Customers

Create an Address for a Customer

Creates a new postal address for the given customer.

post/customers/customers/{customerId}/addresses

Request body

namestring required

Short label the customer uses to identify the address — shown in address pickers at checkout. Typical values are Home, Work or a contact name.

address_line_1string required

First line of the postal address — usually the street number and street name. Required because postal carriers cannot deliver without it.

address_line_2string nullable

Optional second line of the postal address, used for suite/apartment numbers or building names that don't fit on address_line_1.

citystring nullable

City or town the address sits in. Optional because some rural addresses don't use a city line; when omitted the postcode is used for delivery routing.

countystring nullable

County, state or province. Optional in regions where the postcode alone uniquely identifies a delivery area.

countrystring nullable

Country the address is in. Free text rather than an ISO code so the customer can match the wording used on their shipping documents.

postcodestring nullable

Postal/ZIP code for the address. Optional because some countries don't use postcodes, but strongly recommended for delivery routing where they exist.

Example request

{
  "name": "Home",
  "address_line_1": "123 Fake Street",
  "address_line_2": "Some building",
  "city": "London",
  "county": "London",
  "country": "United Kingdom",
  "postcode": "E14 1AA"
}

Response

The customer's address was successfully retrieved

Example response

{
  "data": {
    "id": "000000-000000-000000-000000",
    "name": "Home",
    "address_line_1": "123 Fake Street",
    "address_line_2": "Some Building",
    "city": "London",
    "county": "London",
    "country": "United Kingdom",
    "country_code": "GB",
    "postcode": "E14 1AA"
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.