Addresses
The Addresses resource family is responsible for the customer’s shipping and billing address. This resource allows you to retrieve a logged in customer’s addresses, edit existing addresses, create new addresses, and set default billing and shipping addresses.
Shipping Address vs. Billing Addresses
A shipping address is where you ship the physical goods that you purchased in the store. A billing address is the address associated with the paymentmethods used for a purchase. For example, the billing address would be the address on the credit card that is being used for a purchase. Customers choose which billing and shipping address to use for a purchase through the orders resources.
Currently you cannot create an address
and label it as a shipping only address or label it as 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 customer’s addresses; similarly,
Read Shipping Addresses retrieves a list of all the customer’s addresses. Future versions of the API may allow the possibility to label what the
address is for, but out of the box this API version does not support this functionality.
Read Addresses
Read list of the customer’s addresses.
Workflow
- Start with profile
GET
the link with rel: addresses- Render the response
Read Address
Read an address from a list of addresses.
Workflow
- Start with addresses
GET
the link with rel: element- Render the response
Response Fields
addresses.address
Type: Name | Description | Type |
---|---|---|
name | The customer name. | object |
given-name | The person’s given name. | string |
family-name | The person’s family name. | string |
address | The customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card. | object |
street-address | The street address. | string |
extended-address | Extra field for address information. This field is optional. | string |
locality | The city name. | string |
region | The region name. A region typically corresponds to a province or a state of a country. | string |
postal-code | Postal code or zip code. | string |
country-name | The country name. | string |
phone-number | Phone number | string |
organization | The organization | string |
Read Shipping Addresses
Read list of the customer’s shipping addresses.
Workflow
- Start with addresses
GET
the link with rel: shippingaddresses- Render the response
Read Shipping Address
Read a shipping address from a list of shipping addresses.
Workflow
- Start with shipping-addresses
GET
the link with rel: element- Render the response
Response Fields
addresses.address
Type: Name | Description | Type |
---|---|---|
name | The customer name. | object |
given-name | The person’s given name. | string |
family-name | The person’s family name. | string |
address | The customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card. | object |
street-address | The street address. | string |
extended-address | Extra field for address information. This field is optional. | string |
locality | The city name. | string |
region | The region name. A region typically corresponds to a province or a state of a country. | string |
postal-code | Postal code or zip code. | string |
country-name | The country name. | string |
phone-number | Phone number | string |
organization | The organization | string |
Read Default Shipping Address
Read the customer’s default shipping addresses.
Workflow
- Start with shipping-addresses
GET
the link with rel: default- Render the response
Response Fields
addresses.address
Type: Name | Description | Type |
---|---|---|
name | The customer name. | object |
given-name | The person’s given name. | string |
family-name | The person’s family name. | string |
address | The customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card. | object |
street-address | The street address. | string |
extended-address | Extra field for address information. This field is optional. | string |
locality | The city name. | string |
region | The region name. A region typically corresponds to a province or a state of a country. | string |
postal-code | Postal code or zip code. | string |
country-name | The country name. | string |
phone-number | Phone number | string |
organization | The organization | string |
Read Chosen Default Shipping Address
Use the default shipping address selector to read the chosen default shipping address.
Workflow
- Start with shipping-addresses
GET
the link with rel: selectorGET
the link with rel: chosenGET
the link with rel: description- Render the response
Response Fields
addresses.address
Type: Name | Description | Type |
---|---|---|
name | The customer name. | object |
given-name | The person’s given name. | string |
family-name | The person’s family name. | string |
address | The customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card. | object |
street-address | The street address. | string |
extended-address | Extra field for address information. This field is optional. | string |
locality | The city name. | string |
region | The region name. A region typically corresponds to a province or a state of a country. | string |
postal-code | Postal code or zip code. | string |
country-name | The country name. | string |
phone-number | Phone number | string |
organization | The organization | string |
Read Default Shipping Address Choice
Use the default shipping address selector to read a default shipping address choice.
Workflow
- Start with shipping-addresses
GET
the link with rel: selectorGET
the link with rel: choiceGET
the link with rel: description- Render the response
Response Fields
addresses.address
Type: Name | Description | Type |
---|---|---|
name | The customer name. | object |
given-name | The person’s given name. | string |
family-name | The person’s family name. | string |
address | The customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card. | object |
street-address | The street address. | string |
extended-address | Extra field for address information. This field is optional. | string |
locality | The city name. | string |
region | The region name. A region typically corresponds to a province or a state of a country. | string |
postal-code | Postal code or zip code. | string |
country-name | The country name. | string |
phone-number | Phone number | string |
organization | The organization | string |
Select Default Shipping Address
Use the default shipping address selector to select the default shipping address.
Workflow
- Start with shipping-addresses
GET
the link with rel: selectorGET
the link with rel: choicePOST
the choice using the link with rel: selectaction
Read Billing Addresses
Read list of the customer’s billing addresses.
Workflow
- Start with addresses
GET
the link with rel: billingaddresses- Render the response
Read Billing Address
Read billing addresses from the list of billing addresses.
Workflow
- Start with billing-addresses
GET
the link with rel: element- Render the response
Response Fields
addresses.address
Type: Name | Description | Type |
---|---|---|
name | The customer name. | object |
given-name | The person’s given name. | string |
family-name | The person’s family name. | string |
address | The customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card. | object |
street-address | The street address. | string |
extended-address | Extra field for address information. This field is optional. | string |
locality | The city name. | string |
region | The region name. A region typically corresponds to a province or a state of a country. | string |
postal-code | Postal code or zip code. | string |
country-name | The country name. | string |
phone-number | Phone number | string |
organization | The organization | string |
Read Default Billing Address
Read the customer’s default billing addresses.
Workflow
- Start with billing-addresses
GET
the link with rel: default- Render the response
Response Fields
addresses.address
Type: Name | Description | Type |
---|---|---|
name | The customer name. | object |
given-name | The person’s given name. | string |
family-name | The person’s family name. | string |
address | The customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card. | object |
street-address | The street address. | string |
extended-address | Extra field for address information. This field is optional. | string |
locality | The city name. | string |
region | The region name. A region typically corresponds to a province or a state of a country. | string |
postal-code | Postal code or zip code. | string |
country-name | The country name. | string |
phone-number | Phone number | string |
organization | The organization | string |
Read Chosen Default Billing Address
Use the default billing address selector to read the chosen default billing address.
Workflow
- Start with billing-addresses
GET
the link with rel: selectorGET
the link with rel: chosenGET
the link with rel: description- Render the response
Response Fields
addresses.address
Type: Name | Description | Type |
---|---|---|
name | The customer name. | object |
given-name | The person’s given name. | string |
family-name | The person’s family name. | string |
address | The customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card. | object |
street-address | The street address. | string |
extended-address | Extra field for address information. This field is optional. | string |
locality | The city name. | string |
region | The region name. A region typically corresponds to a province or a state of a country. | string |
postal-code | Postal code or zip code. | string |
country-name | The country name. | string |
phone-number | Phone number | string |
organization | The organization | string |
Read Default Billing Address Choice
Use the default billing address selector to read a default billing address choice.
Workflow
- Start with billing-addresses
GET
the link with rel: selectorGET
the link with rel: choiceGET
the link with rel: description- Render the response
Response Fields
addresses.address
Type: Name | Description | Type |
---|---|---|
name | The customer name. | object |
given-name | The person’s given name. | string |
family-name | The person’s family name. | string |
address | The customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card. | object |
street-address | The street address. | string |
extended-address | Extra field for address information. This field is optional. | string |
locality | The city name. | string |
region | The region name. A region typically corresponds to a province or a state of a country. | string |
postal-code | Postal code or zip code. | string |
country-name | The country name. | string |
phone-number | Phone number | string |
organization | The organization | string |
Select Default Billing Address
Use the default billing address selector to select the default billing address.
Workflow
- Start with billing-addresses
GET
the link with rel: selectorGET
the link with rel: choicePOST
the choice using the link with rel: selectaction
Delete Address
Delete an address.
If the address was selected to use in an order and the address is deleted, the order will show a NeedInfo link.
Workflow
- Start with address
DELETE
address
Update Address
Update an address.
Workflow
- Start with address
- Edit the address object with new details
- Update address using a
PUT
request
Add Address
Create an address.
Workflow
- Start with addresses
GET
the link with rel: addressform- Fill out the form
POST
the form using the link with rel: createaddressaction
Request Fields
addresses.address
Type: Name | Description | Type |
---|---|---|
name | The customer name. | object |
given-name | The person’s given name. | string |
family-name | The person’s family name. | string |
address | The customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card. | object |
street-address | The street address. | string |
extended-address | Extra field for address information. This field is optional. | string |
locality | The city name. | string |
region | The region name. A region typically corresponds to a province or a state of a country. | string |
postal-code | Postal code or zip code. | string |
country-name | The country name. | string |
phone-number | Phone number | string |
organization | The organization | string |