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, and create new 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 Address billing addresses retrieves a list of all the customer’s addresses; similarly, Read Shipping Address 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
Type: addresses.address
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 | Valid region codes for this field can be retrieved using the Geographies Resource. | string |
postal-code | Postal code or zip code. | string |
country-name | Valid country codes for this field can be retrieved using the Geographies Resource. | 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
Type: addresses.address
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 | Valid region codes for this field can be retrieved using the Geographies Resource. | string |
postal-code | Postal code or zip code. | string |
country-name | Valid country codes for this field can be retrieved using the Geographies Resource. | 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
Type: addresses.address
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 | Valid region codes for this field can be retrieved using the Geographies Resource. | string |
postal-code | Postal code or zip code. | string |
country-name | Valid country codes for this field can be retrieved using the Geographies Resource. | string |
phone-number | Phone number | string |
organization | The organization | string |
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
Type: addresses.address
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 | Valid region codes for this field can be retrieved using the Geographies Resource. | string |
postal-code | Postal code or zip code. | string |
country-name | Valid country codes for this field can be retrieved using the Geographies Resource. | 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
Type: addresses.address
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 | Valid region codes for this field can be retrieved using the Geographies Resource. | string |
postal-code | Postal code or zip code. | string |
country-name | Valid country codes for this field can be retrieved using the Geographies Resource. | string |
phone-number | Phone number | string |
organization | The organization | string |
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 detail(s)
- 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