Edit a contract
The ability to edit a contract helps you react quickly to the needs of your customers and your business.
Use this endpoint to:
- Encode mid-term commitment and discount changes
- Fix configuration mistakes and easily roll back packaging changes
Key response fields:
- The
idof the edit - Complete edit details. For example, if you edited the contract to add new overrides and credits, you will receive the IDs of those overrides and credits in the response.
Usage guidelines:
- When you edit a contract, any draft invoices update immediately to reflect that edit. Finalized invoices remain unchanged - you must void and regenerate them in the UI or API to reflect the edit.
- Contract editing must be enabled to use this endpoint. Reach out to your Metronome representative to learn more.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Contract and customer IDs and fields to update
ID of the customer whose contract is being edited
ID of the contract being edited
Optional uniqueness key to prevent duplicate contract edits.
1 - 128Optional list of subscriptions to add to the contract.
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.
Value to update the contract name to. If not provided, the contract name will remain unchanged.
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.
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.
Optional list of subscriptions to update.
RFC 3339 timestamp indicating when the contract will end (exclusive).
Number of days after issuance of invoice after which the invoice is due (e.g. Net 30).
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.
IDs of commits to archive
IDs of credits to archive
IDs of scheduled charges to archive
IDs of overrides to remove
Response
Success