Update Order Address
This API allows a customer to update an address associated with a specific order. It ensures that order delivery information is accurate and up to date, and tracks any changes made for transparency.
Overview
- Method: PUT
- Path:
/update-order-address/:orderId/:addressId - Tags: order, pharmacy
Parameters
orderId (path)
- Type:
string - Required: Yes
- Description: No description
addressId (path)
- Type:
string - Required: Yes
- Description: No description
Request Body
- Content Type:
application/json - Required: Yes
Fields
| Field | Type | Required | Details |
|---|---|---|---|
| address | object | Yes |
address
Fields
| Field | Type | Required | Details |
|---|---|---|---|
| first_name | string | No | minLength: 1, maxLength: 100 |
| last_name | string | No | minLength: 1, maxLength: 100 |
| address_1 | string | Yes | minLength: 1, maxLength: 200 |
| address_2 | string | No | maxLength: 200 |
| city | string | Yes | minLength: 1, maxLength: 100 |
| country_code | string | Yes | minLength: 2, maxLength: 2 |
| province | string | No | maxLength: 100 |
| postal_code | string | Yes | minLength: 1, maxLength: 20 |
| phone | string | No | |
| company | string | No | maxLength: 100 |
| metadata | record<string, object> | No |
Responses
200
Success
Content Type: application/json
{
"address": {
"id": "string",
"first_name": "string",
"last_name": "string",
"address_1": "string",
"address_2": "string",
"city": "string",
"country_code": "string",
"province": "string",
"postal_code": "string",
"phone": "string",
"company": "string",
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-01-01T00:00:00.000Z",
"metadata": {
"key": null
}
}
}400
Validation error
Content Type: application/json
{
"error": "string",
"details": [
{}
],
"message": "string"
}Example Usage
curl -X PUT \
https://api.pillexa.com/update-order-address/:orderId/:addressId \
-H "Content-Type: application/json" \
-d '{"example": "data"}'