Puzzle Documents API

The Documents API from Puzzle — 1 operation(s) for documents.

OpenAPI Specification

puzzle-documents-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Puzzle Api Accounts Documents API
  description: Puzzle Api
  version: '0'
servers:
- url: https://staging.southparkdata.com/rest/v0
tags:
- name: Documents
paths:
  /company/{id}/documents/{entityId}:
    get:
      operationId: documentApi
      summary: Get Documents for Entity
      description: 'Retrieves all documents for a given entity (bill, invoice, transaction, or manual journal entry). Pass the entity ID (e.g., bil_xxx, inv_xxx, txn_xxx, mje_xxx) to get all associated documents with signed download URLs.


        Supported entity prefixes: bil_ (bills), inv_ (invoices), txn_ (transactions), mje_ (manual journal entries)


        Required scope: read:company'
      tags:
      - Documents
      parameters:
      - name: id
        in: path
        required: true
        description: The company ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      - name: entityId
        in: path
        required: true
        description: The entity ID (e.g., bil_xxx for bills, txn_xxx for transactions, inv_xxx for invoices, mje_xxx for manual journal entries)
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  documents:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        documentType:
                          type: string
                          enum:
                          - Receipt
                          - Bill
                          - Invoice
                        contentType:
                          type: string
                        downloadInfo:
                          type: object
                          properties:
                            signedUrl:
                              type: string
                            urlExpiresAt:
                              type: string
                              minLength: 1
                              description: ISO 8601 timestamp
                          required:
                          - signedUrl
                          - urlExpiresAt
                      required:
                      - id
                      - documentType
                      - contentType
                      - downloadInfo
                required:
                - documents