# Update Account Contract Data
source: https://developer.mastercard.com/mastercard-processing-core/documentation/use-cases/data-management/update-accnt-contract-data/index.md

## Overview {#overview}

This use case describes how you modify the account contract's data in the Mastercard Processing CMS.

## Sequence diagram {#sequence-diagram}

![Sequence diagram](https://static.developer.mastercard.com/content/mastercard-processing-core/uploads/update-accnt-contract-data.png)

### Explanation {#explanation}

1. The server sends a `GET` request to the `/accounts/{account_contract_id}` endpoint.
2. The API returns the account contract's data and the `ETag` header, which uniquely identifies a particular version of the `account_contract_id`.
3. The server sends a `PATCH` request to the `/accounts/{account_contract_id}` endpoint passing the fields to be modified in the request body. The server must send in the request the `If-Match` header and the `ETag` value retrieved in step 2. The `If-Match` header helps to prevent overwriting during simultaneous updates of the same resource.
4. The API returns the HTTP status `204`. Note: Some fields of the account contract object can be modified. For example, the `accountContractNumber` can only be set during the account contract creation request. The `PATCH` method must be used for partial updates. The Mastercard Processing API `PATCH` method is designed based on [JSON Merge PATCH (RFC 7386)](https://datatracker.ietf.org/doc/html/rfc7386). To update a specific field, include the new value of the field in the request. If you want to clear a field, you must pass the null value in the request field. Tip: You can use a dedicated API operation to update account contract custom data. For more information, refer to the [Add or update custom data](https://developer.mastercard.com/mastercard-processing-core/documentation/use-cases/data-management/add-update-custom-data/index.md) use case.

Refer to [Sandbox testing](https://developer.mastercard.com/mastercard-processing-core/documentation/sandbox-testing/data-management/update-acc-contract-data/index.md) for information on how to execute the use case in the Sandbox environment.

## Endpoint {#endpoint}


API Reference: `PATCH /accounts/{account_contract_id}`

