Update a Customer {#tms-cust-tkn-update-intro}
==============================================

This section describes how to update a customer token.

Endpoint
--------

**Test:** `PATCH ``https://apitest.cybersource.com``/tms/v2/customers/`*{customerTokenId}*{#tms-cust-tkn-update-intro_restcust-test}  
**Production:** `PATCH ``https://api.cybersource.com``/tms/v2/customers/`*{customerTokenId}*  
**Production in India:** `PATCH ``https://api.in.cybersource.com``/tms/v2/customers/`*{customerTokenId}*{#tms-cust-tkn-update-intro_restcust-prod-india}  
**Production in Saudi Arabia:** `PATCH ``https://api.sa.cybersource.com``/tms/v2/customers/`*{customerTokenId}*{#tms-cust-tkn-update-intro_restcust-prod-ksa}  
**Test in Saudi Arabia:** `PATCH ``https://apitest.sa.cybersource.com``/tms/v2/customers/`*{customerTokenId}*{#tms-cust-tkn-update-intro_restcust-test-ksa}  
The *`{customerTokenId}`* is the customer token ID returned in the id field when you created the customer token. For more information, see [Create a Customer](/docs/cybs/en-us/tms/developer/all/rest/tms/tms-cust-tkn/tms-manage-cust-tkn/tms-cust-tkn-create-intro.md ""). Include only the fields you want to add or update in the request.

Optional Fields for Updating a Customer {#tms-cust-tkn-update-optfields}
========================================================================

You can include any of the following fields in the body of the request:

buyerInformation.merchantCustomerID
:

buyerInformation.email
:

clientReferenceInformation.code
:

merchantDefinedInformation.name
:

merchantDefinedInformation.value
:
{#tms-cust-tkn-update-optfields_dl_u12_vqy_dwb}

Related Information {#tms-cust-tkn-update-optfields_section_jpc_xzz_sxb}
------------------------------------------------------------------------

* [API Field Reference for the REST API](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/api-fields-about-guide.md "")
  {#tms-cust-tkn-update-optfields_ul_kpc_xzz_sxb}

REST Example: Updating a Customer {#tms-cust-tkn-update-ex-rest}
================================================================

Request

```keyword
PATCH https://apitest.cybersource.com/tms/v2/customers/F2F3ADA770102B51E053A2598D0A9078
```

Response to a Successful Request

```
{
  "_links": {
    "self": {
      "href": "/tms/v2/customers/F2F3ADA770102B51E053A2598D0A9078"
    },
    "paymentInstruments": {
      "href": "/tms/v2/customers/F2F3ADA770102B51E053A2598D0A9078/payment-instruments"
    },
    "shippingAddresses": {
      "href": "/tms/v2/customers/F2F3ADA770102B51E053A2598D0A9078/shipping-addresses"
    }
  },
  "id": "F2F3ADA770102B51E053A2598D0A9078",
  "buyerInformation": {
    "merchantCustomerID": "Your customer identifier",
    "email": "test@cybs.com"
  },
  "clientReferenceInformation": {
    "code": "TC50171_3"
  },
  "merchantDefinedInformation": [
    {
      "name": "data1",
      "value": "Your customer data"
    }
  ],
  "metadata": {
    "creator": "testrest"
  }
}
            
```

