> For the complete documentation index, see [llms.txt](https://developer.esw.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.esw.com/shopify/shopify-native/integration-workflow/address-update.md).

# Address Update

### 1. Subscribe to the Order Updates Webhook in Shopify <a href="#id-1-subscribe-to-the-order-updates-webhook-in-shopify" id="id-1-subscribe-to-the-order-updates-webhook-in-shopify"></a>

Listen for the `orders/updated` webhook to track shipping address updates made to an order.

<table data-view="cards"><thead><tr><th align="center"></th><th data-hidden data-card-cover data-type="image">Cover image</th><th data-hidden data-card-cover-dark data-type="image">Cover image (dark)</th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td align="center"><h2><i class="fa-webhook" style="color:$primary;">:webhook:</i> </h2><p><code>orders/updated</code></p></td><td><a href="/files/8uBoR4UpqWLFCtycVZoX">/files/8uBoR4UpqWLFCtycVZoX</a></td><td><a href="/files/MOVOzmFm08yF5bliCROB">/files/MOVOzmFm08yF5bliCROB</a></td><td><a href="https://shopify.dev/docs/api/admin-rest/2025-04/resources/webhook#event-topics-orders-updated">https://shopify.dev/docs/api/admin-rest/2025-04/resources/webhook#event-topics-orders-updated</a></td></tr></tbody></table>

***

### 2. ESW API Call <a href="#id-2-esw-api-call" id="id-2-esw-api-call"></a>

Sync shipping address changes to ESW using the Update Contact Details API.

## Update Order Contact details

> Method to update Order Address info by using brand order reference

```json
{"openapi":"3.0.1","info":{"title":"Order Transaction API","version":"v2"},"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Please insert JWT with Bearer into field","name":"Authorization","in":"header"}},"schemas":{"UpdateOrderContacts":{"required":["actionedBy","contactDetails","transactionDateTime","transactionReference"],"type":"object","properties":{"transactionReference":{"type":"string","description":"Unique reference number of the transaction","format":"uuid"},"transactionDateTime":{"type":"string","description":"The date/time logged by the retailer for the creation of the order in UTC.","format":"date-time"},"actionedBy":{"$ref":"#/components/schemas/ActionedBy"},"actionedByUser":{"type":"string","description":"Identifier for the person who initiated the action, for example, John Smith or johnsmith@test.com.","nullable":true},"contactDetails":{"$ref":"#/components/schemas/UpdateContactDetail"}},"additionalProperties":false,"description":"Update Contact details like address info."},"ActionedBy":{"enum":["Retailer","Shopper","EShopWorld","ThirdParty"],"type":"string","description":"To define Who initiated the request"},"UpdateContactDetail":{"required":["address1","city","contactDetailsType","email","postalCode","telephone"],"type":"object","properties":{"contactDetailsType":{"$ref":"#/components/schemas/UpdateContactDetailsType"},"address1":{"minLength":1,"type":"string","description":"Address line 1 of the address."},"address2":{"type":"string","description":"Address line 2 of the address.","nullable":true},"address3":{"type":"string","description":"Address line 3 of the address.","nullable":true},"city":{"minLength":1,"type":"string","description":"City of the address."},"postalCode":{"minLength":1,"type":"string","description":"Postal code or zip code of the address."},"region":{"type":"string","description":"Region, province, state, or county of the address. ISO can be provided, if available.","nullable":true},"email":{"minLength":1,"type":"string","description":"Email address."},"telephone":{"minLength":1,"type":"string","description":"Phone number."}},"additionalProperties":false,"description":"Update Contact Details"},"UpdateContactDetailsType":{"enum":["IsDelivery"],"type":"string","description":"ContactDetailsType"},"OrderTransactionApiResponse":{"type":"object","properties":{"transactionReference":{"type":"string","description":"Unique reference number of the transaction.\r\nIf the retailer sends this data, eSW will honor it. If the retailer does not send this data, eSW will generate the GUID for the transaction.","format":"uuid"}},"additionalProperties":false,"description":"Response from Order API"},"Error":{"type":"object","properties":{"code":{"type":"integer","description":"Error Identifier code","format":"int32"},"message":{"type":"string","description":"Error Message","nullable":true}},"additionalProperties":false,"description":"Error Response"},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/v2/{tenantCode}/Order/{brandOrderReference}/ContactDetails":{"put":{"tags":["Order"],"summary":"Update Order Contact details","description":"Method to update Order Address info by using brand order reference","operationId":"ContactDetails","parameters":[{"name":"brandOrderReference","in":"path","description":"","required":true,"schema":{"type":"string"}},{"name":"tenantCode","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderContacts"}}}},"responses":{"202":{"description":"The request is accepted, but not processed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderTransactionApiResponse"}}}},"400":{"description":"The request is not valid","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Error"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"500":{"description":"Internal server error"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.esw.com/shopify/shopify-native/integration-workflow/address-update.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
