Skip to main content
GET
Fetch contract

Authorizations

X-API-KEY
string
header
required

API Key Authentication.

Path Parameters

id
string<uuid>
required

Unique identifier for the contract.

Response

Schema defining a contract.

id
string<uuid>
required

Unique identifier for the contract.

contractNumber
string
required

Human-readable contract identifier, sequential per customer (e.g. ACMEX-CTR-01). Generated by the server on creation.

customerId
string<uuid>
required

ID of the customer associated with this contract.

startDate
string<date>
required

Date when the contract becomes active.

endDate
string<date> | null
required

Optional date when the contract expires. If null, the contract has no end date.

retroactiveDate
string<date> | null
required

Optional retroactive date to apply contract changes from a past date.

invoicingStartDate
string<date> | null
required

Read-only. Start date of the first billing cycle Aira invoices for this contract, recorded when it is activated: the cycle containing the retroactive date when one is set, otherwise the cycle running on the activation day, or the contract start when that is still ahead. Null while the contract is a draft.

status
enum<string>
required

Current status of the contract.

Available options:
active,
canceled,
completed,
draft
rateAdjustmentIndex
null | enum<string>
required

Reference index (e.g. IPCA) used to filter contracts when applying a mass adjustment on contracts.

Available options:
none,
igpm,
ipca,
other,
null
customFields
object
required

Custom fields that can be associated with the entity. The fields must be previously created in the system before they can be used.

Example:
invoiceAllocationStrategy
enum<string>
required

Invoice allocation strategy configured for the contract.

Available options:
single,
percent_split,
subsidiary_usage_split
includeNewSubsidiariesOnUsageScope
boolean
required

Whether future subsidiaries are automatically included in usage scope.

usageScopes
object[]
required

Customers that compose the usage scope for this contract.

Minimum array length: 1
allocations
object[]
required

Payment account allocation configuration.

Minimum array length: 1
billingSchedule
object
required

Schema defining the billing schedule of a contract: the calendar it closes on (month or week) and the billing day read against it.

planInstances
object[]
required

The plan instances attached to the contract. While the contract is draft or active only its active plan instances are listed; once the contract is completed or canceled, all of them are.

ID of the legal entity associated with this contract. Optional on create; defaults to the tenant's default legal entity when absent.

Legal entity summary embedded on contract responses.

taxRegimeId
string<uuid> | null

ID of the tax regime applied to invoices generated from this contract. Null when no regime is attached.

autoIssue
boolean

When true, invoices produced at billing-cycle close are issued automatically instead of waiting in review. Defaults to false when omitted; omitting it on update leaves the current value unchanged.

billingSettings
object | null

Schema defining billing settings for a contract.

paymentGatewaySettings
object | null

Schema defining payment gateway settings for a contract.