Developers

API v3 · Current

Sage 100 Contractor Reports 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

Reports API

Pre-built reports computed at the on-premise agent: agings, ledger reports, statements, job cost and payroll summaries. The catalogue describes each report's criteria, columns and calculation; a report runs as a job that is submitted, long-polled and then fetched.

Operations
8
Release
v3.0.0-alpha.30

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

Operations

GET/api/v3/reports

List reports

List every report this API can run.

GET/api/v3/reports/company-defaults

Get the company's criteria defaults

What each default token resolves to for the caller's company today.

The fiscal tokens come from the company's ledger setup, so a criteria form can start from the values a job submitted now would use.

GET/api/v3/reports/jobs/{jobId}

Get a report job

Get a job's state.

With wait, the request is held until the job finishes or the wait elapses, whichever comes first, and then answers with the job as it stands.

Parameters

  • jobIdrequired
    string

    The job id.

  • waitquery
    string

    How long to wait for the job to finish, as a duration such as 25s, at most 25s. Omitted or 0s answers at once.

DELETE/api/v3/reports/jobs/{jobId}

Cancel a report job

Cancel a job.

The job is cancelled at once and never has a result. The on-premise agent is then asked to stop the work: a report still waiting to start never runs, and a report already running is stopped and returns no result. An on-premise agent that predates report cancellation finishes the run, and its result is discarded. Cancellation is requested, not guaranteed. A job that has already finished is returned unchanged.

Parameters

  • jobIdrequired
    string

    The job id.

GET/api/v3/reports/jobs/{jobId}/result

Get a report result

Get a finished job's result.

409 JOB_NOT_DONE while the job is queued or running. A failed job answers with its own error, at that error's status. A cancelled job has no result and answers 404 JOB_NOT_FOUND.

The result holds only the columns this API key may read, whichever key submitted the job: a column it may not read is left out of columns, every row, totals, and every subtotal's and the grand total's sums, and subtotals grouped by such a column are left out.

Parameters

  • jobIdrequired
    string

    The job id.

GET/api/v3/reports/{id}

Describe a report

Describe one report: its criteria (also as a JSON Schema), columns, groupings and how it is calculated. A column this API key may not read is left out.

Parameters

  • idrequired
    string

    The report id.

POST/api/v3/reports/{id}/jobs

Run a report

The criteria are checked before the report runs, so a bad criterion is a 400 VALIDATION_FAILED naming it rather than a failed job. A grouping by a column this API key may not read is 403 FORBIDDEN. Otherwise always 202.

Parameters

  • idrequired
    string

    The report id.

Request body: ReportJobRequest

  • params
    object

    The criteria, keyed by ReportParam.name. An omitted criterion takes its default. A criterion may be sent as one of its ReportParam.relative tokens, resolved when the job is submitted. A criterion the report does not declare is refused with VALIDATION_FAILED.

  • grouping
    integer (int32)

    Which of the report's groupings to subtotal by, as an index; -1 for none. Omitted means the report's defaultGrouping. A grouping by a column this API key may not read is refused with 403 FORBIDDEN.

GET/api/v3/reports/{id}/params/{param}/options

Search a lookup criterion's records

Find the records a lookup criterion can take, by name or number: the pick-list behind the criterion.

search is matched on the entity's name fields (and on the record number when it is a number), the closest first, within the criterion's lookupFilter. A name that contains search matches it, so "north" finds "Northwind Medical Center". Each option's value is what the criterion takes.

Parameters

  • idrequired
    string

    The report id.

  • paramrequired
    string

    The criterion's name, as params lists it. It must be a lookup criterion.

  • searchrequiredquery
    string

    What to look for: part of a name, or a record number. At most 100 characters. Empty browses every record the criterion offers, by name.

  • limitquery
    integer (int32)

    At most this many options, 1 to 50. Default 20.

  • offsetquery
    integer (int32)

    Skip this many records, the ones already shown, to read the next page. 0 to 999: a pick-list pages through at most the first 1000 records.

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