# Purchase invoices API

List received purchase invoices and retrieve the full data for one document.

## Authentication

Use `https://prod.gets.complyance.io` and `Authorization: Bearer YOUR_API_KEY`. Use the workspace and environment where the invoice was received.

## Operations

| Request | Response |
| - | - |
| [`GET /api/v3/documents?type=purchases`](https://docs.complyance.io/api-reference/purchases/list/) | Date-filtered, paginated document identifiers and summary fields |
| [`GET /api/v3/documents/{documentId}?type=purchases`](https://docs.complyance.io/api-reference/purchases/get/) | Full data for one received purchase invoice |

Use listing to reconcile documents over a date range. Use the [purchase invoice webhook](https://docs.complyance.io/one-platform/developer-portal/webhooks/purchase-invoices/) to learn when a document is stored, then fetch it by the returned `documentId`.

## Identifiers and duplicates

`documentId` is the retrieval identifier. An invoice number printed by a supplier is not a substitute. Store the returned `documentId` with your imported record so repeated webhook deliveries or reconciliation runs do not create duplicate records.

## Errors

Purchase endpoints return `success: false`, `code` and `message`. This differs from Connect’s nested `error` object. Two responses have their own shape: a `401` returns only `code` and `message`, and a `422` for a missing or malformed query parameter lists the checks that failed. Check the HTTP status before reading the body.

Source: https://docs.complyance.io/api-reference/purchases/
