Puzzle Bills API

The Bills API from Puzzle — 3 operation(s) for bills.

OpenAPI Specification

puzzle-bills-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Puzzle Api Accounts Bills API
  description: Puzzle Api
  version: '0'
servers:
- url: https://staging.southparkdata.com/rest/v0
tags:
- name: Bills
paths:
  /company/{id}/bills:
    get:
      operationId: billsApi
      summary: Get Bills
      description: 'Retrieves bills.


        Required scope: read:company'
      tags:
      - Bills
      parameters:
      - name: id
        in: path
        required: true
        description: The company ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      - name: isLinked
        in: query
        required: false
        schema:
          type: string
          description: Boolean flag; "true" enables, any other value disables
      - name: isPaid
        in: query
        required: false
        schema:
          type: string
          description: Boolean flag; "true" enables, any other value disables
      - name: isSubmitted
        in: query
        required: false
        schema:
          type: string
          description: Boolean flag; "true" enables, any other value disables
      - name: isVoided
        in: query
        required: false
        schema:
          type: string
          description: Boolean flag; "true" enables, any other value disables
      - name: minAmount
        in: query
        required: false
        schema:
          type: string
          minLength: 1
          description: Arbitrary-precision decimal, serialized as a string
      - name: maxAmount
        in: query
        required: false
        schema:
          type: string
          minLength: 1
          description: Arbitrary-precision decimal, serialized as a string
      - name: from
        in: query
        required: false
        schema:
          type: string
          minLength: 1
          description: Calendar date, YYYY-MM-DD
      - name: to
        in: query
        required: false
        schema:
          type: string
          minLength: 1
          description: Calendar date, YYYY-MM-DD
      - name: dueDateFrom
        in: query
        required: false
        schema:
          type: string
          minLength: 1
          description: Calendar date, YYYY-MM-DD
      - name: dueDateTo
        in: query
        required: false
        schema:
          type: string
          minLength: 1
          description: Calendar date, YYYY-MM-DD
      - name: statuses
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            enum:
            - Draft
            - Voided
            - Paid
            - Unpaid
            - Current
            - Overdue
          - type: array
            items:
              type: string
              enum:
              - Draft
              - Voided
              - Paid
              - Unpaid
              - Current
              - Overdue
      - name: vendorIds
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            minLength: 1
            description: Partner-facing external identifier
          - type: array
            items:
              type: string
              minLength: 1
              description: Partner-facing external identifier
      - name: sortBy
        in: query
        required: false
        schema:
          type: string
          enum:
          - AMOUNT_DESC
          - AMOUNT_ASC
          - DESCRIPTOR_DESC
          - DESCRIPTOR_ASC
          - DUE_DATE_DESC
          - DUE_DATE_ASC
          - ISSUE_DATE_DESC
          - ISSUE_DATE_ASC
          - VENDOR_DESC
          - VENDOR_ASC
      - name: count
        in: query
        required: false
        schema:
          type: integer
      - name: after
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                        userId:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                        vendorId:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                        issueDate:
                          type: string
                          minLength: 1
                          description: Calendar date, YYYY-MM-DD
                        dueDate:
                          type: string
                          minLength: 1
                          description: Calendar date, YYYY-MM-DD
                          nullable: true
                        externalId:
                          type: string
                          nullable: true
                        description:
                          type: string
                          nullable: true
                        submittedAt:
                          type: string
                          minLength: 1
                          description: ISO 8601 timestamp
                          nullable: true
                        voidedAt:
                          type: string
                          minLength: 1
                          description: ISO 8601 timestamp
                          nullable: true
                        paidAt:
                          type: string
                          minLength: 1
                          description: ISO 8601 timestamp
                          nullable: true
                        status:
                          type: string
                          enum:
                          - Deleted
                          - Draft
                          - Posted
                          - Voided
                          - Paid
                        currentness:
                          type: string
                          enum:
                          - Current
                          - Overdue
                          nullable: true
                        amount:
                          type: object
                          properties:
                            amount:
                              type: string
                              minLength: 1
                              description: Arbitrary-precision decimal, serialized as a string
                            currency:
                              type: string
                              minLength: 3
                              maxLength: 3
                              description: ISO 4217 currency code
                          required:
                          - amount
                          - currency
                          description: A monetary amount with its currency
                          nullable: true
                        provider:
                          type: string
                          nullable: true
                        documents:
                          type: array
                          items:
                            type: object
                            properties:
                              file:
                                type: object
                                properties:
                                  id:
                                    type: string
                                  filename:
                                    type: string
                                    nullable: true
                                  contentType:
                                    type: string
                                  size:
                                    type: integer
                                  isDeleted:
                                    type: boolean
                                  downloadInfo:
                                    type: object
                                    properties:
                                      signedUrl:
                                        type: string
                                      urlExpiresAt:
                                        type: string
                                        minLength: 1
                                        description: ISO 8601 timestamp
                                    required:
                                    - signedUrl
                                    - urlExpiresAt
                                  parseError:
                                    type: string
                                    nullable: true
                                  parseType:
                                    type: string
                                    enum:
                                    - bill
                                    - invoice
                                    - receipt
                                    - bankStatement
                                    - unknown
                                    nullable: true
                                required:
                                - id
                                - filename
                                - contentType
                                - size
                                - isDeleted
                                - downloadInfo
                                - parseError
                                - parseType
                              uploadActorType:
                                type: string
                                enum:
                                - SYSTEM_ACTOR
                                - TRAIN_ACTOR
                                - USER_ACTOR
                                - USER_ACTOR_VIA_AI
                                - ADMIN_ACTOR
                                - AI_ACTOR
                            required:
                            - file
                            - uploadActorType
                        lines:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                                description: Partner-facing external identifier
                              classifications:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    class:
                                      type: string
                                    description:
                                      type: string
                                      nullable: true
                                    segments:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            type: string
                                            minLength: 1
                                            description: Partner-facing external identifier
                                            nullable: true
                                          segment:
                                            type: string
                                          description:
                                            type: string
                                            nullable: true
                                        required:
                                        - id
                                        - segment
                                        - description
                                  required:
                                  - class
                                  - description
                                  - segments
                              amount:
                                type: object
                                properties:
                                  amount:
                                    type: string
                                    minLength: 1
                                    description: Arbitrary-precision decimal, serialized as a string
                                  currency:
                                    type: string
                                    minLength: 3
                                    maxLength: 3
                                    description: ISO 4217 currency code
                                required:
                                - amount
                                - currency
                                description: A monetary amount with its currency
                              coaKey:
                                type: string
                                minLength: 1
                                description: Chart-of-accounts key
                                nullable: true
                              quantity:
                                type: string
                                minLength: 1
                                description: Arbitrary-precision decimal, serialized as a string
                                nullable: true
                              unitPrice:
                                type: string
                                minLength: 1
                                description: Arbitrary-precision decimal, serialized as a string
                                nullable: true
                              description:
                                type: string
                                nullable: true
                            required:
                            - id
                            - classifications
                            - amount
                            - coaKey
                            - quantity
                            - unitPrice
                            - description
                      required:
                      - id
                      - userId
                      - issueDate
                      - dueDate
                      - externalId
                      - description
                      - submittedAt
                      - voidedAt
                      - paidAt
                      - status
                      - currentness
                      - amount
                      - provider
                      - documents
                      - lines
                  pageInfo:
                    type: object
                    properties:
                      endCursor:
                        type: string
                        nullable: true
                      hasNextPage:
                        type: boolean
                      total:
                        type: integer
                        nullable: true
                    required:
                    - endCursor
                    - hasNextPage
                    - total
                  total:
                    type: object
                    properties:
                      amount:
                        type: string
                        minLength: 1
                        description: Arbitrary-precision decimal, serialized as a string
                      currency:
                        type: string
                        minLength: 3
                        maxLength: 3
                        description: ISO 4217 currency code
                    required:
                    - amount
                    - currency
                    description: A monetary amount with its currency
                required:
                - items
                - pageInfo
                - total
    post:
      operationId: createBillApi
      summary: Create Bill
      description: 'Creates a bill for the company.


        Required scope: write:bill'
      tags:
      - Bills
      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:
                nativeId:
                  type: string
                vendorId:
                  type: string
                  minLength: 1
                  description: Partner-facing external identifier
                description:
                  type: string
                issueDate:
                  type: string
                  minLength: 1
                  description: Calendar date, YYYY-MM-DD
                dueDate:
                  type: string
                  minLength: 1
                  description: Calendar date, YYYY-MM-DD
                shouldPost:
                  type: boolean
                lines:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        minLength: 1
                        description: Partner-facing external identifier
                      amount:
                        type: string
                        minLength: 1
                        description: Arbitrary-precision decimal, serialized as a string
                      currency:
                        type: string
                        minLength: 3
                        maxLength: 3
                        description: ISO 4217 currency code
                      coaKey:
                        type: string
                        minLength: 1
                        description: Chart-of-accounts key
                      quantity:
                        type: string
                        minLength: 1
                        description: Arbitrary-precision decimal, serialized as a string
                      unitPrice:
                        type: string
                        minLength: 1
                        description: Arbitrary-precision decimal, serialized as a string
                      description:
                        type: string
                      classifications:
                        type: array
                        items:
                          type: object
                          properties:
                            class:
                              type: string
                              minLength: 1
                            segment:
                              type: string
                              minLength: 1
                          required:
                          - class
                          - segment
                      prepaid:
                        type: object
                        properties:
                          expenseRecognitionMethod:
                            type: string
                            enum:
                            - automatic
                            - manual
                          startDate:
                            type: string
                            minLength: 1
                            description: Calendar date, YYYY-MM-DD
                          endDate:
                            type: string
                            minLength: 1
                            description: Calendar date, YYYY-MM-DD
                        required:
                        - expenseRecognitionMethod
                      fixedAsset:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                            - ComputersAndHardware
                            - Furniture
                            - Other
                            - Software
                          inServiceAt:
                            type: string
                            minLength: 1
                            description: Calendar date, YYYY-MM-DD
                          capitalizedAt:
                            type: string
                            minLength: 1
                            description: Calendar date, YYYY-MM-DD
                          depreciationMethod:
                            type: string
                            enum:
                            - StraightLine
                          description:
                            type: string
                          salvageValue:
                            type: string
                            minLength: 1
                            description: Arbitrary-precision decimal, serialized as a string
                          usefulLifeMonths:
                            type: integer
                        required:
                        - type
                        - inServiceAt
                    required:
                    - amount
                    - currency
                    - coaKey
                document:
                  type: object
                  properties:
                    documentType:
                      type: string
                      enum:
                      - Receipt
                      - Bill
                      - Invoice
                    fileName:
                      type: string
                      minLength: 1
                    contentType:
                      type: string
                      minLength: 1
                    base64File:
                      type: string
                      minLength: 1
                    nativeDocumentId:
                      type: string
                      minLength: 1
                  required:
                  - documentType
                  - fileName
                  - contentType
                  - base64File
                  - nativeDocumentId
              required:
              - issueDate
              - lines
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    description: Partner-facing external identifier
                  userId:
                    type: string
                    minLength: 1
                    description: Partner-facing external identifier
                  vendorId:
                    type: string
                    minLength: 1
                    description: Partner-facing external identifier
                  issueDate:
                    type: string
                    minLength: 1
                    description: Calendar date, YYYY-MM-DD
                  dueDate:
                    type: string
                    minLength: 1
                    description: Calendar date, YYYY-MM-DD
                    nullable: true
                  externalId:
                    type: string
                    nullable: true
                  description:
                    type: string
                    nullable: true
                  submittedAt:
                    type: string
                    minLength: 1
                    description: ISO 8601 timestamp
                    nullable: true
                  voidedAt:
                    type: string
                    minLength: 1
                    description: ISO 8601 timestamp
                    nullable: true
                  paidAt:
                    type: string
                    minLength: 1
                    description: ISO 8601 timestamp
                    nullable: true
                  status:
                    type: string
                    enum:
                    - Deleted
                    - Draft
                    - Posted
                    - Voided
                    - Paid
                  currentness:
                    type: string
                    enum:
                    - Current
                    - Overdue
                    nullable: true
                  amount:
                    type: object
                    properties:
                      amount:
                        type: string
                        minLength: 1
                        description: Arbitrary-precision decimal, serialized as a string
                      currency:
                        type: string
                        minLength: 3
                        maxLength: 3
                        description: ISO 4217 currency code
                    required:
                    - amount
                    - currency
                    description: A monetary amount with its currency
                    nullable: true
                  provider:
                    type: string
                    nullable: true
                  documents:
                    type: array
                    items:
                      type: object
                      properties:
                        file:
                          type: object
                          properties:
                            id:
                              type: string
                            filename:
                              type: string
                              nullable: true
                            contentType:
                              type: string
                            size:
                              type: integer
                            isDeleted:
                              type: boolean
                            downloadInfo:
                              type: object
                              properties:
                                signedUrl:
                                  type: string
                                urlExpiresAt:
                                  type: string
                                  minLength: 1
                                  description: ISO 8601 timestamp
                              required:
                              - signedUrl
                              - urlExpiresAt
                            parseError:
                              type: string
                              nullable: true
                            parseType:
                              type: string
                              enum:
                              - bill
                              - invoice
                              - receipt
                              - bankStatement
                              - unknown
                              nullable: true
                          required:
                          - id
                          - filename
                          - contentType
                          - size
                          - isDeleted
                          - downloadInfo
                          - parseError
                          - parseType
                        uploadActorType:
                          type: string
                          enum:
                          - SYSTEM_ACTOR
                          - TRAIN_ACTOR
                          - USER_ACTOR
                          - USER_ACTOR_VIA_AI
                          - ADMIN_ACTOR
                          - AI_ACTOR
                      required:
                      - file
                      - uploadActorType
                  lines:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                        classifications:
                          type: array
                          items:
                            type: object
                            properties:
                              class:
                                type: string
                              description:
                                type: string
                                nullable: true
                              segments:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      minLength: 1
                                      description: Partner-facing external identifier
                                      nullable: true
                                    segment:
                                      type: string
                                    description:
                                      type: string
                                      nullable: true
                                  required:
                                  - id
                                  - segment
                                  - description
                            required:
                            - class
                            - description
                            - segments
                        amount:
                          type: object
                          properties:
                            amount:
                              type: string
                              minLength: 1
                              description: Arbitrary-precision decimal, serialized as a string
                            currency:
                              type: string
                              minLength: 3
                              maxLength: 3
                              description: ISO 4217 currency code
                          required:
                          - amount
                          - currency
                          description: A monetary amount with its currency
                        coaKey:
                          type: string
                          minLength: 1
                          description: Chart-of-accounts key
                          nullable: true
                        quantity:
                          type: string
                          minLength: 1
                          description: Arbitrary-precision decimal, serialized as a string
                          nullable: true
                        unitPrice:
                          type: string
                          minLength: 1
                          description: Arbitrary-precision decimal, serialized as a string
                          nullable: true
                        description:
                          type: string
                          nullable: true
                      required:
                      - id
                      - classifications
                      - amount
                      - coaKey
                      - quantity
                      - unitPrice
                      - description
                  createdAt:
                    type: string
                    minLength: 1
                    description: ISO 8601 timestamp
                  updatedAt:
                    type: string
                    minLength: 1
                    description: ISO 8601 timestamp
                  removedAt:
                    type: string
                    minLength: 1
                    description: ISO 8601 timestamp
                    nullable: true
                required:
                - id
                - userId
                - issueDate
                - dueDate
                - externalId
                - description
                - submittedAt
                - voidedAt
                - paidAt
                - status
                - currentness
                - amount
                - provider
                - documents
                - lines
                - createdAt
                - updatedAt
                - removedAt
  /company/{id}/bills/{billId}:
    get:
      operationId: billApi
      summary: Ge

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