Developers
API v3 · CurrentSage 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/reportsList reports
List every report this API can run.
GET/api/v3/reports/company-defaultsGet 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
jobIdrequiredstringThe job id.
waitquerystringHow long to wait for the job to finish, as a duration such as
25s, at most25s. Omitted or0sanswers 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
jobIdrequiredstringThe job id.
GET/api/v3/reports/jobs/{jobId}/resultGet 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
jobIdrequiredstringThe 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
idrequiredstringThe report id.
POST/api/v3/reports/{id}/jobsRun 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
idrequiredstringThe report id.
Request body: ReportJobRequest
paramsobjectThe criteria, keyed by
ReportParam.name. An omitted criterion takes its default. A criterion may be sent as one of itsReportParam.relativetokens, resolved when the job is submitted. A criterion the report does not declare is refused withVALIDATION_FAILED.groupinginteger (int32)Which of the report's
groupingsto subtotal by, as an index;-1for none. Omitted means the report'sdefaultGrouping. A grouping by a column this API key may not read is refused with403 FORBIDDEN.
GET/api/v3/reports/{id}/params/{param}/optionsSearch 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
idrequiredstringThe report id.
paramrequiredstringThe criterion's name, as
paramslists it. It must be alookupcriterion.searchrequiredquerystringWhat to look for: part of a name, or a record number. At most 100 characters. Empty browses every record the criterion offers, by name.
limitqueryinteger (int32)At most this many options, 1 to 50. Default 20.
offsetqueryinteger (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
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.
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