Pharmacy
General
Addressid

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

FieldTypeRequiredDetails
addressobjectYes

address

Fields
FieldTypeRequiredDetails
first_namestringNominLength: 1, maxLength: 100
last_namestringNominLength: 1, maxLength: 100
address_1stringYesminLength: 1, maxLength: 200
address_2stringNomaxLength: 200
citystringYesminLength: 1, maxLength: 100
country_codestringYesminLength: 2, maxLength: 2
provincestringNomaxLength: 100
postal_codestringYesminLength: 1, maxLength: 20
phonestringNo
companystringNomaxLength: 100
metadatarecord<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"}'