Skip to main content
Version: 8.3.x

Addresses

The Addresses resource family provides access to addresses for shoppers and accounts. With this resource you can retrieve, edit, create and set default billing and shipping addresses.

Billing Addresses versus Shipping Addresses​

Currently, you cannot create an address and label it as a shipping only address or a billing only address. Cortex does not make a distinction between the shipping and billing addresses. Read Billing Addresses retrieves a list of all the shopper or account addresses; similarly, Read Shipping Addresses retrieves a list of all the shopper or account addresses.

Read Addresses for Profile​

Read list of the shopper’s addresses.

Workflow​

  1. Start with profile
  2. GET the link with rel: addresses
  3. Render the response

Read Addresses for Account​

Read list of the account’s addresses.

Workflow​

  1. Start with account
  2. GET the link with rel: addresses
  3. Render the response

Read Address​

Read an address from a list of addresses.

Workflow​

  1. Start with profile addresses or account addresses
  2. GET the link with rel: element
  3. Render the response

Response​

Type: addresses.address​

NameDescriptionType
nameThe customer name.object
  given-nameThe person’s given name.string
  family-nameThe person’s family name.string
addressThe customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card.object
  street-addressThe street address.string
  extended-addressAn extra field for address information. This field is optional.string
  localityThe city name.string
  regionThe region name. A region typically corresponds to a province or a state of a country.string
  postal-codeThe postal code or zip code.string
  country-nameThe country name.string
phone-numberThe phone number.string
organizationThe organization.string

Sample​

{
"self": {
"type": "addresses.address",
"uri": "/addresses/mobee/gazdcnbumu2teljwgntgkljugbrgcllcge3tellbgm3tqnjygaydkylemu=",
"href": "https://cortex.elasticpath.com/cortex/addresses/mobee/gazdcnbumu2teljwgntgkljugbrgcllcge3tellbgm3tqnjygaydkylemu="
},
"messages": [],
"links": [
{
"rel": "list",
"type": "addresses.addresses",
"href": "https://cortex.elasticpath.com/cortex/addresses/mobee"
},
{
"rel": "profile",
"type": "profiles.profile",
"href": "https://cortex.elasticpath.com/cortex/profiles/mobee/ovzwk4tumvzxiz3vnfsa="
}
],
"address": {
"country-name": "CA",
"extended-address": null,
"locality": "Vancouver",
"postal-code": "VVV VVV",
"region": "BC",
"street-address": "1 Test St"
},
"name": {
"family-name": "user",
"given-name": "test"
},
"organization": null,
"phone-number": "7781112111"
}

Read Shipping Addresses​

Read list of the customer’s shipping addresses.

Workflow​

  1. Start with profile addresses or account addresses
  2. GET the link with rel: shippingaddresses
  3. Render the response

Read Shipping Address​

Read a shipping address from a list of shipping addresses.

Workflow​

  1. Start with shipping addresses
  2. GET the link with rel: element
  3. Render the response

Response Fields​

Type: addresses.address​

NameDescriptionType
nameThe customer name.object
  given-nameThe person’s given name.string
  family-nameThe person’s family name.string
addressThe customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card.object
  street-addressThe street address.string
  extended-addressAn extra field for address information. This field is optional.string
  localityThe city name.string
  regionThe region name. A region typically corresponds to a province or a state of a country.string
  postal-codeThe postal code or zip code.string
  country-nameThe country name.string
phone-numberThe phone number.string
organizationThe organization.string

Read Default Shipping Address​

Read the customer’s default shipping addresses.

Workflow​

  1. Start with shipping addresses
  2. GET the link with rel: default
  3. Render the response

Response Fields​

Type: addresses.address​

NameDescriptionType
nameThe customer name.object
  given-nameThe person’s given name.string
  family-nameThe person’s family name.string
addressThe customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card.object
  street-addressThe street address.string
  extended-addressAn extra field for address information. This field is optional.string
  localityThe city name.string
  regionThe region name. A region typically corresponds to a province or a state of a country.string
  postal-codeThe postal code or zip code.string
  country-nameThe country name.string
phone-numberThe phone number.string
organizationThe organization.string

Read Chosen Default Shipping Address​

Use the default shipping address selector to read the chosen default shipping address.

Workflow​

  1. Start with shipping addresses
  2. GET the link with rel: selector
  3. GET the link with rel: chosen
  4. GET the link with rel: description
  5. Render the response

Response Fields​

Type: addresses.address​

NameDescriptionType
nameThe customer name.object
  given-nameThe person’s given name.string
  family-nameThe person’s family name.string
addressThe customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card.object
  street-addressThe street address.string
  extended-addressAn extra field for address information. This field is optional.string
  localityThe city name.string
  regionThe region name. A region typically corresponds to a province or a state of a country.string
  postal-codeThe postal code or zip code.string
  country-nameThe country name.string
phone-numberThe phone number.string
organizationThe organization.string

Read Default Shipping Address Choice​

Use the default shipping address selector to read a default shipping address choice.

Workflow​

  1. Start with shipping-addresses
  2. GET the link with rel: selector
  3. GET the link with rel: choice
  4. GET the link with rel: description
  5. Render the response

Response Fields​

Type: addresses.address​

NameDescriptionType
nameThe customer name.object
  given-nameThe person’s given name.string
  family-nameThe person’s family name.string
addressThe customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card.object
  street-addressThe street address.string
  extended-addressAn extra field for address information. This field is optional.string
  localityThe city name.string
  regionThe region name. A region typically corresponds to a province or a state of a country.string
  postal-codeThe postal code or zip code.string
  country-nameThe country name.string
phone-numberThe phone number.string
organizationThe organization.string

Select Default Shipping Address​

Use the default shipping address selector to choose the default shipping address.

Workflow​

  1. Start with shipping addresses
  2. GET the link with rel: selector
  3. GET the link with rel: choice
  4. POST the choice using the link with rel: selectaction

Read Billing Addresses​

Read a list of the customer’s billing addresses.

Workflow​

  1. Start with profile addresses or account addresses
  2. GET the link with rel: billingaddresses
  3. Render the response

Read Billing Address​

Read billing addresses from the list of billing addresses.

Workflow​

  1. Start with billing addresses
  2. GET the link with rel: element
  3. Render the response

Response Fields​

Type: addresses.address​

NameDescriptionType
nameThe customer name.object
  given-nameThe person’s given name.string
  family-nameThe person’s family name.string
addressThe customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card.object
  street-addressThe street address.string
  extended-addressAn extra field for address information. This field is optional.string
  localityThe city name.string
  regionThe region name. A region typically corresponds to a province or a state of a country.string
  postal-codeThe postal code or zip code.string
  country-nameThe country name.string
phone-numberThe phone number.string
organizationThe organization.string

Read Default Billing Address​

Read the customer’s default billing addresses.

Workflow​

  1. Start with billing addresses
  2. GET the link with rel: default
  3. Render the response

Response Fields​

Type: addresses.address​

NameDescriptionType
nameThe customer name.object
  given-nameThe person’s given name.string
  family-nameThe person’s family name.string
addressThe customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card.object
  street-addressThe street address.string
  extended-addressAn extra field for address information. This field is optional.string
  localityThe city name.string
  regionThe region name. A region typically corresponds to a province or a state of a country.string
  postal-codeThe postal code or zip code.string
  country-nameThe country name.string
phone-numberThe phone number.string
organizationThe organization.string

Read Chosen Default Billing Address​

Use the default billing address selector to read the chosen default billing address.

Workflow​

  1. Start with billing addresses
  2. GET the link with rel: selector
  3. GET the link with rel: chosen
  4. GET the link with rel: description
  5. Render the response

Response Fields​

Type: addresses.address​

NameDescriptionType
nameThe customer name.object
  given-nameThe person’s given name.string
  family-nameThe person’s family name.string
addressThe customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card.object
  street-addressThe street address.string
  extended-addressAn extra field for address information. This field is optional.string
  localityThe city name.string
  regionThe region name. A region typically corresponds to a province or a state of a country.string
  postal-codeThe postal code or zip code.string
  country-nameThe country name.string
phone-numberThe phone number.string
organizationThe organization.string

Read Default Billing Address Choice​

Use the default billing address selector to read a default billing address choice.

Workflow​

  1. Start with billing addresses
  2. GET the link with rel: selector
  3. GET the link with rel: choice
  4. GET the link with rel: description
  5. Render the response

Response Fields​

Type: addresses.address​

NameDescriptionType
nameThe customer name.object
  given-nameThe person’s given name.string
  family-nameThe person’s family name.string
addressThe customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card.object
  street-addressThe street address.string
  extended-addressAn extra field for address information. This field is optional.string
  localityThe city name.string
  regionThe region name. A region typically corresponds to a province or a state of a country.string
  postal-codeThe postal code or zip code.string
  country-nameThe country name.string
phone-numberThe phone number.string
organizationThe organization.string

Select Default Billing Address​

Use the default billing address selector to select the default billing address.

Workflow​

  1. Start with billing addresses
  2. GET the link with rel: selector
  3. GET the link with rel: choice
  4. POST the choice using the link with rel: selectaction

Delete Address​

If the address was selected to use in an order and the address is deleted, the order shows a NeedInfo link.

Workflow​

  1. Start with address
  2. DELETE address

Update Address​

Make changes to an existing address.

Workflow​

  1. Start with address
  2. Edit the address object with new details
  3. Update address using a PUT request

Add Address​

Create an address.

Workflow​

  1. Start with profile addresses or account addresses
  2. GET the link with rel: addressform
  3. Fill out the form
  4. POST the form using the link with rel: createaddressaction

Request Fields​

Type: addresses.address​

NameDescriptionType
nameThe customer name.object
  given-nameThe person’s given name.string
  family-nameThe person’s family name.string
addressThe customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card.object
  street-addressThe street address.string
  extended-addressAn extra field for address information. This field is optional.string
  localityThe city name.string
  regionThe region name. A region typically corresponds to a province or a state of a country.string
  postal-codeThe postal code or zip code.string
  country-nameThe country name.string
phone-numberThe phone number.string
organizationThe organization.string