Puzzle Reports API

The Reports API from Puzzle — 7 operation(s) for reports.

OpenAPI Specification

puzzle-reports-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Puzzle Api Accounts Reports API
  description: Puzzle Api
  version: '0'
servers:
- url: https://staging.southparkdata.com/rest/v0
tags:
- name: Reports
paths:
  /company/{id}/vendor-spending-report:
    get:
      operationId: vendorSpendingReportApi
      summary: Get Vendor Spending Report
      description: 'Retrieves a report of the company''s vendor spending.


        Required scope: read:company'
      tags:
      - Reports
      parameters:
      - name: id
        in: path
        required: true
        description: The company ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      - name: startDate
        in: query
        required: true
        schema:
          type: string
          pattern: ^\d{4}-\d{2}$
          description: Calendar month, YYYY-MM
      - name: endDate
        in: query
        required: true
        schema:
          type: string
          pattern: ^\d{4}-\d{2}$
          description: Calendar month, YYYY-MM
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  title:
                    type: string
                  columns:
                    type: array
                    items:
                      type: string
                  rows:
                    type: array
                    items:
                      type: array
                      items:
                        type: string
                required:
                - title
                - columns
                - rows
  /company/{id}/financialStatements:
    post:
      operationId: financialStatements
      summary: Get Financial Statements
      description: 'Retrieve the financial statements of a company. Currently supports the Cash Activity Report, Income Statement, and Balance Sheet.


        Required scope: read:company'
      tags:
      - Reports
      parameters:
      - name: id
        in: path
        required: true
        description: The company ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                basis:
                  type: string
                  enum:
                  - cash
                  - accrual
                key:
                  type: string
                  enum:
                  - income_statement
                  - cash_activity_report
                  - trial_balance
                  - balance_sheet
                intervals:
                  type: array
                  items:
                    type: object
                    properties:
                      key:
                        type: string
                      periods:
                        type: array
                        items:
                          type: string
                    required:
                    - key
                    - periods
              required:
              - key
              - intervals
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  lines:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                        parentId:
                          type: string
                          nullable: true
                        childIds:
                          type: array
                          items:
                            type: string
                        depth:
                          type: integer
                          nullable: true
                        name:
                          type: string
                        type:
                          type: string
                          enum:
                          - account
                          - rollup
                          - parent_account_group
                          - counterparty
                          - accrualRevenueSource
                          - department
                          - event
                          - revenueSource
                        amountType:
                          type: string
                          enum:
                          - credit
                          - debit
                          nullable: true
                        accountNumber:
                          type: string
                          nullable: true
                        accountId:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                          nullable: true
                        intervals:
                          type: array
                          items:
                            type: object
                            properties:
                              amount:
                                type: string
                                minLength: 1
                                description: Arbitrary-precision decimal, serialized as a string
                            required:
                            - amount
                      required:
                      - id
                      - parentId
                      - childIds
                      - depth
                      - name
                      - type
                      - amountType
                      - accountNumber
                      - accountId
                      - intervals
                  properties:
                    type: object
                    properties:
                      basis:
                        type: string
                        enum:
                        - cash
                        - accrual
                      currency:
                        type: string
                        minLength: 3
                        maxLength: 3
                        description: ISO 4217 currency code
                      key:
                        type: string
                        enum:
                        - income_statement
                        - cash_activity_report
                        - trial_balance
                        - balance_sheet
                      name:
                        type: string
                      intervals:
                        type: array
                        items:
                          type: object
                          properties:
                            key:
                              type: string
                            periods:
                              type: array
                              items:
                                type: string
                          required:
                          - key
                          - periods
                    required:
                    - basis
                    - currency
                    - key
                    - name
                    - intervals
                required:
                - lines
                - properties
  /company/{id}/statements/profitLoss:
    get:
      operationId: incomeStatementApi
      summary: Get Income Statement
      description: 'Retrieves the income statement for a company with flexible filtering options.


        This endpoint returns income statement data broken down by the specified time interval (month, quarter, or year). You can filter results by departments and locations.


        Required scope: read:company'
      tags:
      - Reports
      parameters:
      - name: id
        in: path
        required: true
        description: The company ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      - name: basis
        in: query
        required: false
        schema:
          type: string
          enum:
          - cash
          - accrual
          description: The value is normalized before matching, so any casing that maps onto a listed value is accepted.
      - name: viewBy
        in: query
        required: false
        schema:
          type: string
          enum:
          - month
          - quarter
          - year
          - totals
          - departments
          description: The value is normalized before matching, so any casing that maps onto a listed value is accepted.
      - name: startPeriod
        in: query
        required: false
        schema:
          type: string
          minLength: 1
      - name: endPeriod
        in: query
        required: false
        schema:
          type: string
          minLength: 1
      - name: dateMacro
        in: query
        required: false
        schema:
          type: string
          enum:
          - CurrentMonth
          - LastFullMonth
          - LastThreeMonths
          - LastThreeFullMonths
          - CurrentYear
          - LastYear
          - QuarterToDate
          - YearToDate
      - name: departments
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: array
            items:
              type: string
      - name: locations
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: array
            items:
              type: string
      - name: expandCounterparties
        in: query
        required: false
        schema:
          type: string
          description: Boolean flag; "true" enables, any other value disables
      - name: expandRevenueSources
        in: query
        required: false
        schema:
          type: string
          description: Boolean flag; "true" enables, any other value disables
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  columns:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                        label:
                          type: string
                        dateRange:
                          type: object
                          properties:
                            start:
                              type: string
                              minLength: 1
                              description: Calendar date, YYYY-MM-DD
                            end:
                              type: string
                              minLength: 1
                              description: Calendar date, YYYY-MM-DD
                          required:
                          - start
                          - end
                          nullable: true
                      required:
                      - key
                      - label
                  lines:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                        title:
                          type: string
                        values:
                          type: array
                          items:
                            type: object
                            properties:
                              balance:
                                type: string
                                minLength: 1
                                description: Arbitrary-precision decimal, serialized as a string
                              columnKey:
                                type: string
                            required:
                            - balance
                            - columnKey
                        accountId:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                          nullable: true
                        accountNumber:
                          type: string
                          nullable: true
                        parentId:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                          nullable: true
                        childIds:
                          type: array
                          items:
                            type: string
                            minLength: 1
                            description: Partner-facing external identifier
                        lineType:
                          type: string
                          enum:
                          - account
                          - rollup
                          - parent_account_group
                          - counterparty
                          - accrualRevenueSource
                          - department
                          - event
                          - revenueSource
                        metadata:
                          type: object
                          properties:
                            counterpartyName:
                              type: string
                              nullable: true
                            counterpartyType:
                              type: string
                              enum:
                              - customer
                              - vendor
                              - employee
                              - contractor
                              nullable: true
                            revenueSourceType:
                              type: string
                              enum:
                              - transaction
                              - invoice
                              - schedule
                              - mje
                              - other
                              - subledger
                              nullable: true
                          required:
                          - counterpartyName
                          - counterpartyType
                          - revenueSourceType
                          nullable: true
                      required:
                      - id
                      - title
                      - values
                      - childIds
                      - lineType
                required:
                - columns
                - lines
  /company/{id}/statements/profitLoss/interop:
    get:
      operationId: incomeStatementInteropFormatApi
      summary: Get Income Statement (Interop Format)
      description: 'Retrieves the income statement in QuickBooks-compatible format with hierarchical row structure.


        This endpoint returns income statement data in the same format as QuickBooks Online API, with nested sections and summary rows. Supports filtering by accounting method, and department.


        Required scope: read:company'
      tags:
      - Reports
      parameters:
      - name: id
        in: path
        required: true
        description: The company ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      - name: startPeriod
        in: query
        required: true
        schema:
          type: string
          minLength: 1
      - name: endPeriod
        in: query
        required: true
        schema:
          type: string
          minLength: 1
      - name: basis
        in: query
        required: false
        schema:
          type: string
          enum:
          - cash
          - accrual
      - name: departments
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: array
            items:
              type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  Header:
                    type: object
                    properties:
                      Time:
                        type: string
                      ReportName:
                        type: string
                      StartPeriod:
                        type: string
                      EndPeriod:
                        type: string
                      Currency:
                        type: string
                      ReportBasis:
                        type: string
                    required:
                    - Time
                    - ReportName
                    - StartPeriod
                    - EndPeriod
                    - Currency
                    - ReportBasis
                  Columns:
                    type: array
                    items:
                      type: object
                      properties:
                        ColTitle:
                          type: string
                        ColType:
                          type: string
                      required:
                      - ColTitle
                      - ColType
                  Rows:
                    type: object
                    properties:
                      Row:
                        type: array
                        items:
                          $ref: '#/components/schemas/InteropReportRow'
                    required:
                    - Row
                required:
                - Header
                - Columns
                - Rows
  /company/{id}/statements/balanceSheet:
    get:
      operationId: balanceSheetStatementApi
      summary: Get Balance Sheet Statement
      description: 'Retrieves the balance sheet statement for a company with flexible filtering options.


        This endpoint returns balance sheet statement data broken down by the specified time interval (month, quarter, or year).


        Required scope: read:company'
      tags:
      - Reports
      parameters:
      - name: id
        in: path
        required: true
        description: The company ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      - name: basis
        in: query
        required: false
        schema:
          type: string
          enum:
          - cash
          - accrual
          description: The value is normalized before matching, so any casing that maps onto a listed value is accepted.
      - name: viewBy
        in: query
        required: false
        schema:
          type: string
          enum:
          - month
          - quarter
          - year
          - totals
          - departments
          description: The value is normalized before matching, so any casing that maps onto a listed value is accepted.
      - name: startPeriod
        in: query
        required: false
        schema:
          type: string
          minLength: 1
      - name: endPeriod
        in: query
        required: false
        schema:
          type: string
          minLength: 1
      - name: dateMacro
        in: query
        required: false
        schema:
          type: string
          enum:
          - CurrentMonth
          - LastFullMonth
          - LastThreeMonths
          - LastThreeFullMonths
          - CurrentYear
          - LastYear
          - QuarterToDate
          - YearToDate
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  columns:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                        label:
                          type: string
                        dateRange:
                          type: object
                          properties:
                            start:
                              type: string
                              minLength: 1
                              description: Calendar date, YYYY-MM-DD
                            end:
                              type: string
                              minLength: 1
                              description: Calendar date, YYYY-MM-DD
                          required:
                          - start
                          - end
                          nullable: true
                      required:
                      - key
                      - label
                  lines:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                        title:
                          type: string
                        values:
                          type: array
                          items:
                            type: object
                            properties:
                              balance:
                                type: string
                                minLength: 1
                                description: Arbitrary-precision decimal, serialized as a string
                              columnKey:
                                type: string
                            required:
                            - balance
                            - columnKey
                        accountId:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                          nullable: true
                        accountNumber:
                          type: string
                          nullable: true
                        parentId:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                          nullable: true
                        childIds:
                          type: array
                          items:
                            type: string
                            minLength: 1
                            description: Partner-facing external identifier
                        lineType:
                          type: string
                          enum:
                          - account
                          - rollup
                          - parent_account_group
                          - counterparty
                          - accrualRevenueSource
                          - department
                          - event
                          - revenueSource
                        metadata:
                          type: object
                          properties:
                            counterpartyName:
                              type: string
                              nullable: true
                            counterpartyType:
                              type: string
                              enum:
                              - customer
                              - vendor
                              - employee
                              - contractor
                              nullable: true
                            revenueSourceType:
                              type: string
                              enum:
                              - transaction
                              - invoice
                              - schedule
                              - mje
                              - other
                              - subledger
                              nullable: true
                          required:
                          - counterpartyName
                          - counterpartyType
                          - revenueSourceType
                          nullable: true
                      required:
                      - id
                      - title
                      - values
                      - childIds
                      - lineType
                required:
                - columns
                - lines
  /company/{id}/statements/balanceSheet/interop:
    get:
      operationId: balanceSheetInteropFormatApi
      summary: Get Balance Sheet (Interop Format)
      description: 'Retrieves the balance sheet in QuickBooks-compatible format with hierarchical row structure.


        This endpoint returns balance sheet data in the same format as QuickBooks Online API, with nested sections and summary rows. Supports filtering by accounting method, and department.


        Required scope: read:company'
      tags:
      - Reports
      parameters:
      - name: id
        in: path
        required: true
        description: The company ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      - name: startPeriod
        in: query
        required: true
        schema:
          type: string
          minLength: 1
      - name: endPeriod
        in: query
        required: true
        schema:
          type: string
          minLength: 1
      - name: basis
        in: query
        required: false
        schema:
          type: string
          enum:
          - cash
          - accrual
      - name: departments
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: array
            items:
              type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  Header:
                    type: object
                    properties:
                      Time:
                        type: string
                      ReportName:
                        type: string
                      StartPeriod:
                        type: string
                      EndPeriod:
                        type: string
                      Currency:
                        type: string
                      ReportBasis:
                        type: string
                    required:
                    - Time
                    - ReportName
                    - StartPeriod
                    - EndPeriod
                    - Currency
                    - ReportBasis
                  Columns:
                    type: array
                    items:
                      type: object
                      properties:
                        ColTitle:
                          type: string
                        ColType:
                          type: string
                      required:
                      - ColTitle
                      - ColType
                  Rows:
                    type: object
                    properties:
                      Row:
                        type: array
                        items:
                          $ref: '#/components/schemas/InteropReportRow'
                    required:
                    - Row
                required:
                - Header
                - Columns
                - Rows
  /company/{id}/statements/cashActivity:
    get:
      operationId: cashActivityStatementApi
      summary: Get Cash Activity Statement
      description: "Retrieves the cash activity statement for a company with flexible filtering options.\n\nThis endpoint returns cash activity statement data broken down by the specified time interval (month, quarter, or year). \n\nRequired scope: read:company"
      tags:
      - Reports
      parameters:
      - name: id
        in: path
        required: true
        description: The company ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      - name: viewBy
        in: query
        required: false
        schema:
          type: string
          enum:
          - month
          - quarter
          - year
          - totals
          - departments
          description: The value is normalized before matching, so any casing that maps onto a listed value is accepted.
      - name: startPeriod
        in: query
        required: false
        schema:
          type: string
          minLength: 1
      - name: endPeriod
        in: query
        required: false
        schema:
          type: string
          minLength: 1
      - name: dateMacro
        in: query
        required: false
        schema:
          type: string
          enum:
          - CurrentMonth
          - LastFullMonth
          - LastThreeMonths
          - LastThreeFullMonths
          - CurrentYear
          - LastYear
          - QuarterToDate
          - YearToDate
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  columns:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                        label:
                          type: string
                        dateRange:
                          type: object
                          properties:
                            start:
                              type: string
                              minLength: 1
                              description: Calendar date, YYYY-MM-DD
                            end:
                              type: string
                              minLength: 1
                              description: Calendar date, YYYY-MM-DD
                          required:
                          - start
                          - end
                          nullable: true
                      required:
                      - key
                      - label
                  lines:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                        title:
                          type: string
                        values:
                          type: array
                          items:
                            type: object
                            properties:
                              balance:
                                type: string
                                minLength: 1
                                description: Arbitrary-precision decimal, serialized as a string
                              columnKey:
                                type: string
                            required:
                            - balance
                            - columnKey
                        accountId:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                          nullable: true
                        accountNumber:
                          type: string
                          nullable: true
                        parentId:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                          nullable: true
                        childIds:
                          type: array
                          items:
          

# --- truncated at 32 KB (35 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/puzzle/refs/heads/main/openapi/puzzle-reports-api-openapi.yml