List purchase invoices

Find received purchase invoices in a date range with cursor pagination.

Endpoint

http
GET https://prod.gets.complyance.io/api/v3/documents?type=purchases

Authentication

Authorization: Bearer YOUR_API_KEY. The API key selects the workspace and environment.

Parameters

QueryRequiredDescription
typeYespurchases
fromYesStart date, YYYY-MM-DD
toNoEnd date, YYYY-MM-DD; defaults to from
limitNoPage size, 1–100; default 100
cursorNoOpaque nextCursor from the previous response
List one day's received purchasesbash
curl --get 'https://prod.gets.complyance.io/api/v3/documents' \
  --header "Authorization: Bearer ${COMPLYANCE_API_KEY}" \
  --header 'Accept: application/json' \
  --data-urlencode 'type=purchases' \
  --data-urlencode 'from=2026-09-22' \
  --data-urlencode 'limit=100'

The range includes both dates, using UTC day boundaries for receipt/storage. It does not filter by the supplier’s invoice issue date.

Response

Example responsejson
{
  "success": true,
  "data": {
    "items": [
      {
        "documentId": "01JEXAMPLE0000000000000142",
        "receivedAt": "2026-09-22T08:15:00.000Z",
        "storedAt": "2026-09-22T08:15:02.000Z",
        "status": "purchase.invoice.stored",
        "country": "AE",
        "environment": "sandbox",
        "invoiceNumber": "INV-2026-0142",
        "supplierName": "Acme Trading LLC",
        "issueDate": "2026-09-22"
      }
    ],
    "hasMore": false,
    "nextCursor": null
  }
}

invoiceNumber, supplierName and issueDate can be null. receivedAt and storedAt describe receipt and storage; they are distinct from the supplier’s issue date.

When hasMore is true, request the next page with cursor=nextCursor. URL-encode the cursor and retain the same date range and limit. Stop when hasMore is false. Do not construct or modify a cursor.

Errors

HTTP / codeMeaning
400 VALIDATION_ERRORA date is not YYYY-MM-DD, from is after to, or the cursor or limit is not valid
400 NOT_SUPPORTEDSales listing was requested; use type=purchases
401Missing or invalid authentication; see authentication failures
422from or type is missing, type is not recognised, or limit is above 100
500 INTERNAL_ERRORRetrieval failed; retry with backoff

A 422 lists the checks that failed in its own format, without success, code and message. Check the HTTP status before reading the body.

Next, get a purchase invoice using a returned documentId.

Last updated