Skip to main content
QUERY
Get a link to an invoice preview's PDF

Authorizations

Authorization
string
header
required

An API key created in Settings, sent as Authorization: Bearer <key>.

Body

application/json
scheduledIssueAt
string<date-time>
required

The day the invoice would be issued. Only the date is used; send it as midnight UTC.

contractId
string<uuid>

The contract whose draft amendment to preview.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
terms
object

Contract terms to preview without saving them, and the customer they would bill.

cancellation
object

A cancellation to preview without agreeing it: the contract, and the day it would end.

Response

Successful response

downloadUrl
string
required

A link to the file. It works for one hour after this response, and anyone holding it can download the file. Do not send your API key with it: the link points at Synthetic's file storage, not the API. For a new link, call the route again.