PUT
/
customers
/
{user_id}
/
addresses
/
{address_id}
curl --request PUT \
  --url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/customers/{user_id}/addresses/{address_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "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": "<string>",
  "tax_identification_number": "123456789",
  "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": "<string>",
      "tax_identification_number": "123456789",
      "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

address_id
string
required

address id

Body

application/json
payload for address update
id
string | null
required

null value for guest checkout.

first_name
string
required
last_name
string | null
required
country_code
string
required

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

phone
string
required

10 digit phone number without country code.

email
string
required
address_line1
string
required
address_line2
string | null
required
landmark
string | null
required
pincode
string
required
city
string
required
state
string
required
country
string
required
Allowed value: "India"
tax_identification_number
string | null
required

Tax Identification Number (TIN/VAT/GSTIN) specific to the country of operation.

Example:

"123456789"

business_name
string | null
required

Use in billing & shipping details only.

is_default_billing
boolean
is_default_shipping
boolean

Response

200
application/json
OK
message
string
success
boolean
content
object