https://app.synthetic.ai/api/v1.
Reads use GET, or QUERY where a read takes a JSON body; QUERY changes nothing, like GET.
Send every request body as JSON, with Content-Type: application/json.
A route that takes parameters refuses a query parameter or body field it does not take with 400,
so a misspelled name is never ignored.
Responses from the API are JSON.
An amount is an object with a value, a whole number of the currency’s smallest unit such as cents,
and a currencyCode.
For example, { "value": 200000, "currencyCode": "USD" } is $2,000.00.
Timestamps are ISO 8601 strings.
A field that holds a day rather than a moment, such as a contract’s startAt, is midnight UTC on
that day, and only the date matters.
Terms used in this API
What you can read
On
GET /invoices, needsApproval=true lists the drafts waiting for someone to approve them.
A draft is listed once its period has started or is fewer than 31 days away, and can take a day or
more to appear, for example one from a contract agreed today.
A draft on a contract set to issue automatically does not wait for anyone, unless its period started
on or before the day billing setup finished, or a person was asked to review it.
A draft with usageLineCount above 0 is listed only from its scheduledIssueAt, once its
awaitingUsageLineCount is 0. Nothing is listed while the entity is still in billing setup.
Each payment carries its amount, how much of it has been applied to invoices, the customer it came
from once one has been attributed, the date it was received, and its fees: bank, the fee a bank
charged on a cash payment, and processor, the fee a payment provider kept from a card payment.
Each is null when there is no such fee.
A fee is a payment too, so it can also be read on its own.
The bankFee field repeats fees.bank and is deprecated; read fees.bank instead.
Your first request
- In Synthetic, open Settings → API keys and create a key. Copy the secret when it is shown, because it is shown only once.
-
Confirm the key works:
-
List payments:
GET /openapi.json, with its parameters and
response fields.
It is generated from the API’s own OpenAPI document at
https://app.synthetic.ai/api/v1/openapi.json.