Update Customer Address
PUT /customers/addresses/{addressId}
Description
Update the address details for a customer using the specified address ID.
Parameters
| Name | Type | Description |
|---|---|---|
| addressId* | string | (Required) Identifier for the address to be updated. (path) |
Request Body
- Media Type:
application/json
| Name | Type | Description |
|---|---|---|
| state | string | (Optional) State of the address. |
| city | string | (Optional) City of the address. |
| address | string | (Optional) Detailed address. |
| longitude | number | (Optional) Longitude of the address. |
| latitude | number | (Optional) Latitude of the address. |
| postalCode | string | (Optional) Postal code of the address. |
| deliveryMode | string | (Optional) Delivery mode, e.g., PICK_UP. |
| customerPhoneNumber | string | (Optional) Customer's phone number. |
Example
Request Body
{
"state": "string",
"city": "string",
"address": "string",
"longitude": 0,
"latitude": 0,
"postalCode": "string",
"deliveryMode": "PICK_UP",
"customerPhoneNumber": "string"
}
Responses
This section outlines the possible responses from the customer address update API.
Success Response (200)
The Success Response (200) is returned when the customer address is successfully updated. This response indicates the success of the operation and provides additional details.
Response Fields
| Field | Type | Description |
|---|---|---|
| status | boolean | Indicates the success of the customer address update request. |
| statusCode | integer | Numeric code representing the status of the response (e.g., 200 for success). |
| message | string | A message indicating the outcome of the operation. |
| data | object | Contains the updated address details. |
| errors | array | An array of objects providing details about any errors encountered during the request. |
Media Type
application/json: The response is in JSON format. Example Value
Schema:
{
"message": "string",
"data": {
"id": "string",
"state": "string",
"city": "string",
"address": "string",
"latitude": 0,
"longitude": 0,
"customerId": "string",
"tenantId": "string",
"postalCode": "string",
"deliveryMode": "PICK_UP",
"customerPhoneNumber": "string"
},
"meta": {
"currentPage": 0,
"from": 0,
"to": 0,
"perPage": 0,
"total": 0,
"lastPage": 0
}
}
LANGUAGE
CURL REQUEST
curl --request PUT \
--url /customers/addresses/{addressId} \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!