curl --request PATCH \
--url https://api.zenskar.com/customers/{customer_id}/addresses/{address_id} \
--header 'Content-Type: application/json' \
--header 'organisation: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"line2": "Suite 200"
}
'{
"id": "123e4567-e89b-12d3-a456-426614174000",
"customer_id": "223e4567-e89b-12d3-a456-426614174001",
"line1": "123 Business Ave",
"line2": "Suite 200",
"city": "San Francisco",
"state": "CA",
"zip_code": "94102",
"country": "United States",
"country_code": "US",
"is_default_billing": true,
"is_default_shipping": true,
"validation_status": "pending",
"created_at": "2023-01-01T00:00:00",
"updated_at": "2023-06-15T10:30:00"
}Customer Addresses
Update customer address
Update an existing address with partial data. Only provided fields will be updated.
Partial Updates: This endpoint supports partial updates - only include fields you want to change. Omitted fields will retain their current values.
Default Flag Behavior:
- Setting
is_default_billing: truewill unset the flag on all other addresses - Setting
is_default_shipping: truewill unset the flag on all other addresses - Only one address can be default billing and one can be default shipping at a time
Duplicate Prevention:
If updating address fields would result in a duplicate of another existing address, the update will be rejected with a DUPLICATE_ADDRESS error. This ensures data integrity and prevents confusion in downstream systems.
Validation Status: When address fields are modified, the validation_status may need to be re-verified through tax calculation services.
PATCH
/
customers
/
{customer_id}
/
addresses
/
{address_id}
curl --request PATCH \
--url https://api.zenskar.com/customers/{customer_id}/addresses/{address_id} \
--header 'Content-Type: application/json' \
--header 'organisation: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"line2": "Suite 200"
}
'{
"id": "123e4567-e89b-12d3-a456-426614174000",
"customer_id": "223e4567-e89b-12d3-a456-426614174001",
"line1": "123 Business Ave",
"line2": "Suite 200",
"city": "San Francisco",
"state": "CA",
"zip_code": "94102",
"country": "United States",
"country_code": "US",
"is_default_billing": true,
"is_default_shipping": true,
"validation_status": "pending",
"created_at": "2023-01-01T00:00:00",
"updated_at": "2023-06-15T10:30:00"
}Authorizations
Body
application/json
Update Customer Address Request Schema
Response
Successfully updated customer address
Customer Address Response Schema