Invoice Supporting Documents API
Invoice APIs
Invoice Supporting Documents API
Retrieve the list of supporting documents attached to a specific invoice
Invoice Supporting Documents API
Documentation Index
Fetch the complete documentation index at: https://docs.pazy.io/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
All requests require an API key in the request headers. Headers:Request
Content-Type:application/json
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
invoiceId | string | Yes | Unique identifier of the invoice whose supporting documents are to be fetched |
Code Examples
Success Response
HTTP Status:200 OK
Response Fields:
| Field | Type | Description |
|---|---|---|
ok | boolean | Indicates whether the request was successful |
data | object | Contains the supporting documents response data |
data.documents | array | List of supporting documents attached to the invoice |
data.documents[].id | string | Unique identifier for the document |
data.documents[].name | string | Original file name |
data.documents[].size | number | File size in bytes |
data.documents[].createdOn | string | Date the document was attached (ISO 8601 format) |
data.documents[].extension | string | Uppercased file extension (e.g., PDF, PNG, JPG) |
data.documents[].downloadUrl | string | Pre-signed URL to download the document (consume with the Download File API) |
data.documents[].user | object | Information about the user who uploaded the document |
data.documents[].user.id | string | Unique identifier for the user |
data.documents[].user.name | string | Name of the user |
data.context | object | Container for metadata |
data.context.count | number | Total number of documents returned |
Response Example
Empty Results
When the invoice has no supporting documents attached, an empty array is returned:Error Responses
Missing Invoice ID
HTTP Status:400 Bad Request
Invoice Not Found
HTTP Status:404 Not Found
Access Denied
HTTP Status:403 Forbidden
Authentication Errors
HTTP Status:401 Unauthorized
Permission Errors
HTTP Status:403 Forbidden
Internal Error
HTTP Status:500 Internal Server Error
Best Practices
- The
downloadUrlpoints at the Download File API — call it with the sameAuthorizationheader to retrieve the file bytes - Use the Invoice Supporting Document Upload API to add more files against the same invoice
- The
extensionfield is uppercased and falls back toUNKif the underlying MIME type is missing