Retrieve Purchase Invoice List: /purchase-invoices
Purpose
This API retrieves a paginated list of all purchase invoices recorded in the system. Each invoice includes metadata such as status, issue and due dates, currency details, associated supplier account, and financial figures like subtotal, tax, and total. The endpoint also returns invoice line items, purchase order references, and key performance indicators (KPIs) that support financial tracking and operational analysis.
Use Case
A procurement officer or finance team member wants to view all purchase invoices issued in the system. This API is used to:
- Display invoice history in a UI.
- Fetch data for financial reporting.
- Filter invoices by account or status using optional parameters.
Path Parameters
This endpoint does not require any path parameters.
Query Parameters
| Category | Parameter / Field | Type | Operators | Description | Example |
|---|---|---|---|---|---|
| Sorting | order_by | string | N/A | Field name to sort results. | order_by=created_on |
| direction | string | N/A |
Sorting direction. Accepts asc or desc. | direction=desc | |
| Pagination | limit | integer | N/A |
Number of records per page. | limit=25 |
| offset | integer | N/A |
Records to skip from the start. | offset=0 | |
| Filtering | status | enum | eq, ne | Filter by purchase invoice status. Status type: ACTIVE, INACTIVE, DELETED, DRAFT |
purchase-invoices/status eq 'APPROVED' |
| created_by | string | eq, ne | Filter by creator of the invoice. | purchase-invoices/created_by eq 'finance_officer' | |
| created_on | date | eq, ne, gt, ge, lt, le | Filter by invoice creation date. Date format: 'yyyy-mm-dd' |
purchase-invoices/created_on ge '2025-01-01' | |
| last_updated_by | string | eq, ne | Filter by user who last updated invoice. | purchase-invoices/last_updated_by eq 'accounts_manager' | |
| last_updated_on | date | eq, ne, gt, ge, lt, le | Filter by last update date. Date format: 'yyyy-mm-dd' |
purchase-invoices/last_updated_on lt '2025-09-01' |
*Here, eq = equal, ne = not equal, gt = greater than, ge = greater or equal, lt = less than, le = less or equal.*
Request Body
No request body is required for this endpoint.
Response
The response returns a structured list of purchase invoice objects, each containing detailed metadata and financial information. Each invoice includes its unique ID, status, currency, issue and due dates, tax inclusivity flag, and total amounts. Line items within the invoice specify item quantities, warehouse allocations, accounting codes, and subtotal calculations. If the invoice is linked to a purchase order, that reference is included. KPIs provide insight into outstanding balances, overdue amounts, payment history, and credit application. The response also includes pagination metadata such as record count, limit, offset, and navigation URLs for previous and next pages, enabling efficient client-side data handling and browsing across large datasets.
Response Body
{
"purchase_invoices": [
{
"status": "PURCHASE_INVOICE_STATUS",
"id": "PURCHASE_INVOICE_ID",
"origin": "PURCHASE_INVOICE_ORIGIN",
"custom_form": {
"uuid": "CUSTOM_FORM_UUID",
"name": "CUSTOM_FORM_NAME"
},
"currency": {
"id": "CURRENCY_ID",
"name": "CURRENCY_NAME",
"link": {
"rel": "LINK_REL",
"href": "CURRENCY_LINK"
}
},
"issue_date": "ISSUE_DATE",
"alternate_issue_date": "ALT_ISSUE_DATE",
"due_date": "DUE_DATE",
"alternate_due_date": "ALT_DUE_DATE",
"subtotal": "INVOICE_SUBTOTAL",
"tax": "INVOICE_TAX",
"total": "INVOICE_TOTAL",
"price_tax_inclusive": "BOOLEAN",
"account_id": "ACCOUNT_ID",
"purchase_order_id": "PURCHASE_ORDER_ID",
"created_by": "CREATED_BY",
"created_on": "CREATED_TIMESTAMP",
"last_updated_by": "LAST_UPDATED_BY",
"last_updated_on": "LAST_UPDATED_TIMESTAMP",
"uuid": "INVOICE_UUID",
"version": "INVOICE_VERSION",
"custom_attributes": [],
"custom_objects": [],
"lines": [
{
"subtotal": "LINE_SUBTOTAL",
"total": "LINE_TOTAL",
"tax": "LINE_TAX",
"accounting_code": "ACCOUNTING_CODE",
"item_uuid": "ITEM_UUID",
"item_purchase_order_quantity": "ITEM_PO_QUANTITY",
"item_uom": "ITEM_UOM",
"item_warehouse": "ITEM_WAREHOUSE",
"uuid": "LINE_UUID",
"version": "LINE_VERSION"
}
],
"kpis": {
"outstanding": "KPI_OUTSTANDING",
"overdue": "KPI_OVERDUE",
"last_payment_date": "LAST_PAYMENT_DATE",
"payment_applied": "PAYMENT_APPLIED",
"credit_applied": "CREDIT_APPLIED",
"credit_issued": "CREDIT_ISSUED",
"last_reactivated_on": "LAST_REACTIVATED",
"last_cancelled_on": "LAST_CANCELLED",
"last_amended_on": "LAST_AMENDED",
"voided_on": "VOIDED_ON",
"deleted_on": "DELETED_ON"
}
}
],
"pagination": {
"records": "TOTAL_RECORDS",
"limit": "PAGE_LIMIT",
"offset": "PAGE_OFFSET",
"previous_page": "PREVIOUS_PAGE_URL",
"next_page": "NEXT_PAGE_URL"
}
}
| Attribute | Type | Description |
|---|---|---|
| status | String | Current status of the purchase invoice |
| id | String | Unique ID of the purchase invoice |
| custom_form | Object | Custom form data associated (empty object here) |
| currency | Object | Currency used in the invoice |
| issue_date | String | Issue date in ISO 8601 format |
| alternate_issue_date | String | Alternate issue date |
| due_date | String | Due date of the invoice |
| alternate_due_date | String | Alternate due date |
| subtotal | String | Subtotal amount |
| tax | String | Tax amount |
| total | String | Total amount |
| price_tax_inclusive | String | Indicates if tax is included in the price |
| account_id | String | ID of the associated account |
| purchase_order_id | String | ID of the related purchase order |
| created_by | String | Name of the creator of the invoice |
| created_on | String | Timestamp when the invoice was created |
| last_updated_by | String | Name of the last user who updated the invoice |
| last_updated_on | String | Timestamp of last update |
| uuid | String | Universally unique identifier |
| version | String | Version number of the invoice |
| custom_attributes | Array | Custom attributes (empty array here) |
| custom_objects | Array | Custom objects (empty array here) |
| lines | Array | Line items in the invoice |
| kpis | Object | KPI-related metrics for the invoice |
Retrieve Purchase Invoice Details by ID: /purchase-invoices/{id}
Purpose
This API retrieves detailed information about a single purchase invoice identified by its unique invoice ID. It enables clients and internal systems to access all relevant metadata, financial values, and item-level breakdowns associated with the invoice. The endpoint supports visibility into the invoice’s lifecycle, including creation details, currency, totals, and payment tracking metrics.
Use Case
This endpoint is used to review or validate the full details of a specific purchase invoice. It is commonly applied in workflows such as displaying invoice details in a UI, exporting invoice data for reporting, or verifying values during reconciliation. For example, after selecting a supplier and adding multiple items with valid pricing and inventory, a purchase invoice is created. This endpoint allows users to retrieve that invoice and confirm its issue and due dates, subtotal, tax, total, and item-level quantities and warehouse
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| purchase_invoice_id | String | Unique ID of the purchase invoice to fetch . |
Query Parameters
No query parameters are required or supported for this endpoint.
Request Body
No request body is required for this endpoint.
Response
The response returns a structured purchase invoice object containing comprehensive metadata and financial information. It includes the invoice ID, status, currency details, issue and due dates, tax inclusivity flag, and total amounts. Line items are listed with their respective subtotals, quantities, accounting codes, and warehouse references. The response also includes metadata such as the creator, timestamps, versioning, and custom form details. KPIs provide insight into payment status, outstanding balances, overdue amounts, and credit application. This structure ensures that internal systems and users can accurately track, audit, and manage individual purchase invoices.
Response Body
{
"purchase_invoice": {
"status": "PURCHASE_INVOICE_STATUS",
"id": "PURCHASE_INVOICE_ID",
"custom_form": "CUSTOM_FORM",
"currency": {
"id": "CURRENCY_ID",
"name": "CURRENCY_NAME",
"link": {
"rel": "LINK_REL",
"href": "CURRENCY_LINK"
}
},
"issue_date": "ISSUE_DATE",
"alternate_issue_date": "ALT_ISSUE_DATE",
"due_date": "DUE_DATE",
"alternate_due_date": "ALT_DUE_DATE",
"subtotal": "INVOICE_SUBTOTAL",
"tax": "INVOICE_TAX",
"total": "INVOICE_TOTAL",
"price_tax_inclusive": "BOOLEAN",
"account_id": "ACCOUNT_ID",
"purchase_order_id": "PURCHASE_ORDER_ID",
"created_by": "CREATED_BY",
"created_on": "CREATED_TIMESTAMP",
"last_updated_by": "LAST_UPDATED_BY",
"last_updated_on": "LAST_UPDATED_TIMESTAMP",
"uuid": "INVOICE_UUID",
"version": "INVOICE_VERSION",
"custom_attributes": "CUSTOM_ATTRIBUTES",
"custom_objects": "CUSTOM_OBJECTS",
"lines": [
{
"subtotal": "LINE_SUBTOTAL",
"total": "LINE_TOTAL",
"tax": "LINE_TAX",
"accounting_code": "ACCOUNTING_CODE",
"item_uuid": "ITEM_UUID",
"item_purchase_order_quantity": "ITEM_PO_QUANTITY",
"item_uom": "ITEM_UOM",
"item_warehouse": "ITEM_WAREHOUSE",
"uuid": "LINE_UUID",
"version": "LINE_VERSION"
}
],
"kpis": {
"outstanding": "KPI_OUTSTANDING",
"overdue": "KPI_OVERDUE",
"last_payment_date": "LAST_PAYMENT_DATE",
"payment_applied": "PAYMENT_APPLIED",
"credit_applied": "CREDIT_APPLIED",
"credit_issued": "CREDIT_ISSUED",
"last_reactivated_on": "LAST_REACTIVATED",
"last_cancelled_on": "LAST_CANCELLED",
"last_amended_on": "LAST_AMENDED",
"voided_on": "VOIDED_ON",
"deleted_on": "DELETED_ON"
}
}
}
| Attribute | Type | Description |
|---|---|---|
| status | String | Status of the purchase invoice |
| id | String | Unique invoice ID |
| custom_form | Object | Custom form data (empty in this case) |
| currency | Object | Currency details with id, name, and link |
| issue_date | String | Invoice issue date (ISO 8601 format) |
| alternate_issue_date | String | Alternate issue date |
| due_date | String | Invoice due date |
| alternate_due_date | String | Alternate due date |
| subtotal | String | Subtotal amount (blank in this example) |
| tax | String | Tax amount (blank in this example) |
| total | String | Total invoice amount |
| price_tax_inclusive | String | Indicates if price includes tax |
| account_id | String | ID of the associated account |
| purchase_order_id | String | ID of the related purchase order (blank here) |
| created_by | String | Name of the user who created the invoice |
| created_on | String | Creation timestamp in ISO format |
| last_updated_by | String | Name of the user who last updated the invoice |
| last_updated_on | String | Last updated timestamp in ISO format |
| uuid | String | Universally unique identifier for the invoice |
| version | String | Version number of the invoice |
| custom_attributes | Array | Custom attributes array (empty in this case) |
| custom_objects | Array | Custom objects array (empty in this case) |
| lines | Array | Line items array with subtotal, total, tax, etc. |
| kpis | Object | Key performance indicators related to the invoice |
Retrieve Purchase Invoice List by Account ID: /accounts/{id}/purchase-invoices
Purpose
This API fetches a paginated list of all purchase invoices linked to a specific account. It enables users to view invoice records filtered by supplier context, supporting account-level financial tracking and reporting.
Use Case
This endpoint is used to review purchase invoices associated with a particular account. It supports internal systems that display account-specific invoice histories and enables reporting tools to group invoices by supplier or customer. For example, after creating a purchase invoice for a supplier account, this endpoint allows retrieval of all invoices tied to that supplier, including their financial details and item breakdowns.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| account_id | String | Unique ID of the account whose purchase invoices are to be fetched. |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| order_by | String | Field name to sort the result set (issue_date, total, status). |
| direction | String | Sorting direction. Accepts asc or desc. |
| limit | Integer | Number of records to retrieve per page. Default is 20. |
| offset | Integer | Number of records to skip from the beginning. Used for pagination. |
| fields | String | Comma-separated list of specific fields to include in the response. |
Request Body
No request body is required for this endpoint.
Response
The response returns an account object containing a list of associated purchase invoices. Each invoice includes metadata such as status, issue and due dates, currency, totals, and tax configuration. Line items detail quantities, subtotals, warehouse allocations, and accounting codes. KPIs provide insight into payment status, outstanding amounts, and credit application. Pagination metadata is included to support navigation across multiple invoice records.
Response Body
{
"account": {
"purchase_invoices": [
{
"status": "PURCHASE_INVOICE_STATUS",
"id": "PURCHASE_INVOICE_ID",
"custom_form": "CUSTOM_FORM",
"currency": {
"id": "CURRENCY_ID",
"name": "CURRENCY_NAME",
"link": {
"rel": "LINK_REL",
"href": "CURRENCY_LINK"
}
},
"issue_date": "ISSUE_DATE",
"alternate_issue_date": "ALT_ISSUE_DATE",
"due_date": "DUE_DATE",
"alternate_due_date": "ALT_DUE_DATE",
"subtotal": "INVOICE_SUBTOTAL",
"tax": "INVOICE_TAX",
"total": "INVOICE_TOTAL",
"price_tax_inclusive": "BOOLEAN",
"account_id": "ACCOUNT_ID",
"purchase_order_id": "PURCHASE_ORDER_ID",
"created_by": "CREATED_BY",
"created_on": "CREATED_TIMESTAMP",
"last_updated_by": "LAST_UPDATED_BY",
"last_updated_on": "LAST_UPDATED_TIMESTAMP",
"uuid": "INVOICE_UUID",
"version": "INVOICE_VERSION",
"custom_attributes": "CUSTOM_ATTRIBUTES",
"custom_objects": "CUSTOM_OBJECTS",
"lines": [
{
"subtotal": "LINE_SUBTOTAL",
"total": "LINE_TOTAL",
"tax": "LINE_TAX",
"accounting_code": "ACCOUNTING_CODE",
"item_uuid": "ITEM_UUID",
"item_purchase_order_quantity": "ITEM_PO_QUANTITY",
"item_uom": "ITEM_UOM",
"item_warehouse": "ITEM_WAREHOUSE",
"uuid": "LINE_UUID",
"version": "LINE_VERSION"
}
],
"kpis": {
"outstanding": "KPI_OUTSTANDING",
"overdue": "KPI_OVERDUE",
"last_payment_date": "LAST_PAYMENT_DATE",
"payment_applied": "PAYMENT_APPLIED",
"credit_applied": "CREDIT_APPLIED",
"credit_issued": "CREDIT_ISSUED",
"last_reactivated_on": "LAST_REACTIVATED",
"last_cancelled_on": "LAST_CANCELLED",
"last_amended_on": "LAST_AMENDED",
"voided_on": "VOIDED_ON",
"deleted_on": "DELETED_ON"
}
}
],
"pagination": {
"records": "TOTAL_RECORDS",
"limit": "PAGE_LIMIT",
"offset": "PAGE_OFFSET",
"previous_page": "PREVIOUS_PAGE_URL",
"next_page": "NEXT_PAGE_URL"
}
}
}
| Attribute | Type | Description |
|---|---|---|
| status | String | Status of the purchase invoice |
| id | String | Unique invoice ID |
| custom_form | Object | Custom form object (empty in this case) |
| currency | Object | Currency details including id, name, and link |
| issue_date | String | Invoice issue date (ISO 8601 format) |
| alternate_issue_date | String | Alternate issue date |
| due_date | String | Invoice due date |
| alternate_due_date | String | Alternate due date |
| subtotal | String | Subtotal amount (blank in this example) |
| tax | String | Tax amount (blank in this example) |
| total | String | Total invoice amount |
| price_tax_inclusive | String | Indicates if price includes tax |
| account_id | String | ID of the associated account |
| purchase_order_id | String | Purchase order ID (blank in this example) |
| created_by | String | Creator of the invoice |
| created_on | String | Timestamp of creation in ISO format |
| last_updated_by | String | Last updater (empty in this example) |
| last_updated_on | String | Timestamp of last update (empty in this example) |
| uuid | String | Unique UUID of the invoice |
| version | String | Version number |
| custom_attributes | Array | Custom attributes array (empty in this case) |
| custom_objects | Array | Custom objects array (empty in this case) |
| lines | Array | Line items array |
| kpis | Object | Key performance indicators for the invoice |
Retrieve Purchase Invoice Line Details: /purchase-invoices/{id}/lines/{uuid}
Purpose
This API retrieves detailed information about a specific line item within a purchase invoice, identified by its unique line UUID. It enables clients and systems to access granular financial and inventory data tied to individual invoice entries.
Use Case
This endpoint is used to fetch line-level details from a purchase invoice for display, validation, or analysis. It supports workflows such as showing item breakdowns in a UI, verifying pricing and tax configurations, and auditing warehouse allocations or accounting codes. For example, after creating a purchase invoice with multiple items, this endpoint allows retrieval of a specific item’s financial values and metadata.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| purchase_order_id | String | Unique ID of the purchase invoice |
| line_uuid | String | Unique UUID of the invoice line item |
Query Parameters
No query parameters are required or supported for this endpoint.
Request Body
This endpoint does not require a request body.
Response
The response returns a purchase invoice object containing a single line item with detailed attributes. These include subtotal, total, tax amount, accounting code, item quantity, warehouse name, and versioning. While invoice-level metadata such as status, ID, and creator fields are present, they may be null or minimal in this context. KPIs are also included, summarizing payment status and credit application, though they may reflect default values. This structure ensures precise access to item-level financial data within a broader invoice contex
Response Body
{
"purchase_invoice": {
"status": "PURCHASE_INVOICE_STATUS",
"id": "PURCHASE_INVOICE_ID",
"custom_form": "CUSTOM_FORM",
"created_by": "CREATED_BY",
"last_updated_by": "LAST_UPDATED_BY",
"custom_attributes": "CUSTOM_ATTRIBUTES",
"custom_objects": "CUSTOM_OBJECTS",
"line": {
"subtotal": "LINE_SUBTOTAL",
"total": "LINE_TOTAL",
"tax": "LINE_TAX",
"accounting_code": "ACCOUNTING_CODE",
"item_uuid": "ITEM_UUID",
"item_purchase_order_quantity": "ITEM_PO_QUANTITY",
"item_uom": "ITEM_UOM",
"item_warehouse": "ITEM_WAREHOUSE",
"uuid": "LINE_UUID",
"version": "LINE_VERSION"
},
"kpis": {
"outstanding": "KPI_OUTSTANDING",
"overdue": "KPI_OVERDUE",
"last_payment_date": "LAST_PAYMENT_DATE",
"payment_applied": "PAYMENT_APPLIED",
"credit_applied": "CREDIT_APPLIED",
"credit_issued": "CREDIT_ISSUED",
"last_reactivated_on": "LAST_REACTIVATED",
"last_cancelled_on": "LAST_CANCELLED",
"last_amended_on": "LAST_AMENDED",
"voided_on": "VOIDED_ON",
"deleted_on": "DELETED_ON"
}
}
}
| Attribute | Type | Description |
|---|---|---|
| status | String | Status of the purchase invoice |
| id | String | Unique ID of the purchase invoice. |
| custom_form | Object | Custom form metadata (empty object in this example) |
| subtotal | String | Subtotal amount (empty in this example) |
| tax | String | Tax amount (empty in this example) |
| created_by | String | Username who created the invoice (empty in this example) |
| last_updated_by | String | Username who last updated the invoice |
| custom_attributes | Array | List of custom attributes (empty in this example) |
| custom_objects | Array | List of custom objects (empty in this example) |
| line | Object|Null | Single line item object (null in this example) |
| kpis | Object | Key performance indicators for the invoice |
Retrieve All Notes for a Purchase Invoice: /purchase-invoices/{purchase_invoice_id}/notes
Purpose
This API retrieves all notes associated with a specific purchase invoice. Notes can include descriptive text, file attachments, metadata (creator, timestamps), and optional custom attributes. It also supports pagination for cases where a large number of notes are attached.
Use Case
Use this API when you need to list all notes for a given purchase invoice, for example, to display invoice-related comments, attached files, or to audit who added notes and when. Ideal for UIs that display invoice details with supporting documentation.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| purchase_invoice_id | string | Unique identifier of the purchase invoice to fetch notes for. |
Query Parameters
No query parameter is required for this endpoint.
Request Body
No request body is required for this endpoint.
Response
On success, the response returns a purchase_invoice object containing two main elements: notes, which is an array of note objects where each note includes its unique identifier (uuid), versioning, rich-text content, attached files (with uuid, name, and version), audit metadata (created_by, created_on, last_updated_by, last_updated_on), and optional custom_attributes; and pagination, which provides metadata for navigating results, including the total record count, applied limit, current offset, and links to previous and next pages. This structure ensures efficient handling of large datasets while maintaining complete audit details for each note.
Response Body
{
"purchase_invoice": {
"notes": [
{
"uuid": "NOTE_UUID",
"version": "VERSION",
"content": "NOTE_CONTENT",
"files": [
{
"uuid": "FILE_UUID",
"name": "FILE_NAME",
"version": "FILE_VERSION"
}
],
"created_by": "CREATOR_NAME",
"created_on": "CREATED_TIMESTAMP",
"last_updated_by": "UPDATED_BY",
"last_updated_on": "UPDATED_TIMESTAMP",
"custom_attributes": []
}
],
"pagination": {
"records": "TOTAL_RECORDS",
"limit": "PAGE_LIMIT",
"offset": "PAGE_OFFSET",
"previous_page": "PREVIOUS_PAGE_LINK",
"next_page": "NEXT_PAGE_LINK"
}
}
}
| Attribute | Type | Description |
|---|---|---|
| purchase_invoice | object | Root object containing invoice-related notes. |
| notes | array | List of notes attached to the invoice. |
| uuid | string (UUID) | Unique identifier of the note. |
| version | string | Version number of the note, used for concurrency control. |
| content | string (HTML) | Content of the note, supports rich-text formatting. |
| files | array | List of files attached to the note. |
| uuid | string (UUID) | Unique identifier of the file. |
| name | string | Name of the attached file. |
| version | string | Version of the file. |
| created_by | string | Name of the user who created the note. |
| created_on | string (timestamp) | ISO 8601 date-time when the note was created. |
| last_updated_by | string | User who last updated the note. |
| last_updated_on | string (timestamp) | ISO 8601 date-time of the last update. |
| custom_attributes | array | Optional key-value attributes defined by the client. |
| pagination | object | Pagination metadata for navigating note records. |
| records | integer | Total number of records returned. |
| limit | integer | Maximum number of records per page. |
| offset | integer | Offset for pagination. |
| previous_page | string | URL to the previous page of results (if available). |
| next_page | string | URL to the next page of results (if available). |
Retrieve a Specific Note for a Purchase Invoice: /purchase-invoices/{purchase_invoice_id}/notes/{NOTE_UUID}
Purpose
Retrieves details of a single note attached to a purchase invoice by its unique identifier.
Use Case
Use this API to fetch full information about a specific note for viewing, editing, or auditing.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| purchase_invoice_id | string | Unique identifier of the purchase invoice. |
| NOTE_UUID | string | Unique identifier of the note. |
Query Parameters
No query parameter is required for this endpoint.
Request Body
This endpoint does not require a request body.
Response
Returns a single note object inside the purchase_invoice. The note includes its unique uuid, version number, content (with HTML support), attached files (if any), and full audit metadata (created_by, created_on, last_updated_by, last_updated_on). Custom attributes can also be present.
Response Body
{
"purchase_invoice": {
"note": {
"uuid": "NOTE_UUID",
"version": "VERSION",
"content": "NOTE_CONTENT",
"files": [
{
"uuid": "FILE_UUID",
"name": "FILE_NAME",
"version": "FILE_VERSION"
}
],
"created_by": "CREATOR_NAME",
"created_on": "CREATED_TIMESTAMP",
"last_updated_by": "UPDATED_BY",
"last_updated_on": "UPDATED_TIMESTAMP",
"custom_attributes": []
}
}
}
| Attribute | Type | Description |
|---|---|---|
| purchase_invoice | object | Root object. |
| note | object | Single note attached to the invoice. |
| uuid | string (UUID) | Unique identifier of the note. |
| version | string | Version number of the note. |
| content | string (HTML) | Rich-text content of the note. |
| files | array | List of attached files. |
| uuid | string (UUID) | Unique identifier of the file. |
| name | string | File name. |
| version | string | File version. |
| created_by | string | User who created the note. |
| created_on | string (timestamp) | ISO timestamp of note creation. |
| last_updated_by | string | User who last updated the note. |
| last_updated_on | string (timestamp) | ISO timestamp of last update. |
| custom_attributes | array | Optional client-defined attributes. |
Retrieve All Files for a Note: /purchase-invoices/{purchase_invoice_id}/notes/{NOTE_UUID}/files
Purpose
Retrieves a list of all files attached to a specific note.
Use Case
Useful when you want to display or download all files attached to a note, for example, invoice attachments like receipts or scanned documents.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| purchase_invoice_id | string | Unique identifier of the purchase invoice. |
| NOTE_UUID | string | Unique identifier of the note. |
Query Parameters
No query parameters are required or supported for this endpoint.
Request Body
This endpoint does not require a request body.
Response
The response contains a files array under purchase_invoice.note, listing all files associated with the note. Each file includes its unique uuid, file name, and version. Additionally, custom_attributes may be present for extra metadata.
Response Body
{
"purchase_invoice": {
"note": {
"files": [
{
"uuid": "FILE_UUID",
"name": "FILE_NAME",
"version": "FILE_VERSION"
}
],
"custom_attributes": []
}
}
}
| Attribute | Type | Description |
|---|---|---|
| purchase_invoice | object | Root object. |
| note | object | Contains files and optional custom attributes. |
| files | array | List of files attached to the note. |
| uuid | string (UUID) | File unique identifier. |
| name | string | File name. |
| version | string | File version. |
| custom_attributes | array | Optional metadata. |
Retrieve a Specific File from a Note: /purchase-invoices/{purchase_invoice_id}/notes/{NOTE_UUID}/files/{FILE_UUID}
Purpose
Retrieves metadata of a single file attached to a note, identified by its unique file UUID.
Use Case
Use this API when you need to fetch or download a specific file attached to a note, e.g., retrieving a scanned receipt linked to an invoice.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| purchase_invoice_id | string | Unique identifier of the purchase invoice. |
| NOTE_UUID | string | Unique identifier of the note. |
| FILE_UUID | string | Unique identifier of the file. |
Query Parameters
No query parameters are required or supported for this endpoint.
Request Body
This endpoint does not require a request body.
Response
The response contains a single file object under purchase_invoice.note. It provides the file’s unique identifier (uuid), its name, and its version. custom_attributes may also be included to store client-defined metadata.
Response Body
{
"purchase_invoice": {
"note": {
"file": {
"uuid": "FILE_UUID",
"name": "FILE_NAME",
"version": "FILE_VERSION"
},
"custom_attributes": []
}
}
}
| Attribute | Type | Description |
|---|---|---|
| purchase_invoice | object | Root object. |
| note | object | Contains the file metadata and optional attributes. |
| file | object | File metadata object. |
| uuid | string (UUID) | Unique identifier of the file. |
| name | string | File name. |
| version | string | File version. |
| custom_attributes | array | Optional metadata. |