Create an Order

Service Url: POST /orders

Tokens:

Request Body

request – ICreateOrderTransaction – The details of the order to create.

Response Body:

200 Ok

Remarks

Creates an order given a transaction. The transaction must have a user and customer order ID associated with it. 

Example Request: Create Order Transaction Example 

{
  "customerOrderCreateHeaderMessage" : {
    "transactionId" : "00010002000081811201312526",
    "customerOrderId" : "10",
    "customerOrderTypeId" : "CUSTOMER_ORDER",
    "referenceId" : "10",
    "deviceId" : {
      "id" : "pos2@0001.enactor"
    },
    "locationId" : {
      "id" : "0001"
    },
    "userId" : {
      "id" : "CUST_USER"
    },
    "createdDate" : "2018-11-20T15:10:44.000+00:00",
    "authorisedByUserKey" : { },
    "authorisedDate" : "2018-11-20T15:10:44.000+00:00",
    "preferredContactTypeKey" : { },
    "customerNumber" : "1",
    "customerPostcode" : "SG141PB",
    "contactAddress" : {
      "county" : "Hertfordshire",
      "email" : "demo@enactor.co.uk",
      "phone1" : "01295768256",
      "postCode" : "SG141PB",
      "street1" : "1 Enactor House",
      "street2" : "Bluecoats Avenue",
      "town" : "Hertford",
      "organisation" : "Enactor",
      "isTemplate" : false,
      "countryCodeId" : { },
      "typeId" : { }
    },
    "currencyId" : {
      "id" : "GBP"
    },
    "status" : "STARTING",
    "notificationEmailAddress" : "demo@enactor.co.uk"
  },
  "customerOrderItems" : [ {
    "transactionId" : "00010002000081811201312526",
    "customerOrderId" : "10",
    "sourceLineNumber" : 2,
    "fulfilmentId" : 1,
    "locationId" : {
      "id" : "0001"
    },
    "userId" : {
      "id" : "CUST_USER"
    },
    "createdDate" : "2018-11-20T13:12:52.000+00:00",
    "productId" : {
      "id" : "MB709SN"
    },
    "orderedQty" : 1,
    "unitPrice" : 4260,
    "netPrice" : 4260,
    "effectiveNetValue" : 4260
  } ],
  "customerOrderPayments" : [ {
    "cardPayment" : {
      "cardDetails" : { },
      "isPreAuth" : false,
      "hostAuthorised" : false,
      "hostDeclined" : false,
      "isManuallyRecorded" : false,
      "billingAddressContactTypeId" : { },
      "transactionId" : "00010002000081811201312526",
      "customerOrderId" : "10",
      "paymentType" : "customerOrderCardPayment",
      "amount" : 4260,
      "exchangeRate" : 0.0,
      "foreignValue" : 0,
      "isRefund" : false,
      "isTransfer" : false,
      "currencyId" : {
        "id" : "GBP"
      },
      "tenderId" : {
        "tenderId" : "CARD",
        "groupId" : {
          "id" : "UK",
          "groupTypeId" : "region",
          "groupHierarchyId" : "All"
        }
      },
      "userId" : {
        "id" : "CUST_USER"
      }
    }
  } ],
  "fulfilmentOptions" : [ {
    "customerOrderId" : "10",
    "fulfilmentId" : 1,
    "sourceType" : "locationStockFulfilment",
    "sourceId" : "0003",
    "destinationType" : "ADDRESS",
    "destinationLocationId" : { },
    "destinationAddress" : {
      "county" : "Hertfordshire",
      "postCode" : "sg124 9tf",
      "street1" : "44 Furlong Way",
      "street2" : "Great Amwell",
      "isTemplate" : false,
      "lastUpdated" : 1542726677852,
      "countryCodeId" : { },
      "typeId" : { }
    },
    "destinationName" : { },
    "deliveryCharge" : 0,
    "deliveryChargeForeignCurrencyId" : { },
    "deliveryTypeId" : { }
  } ],
  "transactionId" : "estateManager.enactor_16731acdc59",
  "sequenceNumber" : 1,
  "source" : "estateManager.enactor",
  "sourceApplication" : "Retail Transaction Processing",
  "topic" : "Transactions",
  "userId" : "CUST_USER"
}

Go to Top