# Update Client Data
source: https://developer.mastercard.com/mastercard-processing-core/documentation/use-cases/data-management/update-client-data/index.md

## Overview {#overview}

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

## Sequence diagram {#sequence-diagram}

Diagram update-client-data-new

### Explanation {#explanation}

1. The cardholder requests to update personal data.
2. The mobile application or e-banking service sends the request to the server to modify the client's data.
3. The server sends a `GET` request to the `/clients/{client_id}` endpoint.
4. The API returns the client's data and the `ETag` header, which uniquely identifies a particular version of the `client_id`.
5. The server sends a `PATCH` request to the `/clients/{client_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 3. The `If-Match` header helps to prevent overwriting during simultaneous updates of the same resource.
6. The API returns the HTTP status `204`.
7. The server sends a response to the mobile application or e-banking service.
8. The mobile application or e-banking service notifies the cardholder that client's data has been updated successfully.

Note: Some fields of the `Client` object can be modified. For example, the `clientNumber` can only be set during the client 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 the client's 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-client-data/index.md) for information on how to execute the use case in the Sandbox environment.

<br />

## Endpoint {#endpoint}


API Reference: `PATCH /clients/{client_id}`

