## Update End Date `client.v1.contracts.updateEndDate(ContractUpdateEndDateParamsbody, RequestOptionsoptions?): ContractUpdateEndDateResponse` **post** `/v1/contracts/updateEndDate` Update the end date of a contract ### Parameters - **body:** `ContractUpdateEndDateParams` - **contract\_id:** `string` ID of the contract to update - **customer\_id:** `string` ID of the customer whose contract is to be updated - **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. - **ending\_before:** `string` RFC 3339 timestamp indicating when the contract will end (exclusive). If not provided, the contract will be updated to be open-ended. ### Returns - `ContractUpdateEndDateResponse` - **data:** `ID` ### Example ```node import Metronome from '@metronome/sdk'; const client = new Metronome({ bearerToken: 'My Bearer Token', }); const response = await client.v1.contracts.updateEndDate({ contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc', customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d', ending_before: '2020-01-01T00:00:00.000Z', }); console.log(response.data); ```