AdemeroHelp

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.

IntegratorsHalf a day for a developerVerified 2026-09-05

Before you begin

  • Sage Intacct Web Services enabled, with a Web Services user and sender credentials
  • Somewhere to run code on a schedule
  • Either an SFTP server Paige exports to, or a Paige API key

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

SourceHowWhen to prefer it
SFTP export filesPaige 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 APIGET …/scanJobs/{id}/documentPages, then …/pages/{pageId}/fieldValues; page images by signed URLYou'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.

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.