v14

OpenAPI 3.1.02026-08-03122113375.9 KB
user-addresses

Create address

Create and persist a shipping or billing address for the authenticated user.

Use this endpoint when the user confirms a new address in checkout or account settings.

Common ways to call this endpoint:

  1. Assisted flow: find address -> retrieve details -> create saved address.
  2. Manual flow: user enters address fields directly, then create.

Request guidance:

  • type must be shipping or billing.
  • country should be an ISO 3166-1 alpha-2 country code (for example, GB).
  • Set loqateId and isValidated when the address came from the lookup endpoints.
  • Set isPrimary to true when this should become the default address for that type.

Behavior notes:

  • Returns 201 with the newly saved address record.
  • A user can store up to 10 addresses in total; additional creates return 400.
  • If isPrimary is true, existing primary addresses of the same type are replaced.
  • After creation, call GET /user/addresses to refresh the full address list in UI.
post/user/addresses

Request body

labelstring nullable

A recognisable label for the address, e.g. "Home", "Work"

type'shipping' | 'billing' required

Type of address, 'shipping' or 'billing'

line1string required

First line of the formatted address

line2string nullable

Second line of the formatted address

citystring required

City or town

statestring required

State or province name

postalCodestring required

Postal or ZIP code

countrystring required

ISO 3166-1 alpha-2 country code

loqateIdstring nullable

The LoqateID of the address, if applicable

isValidatedboolean nullable

Whether the address has been validated using Loqate

isPrimaryboolean nullable

Whether the address is the primary address for this type

Response

Address created

labelstring nullable

A recognisable label for the address, e.g. "Home", "Work"

type'shipping' | 'billing' required

Type of address, 'shipping' or 'billing'

line1string required

First line of the formatted address

line2string nullable

Second line of the formatted address

citystring required

City or town

statestring required

State or province name

postalCodestring required

Postal or ZIP code

countrystring required

ISO 3166-1 alpha-2 country code

loqateIdstring nullable

The LoqateID of the address, if applicable

isValidatedboolean nullable

Whether the address has been validated using Loqate

isPrimaryboolean nullable

Whether the address is the primary address for this type

idstring required

Unique identifier for the address

createdAtstring nullable

Timestamp when the address was created

updatedAtstring nullable

Timestamp when the address was last updated