Change a Default Shipping Address
This section shows you how to change a default customer shipping address.
Endpoint
Test:
PATCH
https://apitest.cybersource.com
/tms/v2/customers/{customerTokenId}
/shipping-addresses/{shippingAddressTokenId}Production:
PATCH
https://api.cybersource.com
/tms/v2/customers/{customerTokenId}
/shipping-addresses/{shippingAddressTokenId}Production in India:
PATCH
https://api.in.cybersource.com
/tms/v2/customers/{customerTokenId}
/shipping-addresses/{shippingAddressTokenId}The is the customer token ID returned in
the path parameter, pass the
shipping address token ID response field returned when you created a shipping
address token. For more information, see Create a Customer and Create a Customer Shipping Address.
{customerTokenId}
id
field when you created the customer token. In the
{shippingAddressTokenId}
Required Fields for Changing a Default Shipping Address
- default
- Set totrue.
Related Information
REST Example: Changing Default Shipping Address
Request
{ "default": true }
Response to a Successful Request
{ "_links": { "self": { "href": "/tms/v2/customers/F45FB3E443AC3C57E053A2598D0A9CFF/shipping-addresses/F45FD8DE51B99E9CE053A2598D0AFDFA" }, "customer": { "href": "/tms/v2/customers/F45FB3E443AC3C57E053A2598D0A9CFF" } }, "id": "F45FD8DE51B99E9CE053A2598D0AFDFA", "default": true, "shipTo": { "firstName": "John", "lastName": "Doe", "company": "Visa", "address1": "1 Market St", "locality": "san francisco", "administrativeArea": "CA", "postalCode": "94105", "country": "US", "email": "test@cybs.com", "phoneNumber": "4158880000" }, "metadata": { "creator": "testrest" } }