Order Ingestion

Ingest Shopify Orders into ESW System

1. Order Webhook


2. ESW Create Order API Call

Call the ESW Create Order API

Use the ESW CreateOrder API to register Shopify orders in ESW as offline orders.

Code Snippet
Request
curl -i -X POST \
  'https://api.sandbox.esw.com/v2/{tenantCode}/Order' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "brandOrderReference": "12345",
    "weight": {
      "weightTotal": 0.1,
      "weightUnit": "KG"
    },
    "orderType": "Offline",
    "parentBrandOrderReference": "P12345",
    "transactionReference": "C857B3CD-5EB7-426D-8741-812E5ED214C0",
    "transactionDateTime": "\"2019-10-14T15:56:18.455Z\"",
    "actionedBy": "Retailer",
    "actionedByUser": "johnsmith@test.com",
    "shopperCurrencyIso": "EUR",
    "retailerCurrencyIso": "USD",
    "deliveryCountryIso": "IE",
    "shopperExperience": {
      "shopperCultureLanguageIso": "en-IE",
      "registeredProfileId": "44170"
    },
    "contactDetails": [
      {
        "contactDetailsType": "IsDelivery",
        "nickName": "NickName",
        "addressId": "AD12345",
        "firstName": "John ",
        "lastName": "Smith",
        "address1": "1234 Line Ave S",
        "address2": "Apt B1",
        "address3": "New York state",
        "city": "New York city",
        "postalCode": "10001",
        "region": "Region",
        "country": "US",
        "email": "email@test.com",
        "telephone": "+14211112222",
        "gender": "None",
        "poBox": ""
      }
    ],
    "lineItems": [
      {
        "lineItemId": "1",
        "quantity": 2,
        "estimatedDeliveryDateFromRetailer": "\"2020-08-31T11:54:24.631Z\"",
        "product": {
          "title": "Black dress",
          "description": "Long black dress",
          "customsDescription": "Long black dress",
          "productCode": "123456",
          "hsCode": "123456",
          "countryOfOriginIso": "CN",
          "imageUrl": "https://url.com/test.png",
          "color": "black",
          "size": "38",
          "productUnitPriceInfo": {
            "price": {
              "currency": "EUR",
              "amount": "100.00"
            }
          },
          "isReturnProhibited": false
        },
        "metadataItems": [
          {
            "name": "KeyName",
            "value": "KeyValue"
          }
        ]
      }
    ],
    "deliveryOption": {
      "eshopDeliveryOptionCode": "DEFAULT",
      "estimatedDeliveryDateToShopper": "\"2020-08-31T11:54:24.631Z\"",
      "priceInfo": {
        "price": {
          "currency": "EUR",
          "amount": "100.00"
        }
      }
    },
    "retailerInvoice": {
      "number": "784512",
      "date": "2020-05-11"
    },
    "payment": {
      "method": "ApplePay",
      "last4Digits": "1234",
      "paymentAttemptRef": "1CBA8F0C-F7EE-437C-A450-B63ADD08CA5A",
      "priceInfo": {
        "price": {
          "currency": "EUR",
          "amount": "100.00"
        }
      },
      "deliveryPriceInfo": {
        "price": {
          "currency": "EUR",
          "amount": "100.00"
        }
      },
      "retailerPriceInfo": {
        "price": {
          "currency": "EUR",
          "amount": "100.00"
        }
      },
      "retailerDeliveryPriceInfo": {
        "price": {
          "currency": "EUR",
          "amount": "100.00"
        }
      },
      "paymentStatus": "string",
      "merchantPaymentId": "string"
    },
    "originDetails": {
      "originType": "None",
      "firstName": "John ",
      "lastName": "Smith",
      "telephone": "+14211112222",
      "nickName": "NickName",
      "addressId": "AD12345",
      "address1": "1234 Line Ave S",
      "address2": "Apt B1",
      "address3": "New York state",
      "city": "New York city",
      "postalCode": "10001",
      "region": "Region",
      "country": "US",
      "email": "email@test.com",
      "gender": "None",
      "poBox": ""
    },
    "metadataItems": [
      {
        "name": "KeyName",
        "value": "KeyValue"
      }
    ]
  }'
Reponse
{
  "transactionReference": "46874510-DE4C-4748-A74C-97C54AFB4270"
}