Skip to content
Elara One docs
Customers

Add an address

POST
/v1/account/addresses

Authorization

tenantKeybearerAuth
headerX-Tenant-Key<token>

The public store key (pk_live_…). Required on every call.

headerAuthorizationBearer <token>

A customer token from POST /v1/auth/login, or a merchant API key, on routes that need one.

Header Parameters

X-Client-IP?string

Optional. IP address of the shopper (one IPv4/IPv6, no port, no list). Honoured only together with a valid X-Tenant-Secret; ignored otherwise. Used for rate limits and recorded with form submissions.

X-Tenant-Secret?string

Optional here. Server secret of the store: server-to-server only, never from a browser. Enables X-Client-IP.

Request Body

application/json
  1. body

POST account/addresses. Field set matches lunar_addresses exactly — first_name, last_name, line_one, city are the table's own NOT NULL columns.

title?|
Lengthlength <= 255
label?|

An optional nickname ("Home", "Work"), stored as meta.label (AddressLabel).

Lengthlength <= 50
first_name*string
Lengthlength <= 255
last_name*string
Lengthlength <= 255
company_name?|
Lengthlength <= 255
line_one*string
Lengthlength <= 255
line_two?|
Lengthlength <= 255
line_three?|
Lengthlength <= 255
city*string
Lengthlength <= 255
state?|
Lengthlength <= 255
postcode?|
Lengthlength <= 32
country_id?integer|null
delivery_instructions?string|null
contact_email?|
Formatemail
Lengthlength <= 255
contact_phone?|
Lengthlength <= 64
shipping_default?boolean
billing_default?boolean

Response Body

Success.

application/json
  1. response
data*
Example Request
curl -X POST 'https://api.elaraone.app/api/v1/account/addresses' \  -H 'X-Tenant-Key: pk_live_…' \  -H 'X-Tenant-Secret: your-server-secret' \  -H 'Content-Type: application/json' \  -d '{  "first_name": "string",  "last_name": "string",  "line_one": "string",  "city": "string"}'
Example Response
{  "data": {    "id": 0,    "title": "string",    "label": "string",    "first_name": "string",    "last_name": "string",    "company_name": "string",    "line_one": "string",    "line_two": "string",    "line_three": "string",    "city": "string",    "state": "string",    "postcode": "string",    "country_id": 0,    "delivery_instructions": "string",    "contact_email": null,    "contact_phone": "string",    "shipping_default": true,    "billing_default": true  }}