Required Scopes
Required Scopes
Contracts
Create a contract
To create a contract, make aPOST request to /commerce/contracts/2027-03-beta/contracts.
The request body must include name, billingContactId, currencyCode, contractEffectiveDate, and at least one entry in lineItems.
- Example request
- Example response
Retrieve a contract
To retrieve a contract, make aGET request to /commerce/contracts/2027-03-beta/contracts/{contractId}.
To batch retrieve or retrieve all contract records, use the Contracts object API.
Update a contract
To update a contract’s properties, make aPATCH request to /commerce/contracts/2027-03-beta/contracts/{contractId}.
In the request body, include the properties to update. Properties not included will remain unchanged.
Line item modifications are not supported via this endpoint. To add, update, or remove line items on an active contract, use the contract changes process instead.
The response returns the full updated contract object.
Terminate a contract
To terminate an active contract, make aPOST request to /commerce/contracts/2027-03-beta/contracts/{contractId}/terminate.
In the request body, you can include a terminationDate to set a future termination date. This will schedule the termination and update the contract’s total contract value (TCV) to reflect the shortened term. If omitted, the contract terminates as of the current date.
terminationDate property set to reflect the date of termination.
Contract changes
A contract change lets you propose updates to a contract’s line items. Rather than editing line items directly, you describe what should change. You can use contract changes to add or remove services, adjust pricing mid-contract, or update quantities. There are two workflows for contract changes based on thetype field:
Changes move through the following statuses:
Create a change
To create a contract change, make aPOST request to /commerce/contracts/2027-03-beta/changes.
The type field is required and determines the change workflow. Use "DIRECT" to specify line item modifications in the request, or "QUOTE" to initiate a quote-backed approval flow.
- DIRECT
- QUOTE
The response returns the change:
Line item changes
ForDIRECT changes, each entry in lineItemChanges represents a modification to a single line item:
Retrieve changes for a contract
To retrieve all changes for a contract, make aGET request to /commerce/contracts/2027-03-beta/contracts/{contractId}/changes.
The response returns a changes array containing all changes associated with the contract.
Retrieve a change
To retrieve an individual change by ID, make aGET request to /commerce/contracts/2027-03-beta/changes/{changeId}.
The response returns the full change object.
Update a change
To update a change, make aPATCH request to /commerce/contracts/2027-03-beta/changes/{changeId}.
A change can only be updated while it has
DRAFT status.Accept a change
To accept aDIRECT change, make a POST request to /commerce/contracts/2027-03-beta/changes/{changeId}/accept. No request body is required. Accepting a change applies the line item modifications to the contract and transitions the change to ACCEPTED status.
This endpoint only works for
DIRECT changes. QUOTE changes are accepted when the buyer signs the associated quote.Cancel a change
To cancel aDIRECT change, make a POST request to /commerce/contracts/2027-03-beta/changes/{changeId}/cancel. No request body is required.
This endpoint only works for
DIRECT changes. QUOTE changes are canceled by voiding the associated quote.CANCELED status without applying any modifications to the contract.
The response returns the updated change.
Preview a change
To preview the effects of aDIRECT change without creating it, make a POST request to /commerce/contracts/2027-03-beta/changes/preview.
The request body uses the same schema as creating a DIRECT change. The endpoint does not persist the change or affect the contract.
The response returns only the projected line item state:
Renewal quotes
A renewal quote lets you initiate the renewal process for a contract that is approaching its end date. When a renewal quote is accepted by the buyer, a new contract is created and automatically associated with the previous one.Create a renewal quote
To create a renewal quote, make aPOST request to /commerce/contracts/2027-03-beta/contracts/{contractId}/renewal-quotes.
When creating a renewal quote, you must associate it with a deal. In the request body, you can either:
- Associate it with an existing deal by including
dealId. - Generate a new deal by including both
dealPipelineanddealStage.
The response returns the newly created quote, including its line items and metadata.
Contract properties
Contract status
Thestatus field reflects the contract’s current state, and is determined by the contractEffectiveDate date and end date:
Address format
ThebillingAddress and sellerCompanyAddress properties use the same structure:
Line items
Modes
ThelineItems array accepts a mode field that determines how each line item is created:
- CUSTOM
- FROM_PRODUCT
- CLONE
Recurring billing
To configure recurring billing for line items, use the fields below, which map directly to the corresponding CRM line item property. Learn more about recurring billing.
For example, the line item below would bill monthly for 8 months:
Taxes
To configure taxes for a line item, you can set the following fields:
The following example shows how to manually specify a tax rate for a line item using
taxRateGroupId:
taxAmount field is returned in line item responses and is automatically calculated based on the line item’s tax configuration.
Pricing models
Thepricing object supports four pricing models. All tiered models (VOLUME, GRADUATED, STAIRSTEP) share the same prices array structure: maxQuantity defines the upper bound of each tier, and the last tier is always unbounded.
- Flat
- Volume
- Graduated
- Stairstep
In the
FLAT pricing model, a single fixed price per unit is charged, regardless of quantity. prices contains a single entry per currency.- Tiers must be ordered low to high by
maxQuantity. maxQuantitymust be a positive integer (e.g.,10).- The last tier must always be unbounded (omit
maxQuantity). - The
pricefield means different things depending on the model:VOLUME,GRADUATED: per-unit rate, multiplied by quantity.STAIRSTEP: total flat fee for the tier (quantity is not factored in).
- For multi-currency line items, include one full set of tiers per currency code within the same
pricesarray.