Skip to main content
POST
/
v2
/
contracts
/
commits
/
edit
Edit a commit
curl --request POST \
  --url https://api.metronome.com/v2/contracts/commits/edit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "customer_id": "4c91c473-fc12-445a-9c38-40421d47023f",
  "commit_id": "5e7e82cf-ccb7-428c-a96f-a8e4f67af822",
  "access_schedule": {
    "update_schedule_items": [
      {
        "id": "d5edbd32-c744-48cb-9475-a9bca0e6fa39",
        "ending_before": "2025-03-12T00:00:00Z"
      }
    ]
  }
}'
{
  "data": {
    "id": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc"
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Commit and customer IDs and fields to update

customer_id
string<uuid>
required

ID of the customer whose commit is being edited

commit_id
string<uuid>
required

ID of the commit to edit

access_schedule
object
invoice_schedule
object
invoice_contract_id
string<uuid>

ID of contract to use for invoicing

applicable_product_ids
string<uuid>[] | null

Which products the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products.

applicable_product_tags
string[] | null

Which tags the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products.

specifiers
object[] | null

List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. This field cannot be used together with applicable_product_ids or applicable_product_tags. Instead, to target usage by product or product tag, pass those values in the body of specifiers.

product_id
string<uuid>
priority
number | null

If multiple commits are applicable, the one with the lower priority will apply first.

rate_type
enum<string>

If provided, updates the commit to use the specified rate type for current and future invoices. Previously finalized invoices will need to be voided and regenerated to reflect the rate type change.

Available options:
LIST_RATE,
list_rate,
COMMIT_RATE,
commit_rate

Response

Success

data
object
required