Add a Non-Default Shipping Address

This section shows you how to add a non-default customer shipping address.

Endpoint

Test:
POST
https://apitest.cybersource.com
/tms/v2/customers/
{customerTokenId}
/shipping-addresses
Production:
POST
https://api.cybersource.com
/tms/v2/customers/
{customerTokenId}
/shipping-addresses
Production in India:
POST
https://api.in.cybersource.com
/tms/v2/customers/
{customerTokenId}
/shipping-addresses
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 Shipping Address.

Required Fields for Adding a Non-Default Shipping Address

You can include any of the following fields in the body of the request:
default
Set to
false
.
shipTo.address1
shipTo.address2
shipTo.administrativeArea
shipTo.company
shipTo.country
shipTo.email
shipTo.firstName
shipTo.lastName
shipTo.locality
shipTo.phoneNumber
shipTo.postalCode
Add a Non-Default Shipping Address

REST Example: Adding a Non-Default Shipping Address

Request
{ "default": false, "shipTo": { "firstName": "John", "lastName": "Doe", "company": "Visa", "address1": "1 Market St", "locality": "san francisco", "administrativeArea": "CA", "postalCode": "94105", "country": "US", "phoneNumber": "4158880000", "email": "
test@cybs.com
" } }
Response to a Successful Request
{ "_links": { "self": { "href": "/tms/v2/customers/F45FB3E443AC3C57E053A2598D0A9CFF/shipping-addresses/F45FD8DE51B99E9CE053A2598D0AFDFA" }, "customer": { "href": "/tms/v2/customers/F45FB3E443AC3C57E053A2598D0A9CFF" } }, "id": "F45FD8DE51B99E9CE053A2598D0AFDFA", "default": false, "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" } }
Add a Non-Default Shipping Address