Next Commerce
Customers

Users Addresses Create

POST
/users/{id}/addresses/

Authorization

oauth2 users:write
AuthorizationBearer <token>

Generate an Access Token through Settings > API Access for single store access or use the Authorization Code flow with your partner App Client ID. Use required permission scopes for API endpoint access. Example Authorization: Bearer 123

In: header

Scope: users:write

Path Parameters

id*integer

A unique integer value identifying this User address.

Header Parameters

X-29next-API-Version*string
Default"unstable"
Value in"unstable"
country*string

The address country code.

first_name?string

The first name of the address.

Lengthlength <= 255
is_default_for_billing?boolean

Use this address as the default billing address.

is_default_for_shipping?boolean

Use this address as the default shipping address.

last_name?string

The last name of the address.

Lengthlength <= 255
line1*string

The first line of the address.

Lengthlength <= 255
line2?string

Optional second line of of the address.

Lengthlength <= 255
line3?string

Optional third line of of the address.

Lengthlength <= 255
line4*string

City of the address.

Lengthlength <= 255
notes?string

Tell us anything we should know when delivering your order.

phone_number?string

The address phone number.

Lengthlength <= 128
postcode?string

The address post code or zip code.

Lengthlength <= 64
state?string

The address state/province.

Lengthlength <= 255

Response Body

application/json

curl -X POST "https://example.29next.store/api/admin/users/0/addresses/" \  -H "X-29next-API-Version: unstable" \  -H "Content-Type: application/json" \  -d '{    "country": "string",    "line1": "string",    "line4": "string"  }'
{
  "country": "string",
  "first_name": "string",
  "id": 0,
  "is_default_for_billing": true,
  "is_default_for_shipping": true,
  "last_name": "string",
  "line1": "string",
  "line2": "string",
  "line3": "string",
  "line4": "string",
  "notes": "string",
  "phone_number": "string",
  "postcode": "string",
  "state": "string"
}