Create contract
Creates a new contract in draft status. Send planIds to create its plan instances along with it; the contract needs at least one active plan instance before it can be activated.
Authorizations
API Key Authentication.
Body
Schema defining a contract.
ID of the customer associated with this contract.
Date when the contract becomes active.
Optional date when the contract expires. If null, the contract has no end date.
Optional retroactive date to apply contract changes from a past date.
Reference index (e.g. IPCA) used to filter contracts when applying a mass adjustment on contracts.
none, igpm, ipca, other, null Custom fields that can be associated with the entity. The fields must be previously created in the system before they can be used.
Invoice allocation strategy configured for the contract.
single, percent_split, subsidiary_usage_split Whether future subsidiaries are automatically included in usage scope.
Customers that compose the usage scope for this contract.
1Payment account allocation configuration.
1Schema defining billing schedule for a contract.
ID of the legal entity associated with this contract. Optional on create; defaults to the tenant's default legal entity when absent.
ID of the tax regime applied to invoices generated from this contract. Null when no regime is attached.
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.
Schema defining billing settings for a contract.
Schema defining payment gateway settings for a contract.
Plans to instantiate on the new contract, each from its current active version and following the contract dates. The contract and its plan instances are created together: when any plan cannot be instantiated, nothing is created.
Response
Schema defining a contract.
Unique identifier for the contract.
Human-readable contract identifier, sequential per customer (e.g. ACMEX-CTR-01). Generated by the server on creation.
ID of the customer associated with this contract.
Date when the contract becomes active.
Optional date when the contract expires. If null, the contract has no end date.
Optional retroactive date to apply contract changes from a past date.
Current status of the contract.
active, canceled, completed, draft Reference index (e.g. IPCA) used to filter contracts when applying a mass adjustment on contracts.
none, igpm, ipca, other, null Custom fields that can be associated with the entity. The fields must be previously created in the system before they can be used.
Invoice allocation strategy configured for the contract.
single, percent_split, subsidiary_usage_split Whether future subsidiaries are automatically included in usage scope.
Customers that compose the usage scope for this contract.
1Payment account allocation configuration.
1Schema defining billing schedule for a contract.
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.
ID of the tax regime applied to invoices generated from this contract. Null when no regime is attached.
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.
Schema defining billing settings for a contract.
Schema defining payment gateway settings for a contract.