Introducing contract editing
Contract editing is a new feature in Metronome used to make changes to a contract. You can edit:- Commit and credit access and invoice schedules
 - Applicable product IDs and tags on a commit
 - Scheduled charge invoice schedules
 
Contract edits replace amendments
Amendments on contracts are only additive; you can add new commits, credits, scheduled charges, and overrides, but you can’t remove or edit existing objects on the contract. Due to these limitations, we’re replacing amendments with contract editing. To use contract editing, you must update your integration to stop using amendments. After migrating to editing, you’ll no longer have access to create amendments in the UI or with the API.New functionality
Contract edits introduce new endpoints, data export tables, and scheduled invoice logic.New endpoints to support editing
As part of the contract edits feature, use these improved endpoints:- /v2/contracts/edit: Used to edit a contract; add scheduled charges, commits and credits, and overrides or edit commit and credit access and invoice schedules.
 - /v2/contracts/get: This new version of the 
/contracts/getendpoint returns the current state of a contract, inclusive of amendments and edits. Amendments and edits are not returned in a separate object. Use theas_of_dateparameter to view the full contract, inclusive of amendments and edits as of a previous timestamp. Usage filters are now returned as schedule segments. - v2/contracts/list: This new version of the 
/contracts/listendpoint returns the current state of a customer’s contracts, inclusive of amendments and edits. Amendments and edits are not returned on a separate object. Usage filters are now returned as schedule segments. - v2/contracts/getEditHistory: A new endpoint that lists the edits on a contract. Includes all amendments and existing events up-versioned to be edits. For example, updating the contract end date, adding usage filters with the 
setUsageFilterendpoint, or truncating commits using theupdateCommitEndDateendpoint. 
New data export tables
The contract edits feature introduces new data export tables. Thecontract_edits table contains the ID of each edit, timestamp when the edit was made, and describes all edits made on the contract. One row represents an edit made to the contract.
This table includes all existing amendments and events up-versioned to be edits. For example, a updating contract end date through the API or UI.
This table’s schema includes:
idcontract_idtimestampeditsmetadatacreated_byupdated_at
usage_filter_schedule table provides a more ergonomic way to understand a contract’s usage filters, mimicking the result of the the /v2/contracts/get endpoint.
Previously, the usage_filters table only included the starting_at value associated with a filter. This meant you had to add additional logic to understand which filters were active at a given time. Now, each row includes a starting_at value and an ending_before value.
This table’s schema includes:
idcontract_idstarting_atending_beforegroup_keygroup_valuesmetadataupdated_at
Updated logic for scheduled invoices
Prior to contract editing, when multiple scheduled charges shared the same timestamp but were created on different contract amendments, the scheduled charges went on separate invoices. For example, a prepaid commit payment and a scheduled charge occurring on the same date but created through different amendments appeared on different invoices. Contract editing now consolidates all scheduled charges with matching timestamps onto a single invoice, even if they were created through edits. This provides customers with a more streamlined billing experience by delivering one comprehensive invoice for all charges due on the same date. To understand this new logic, consider an example where scheduled charges share the same date. On December 10, 2024, two charges were scheduled to be issued:- The first scheduled charge was scheduled to be issued during contract creation.
 - The second scheduled charge was scheduled to be issued through a contract amendment.
 
How to migrate to edits
Migrating from amendments to edits includes 4 steps: start using v2 contract endpoints, enable new data export tables, update your amend contract API workflows, and let your Metronome representative know when you’re finished.1. Start using /v2/contracts/get and /v2/contracts/list
The v1 /contracts/get and /contracts/list endpoints aren’t compatible with contract editing. You now have access to two new endpoints that provide more ergonomic response shapes: /v2/contracts/get and /v2/contracts/list.
To start using the new endpoints:
- Migrate any automated usage of 
/v1/contracts/getand/v1/contracts/listto the new endpoints. - After confirming that you’re no longer using those v1 endpoints, contact your Metronome representative. They’ll grant you the ability to use contract editing, which includes using the new 
/v2/contracts/editendpoint to edit contracts with the API and the ability to edit a contract in the UI. 
/contracts/amend with the API.
:::
The /v1/contracts/get response contains separate fields for current, initial, and amendments. current contains the current state of the contract.
For example, see this response:
/v2/contracts/get endpoint returns the current state of the contract. The response is similar to the data nested under the current field in the v1/contracts/get response.
This example shows the /v2/contracts/get response:
/v2/contracts/get endpoint you can specify an as_of_date. The response returns the state of the contract as of that timestamp in the past.
This example response shows how you can pass the timestamp when the contract was initially created as the as_of_date to view the initial contract, with no edits:
2. Enable new data export tables
If you use theamendments or usage_filters data export tables, let your Metronome representative know and they’ll enable the contract_edits and usage_filter_schedule tables for you.
If you use the amendments data export table, update your workflow to point to the contract_edits table.
All historical amendments are included as rows in the contract_edits data table.
If you use the usage_filters data export table, update your workflow to use the usage_filter_schedule table.
3. Update your /contracts/amend API workflows
Switching to /v2/contracts/edit gives you more flexibility in making changes to a contract.
If you only amend contracts through the UI, there’s no action needed.
If you have automated workflows built around the /contracts/amend endpoint, update them to use the new /v2/contracts/edit endpoint.
The /contracts/amend and /v2/contracts/edit endpoints share similar syntax for adding new objects to a contract.
For example, this request amends the contract to add an overwrite override to a product.
/v2/contracts/edit endpoint.
Note that the contents of add_overrides are identical to the contents of overrides when calling the /contracts/amend endpoint.
There’s also no effective date associated with edits. When calling /contracts/amend you had to pass in a starting_at date for the amendment that was unused. Edits occur immediately, and may involve changes to a schedule.
For example, this API request immediately adds an override that starts on Feb 1, 2025:
/v2/contracts/edit to edit existing objects.
For example, this API call edits the access and invoice schedules for a commit:
4. Contact Metronome
When finished with your migration, contact your Metronome representative to confirm you’ve completed the migration. At this point, Metronome removes your access to:- The 
/v1/contracts/get,/v1/contracts/list, and/contracts/amendendpoints - Adding an amendment through the UI
 - Updates to the 
amendmentsorusage_filtersdata export tables