# Integrate Paige with the Sage Intacct API

For developers: the two Intacct Web Services calls that turn a Paige invoice into an AP bill with the PDF attached — create the supporting document, then create the bill referencing it — 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-sage-intacct-api

**At the end of this guide you'll have the exact sequence of Intacct Web Services 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.**

Intacct's attachment model is the part people miss: a bill doesn't take a file directly. You first create a **supporting document** (an attachment record in an attachments folder), then create the bill with `SUPDOCID` pointing at it. Two calls, in that order.

## 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.

## Authenticate

Intacct's API is XML over HTTPS. Each request carries your **sender ID and password** in the control block and a **session** (from `getAPISession`) or a Web Services user login in the operation block. Create a dedicated Web Services user for the integration.

## The two calls

### 1. Create the supporting document

```xml
<create_supdoc>
  <supdocid>INV-20441</supdocid>
  <supdocfoldername>Vendor Invoices</supdocfoldername>
  <supdocdescription>Paige – Vendor Invoice</supdocdescription>
  <attachments>
    <attachment>
      <attachmentname>INV-20441</attachmentname>
      <attachmenttype>pdf</attachmenttype>
      <attachmentdata><!-- base64 of the PDF --></attachmentdata>
    </attachment>
  </attachments>
</create_supdoc>
```

`supdocid` must be unique in your company (the invoice number plus vendor works) and at most 20 characters unless your company uses attachment auto-numbering, in which case omit it and read the generated ID from the response. The folder must exist (**Company > Attachments > Folders**).

### 2. Create the bill referencing it

```xml
<create>
  <APBILL>
    <WHENCREATED>08/28/2026</WHENCREATED>
    <WHENDUE>09/27/2026</WHENDUE>
    <VENDORID>V00123</VENDORID>
    <RECORDID>INV-20441</RECORDID>
    <DESCRIPTION>Paige – Vendor Invoice</DESCRIPTION>
    <SUPDOCID>INV-20441</SUPDOCID>
    <APBILLITEMS>
      <APBILLITEM>
        <ACCOUNTNO>6150</ACCOUNTNO>
        <TRX_AMOUNT>1284.50</TRX_AMOUNT>
        <ENTRYDESCRIPTION>Invoice INV-20441</ENTRYDESCRIPTION>
        <!-- add DEPARTMENTID, LOCATIONID, etc. if your company requires them -->
      </APBILLITEM>
    </APBILLITEMS>
  </APBILL>
</create>
```

`VENDORID`, `WHENCREATED`, and `WHENDUE` are required unless you create the bill as a draft. Map Paige's `Vendor Name` to a vendor ID with a `readByQuery` on `VENDOR` by name, or have the reviewer put the vendor ID in a Paige field. For itemized invoices, add one `APBILLITEM` per row of Paige's `line_items` table.

**What you should see:** a success response with the bill's record number, and in Intacct the bill shows the PDF in its **Attachment** field.

## Idempotency and errors

- Before creating, `readByQuery` on `APBILL` for the same `VENDORID` and `RECORDID`; Intacct rejects duplicates anyway, but checking first avoids orphaned supporting documents.
- Paige's values are strings as printed; format dates to your company's format and amounts as plain numbers.
- If you poll SFTP, move processed files to a `processed/` subfolder; if you poll the Paige API, record processed page IDs.
- Intacct's REST API is newer than the XML API; as of this writing, attaching supporting documents on bill creation is documented for the XML API, so that's what this guide uses.

## What's next

- [Import Paige invoices into Sage Intacct from CSV](https://help.ademero.com/paige/integrations/import-paige-invoices-into-sage-intacct-from-csv)
- [Integrate your own system with the Paige API](https://help.ademero.com/paige/integrations/integrate-your-own-system-with-the-paige-api)
