Skip to main content
GET
Get an invoice

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string<uuid>
required

The invoice id.

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)$

Response

Successful response

A bill the entity raises for a customer for one period of a contract: what it charges, how far it has got towards being issued, and how much of it has been paid.

id
string<uuid>
required
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)$
customerId
string<uuid>
required
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)$
customerName
string | null
required

The customer's name on the invoice. Issuing copies it onto the invoice, so renaming the customer later leaves an issued invoice as it was; until then it is the customer's current name.

contractId
string<uuid>
required
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)$
number
string
required

The invoice number, unique among the entity's invoices, voided ones included. It can change up to the moment the invoice is issued, and not after.

status
enum<string>
required

DRAFT: not approved yet. APPROVED: approved before periodStartAt, the day Synthetic will issue it. ISSUING: being issued; it becomes ISSUED shortly. ISSUED: issued; what it charges no longer changes. VOIDED: withdrawn before it was issued; nothing is owed on it. Until an invoice is issued, Synthetic may change or void it when the contract's terms change. Whether it has been paid is not a status: compare appliedAmount with totalAmount.

Available options:
DRAFT,
APPROVED,
ISSUING,
ISSUED,
VOIDED
notes
string | null
required

A note for the entity's own staff. It is never printed on the invoice, and can change until the invoice is issued.

approvedByUserId
string<uuid> | null
required

The id of the person who approved the invoice, if a person did; otherwise null.

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)$
approvedByUser
object | null
required

The person who approved the invoice, if a person did; otherwise null. Their role is their current one, not the one they had when they approved.

approvedByApiKeyId
string<uuid> | null
required

The API key that approved the invoice, if one did; otherwise null.

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)$
approvedAt
string | null
required

When the invoice was approved; null when it has not been.

issuedAt
string | null
required

When the invoice was issued; null until it is. An invoice issued backdated carries the earlier date it was issued with, and has it already while ISSUING. An invoice not issued yet is planned to issue on periodStartAt.

dueAt
string | null
required

When payment is due: issuedAt plus paymentTermsDays days. Null while issuedAt is.

paymentTermsDays
integer | null
required

How many days the customer has to pay once the invoice is issued, from the contract terms the invoice bills.

Required range: -9007199254740991 <= x <= 9007199254740991
lastPaidAt
string<date-time>
required

The calendar date the latest payment with status POSTED applied to this invoice was received, carried at UTC midnight; null when none has been applied. The time is not data.

paidAt
string<date-time>
required

Once payments with status POSTED cover totalAmount, the calendar date the latest of them was received, carried at UTC midnight; null while anything is owed or no payment has been applied. The time is not data.

voidedAt
string | null
required

When the invoice was voided; null unless its status is VOIDED.

periodStartAt
string<date-time>
required

The first calendar day the invoice bills for, carried at UTC midnight. The time is not data.

periodEndAt
string<date-time>
required

The calendar date the billed period ends, carried at UTC midnight: it covers the days before this date, not the date itself. The time is not data.

lastSentAt
string | null
required

When Synthetic last started emailing the invoice to the customer, whether or not the email went out; null if it never has.

deliveryMethod
enum<string> | null
required

How the invoice reaches the customer. EMAIL: Synthetic emails it when it is issued. MANUAL: the entity sends it itself. The person who approves the invoice chooses; an invoice Synthetic issues on its own, under a contract with autoIssue on, is EMAIL. Null when no delivery method was recorded, such as an invoice that is not approved yet or one issued with a backdated date; Synthetic does not email those.

Available options:
EMAIL,
MANUAL
totalAmount
object
required

The sum of the invoice's lines. Its value is a whole number of the currency's smallest unit, so { "value": 200000, "currencyCode": "USD" } is $2,000.00.

appliedAmount
object
required

How much of the total payments with status POSTED have paid, a bank fee charged on one of them included.

pendingPaymentAmount
object
required

How much of the total card payments with status PENDING will pay once their money arrives. It is not part of appliedAmount.

remainingAmount
object
required

totalAmount less appliedAmount and pendingPaymentAmount. Payments apply only to issued invoices, so it equals totalAmount until then, and stays equal to it on a voided invoice, though nothing is owed on one.

lines
object[] | null
required

Every line of the invoice when it is read by id; null in a list.

createdAt
string
required
updatedAt
string
required