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

Update End Date

Update the commit end date
client.v1.customers.commits.updateEndDate(CommitUpdateEndDateParamsbody, RequestOptionsoptions?): dataIDCommitUpdateEndDateResponse
post/v1/contracts/customerCommits/updateEndDate

Pull forward the end date of a prepaid commit. Use the "edit a commit" endpoint to extend the end date of a prepaid commit, or to make other edits to the commit.

Parameters
bodycommit_idstringcustomer_idstringaccess_ending_beforestringinvoices_ending_beforestringCommitUpdateEndDateParams
Hide ParametersShow Parameters
commit_idstring

ID of the commit to update. Only supports "PREPAID" commits.

formatuuid
customer_idstring

ID of the customer whose commit is to be updated

formatuuid
access_ending_beforestring
optional

RFC 3339 timestamp indicating when access to the commit will end and it will no longer be possible to draw it down (exclusive). If not provided, the access will not be updated.

formatdate-time
invoices_ending_beforestring
optional

RFC 3339 timestamp indicating when the commit will stop being invoiced (exclusive). If not provided, the invoice schedule will not be updated.

formatdate-time
Returns
CommitUpdateEndDateResponse
Hide ParametersShow Parameters
dataidstringID
import Metronome from '@metronome/sdk';

const client = new Metronome({
  bearerToken: 'My Bearer Token',
});

const response = await client.v1.customers.commits.updateEndDate({
  commit_id: '6162d87b-e5db-4a33-b7f2-76ce6ead4e85',
  customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
  access_ending_before: '2020-01-01T00:00:00.000Z',
  invoices_ending_before: '2020-01-01T00:00:00.000Z',
});

console.log(response.data);
200 Example
{
  "data": {
    "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
  }
}