---
title: "Update Contract"
method: PUT
path: "/organizations/{orgId}/contracts/{id}"
tags: ["Contract"]
---

# Update Contract

`PUT /organizations/{orgId}/contracts/{id}`

Update the Contract with the given UUID.

This endpoint updates the details of the Contract with the specified ID. Used to modify details of an existing Contract such as the start or end dates.

**Note:** If you have created Custom Fields for a Contract, when you use this endpoint to update the Contract use the `customFields` parameter to preserve those Custom Fields. If you omit them from the update request, they will be lost.

## Path parameters

- `orgId` string, required
- `id` string, required

## Request body

- ContractRequest
  - `version` integer — The version number of the entity: - **Create entity:** Not valid for initial insertion of new entity - *do not use for Create*. On initial Create, version is set at 1 and listed in the response. - **Update Entity:** On Update, version is required and must match the existing version because a check is performed to ensure sequential versioning is preserved. Version is incremented by 1 and listed in the response.
  - `customFields` object — User defined fields enabling you to attach custom data. The value for a custom field can be either a string or a number. If `customFields` can also be defined for this entity at the Organizational level, `customField` values defined at individual level override values of `customFields` with the same name defined at Organization level. See [Working with Custom Fields](https://www.m3ter.com/docs/guides/creating-and-managing-products/working-with-custom-fields) in the m3ter documentation for more information.
  - `accountId` string, required — The unique identifier (UUID) of the Account associated with this Contract.
  - `name` string, required — The name of the Contract.
  - `code` string — The short code of the Contract.
  - `description` string — The description of the Contract, which provides context and information.
  - `purchaseOrderNumber` string — The Purchase Order Number associated with the Contract.
  - `applyContractPeriodLimits` boolean
  - `usageFilters` UsageFilter[]
    - `dimensionCode` string, required
    - `value` string, required
    - `mode` 'INCLUDE' | 'EXCLUDE', required
  - `billGroupingKeyId` string
  - `startDate` string, date, required — The start date for the Contract *(in ISO-8601 format)*. This date is inclusive, meaning the Contract is active from this date onward.
  - `endDate` string, date, required — The exclusive end date of the Contract *(in ISO-8601 format)*. This means the Contract is active until midnight on the day ***before*** this date.

## Response `200`

Returns the updated Contract

- ContractResponse
  - `id` string, required — The UUID of the entity.
  - `version` integer — The version number: - **Create:** On initial Create to insert a new entity, the version is set at 1 in the response. - **Update:** On successful Update, the version is incremented by 1 in the response.
  - `customFields` object — User defined fields enabling you to attach custom data. The value for a custom field can be either a string or a number. If `customFields` can also be defined for this entity at the Organizational level,`customField` values defined at individual level override values of `customFields` with the same name defined at Organization level. See [Working with Custom Fields](https://www.m3ter.com/docs/guides/creating-and-managing-products/working-with-custom-fields) in the m3ter documentation for more information.
  - `accountId` string — The unique identifier (UUID) of the Account associated with this Contract.
  - `name` string — The name of the Contract.
  - `code` string — The short code of the Contract.
  - `description` string — The description of the Contract, which provides context and information.
  - `purchaseOrderNumber` string — The Purchase Order Number associated with the Contract.
  - `applyContractPeriodLimits` boolean
  - `usageFilters` UsageFilter[]
    - `dimensionCode` string, required
    - `value` string, required
    - `mode` 'INCLUDE' | 'EXCLUDE', required
  - `billGroupingKeyId` string
  - `startDate` string, date — The start date for the Contract *(in ISO-8601 format)*. This date is inclusive, meaning the Contract is active from this date onward.
  - `endDate` string, date — The exclusive end date of the Contract *(in ISO-8601 format)*. This means the Contract is active until midnight on the day ***before*** this date.
  - `dtCreated` string, date-time — The date and time *(in ISO-8601 format)* when the Contract was created.
  - `dtLastModified` string, date-time — The date and time *(in ISO-8601 format)* when the Contract was last modified.
  - `createdBy` string — The unique identifier (UUID) of the user who created this Contract.
  - `lastModifiedBy` string — The unique identifier (UUID) of the user who last modified this Contract.

## Other responses

- `4XX` — Error message
- `5XX` — Error message

---

[API](https://skmtc.net/m3ter-com/apis/m3ter-api.md) · [All operations](https://skmtc.net/m3ter-com/apis/m3ter-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/m3ter-com/m3ter-api/revisions/ac93d1a9e6d9/schema)
