Skip to main content
GET
Get a contract

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string<uuid>
required

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

Query Parameters

amendmentId
string<uuid>

One of this contract's amendments, to read the contract as it stood under it.

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

An agreement between the entity and one of its customers. It sets what the customer is billed for, from when and until when, and whether the agreement renews when it ends.

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

The customer the contract bills.

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

The contract's name, such as the agreement's title; null when it has none. It is not printed on invoices.

currencyCode
enum<string>
required

The currency the contract bills in.

Available options:
USD,
CAD,
EUR,
USDC
startAt
string<date-time>
required

The calendar date the contract starts, carried at UTC midnight. The time is not data.

endAt
string<date-time>
required

The calendar date the contract ends, carried at UTC midnight: it covers the days before this date, not the date itself. It includes changes that are finalized but have not taken effect yet, and any agreed cancellation. The time is not data.

cancelsAt
string<date-time>
required

The calendar date an agreed cancellation ends the contract, carried at UTC midnight; null when no cancellation has been agreed. It is also endAt. The time is not data.

paymentTermsDays
integer | null
required

How many days the customer has to pay an invoice once it is issued, under the current amendment.

Required range: -9007199254740991 <= x <= 9007199254740991
lifecycleStatus
enum<string>
required

DRAFT: the contract's terms have not been agreed yet. ACTIVE: the terms are agreed and the contract has not ended, including one that has not started yet. EXPIRED: the contract has ended. CANCELLED: the contract was ended by a cancellation. DELETED: the contract was deleted; a list includes it only when lifecycleStatuses names DELETED.

Available options:
DRAFT,
ACTIVE,
EXPIRED,
CANCELLED,
DELETED
autoIssue
boolean
required

Whether the contract's invoices are issued on their periodStartAt without a person approving them. An invoice issued this way is not emailed to the customer. This does not apply while the entity is in billing setup, to an invoice whose period starts on or before the day billing setup finished, or to an invoice a person was asked to review.

processingInvoices
boolean
required

Whether the contract's invoices are still being updated after a change to its terms or its deletion.

processingInvoicesStartedAt
string | null
required

When the change that processingInvoices is waiting on was last requested; null while processingInvoices is false.

autoRenew
boolean
required

Whether the contract renews itself. A renewal is a new contract on the same terms that starts when this one ends. When true, the renewal is created on autoRenewalAt, so none while that is null, and is agreed automatically once this contract's terms are finalized. A contract already past its end when its terms are written or finalized gets one renewal for each term since. A change to this contract made after its renewal is agreed goes to a person to agree. When false, nothing is created automatically; from autoRenewalAt a person is asked to decide.

notes
string | null
required

A note for the entity's own staff. It is never printed on an invoice.

autoRenewalAt
string<date-time>
required

The calendar date the contract comes up for renewal, carried at UTC midnight: renewalNoticeDays before the current amendment ends; null when renewalNoticeDays is null. Only a running contract with finalized terms, no agreed cancellation and no renewal comes up for renewal. The time is not data.

renewalNoticeDays
integer | null
required

How many days before the current amendment ends the contract comes up for renewal; null when it never does, so nothing is created or asked before it ends, even when autoRenew is true.

Required range: -9007199254740991 <= x <= 9007199254740991
renewingContractId
string<uuid> | null
required

The contract this one renews; null when it is not a renewal.

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

The contract that renews this one, a draft renewal included and a deleted one not; null when there is none.

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

The amendment whose terms apply today: the latest finalized one that has started, or amendment 0 until one has.

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

The status of the current amendment. DRAFT means the contract's terms have not been agreed yet.

Available options:
DRAFT,
FINALIZING,
FINALIZED,
VOIDING,
VOIDED
currentAmendmentStartAt
string<date-time>
required

The calendar date the current amendment takes or took effect, carried at UTC midnight. The time is not data.

draftAmendmentId
string<uuid> | null
required

The amendment being written and not yet agreed; null when there is none. It is the same as currentAmendmentId while the contract's terms have never been agreed.

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

Agreed changes to the contract that have not taken effect yet; null when there are none. Once it has started and is finalized, it becomes the current amendment. A scheduled cancellation shows in cancelsAt instead.

subscriptionBillableCount
integer
required

How many SUBSCRIPTION billables the current amendment carries.

Required range: -9007199254740991 <= x <= 9007199254740991
oneTimeBillableCount
integer
required

How many ONE_TIME billables the current amendment carries.

Required range: -9007199254740991 <= x <= 9007199254740991
contractHealth
enum<string>
required

Whether the contract needs attention. RENEWAL_DUE: it has come up for renewal, does not renew itself and no agreed contract of the customer follows it yet, so a person needs to decide. ENDING: its current amendment ends within 30 days, and it does not renew itself, never comes up for renewal and has no cancellation agreed. HEALTHY: running and needs nothing. UPCOMING: agreed and not started yet. NO_ACTIVE_CONTRACT: expired, ended by a cancellation, or deleted. DRAFT_ONLY: its terms have not been agreed yet.

Available options:
RENEWAL_DUE,
ENDING,
HEALTHY,
UPCOMING,
NO_ACTIVE_CONTRACT,
DRAFT_ONLY
createdAt
string
required
updatedAt
string
required