# Integrate Paige with the Acumatica REST API

For developers: the calls that turn a Paige invoice into an Acumatica AP bill with the PDF attached — sign in, PUT the Bill entity, then upload the file through the bill's files link — fed from Paige's SFTP export files or the Paige API.

Product: paige · Audience: integrator · Time: Half a day for a developer · Last verified: 2026-09-05

Canonical: https://help.ademero.com/paige/integrations/integrate-paige-with-the-acumatica-rest-api

**At the end of this guide you'll have the exact Acumatica REST calls — and the two ways to get Paige's data into them — to create an AP bill with the invoice PDF attached for every invoice Paige finishes.**

## Getting Paige's data

| Source | How | When to prefer it |
| --- | --- | --- |
| **SFTP export files** | Paige writes `<name>.pdf` and `<name>.json` per document; your job polls the folder and reads the JSON (`fields`, `metadata.document_type`, `metadata.pdf_file`) | Simplest; the PDF is already assembled |
| **Paige API** | `GET …/scanJobs/{id}/documentPages`, then `…/pages/{pageId}/fieldValues`; page images by signed URL | You'd rather query than watch a folder. The API returns page images, not one merged PDF — see [Integrate your own system with the Paige API](/paige/integrations/integrate-your-own-system-with-the-paige-api). |

The rest assumes you have, per invoice, the field values and the PDF bytes.

## Sign in

Acumatica's contract-based REST API uses a session:

```http
POST https://<instance>/entity/auth/login
Content-Type: application/json

{ "name": "paige-integration", "password": "…", "company": "<tenant>" }
```

Keep the returned cookies for the calls below, and `POST /entity/auth/logout` when done (Acumatica counts sessions against licenses). For production, prefer a **connected application** with OAuth 2.0 over a stored password.

## The calls

### 1. Create the bill

```http
PUT https://<instance>/entity/Default/22.200.001/Bill
Content-Type: application/json

{
  "Type": { "value": "Bill" },
  "Vendor": { "value": "V00123" },
  "VendorRef": { "value": "INV-20441" },
  "Date": { "value": "2026-08-28T00:00:00" },
  "DueDate": { "value": "2026-09-27T00:00:00" },
  "Description": { "value": "Paige – Vendor Invoice" },
  "Details": [
    {
      "Account": { "value": "6150" },
      "Amount": { "value": 1284.50 },
      "TransactionDescription": { "value": "Invoice INV-20441" }
    }
  ]
}
```

Use your instance's endpoint version (the number in the path; `22.200.001` or later is assumed below). Every value is wrapped in `{ "value": … }`. `Vendor` is the vendor ID; look it up first with `GET …/Vendor?$filter=VendorName eq 'Acme Office Supply'` if Paige only gives the name. The response returns the created bill, including its `ReferenceNbr` and a `_links` object.

For itemized invoices, add one `Details` entry per row of Paige's `line_items` table.

### 2. Attach the PDF

On endpoint `22.200.001` and later, the bill's response carries the upload URL:

1. Read `_links.files:put` from the response of call 1 (or from `GET …/Bill/Bill/{ReferenceNbr}`). It looks like `/entity/Default/22.200.001/files/PX.Objects.AP.APInvoiceEntry/Document/{ReferenceNbr}/{filename}`.
2. `PUT` the PDF bytes to that URL with the filename substituted (`INV-20441.pdf`) and `Content-Type: application/pdf`.

**What you should see:** `204 No Content`, and the file listed under the bill's **Files** in Acumatica.

On endpoints before `22.200.001`, the older form is `PUT …/Bill/Bill/{ReferenceNbr}/files/{filename}` with the same body.

## Idempotency and errors

- Before creating, `GET …/Bill?$filter=Vendor eq 'V00123' and VendorRef eq 'INV-20441'` and skip if one exists.
- Paige's values are strings as printed; format dates as ISO and amounts as numbers.
- A `422` means a required field on the Bills and Adjustments screen isn't supplied (branch, terms, subaccount, …); the response body names it.
- If you poll SFTP, move processed files to a `processed/` subfolder; if you poll the Paige API, record processed page IDs.

## What's next

- [Import Paige invoices into Acumatica with an import scenario](https://help.ademero.com/paige/integrations/import-paige-invoices-into-acumatica-with-an-import-scenario)
- [Integrate your own system with the Paige API](https://help.ademero.com/paige/integrations/integrate-your-own-system-with-the-paige-api)
