Developers

API v3 · Current

Sage 100 Contractor Attachments API

Browse the selected domain reference below. For authentication, request and response conventions, errors, locking, and writes, start with the Getting started guide.

API v3 reference

Attachments API

Files attached to Sage records, such as the scanned AP invoice or the signed change order: attach one file to an existing record, list a record's files, and download one. Off until a Twinn administrator turns them on for the API key and the company's on-premise service has them switched on.

Operations
3
Records
1
Release
v3.0.0-alpha.28

Authentication, headers, the shared query contract, errors, locking and writes are in Getting started. The interactive reference, with every schema, is below.

Operations

POST/api/v3/attachments

Attach a file to a record

Attach one file to one existing record. A record and its file are never written in one request: write the record first, then attach the file with the record's number. A failed attachment therefore never affects the record.

Request body: AttachmentUpload

  • metadatarequired
    AttachmentInput

    What to attach, and to which record. The JSON part of the upload, named metadata.

  • filerequired
    object
GET/api/v3/attachments

List a record's attachments

Returns Attachment.

Parameters

  • entityrequiredquery
    "ap-invoices" | "ledger-transactions" | "vendors" | "jobs" | "change-orders" | "purchase-orders"

    The kind of record.

  • idrequiredquery
    integer (int64)

    The record's number.

GET/api/v3/attachments/{id}/content

Download an attached file

Download one attached file.

Parameters

  • idrequired
    integer (int64)

    The attachment's own number, as the list returns it.

Records

The fields each record carries, as queries return them and writes read them back.

Attachment

One file attached to a record.

6 fields
  • attachmentIdrequired
    integer (int64)

    The attachment's own number.

  • fileNamerequired
    string

    The file's name.

  • servedrequired
    boolean

    Whether GET /api/v3/attachments/{id}/content can return the file. A file Sage links to outside the company's own files (on another server, or synchronised from elsewhere) is listed with served: false and is not returned.

  • description
    string

    The description shown beside the file in Sage.

  • attachedOn
    string (date)

    The day it was attached.

  • attachedBy
    string

    Who attached it, as Sage records it.

Section 6

Full API reference

This is the v3 contract itself, not a description of it. The document below is OpenAPI 3.1 compiled from the TypeSpec the server and the generated clients are both built from, so what it says is what the API does. The guide above covers the 87 query entities, 38 writes, and the problem shape for each status. This reference includes the complete field and type definitions.

Only the selected domain is loaded into the interactive reference. The complete v3 contract remains available for generators and tooling.

The field-level reference for all 213 operations. Expand an entity's model to see its available properties and types. Those property names are used in select, orderBy, matchFields and every match.field.

Use it as an index rather than reading it front to back. The 87 /query entries all share the contract from section 2, and every operation's failure responses are drawn from the 16 statuses the contract declares (see section 3). Those responses are declared once and referenced, so a status on one route has the same meaning on every route.

Loading the reference domains…

Something here does not match what you see?

This guide is maintained by hand alongside the generated reference, so if a field, a status value or a cascade does not behave the way it is described here, that is worth reporting rather than working around. Tell us what you called and what came back.

Contact us