Skip to main content
POST
/
v1
/
contracts
/
updateEndDate
Update the contract end date
curl --request POST \
  --url https://api.metronome.com/v1/contracts/updateEndDate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "customer_id": "13117714-3f05-48e5-a6e9-a66093f13b4d",
  "contract_id": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc",
  "ending_before": "2020-01-01T00:00:00.000Z"
}'
{
  "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

Update the end date of a contract

customer_id
string<uuid>
required

ID of the customer whose contract is to be updated

contract_id
string<uuid>
required

ID of the contract to update

ending_before
string<date-time>

RFC 3339 timestamp indicating when the contract will end (exclusive). If not provided, the contract will be updated to be open-ended.

allow_ending_before_finalized_invoice
boolean

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.

Response

Success

data
object
required