> 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/api-references/order-api/order.md). Agents can also search and read this documentation through its [MCP server](https://developer.esw.com/~gitbook/mcp).

# Order

## POST /api/v2/Order

> Creates an order.

```json
{"openapi":"3.0.4","info":{"title":"Order","version":"2.0"},"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},"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}},"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"],"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"},"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}},"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":{"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},"priceInfo":{"$ref":"#/components/schemas/PriceInfo"}},"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}},"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":{"/api/v2/Order":{"post":{"tags":["Order"],"summary":"Creates an order.","operationId":"OrderCreate","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"}}}}}}}}}
```

## POST /api/v2/Order/{brandOrderReference}/LineItems

> Adds items to an order. Creates order if it doesn't exist.

```json
{"openapi":"3.0.4","info":{"title":"Order","version":"2.0"},"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Please insert JWT with Bearer into field","name":"Authorization","in":"header"}},"schemas":{"LineItemsAddRequest":{"required":["actionedBy","contactDetails","deliveryCountryIso","deliveryOption","lineItems","orderType","retailerCurrencyIso","shopperCurrencyIso","shopperExperience","transactionDateTime","transactionReference"],"type":"object","properties":{"orderType":{"$ref":"#/components/schemas/OrderType"},"parentBrandOrderReference":{"type":"string","description":"The parent order number.","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}},"additionalProperties":false,"description":"Add line items request"},"OrderType":{"enum":["Offline","Checkout","NonCheckoutEcommerce"],"type":"string","description":"OrderType"},"ActionedBy":{"enum":["Retailer","Shopper","EShopWorld"],"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"},"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}},"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":{"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},"priceInfo":{"$ref":"#/components/schemas/PriceInfo"}},"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}},"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":{"/api/v2/Order/{brandOrderReference}/LineItems":{"post":{"tags":["Order"],"summary":"Adds items to an order. Creates order if it doesn't exist.","operationId":"LineItems","parameters":[{"name":"brandOrderReference","in":"path","description":"Retailer's unique reference number for the order","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineItemsAddRequest"}}}},"responses":{"202":{"description":"Accepted","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"}}}},"500":{"description":"Internal server error"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}}}
```

## Retrieves an order.

> Method to return order details by brand order reference

```json
{"openapi":"3.0.4","info":{"title":"Order","version":"2.0"},"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Please insert JWT with Bearer into field","name":"Authorization","in":"header"}},"schemas":{"Order":{"type":"object","properties":{"orderType":{"$ref":"#/components/schemas/OrderType"},"orderGuid":{"type":"string","description":"Order GUID.","format":"uuid"},"status":{"$ref":"#/components/schemas/OrderStatuses"},"brandOrderReference":{"type":"string","description":"The brand's order number.","nullable":true},"parentBrandOrderReference":{"type":"string","description":"The parent order number.","nullable":true},"eShopWorldOrderNumber":{"type":"string","description":"Order number in the eshopWorld system.","nullable":true},"shopperCurrencyIso":{"type":"string","description":"ISO 4217 format three-letter identifier for the shopper currency.","nullable":true},"retailerCurrencyIso":{"type":"string","description":"ISO 4217 format three-letter identifier for the retailer's currency.","nullable":true},"deliveryCountryIso":{"type":"string","description":"ISO 3166 format two-letter country identifier for the delivery country.","nullable":true},"orderDate":{"type":"string","description":"The datetime when the order was created, in UTC.","format":"date-time"},"weight":{"$ref":"#/components/schemas/WeightInfo"},"shopperExperience":{"$ref":"#/components/schemas/ShopperExperience"},"contactDetails":{"type":"array","items":{"$ref":"#/components/schemas/ContactDetail"},"description":"Shopper’s delivery or payment contact details.","nullable":true},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/OrderItem"},"description":"Attributes that describe the items in the cart.","nullable":true},"orderCharges":{"type":"array","items":{"$ref":"#/components/schemas/NamedMoney"},"description":"<summary>A list of order level charges.</summary>","nullable":true},"deliveryOption":{"$ref":"#/components/schemas/DeliveryOption"},"payment":{"$ref":"#/components/schemas/Payment"},"retailerInvoice":{"$ref":"#/components/schemas/RetailerInvoice"},"originDetails":{"$ref":"#/components/schemas/OriginDetails"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"},"description":"Transactions","nullable":true},"metadataItems":{"type":"array","items":{"$ref":"#/components/schemas/MetadataItem"},"description":"Key-value pairs","nullable":true},"orderBalances":{"type":"array","items":{"$ref":"#/components/schemas/NamedMoney"},"description":"A list of order balance charges","nullable":true}},"additionalProperties":false,"description":"Order"},"OrderType":{"enum":["Offline","Checkout","NonCheckoutEcommerce"],"type":"string","description":"OrderType"},"OrderStatuses":{"enum":["Received","Cancelled"],"type":"string","description":"Order statuses."},"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."},"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"},"OrderItem":{"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/Product"},"articles":{"type":"array","items":{"$ref":"#/components/schemas/OrderArticle"},"description":"List of articles with their statuses","nullable":true},"metadataItems":{"type":"array","items":{"$ref":"#/components/schemas/MetadataItem"},"description":"Key-value pairs","nullable":true}},"additionalProperties":false,"description":"Cart Items"},"Product":{"required":["description","productCode","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},"prohibitedItem":{"type":"boolean","description":"Indicates whether the item is prohibited"},"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},"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},"vatRate":{"type":"number","description":"Vat rate","format":"double"},"taxCode":{"type":"string","description":"Tax code","nullable":true}},"additionalProperties":false,"description":"Product"},"OrderArticle":{"type":"object","properties":{"sequence":{"type":"integer","description":"Article sequence within the line item","format":"int32"},"status":{"$ref":"#/components/schemas/OrderArticleStatuses"},"charges":{"type":"array","items":{"$ref":"#/components/schemas/NamedMoney"},"description":"A list of item level charges.","nullable":true}},"additionalProperties":false,"description":"Order Article"},"OrderArticleStatuses":{"enum":["Created","Shipped","Cancelled"],"type":"string","description":"Order article statuses"},"NamedMoney":{"required":["name"],"type":"object","properties":{"name":{"minLength":1,"type":"string","description":"Name of the charge."},"value":{"$ref":"#/components/schemas/Money"}},"additionalProperties":false,"description":"Money"},"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."},"DeliveryOption":{"required":["eshopDeliveryOptionCode"],"type":"object","properties":{"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."},"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}},"additionalProperties":false,"description":"Payment details"},"PriceInfo":{"type":"object","properties":{"price":{"$ref":"#/components/schemas/Money"}},"additionalProperties":false,"description":"Price Info"},"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"},"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"},"Transaction":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/TransactionType"},"transactionReference":{"type":"string","description":"Unique reference number of the transaction","format":"uuid"},"status":{"$ref":"#/components/schemas/TransactionStatus"},"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},"reasonCode":{"type":"string","description":"Reason","nullable":true},"lastUpdateTime":{"type":"string","description":"LastUpdateTime","format":"date-time","nullable":true},"creationTime":{"type":"string","description":"CreationTime","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Transaction details"},"TransactionType":{"enum":["OrderCancel","LineItemCancel","OrderAppeasementMerchandise","OrderAppeasementShipping","LineItemAppeasement","LineItemReplacement","Return","BlindReturn","ShippedMerchandise","OrderCreate","OrderRefund","OrderUpdate","LineItemUpdate","LineItemAdd","OrderReplacement"],"type":"string","description":"Transaction"},"TransactionStatus":{"enum":["Unprocessed","InProgress","Processed","Failed"],"type":"string","description":"Transaction Status"},"ActionedBy":{"enum":["Retailer","Shopper","EShopWorld"],"type":"string","description":"To define Who initiated the request"},"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":{"/api/v2/Order/{brandOrderReference}":{"get":{"tags":["Order"],"summary":"Retrieves an order.","description":"Method to return order details by brand order reference","operationId":"GetOrder","parameters":[{"name":"brandOrderReference","in":"path","description":"","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Order Details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"description":"The request is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"No order 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"}}}}}}}}}
```

## Retrieves an order transaction.

> Method to return transaction details

```json
{"openapi":"3.0.4","info":{"title":"Order","version":"2.0"},"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Please insert JWT with Bearer into field","name":"Authorization","in":"header"}},"schemas":{"GetTransaction":{"type":"object","properties":{"refundAmounts":{"type":"array","items":{"$ref":"#/components/schemas/NamedMoney"},"description":"A list of refund amounts.","nullable":true},"refundAmountsInRetailerCurrency":{"type":"array","items":{"$ref":"#/components/schemas/NamedMoney"},"description":"A list of refund amounts.","nullable":true},"type":{"$ref":"#/components/schemas/TransactionType"},"transactionReference":{"type":"string","description":"Unique reference number of the transaction","format":"uuid"},"status":{"$ref":"#/components/schemas/TransactionStatus"},"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},"reasonCode":{"type":"string","description":"Reason","nullable":true},"lastUpdateTime":{"type":"string","description":"LastUpdateTime","format":"date-time","nullable":true},"creationTime":{"type":"string","description":"CreationTime","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Get Full Transaction Details which includes refund amount"},"NamedMoney":{"required":["name"],"type":"object","properties":{"name":{"minLength":1,"type":"string","description":"Name of the charge."},"value":{"$ref":"#/components/schemas/Money"}},"additionalProperties":false,"description":"Money"},"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"},"TransactionType":{"enum":["OrderCancel","LineItemCancel","OrderAppeasementMerchandise","OrderAppeasementShipping","LineItemAppeasement","LineItemReplacement","Return","BlindReturn","ShippedMerchandise","OrderCreate","OrderRefund","OrderUpdate","LineItemUpdate","LineItemAdd","OrderReplacement"],"type":"string","description":"Transaction"},"TransactionStatus":{"enum":["Unprocessed","InProgress","Processed","Failed"],"type":"string","description":"Transaction Status"},"ActionedBy":{"enum":["Retailer","Shopper","EShopWorld"],"type":"string","description":"To define Who initiated the request"},"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":{"/api/v2/Order/{brandOrderReference}/Transaction/{transactionReference}":{"get":{"tags":["Order"],"summary":"Retrieves an order transaction.","description":"Method to return transaction details","operationId":"GetOrderTransaction","parameters":[{"name":"brandOrderReference","in":"path","description":"","required":true,"schema":{"type":"string"}},{"name":"transactionReference","in":"path","description":"","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Order Details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTransaction"}}}},"400":{"description":"The request is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"No order 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"}}}}}}}}}
```

## Update Order Contact details

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

```json
{"openapi":"3.0.4","info":{"title":"Order","version":"2.0"},"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"],"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":{"/api/v2/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"}}],"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":{"$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"}}}}}}}}}
```

## Cancels the entire order, that is, all line items in the order are cancelled.

> Method to cancel an order by brand order reference

```json
{"openapi":"3.0.4","info":{"title":"Order","version":"2.0"},"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Please insert JWT with Bearer into field","name":"Authorization","in":"header"}},"schemas":{"OrderActivityRequest":{"required":["actionedBy","activityStatus","reasonCode","transactionDateTime","transactionReference"],"type":"object","properties":{"activityStatus":{"$ref":"#/components/schemas/ActivityStatus"},"reasonCode":{"$ref":"#/components/schemas/OrderActivityReasonCode"},"settlementReference":{"type":"string","description":"Unique reference number of the settlement transaction. When the Retailer is using “self-billing” Settlement model, this field should be sent.","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 transaction 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}},"additionalProperties":false,"description":"OrderActivityRequest"},"ActivityStatus":{"enum":["Cancel","Fulfil"],"type":"string","description":"ActivityStatus"},"OrderActivityReasonCode":{"enum":["ShopperCancel","RetailerCancel","Fraud"],"type":"string","description":"Order Activity Reason Code"},"ActionedBy":{"enum":["Retailer","Shopper","EShopWorld"],"type":"string","description":"To define Who initiated the request"},"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":{"/api/v2/Order/{brandOrderReference}/OrderActivity":{"post":{"tags":["Order"],"summary":"Cancels the entire order, that is, all line items in the order are cancelled.","description":"Method to cancel an order by brand order reference","operationId":"OrderActivity","parameters":[{"name":"brandOrderReference","in":"path","description":"Retailer's unique reference number for the order","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Order Activity Details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderActivityRequest"}}}},"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":"No order 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"}}}}}}}}}
```

## Cancels or fulfils the line items fully or partially in an order as per activityStatus.

> Method to cancel or fulfil a line item

```json
{"openapi":"3.0.4","info":{"title":"Order","version":"2.0"},"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Please insert JWT with Bearer into field","name":"Authorization","in":"header"}},"schemas":{"LineItemActivityRequest":{"required":["actionedBy","activityStatus","quantity","reasonCode","transactionDateTime","transactionReference"],"type":"object","properties":{"lineItemId":{"type":"string","description":"The Id of the line item to cancel. Either lineItemId or product code is required.","nullable":true},"productCode":{"type":"string","description":"Product code or stock-keeping unit (SKU) number of the item. Either lineItemId or product code is required.","nullable":true},"quantity":{"type":"integer","description":"Quantity of products to cancel.","format":"int32"},"activityStatus":{"$ref":"#/components/schemas/ActivityStatus"},"reasonCode":{"$ref":"#/components/schemas/LineItemActivityReasonCode"},"settlementReference":{"type":"string","description":"Unique reference number of the settlement transaction. When the Retailer is using “self-billing” Settlement model, this field should be sent.","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 transaction 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}},"additionalProperties":false,"description":"LineItemActivityRequest"},"ActivityStatus":{"enum":["Cancel","Fulfil"],"type":"string","description":"ActivityStatus"},"LineItemActivityReasonCode":{"enum":["OutOfStock","ShopperCancel","ItemFulfilled"],"type":"string","description":"Order Activity Reason Code"},"ActionedBy":{"enum":["Retailer","Shopper","EShopWorld"],"type":"string","description":"To define Who initiated the request"},"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":{"/api/v2/Order/{brandOrderReference}/LineItemActivity":{"post":{"tags":["Order"],"summary":"Cancels or fulfils the line items fully or partially in an order as per activityStatus.","description":"Method to cancel or fulfil a line item","operationId":"LineItemActivity","parameters":[{"name":"brandOrderReference","in":"path","description":"Retailer's unique reference number for the order.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Line item cancel/fulfil request details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineItemActivityRequest"}}}},"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":"No order or line item 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"}}}}}}}}}
```

## Creates a full or partial line item replacement.

> Method to replace a line item

```json
{"openapi":"3.0.4","info":{"title":"Order","version":"2.0"},"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Please insert JWT with Bearer into field","name":"Authorization","in":"header"}},"schemas":{"LineItemRequest":{"required":["actionedBy","quantity","reasonCode","replacementOrderDetails","transactionDateTime","transactionReference"],"type":"object","properties":{"lineItemId":{"type":"string","description":"Line item to be replaced","nullable":true},"productCode":{"type":"string","description":"Product code or stock-keeping unit (SKU) number of the item.","nullable":true},"quantity":{"type":"integer","description":"Quantity to replace.","format":"int32"},"reasonCode":{"$ref":"#/components/schemas/ReplaceOrderItemsReasonCode"},"replacementOrderDetails":{"$ref":"#/components/schemas/ReplacementOrderDetails"},"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 transaction 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}},"additionalProperties":false,"description":"Defines the model to be used when replacing a line item"},"ReplaceOrderItemsReasonCode":{"enum":["LostPackage","DamagedGoods","ShortShip","LostReturn"],"type":"string","description":"Replace Order Reason Code"},"ReplacementOrderDetails":{"required":["replacementBrandOrderReference","replacementLineItemId"],"type":"object","properties":{"replacementBrandOrderReference":{"minLength":1,"type":"string","description":"Retailer's unique reference number for the replacement order,"},"replacementLineItemId":{"minLength":1,"type":"string","description":"Line Item Id of the replacement articles Example: ‘1’"},"replacementProduct":{"$ref":"#/components/schemas/ReplacementProduct"}},"additionalProperties":false,"description":"ReplacementOrderDetails"},"ReplacementProduct":{"type":"object","properties":{"productCode":{"type":"string","description":"Example: ‘277906’","nullable":true},"name":{"type":"string","description":"The name of the product.","nullable":true},"description":{"type":"string","description":"The description of the product.\r\n Example: ‘PINK:PFCT FZ PINK LOUNGE WOMENS KNIT 60% COTTON 40% POLYESTER OUTERWEAR HO’","nullable":true},"colour":{"type":"string","description":"The colour of the product","nullable":true},"size":{"type":"string","description":"The size of the product. Example: ‘S’","nullable":true}},"additionalProperties":false,"description":"Product"},"ActionedBy":{"enum":["Retailer","Shopper","EShopWorld"],"type":"string","description":"To define Who initiated the request"},"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":{"/api/v2/Order/{brandOrderReference}/LineItem":{"post":{"tags":["Order"],"summary":"Creates a full or partial line item replacement.","description":"Method to replace a line item","operationId":"LineItem","parameters":[{"name":"brandOrderReference","in":"path","description":"Retailer's unique reference number for the order.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Order replacement details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineItemRequest"}}}},"responses":{"200":{"description":"Line Item replacement successfully processed"},"202":{"description":"Accepted","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"The request is not valid","content":{"application/json":{"schema":{"$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":"No order 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"}}}}}}}}}
```

## Updates a Line Item within an order.

> Method to update a line item.

```json
{"openapi":"3.0.4","info":{"title":"Order","version":"2.0"},"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Please insert JWT with Bearer into field","name":"Authorization","in":"header"}},"schemas":{"LineItemUpdateRequest":{"required":["actionedBy","lineItemId","productCode","quantity","reasonCode","transactionDateTime","transactionReference"],"type":"object","properties":{"lineItemId":{"minLength":1,"type":"string","description":"Line item to be updated."},"quantity":{"type":"integer","description":"Quantity to be updated.","format":"int32"},"productCode":{"minLength":1,"type":"string","description":"New product code or stock-keeping unit (SKU) number of the item."},"reasonCode":{"$ref":"#/components/schemas/UpdateLineItemReasonCode"},"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 transaction 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}},"additionalProperties":false,"description":"Update line items request"},"UpdateLineItemReasonCode":{"enum":["ProductSubstituted","ProductDiscontinued","ProductNotAvailable"],"type":"string","description":"Update Line Item Reason Code"},"ActionedBy":{"enum":["Retailer","Shopper","EShopWorld"],"type":"string","description":"To define Who initiated the request"},"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":{"/api/v2/Order/{brandOrderReference}/LineItem":{"patch":{"tags":["Order"],"summary":"Updates a Line Item within an order.","description":"Method to update a line item.","operationId":"UpdateLineItem","parameters":[{"name":"brandOrderReference","in":"path","description":"Retailer's unique reference number for the order.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Line Item update details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineItemUpdateRequest"}}}},"responses":{"200":{"description":"Line Item replacement successfully processed"},"202":{"description":"Accepted","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"The request is not valid","content":{"application/json":{"schema":{"$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":"No order 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"}}}}}}}}}
```

## Adds an order level appeasement.

> Method to appease an order

```json
{"openapi":"3.0.4","info":{"title":"Order","version":"2.0"},"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Please insert JWT with Bearer into field","name":"Authorization","in":"header"}},"schemas":{"OrderAppeasementRequest":{"required":["actionedBy","reasonCode","transactionDateTime","transactionReference","type"],"type":"object","properties":{"type":{"$ref":"#/components/schemas/AppeasementsType"},"reasonCode":{"$ref":"#/components/schemas/AppeasementsReasonCode"},"transaction":{"$ref":"#/components/schemas/Price"},"fullAppeasement":{"type":"boolean","description":"Should be Set  for full appeasement, as per the available refund value in eshopWorld's system. Other wise it should be set to false \r\nwhich will be the value in the price amount field."},"settlementReference":{"type":"string","description":"Unique reference number of the settlement transaction. When the Retailer is using “self-billing” Settlement model, this field should be sent.","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 transaction 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}},"additionalProperties":false,"description":""},"AppeasementsType":{"enum":["Merchandise","Shipping","Order"],"type":"string","description":""},"AppeasementsReasonCode":{"enum":["Appeasement","LostPackage","LateArrival","PromoAppeasement"],"type":"string","description":"Note: Please make sure it matches StandardDev Lookup.RefundReason Table"},"Price":{"required":["amount","currency"],"type":"object","properties":{"amount":{"type":"number","description":"Amount to credit eSW or debit eSW","format":"double"},"currency":{"minLength":1,"type":"string","description":"ISO representation for currency of transaction amount."}},"additionalProperties":false,"description":""},"ActionedBy":{"enum":["Retailer","Shopper","EShopWorld"],"type":"string","description":"To define Who initiated the request"},"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":{"/api/v2/Order/{brandOrderReference}/Appeasement":{"post":{"tags":["Order"],"summary":"Adds an order level appeasement.","description":"Method to appease an order","operationId":"Appeasement","parameters":[{"name":"brandOrderReference","in":"path","description":"Retailer's unique reference number for the order.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Order Appeasements Details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderAppeasementRequest"}}}},"responses":{"200":{"description":"Order Appeasements successfully processed"},"202":{"description":"Accepted"},"400":{"description":"The request is not valid","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":"No order 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"}}}}}}}}}
```

## Adds an item level appeasement.

> Method to appease a line item

```json
{"openapi":"3.0.4","info":{"title":"Order","version":"2.0"},"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Please insert JWT with Bearer into field","name":"Authorization","in":"header"}},"schemas":{"LineItemAppeasementRequest":{"required":["actionedBy","quantity","reasonCode","transactionDateTime","transactionReference"],"type":"object","properties":{"lineItemId":{"type":"string","description":"The Id of the line item to appease. Either lineItemId or product code is required.","nullable":true},"productCode":{"type":"string","description":"Product code. Either lineItemId or productId is required.\r\n Example: ‘277906’","nullable":true},"quantity":{"type":"integer","description":"Quantity to appease","format":"int32"},"reasonCode":{"$ref":"#/components/schemas/LineItemAppeasementReasonCode"},"transaction":{"$ref":"#/components/schemas/Price"},"fullAppeasement":{"type":"boolean","description":"Should be Set for full appeasement, as per the available refund value in eshopWorld's system. Other wise it should be set to false \r\nwhich will be the value in the price amount field."},"settlementReference":{"type":"string","description":"Unique reference number of the settlement transaction. When the Retailer is using “self-billing” Settlement model, this field should be sent.","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 transaction 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}},"additionalProperties":false,"description":"LineItemAppeasementRequest"},"LineItemAppeasementReasonCode":{"enum":["Appeasement","ShortShip","LostPackage","LostReturn","LateArrival","PromoAppeasement"],"type":"string","description":"Note: Please make sure it matches StandardDev Lookup.RefundReason Table"},"Price":{"required":["amount","currency"],"type":"object","properties":{"amount":{"type":"number","description":"Amount to credit eSW or debit eSW","format":"double"},"currency":{"minLength":1,"type":"string","description":"ISO representation for currency of transaction amount."}},"additionalProperties":false,"description":""},"ActionedBy":{"enum":["Retailer","Shopper","EShopWorld"],"type":"string","description":"To define Who initiated the request"},"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":{"/api/v2/Order/{brandOrderReference}/LineItemAppeasement":{"post":{"tags":["Order"],"summary":"Adds an item level appeasement.","description":"Method to appease a line item","operationId":"LineItemAppeasement","parameters":[{"name":"brandOrderReference","in":"path","description":"Retailer's unique reference number for the order.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Order.Transaction.Domain.Model.DTO.v2.LineItemAppeasementRequestOrders Item Level Appeasements","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineItemAppeasementRequest"}}}},"responses":{"200":{"description":"Line Item Level Appeasements successfully processed"},"202":{"description":"Accepted","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"The request is invalid","content":{"application/json":{"schema":{"$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":"No order 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"}}}}}}}}}
```

## Replaces Line Items within an Order.

> Method to replace multiple line items within an order.

```json
{"openapi":"3.0.4","info":{"title":"Order","version":"2.0"},"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Please insert JWT with Bearer into field","name":"Authorization","in":"header"}},"schemas":{"OrderReplacementRequest":{"required":["actionedBy","exchange","items","reasonCode","transactionDateTime","transactionReference"],"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemReplacement"},"description":"The Line Items to exchange"},"reasonCode":{"$ref":"#/components/schemas/OrderReplacementReasonCode"},"exchange":{"type":"boolean","description":"Indicates whether return of the items is required."},"settlementReference":{"type":"string","description":"Unique reference number of the settlement transaction. When the Retailer is using “self-billing” Settlement model, this field should be sent.","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 transaction 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}},"additionalProperties":false,"description":"OrderReplacementRequest"},"OrderItemReplacement":{"required":["quantity","replacementOrderDetails"],"type":"object","properties":{"lineItemId":{"type":"string","description":"Line item to be replaced","nullable":true},"productCode":{"type":"string","description":"Product code or stock-keeping unit (SKU) number of the item.","nullable":true},"quantity":{"type":"integer","description":"Quantity to replace.","format":"int32"},"replacementOrderDetails":{"$ref":"#/components/schemas/ReplacementOrderDetails"}},"additionalProperties":false,"description":"Defines the model to be used when replacing a line item"},"ReplacementOrderDetails":{"required":["replacementBrandOrderReference","replacementLineItemId"],"type":"object","properties":{"replacementBrandOrderReference":{"minLength":1,"type":"string","description":"Retailer's unique reference number for the replacement order,"},"replacementLineItemId":{"minLength":1,"type":"string","description":"Line Item Id of the replacement articles Example: ‘1’"},"replacementProduct":{"$ref":"#/components/schemas/ReplacementProduct"}},"additionalProperties":false,"description":"ReplacementOrderDetails"},"ReplacementProduct":{"type":"object","properties":{"productCode":{"type":"string","description":"Example: ‘277906’","nullable":true},"name":{"type":"string","description":"The name of the product.","nullable":true},"description":{"type":"string","description":"The description of the product.\r\n Example: ‘PINK:PFCT FZ PINK LOUNGE WOMENS KNIT 60% COTTON 40% POLYESTER OUTERWEAR HO’","nullable":true},"colour":{"type":"string","description":"The colour of the product","nullable":true},"size":{"type":"string","description":"The size of the product. Example: ‘S’","nullable":true}},"additionalProperties":false,"description":"Product"},"OrderReplacementReasonCode":{"enum":["LostPackage","DamagedGoods","ShortShip","LostReturn","IncorrectSize","IncorrectProduct","ProductNotAsExpected","ShopperRemorse"],"type":"string","description":"Order Replacement Reason Code"},"ActionedBy":{"enum":["Retailer","Shopper","EShopWorld"],"type":"string","description":"To define Who initiated the request"},"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":{"/api/v2/Order/{brandOrderReference}/Replacement":{"post":{"tags":["Order"],"summary":"Replaces Line Items within an Order.","description":"Method to replace multiple line items within an order.","operationId":"OrderReplacement","parameters":[{"name":"brandOrderReference","in":"path","description":"Retailer's unique reference number for the order.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Order Replacement details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderReplacementRequest"}}}},"responses":{"200":{"description":"Line Items replacement successfully processed"},"202":{"description":"Accepted","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"The request is not valid","content":{"application/json":{"schema":{"$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":"No order 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"}}}}}}}}}
```

## Allocates an Order.

> Method to allocate an order.

```json
{"openapi":"3.0.4","info":{"title":"Order","version":"2.0"},"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Please insert JWT with Bearer into field","name":"Authorization","in":"header"}},"schemas":{"OrderAllocationRequest":{"required":["actionedBy","lineItems","transactionDateTime","transactionReference"],"type":"object","properties":{"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemAllocation"},"description":"The Line Items to allocate"},"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 transaction 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}},"additionalProperties":false,"description":"OrderAllocationRequest"},"OrderItemAllocation":{"required":["articles","lineItemId","quantity"],"type":"object","properties":{"lineItemId":{"minLength":1,"type":"string","description":"Line item id"},"quantity":{"type":"integer","description":"Quantity","format":"int32"},"articles":{"type":"array","items":{"$ref":"#/components/schemas/ArticleAllocation"},"description":"Articles to allocate"}},"additionalProperties":false,"description":"Defines the model to be used when allocating a line item"},"ArticleAllocation":{"required":["activityStatus","fulfilmentCountryIso"],"type":"object","properties":{"activityStatus":{"$ref":"#/components/schemas/AllocationActivityStatus"},"fulfilmentCountryIso":{"minLength":1,"type":"string","description":"Fulfilment country ISO"},"fulfilmentCentreId":{"type":"string","description":"Fulfilment centre Id","nullable":true},"reasonCode":{"$ref":"#/components/schemas/LineItemActivityReasonCode"}},"additionalProperties":false,"description":"Article allocation"},"AllocationActivityStatus":{"enum":["Cancel","Allocate"],"type":"string","description":"AllocationActivityStatus"},"LineItemActivityReasonCode":{"enum":["OutOfStock","ShopperCancel","ItemFulfilled"],"type":"string","description":"Order Activity Reason Code"},"ActionedBy":{"enum":["Retailer","Shopper","EShopWorld"],"type":"string","description":"To define Who initiated the request"},"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":{"/api/v2/Order/{brandOrderReference}/Allocation":{"post":{"tags":["Order"],"summary":"Allocates an Order.","description":"Method to allocate an order.","operationId":"OrderAllocation","parameters":[{"name":"brandOrderReference","in":"path","description":"Retailer's unique reference number for the order.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Order Allocation details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderAllocationRequest"}}}},"responses":{"200":{"description":"Order allocation successfully processed"},"202":{"description":"Accepted","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"The request is not valid","content":{"application/json":{"schema":{"$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":"No order 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.esw.com/api-references/order-api/order.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
