Add an Address to a Profile

POST /customervault/v1/profiles/profile_id/addresses

In the previous example you created a profile for a customer. As a result, the API returned a profile ID representing that profile.

The Customer Vault API allows you to add multiple addresses to your customer's profile. To add an address to the profile, you must use that profile ID and make a POST request to the addresses endpoint of the relevant profile.

Request Example
curl -X POST \
-u devcentre322:B-qa2-0-53625f86-302c021476f52bdc9deab7aea876bb28762e62f92fc6712d0214736abf501e9675e55940e83ef77f5c304edc7968 \
-H 'Content-Type: application/json' \
-d ' {
  "street" : "100 Queen Street West",
  "city" : "Toronto",
  "state" : "ON",
  "country" : "CA",
  "zip" : "M5H 2N2"
Value Required? Type Description
city Yes string The customer's city.
country Yes string The customer's country.
defaultShippingAddressIndicator boolean Flag marking this address as the default shipping address.
nickName string An alias for this address defined by the customer (for example, "home address").
phone string The recipient's phone number.
recipientName string The name of the recipient at this address, if it is different from the name in the profile.
state string The customer's state/province/region.
street Yes string The first line of the customer's address.
street2 string The second line of the customer's address.
zip Yes string The customers' zip code.
Response Example
  "id" : "81ffcddf-ad82-40d2-aaa0-c4f9c376ad65",
  "status" : "ACTIVE",
  "street" : "100 Queen Street West",
  "city" : "Toronto",
  "state" : "ON",
  "country" : "CA",
  "zip" : "M5H 2N2",
  "defaultShippingAddressIndicator" : false

The response contains all the details submitted in the request, plus the address id. Make a note of the id for use later.

Value Type Description
id string The address identifier.
status enum

The status of the address request:


See our full API reference documentation for a list of all the JSON attributes and types available for the full list of address operations for details

You can look up the Profile and associated Address using a GET request as follows:

GET /customervault/v1/profiles/profile_id?fields=cards,addresses

The fields parameter is a comma-separated list of subcomponents to return. See the API Reference Section for more details.

Did you find this page useful?