Skip to content
  • Auto
  • Light
  • Dark
Talk to an expert

Edit Commit

Edit a commit
post/v2/contracts/commits/edit

Edit a customer or contract commit. Contract commits can only be edited using this endpoint if contract editing is enabled.

Body Parameters
commit_idstring

ID of the commit to edit

formatuuid
customer_idstring

ID of the customer whose commit is being edited

formatuuid
access_scheduleobject
optional
Hide ParametersShow Parameters
add_schedule_itemsarray of object
optional
Hide ParametersShow Parameters
amountnumber
ending_beforestring
formatdate-time
starting_atstring
formatdate-time
remove_schedule_itemsarray of object
optional
Hide ParametersShow Parameters
idstring
formatuuid
update_schedule_itemsarray of object
optional
Hide ParametersShow Parameters
idstring
formatuuid
amountnumber
optional
ending_beforestring
optional
formatdate-time
starting_atstring
optional
formatdate-time
applicable_product_idsarray of string
optional

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_tagsarray of string
optional

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

invoice_contract_idstring
optional

ID of contract to use for invoicing

formatuuid
invoice_scheduleobject
optional
Hide ParametersShow Parameters
add_schedule_itemsarray of object
optional
Hide ParametersShow Parameters
timestampstring
formatdate-time
amountnumber
optional
quantitynumber
optional
unit_pricenumber
optional
remove_schedule_itemsarray of object
optional
Hide ParametersShow Parameters
idstring
formatuuid
update_schedule_itemsarray of object
optional
Hide ParametersShow Parameters
idstring
formatuuid
amountnumber
optional
quantitynumber
optional
timestampstring
optional
formatdate-time
unit_pricenumber
optional
prioritynumber
optional

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

product_idstring
optional
formatuuid
specifiersarray of object
optional

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.

Hide ParametersShow Parameters
presentation_group_valuesmap
optional
pricing_group_valuesmap
optional
product_idstring
optional

If provided, the specifier will only apply to the product with the specified ID.

formatuuid
product_tagsarray of string
optional

If provided, the specifier will only apply to products with all the specified tags.

Returns
dataidstringID
curl https://api.metronome.com/v2/contracts/commits/edit \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $METRONOME_BEARER_TOKEN" \
    -d '{
          "commit_id": "5e7e82cf-ccb7-428c-a96f-a8e4f67af822",
          "customer_id": "4c91c473-fc12-445a-9c38-40421d47023f"
        }'
200 Example
{
  "data": {
    "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
  }
}