Retrieve All Customer Shipping Addresses

This section shows you how to retrieve all customer shipping addresses.

Endpoint

Test:
GET
https://apitest.cybersource.com
/tms/v2/customers/
{customerTokenId}
/shipping-addresses
Production:
GET
https://api.cybersource.com
/tms/v2/customers/
{customerTokenId}
/shipping-addresses
Production in India:
GET
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.
Use these query string parameters to filter the list of payment instrument tokens:
  • offset
    — Page offset number.
  • limit
    — Maximum number of items you would like returned.

REST Example: Retrieving All Customer Shipping Addresses

Request
GET
https://apitest.cybersource.com
/tms/v2/customers/F2F3ADA770102B51E053A2598D0A9078/shipping-addresses?offset=0&limit=20
Response to a Successful Request
The shipping address in the first array element is the default shipping address.
{ "_links": { "self": { "href": "/tms/v2/customers/F2F3ADA770102B51E053A2598D0A9078/shipping-addresses?offset=0&limit=20" }, "first": { "href": "/tms/v2/customers/F2F3ADA770102B51E053A2598D0A9078/shipping-addresses?offset=0&limit=20" }, "last": { "href": "/tms/v2/customers/F2F3ADA770102B51E053A2598D0A9078/shipping-addresses?offset=0&limit=20" } }, "offset": 0, "limit": 20, "count": 1, "total": 1, "_embedded": { "shippingAddresses": [ { "_links": { "self": { "href": "/tms/v2/customers/F2F3ADA770102B51E053A2598D0A9078/shipping-addresses/F2F4C2D1B966D631E053A2598D0AB155" }, "customer": { "href": "/tms/v2/customers/F2F3ADA770102B51E053A2598D0A9078" } }, "id": "F2F4C2D1B966D631E053A2598D0AB155", "default": true, "shipTo": { "firstName": "John", "lastName": "Doe", "company": "Company Name", "address1": "1 Market St", "locality": "San Francisco", "administrativeArea": "CA", "postalCode": "94105", "country": "US", "email": "
test@cybs.com
", "phoneNumber": "4158880000" }, "metadata": { "creator": "testrest" } } ] } }