> 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/order-ingestion.md).

# Order Ingestion

### 1. Shopify order webhook

Subscribe to Shopify’s order creation webhook.

<table data-view="cards"><thead><tr><th align="center"></th><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></td><td align="center"><code>orders/create</code></td><td><a href="/files/l7pL6vchwKVIHlSWnsQZ">/files/l7pL6vchwKVIHlSWnsQZ</a></td><td><a href="/files/Zn9WWvNhKVBMLfohh8Wa">/files/Zn9WWvNhKVBMLfohh8Wa</a></td><td><a href="https://shopify.dev/docs/api/admin-rest/2025-04/resources/webhook#event-topics-orders-create">https://shopify.dev/docs/api/admin-rest/2025-04/resources/webhook#event-topics-orders-create</a></td></tr></tbody></table>

### 2. ESW Create Order API

Call ESW `CreateOrder` to register the Shopify order in ESW.

## POST /v2/{tenantCode}/Order

> Creates an order.

```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":{"OrderCreate":{"required":["actionedBy","brandOrderReference","contactDetails","deliveryCountryIso","deliveryOption","lineItems","orderType","retailerCurrencyIso","shopperCurrencyIso","shopperExperience","transactionDateTime","transactionReference"],"type":"object","properties":{"brandOrderReference":{"minLength":1,"type":"string","description":"The Brand's order number."},"weight":{"$ref":"#/components/schemas/WeightInfo"},"orderType":{"$ref":"#/components/schemas/OrderType"},"parentBrandOrderReference":{"type":"string","description":"The parent order number.","nullable":true},"externalOrderId":{"type":"string","description":"ExternalOrderId.","nullable":true},"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},"shopperCurrencyIso":{"minLength":1,"type":"string","description":"ISO 4217 format three-letter identifier for the shopper currency."},"retailerCurrencyIso":{"minLength":1,"type":"string","description":"ISO 4217 format three-letter identifier for the retailer's currency."},"deliveryCountryIso":{"minLength":1,"type":"string","description":"ISO 3166 format two-letter country identifier for the delivery country."},"shopperExperience":{"$ref":"#/components/schemas/ShopperExperience"},"contactDetails":{"type":"array","items":{"$ref":"#/components/schemas/ContactDetail"},"description":"Shopper’s delivery or payment contact details. If multiple contactDetails are passed, they will be applied first-to-last."},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemToCreate"},"description":"Attributes that describe the items in the cart. There can be multiple cart items. A minimum of one cart item is required."},"deliveryOption":{"$ref":"#/components/schemas/DeliveryOptionCreate"},"retailerInvoice":{"$ref":"#/components/schemas/RetailerInvoice"},"payment":{"$ref":"#/components/schemas/Payment"},"originDetails":{"$ref":"#/components/schemas/OriginDetails"},"metadataItems":{"type":"array","items":{"$ref":"#/components/schemas/MetadataItem"},"description":"Key-value pairs used for passing additional details. Use of metadataItems must be agreed with eShopWorld. This applies to all metadataItems within this API.","nullable":true},"channelType":{"type":"string","description":"Channel Type","nullable":true}},"additionalProperties":false,"description":"Order create request"},"WeightInfo":{"type":"object","properties":{"weightTotal":{"type":"number","description":"Total weight of the order.","format":"double"},"weightUnit":{"$ref":"#/components/schemas/WeightUnit"}},"additionalProperties":false,"description":"(Required) Attributes that describe the package weight data."},"WeightUnit":{"enum":["KG","LB"],"type":"string","description":"Unit of measurement for the items in the package. 0 indicates KG and 1 indicates LB."},"OrderType":{"enum":["Offline","Checkout","NonCheckoutEcommerce"],"type":"string","description":"OrderType"},"ActionedBy":{"enum":["Retailer","Shopper","EShopWorld","ThirdParty"],"type":"string","description":"To define Who initiated the request"},"ShopperExperience":{"required":["shopperCultureLanguageIso"],"type":"object","properties":{"shopperCultureLanguageIso":{"minLength":1,"type":"string","description":"Preferred language and culture experience for the shopper in the ISO 639-1 and ISO 3166 format."},"registeredProfileId":{"type":"string","description":"Customer profile Id or number","nullable":true}},"additionalProperties":false,"description":"Shopper Experience"},"ContactDetail":{"required":["address1","city","contactDetailsType","country","email","firstName","lastName","telephone"],"type":"object","properties":{"contactDetailsType":{"$ref":"#/components/schemas/ContactDetailsType"},"nickName":{"type":"string","description":"Nickname or identifier for the contact information.","nullable":true},"addressId":{"type":"string","description":"Address Identifier","nullable":true},"firstName":{"minLength":1,"type":"string","description":"First name of the address."},"lastName":{"minLength":1,"type":"string","description":"Last name of the address."},"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":{"type":"string","description":"Postal code or zip code of the address.","nullable":true},"region":{"type":"string","description":"Region, province, state, or county of the address. ISO can be provided, if available.","nullable":true},"country":{"minLength":1,"type":"string","description":"ISO 3166 two-letter country code of the address."},"email":{"minLength":1,"type":"string","description":"Email address."},"telephone":{"minLength":1,"type":"string","description":"Phone number."},"gender":{"$ref":"#/components/schemas/Gender"},"poBox":{"type":"string","description":"Postal order box of the address.","nullable":true}},"additionalProperties":false,"description":"Contact Details"},"ContactDetailsType":{"enum":["IsDelivery","IsPayment","IsDeliveryAndPayment","IsStoreDelivery"],"type":"string","description":"ContactDetailsType"},"Gender":{"enum":["None","Male","Female","Unisex"],"type":"string","description":"Gender"},"OrderItemToCreate":{"required":["lineItemId","product","quantity"],"type":"object","properties":{"lineItemId":{"minLength":1,"type":"string","description":"Item sequence or line item ID."},"quantity":{"type":"integer","description":"Number of product pieces. Matches the length of the articles property","format":"int32"},"estimatedDeliveryDateFromRetailer":{"type":"string","description":"Estimated delivery date of the cart items in the ISO 8601 format. This date is for the first leg of the journey.","format":"date-time","nullable":true},"product":{"$ref":"#/components/schemas/ProductCreate"},"metadataItems":{"type":"array","items":{"$ref":"#/components/schemas/MetadataItem"},"description":"Key-value pairs used for passing additional details. Use of metadataItems must be agreed with eShopWorld. This applies to all metadataItems within this API.","nullable":true}},"additionalProperties":false,"description":"Cart Items"},"ProductCreate":{"required":["description","productCode","productUnitPriceInfo","title"],"type":"object","properties":{"title":{"minLength":1,"type":"string","description":"Localized title of the product. If no title is provided, eShopWorld may use the description from the Product Catalog."},"description":{"minLength":1,"type":"string","description":"Localized description of the product. If no description is provided, eShopWorld may use the description from the Product Catalog."},"customsDescription":{"type":"string","description":"Localized description of the product. If no description is provided, eShopWorld may use the description from the Product Catalog.","nullable":true},"productCode":{"minLength":1,"type":"string","description":"Unique identification code or SKU for the product."},"hsCode":{"type":"string","description":"HsCode.","nullable":true},"countryOfOriginIso":{"type":"string","description":"CountryOfOrigin.","nullable":true},"imageUrl":{"type":"string","description":"Thumbnail image URL of the product. The image size must be less than or equal to 20 KB and the image must be retina-ready.","nullable":true},"color":{"type":"string","description":"Color of the item.","nullable":true},"size":{"type":"string","description":"Size of the item.","nullable":true},"productUnitPriceInfo":{"$ref":"#/components/schemas/PriceInfo"},"wholesalePriceInfo":{"$ref":"#/components/schemas/PriceInfo"},"weightInfo":{"$ref":"#/components/schemas/WeightInfo"},"isReturnProhibited":{"type":"boolean","description":"Indicates whether the item is returnable or not under the regular return policy. The values are True or False.","nullable":true},"isCustomized":{"type":"boolean","description":"Indicates whether the item is customized or not. The values are True or False."}},"additionalProperties":false,"description":"Product"},"PriceInfo":{"type":"object","properties":{"price":{"$ref":"#/components/schemas/Money"}},"additionalProperties":false,"description":"Price Info"},"Money":{"type":"object","properties":{"currency":{"type":"string","description":"Currency three-letter identifier (in the ISO 4217 format).","nullable":true},"amount":{"type":"string","description":"The amount of the currency.","nullable":true}},"additionalProperties":false,"description":"Money"},"MetadataItem":{"type":"object","properties":{"name":{"type":"string","description":"Metadata name/key.","nullable":true},"value":{"type":"string","description":"Metadata value.","nullable":true}},"additionalProperties":false,"description":"Key and value pairs to pass metadata information."},"DeliveryOptionCreate":{"required":["eshopDeliveryOptionCode","priceInfo"],"type":"object","properties":{"priceInfo":{"$ref":"#/components/schemas/PriceInfo"},"eshopDeliveryOptionCode":{"$ref":"#/components/schemas/ServiceLevel"},"estimatedDeliveryDateToShopper":{"type":"string","description":"Estimated delivery date of the items in the cart in the ISO 8601 format for the non-eShopWorld delivery option. This date is the expected final delivery date to the shopper.","format":"date-time","nullable":true},"vatRate":{"type":"number","description":"Vat rate","format":"double"}},"additionalProperties":false,"description":"Delivery Option"},"ServiceLevel":{"enum":["DEFAULT","POST","EXP1","EXP2","RussiaExpress","Standard","PUDO"],"type":"string","description":"Service Levels."},"RetailerInvoice":{"type":"object","properties":{"number":{"type":"string","description":"RetailerInvoice number","nullable":true},"date":{"type":"string","description":"RetailerInvoice Date in the yyyy-MM-dd format","nullable":true}},"additionalProperties":false,"description":"RetailerInvoice details"},"Payment":{"type":"object","properties":{"method":{"type":"string","description":"Payment method used","nullable":true},"last4Digits":{"type":"string","description":"Last 4 digits of the payment card","nullable":true},"paymentAttemptRef":{"type":"string","description":"Payment attempt reference","format":"uuid","nullable":true},"priceInfo":{"$ref":"#/components/schemas/PriceInfo"},"deliveryPriceInfo":{"$ref":"#/components/schemas/PriceInfo"},"retailerPriceInfo":{"$ref":"#/components/schemas/PriceInfo"},"retailerDeliveryPriceInfo":{"$ref":"#/components/schemas/PriceInfo"},"paymentStatus":{"type":"string","description":"Payment Status","nullable":true},"merchantPaymentId":{"type":"string","description":"Merchant Payment Id","nullable":true},"paymentTime":{"type":"string","description":"The time when the payment was taken","format":"date-time"},"preAuthExpiryTime":{"type":"string","description":"The datetime when we can kick off the capture process for the payment","format":"date-time"},"authResult":{"type":"string","description":"Auth result of the payment","nullable":true}},"additionalProperties":false,"description":"Payment details"},"OriginDetails":{"required":["address1","city","country","email","originType"],"type":"object","properties":{"originType":{"$ref":"#/components/schemas/OriginType"},"firstName":{"type":"string","description":"First name of the address.","nullable":true},"lastName":{"type":"string","description":"Last name of the address.","nullable":true},"telephone":{"type":"string","description":"Phone number.","nullable":true},"nickName":{"type":"string","description":"Nickname or identifier for the contact information.","nullable":true},"addressId":{"type":"string","description":"Address Identifier","nullable":true},"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":{"type":"string","description":"Postal code or zip code of the address.","nullable":true},"region":{"type":"string","description":"Region, province, state, or county of the address. ISO can be provided, if available.","nullable":true},"country":{"minLength":1,"type":"string","description":"ISO 3166 two-letter country code of the address."},"email":{"minLength":1,"type":"string","description":"Email address."},"gender":{"$ref":"#/components/schemas/Gender"},"poBox":{"type":"string","description":"Postal order box of the address.","nullable":true}},"additionalProperties":false,"description":"Origin Details"},"OriginType":{"enum":["None","Store"],"type":"string","description":"Payment methods"},"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":{"post":{"tags":["Order"],"summary":"Creates an order.","operationId":"OrderCreate","parameters":[{"name":"tenantCode","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCreate"}}}},"responses":{"202":{"description":"The request is accepted, but not processed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderTransactionApiResponse"}}}},"400":{"description":"The request is invalid","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Error"}}}}},"401":{"description":"The request is unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"The request is 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/order-ingestion.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.
