POST
/
customers
/
{user_id}
/
addresses
curl --request POST \
  --url https://services.commercengine.dev/api/v1/x2yh61zw4k/storefront/customers/{user_id}/addresses \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "first_name": "<string>",
  "last_name": "<string>",
  "country_code": "<string>",
  "phone": "<string>",
  "email": "<string>",
  "address_line1": "<string>",
  "address_line2": "<string>",
  "landmark": "<string>",
  "pincode": "<string>",
  "city": "<string>",
  "state": "<string>",
  "country": "India",
  "gstin": "<string>",
  "business_name": "<string>",
  "is_default_billing": true,
  "is_default_shipping": true
}'
{
  "message": "<string>",
  "success": true,
  "content": {
    "address": {
      "id": "<string>",
      "first_name": "<string>",
      "last_name": "<string>",
      "country_code": "<string>",
      "phone": "<string>",
      "email": "<string>",
      "address_line1": "<string>",
      "address_line2": "<string>",
      "landmark": "<string>",
      "pincode": "<string>",
      "city": "<string>",
      "state": "<string>",
      "country": "India",
      "gstin": "<string>",
      "business_name": "<string>",
      "is_phone_verified": true,
      "is_email_verified": true
    }
  }
}

Authorizations

Authorization
string
header
required

Access token

Path Parameters

user_id
string
required

User id

Body

application/json
payload for new address
first_name
string
required
phone
string
required

10 digit phone number without country code.

email
string
required
address_line1
string
required
pincode
string
required
city
string
required
state
string
required
country
enum<string>
required
Available options:
India
last_name
string
country_code
string

Two-letter code begin with a plus sign prefix that identifies different countries. By default it will be +91 if not provided.

address_line2
string | null
landmark
string | null
gstin
string | null

Use in shipping details only.

business_name
string | null

Use in shipping details only.

is_default_billing
boolean
is_default_shipping
boolean

Response

200
application/json
OK
message
string
success
boolean
content
object