Customers
Add an address
POST
tenantKeybearerAuthheader
X-Tenant-Key<token>The public store key (pk_live_…). Required on every call.
header
AuthorizationBearer <token>A customer token from POST /v1/auth/login, or a merchant API key, on routes that need one.
X-Client-IP?stringOptional. 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?stringOptional here. Server secret of the store: server-to-server only, never from a browser. Enables X-Client-IP.
application/json- 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?|Length
length <= 255label?|An optional nickname ("Home", "Work"), stored as meta.label (AddressLabel).
Length
length <= 50first_name*stringLength
length <= 255last_name*stringLength
length <= 255company_name?|Length
length <= 255line_one*stringLength
length <= 255line_two?|Length
length <= 255line_three?|Length
length <= 255city*stringLength
length <= 255state?|Length
length <= 255postcode?|Length
length <= 32country_id?integer|nulldelivery_instructions?string|nullcontact_email?|Format
emailLength
length <= 255contact_phone?|Length
length <= 64shipping_default?booleanbilling_default?booleanSuccess.
application/json- response
data*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 }}