Skip to main content
POST
Edit a contract

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Contract and customer IDs and fields to update

customer_id
string<uuid>
required

ID of the customer whose contract is being edited

contract_id
string<uuid>
required

ID of the contract being edited

uniqueness_key
string

Optional uniqueness key to prevent duplicate contract edits.

Required string length: 1 - 128
add_commits
object[]
add_credits
object[]
add_recurring_commits
object[]
add_recurring_credits
object[]
add_overrides
object[]
add_scheduled_charges
object[]
add_subscriptions
object[]

Optional list of subscriptions to add to the contract.

add_spend_threshold_configuration
object
add_prepaid_balance_threshold_configuration
object
add_billing_provider_configuration_update
object

Update the billing provider configuration on the contract. Currently only supports adding a billing provider configuration to a contract that does not already have one.

update_contract_name
string | null

Value to update the contract name to. If not provided, the contract name will remain unchanged.

update_scheduled_charges
object[]
update_commits
object[]
update_credits
object[]
update_recurring_commits
object[]

Edits to these recurring commits will only affect commits whose access schedules has not started. Expired commits, and commits with an active access schedule will remain unchanged.

update_recurring_credits
object[]

Edits to these recurring credits will only affect credits whose access schedules has not started. Expired credits, and credits with an active access schedule will remain unchanged.

update_subscriptions
object[]

Optional list of subscriptions to update.

update_spend_threshold_configuration
object
update_prepaid_balance_threshold_configuration
object
update_contract_end_date
string<date-time> | null

RFC 3339 timestamp indicating when the contract will end (exclusive).

update_net_payment_terms_days
number | null

Number of days after issuance of invoice after which the invoice is due (e.g. Net 30).

allow_contract_ending_before_finalized_invoice
boolean

If true, allows setting the contract end date earlier than the end_timestamp of existing finalized invoices. Finalized invoices will be unchanged; if you want to incorporate the new end date, you can void and regenerate finalized usage invoices. Defaults to true.

archive_commits
object[]

IDs of commits to archive

archive_credits
object[]

IDs of credits to archive

archive_scheduled_charges
object[]

IDs of scheduled charges to archive

remove_overrides
object[]

IDs of overrides to remove

Response

Success

data
object
required