Skip to main content

How-to Guide - Rest API - Orders

Introduction

The purpose of this guide is to provide an understanding of the REST Orders APIs provided by Enactor for use with external Web Sites and for Customer integration. It is separated out into functional areas, with each section related to a specific service. Note that the final URL used to access the service will be determined based on how the Enactor REST Orders API is deployed.

Following are Enactor REST Orders APIs areas covered in this document:

  • Orders API

  • Orders Task API

Orders API

The Order API is used to get details about an order. It can also be used to request cancellation and return an order or an item within an order. It cannot be used to submit an order - that must be done by creating a basket and submitting it through the checkout flow. Following is the list of Orders APIs covered in this section:

  • Search Orders

  • List Order Headers

  • Create an Order

  • Get an Order's Details

  • Cancel an Order

  • Cancel an Order Item

  • Request Return of an Order

  • Request Return of an Order Item

  • Update Order?

Search Orders

This service can be used to list orders associated with the customer.

Request

Request Service URL

GET /orders

Request Tokens

There are no request tokens.

Request Parameters

  • typeId: String. The ID of the customer order type – Required. Eg: typeId=CUSTOMER_ORDER

  • earliestDate: Date. List orders created after, or on, this date - Optional, defaults to 60 days ago.

  • latestDate: Date. List orders created before, or on, this date - Optional, defaults to now.

  • pageSize: Integer. The maximum number of orders to return on a single page - Optional, defaults to 10, limited to 100.

  • pageSize: Integer. The offset, in rows, of the first order to return - Optional defaults to 0.

Request Body

There is no request body.

Response

Response Headers

There are no response headers.

Response Body

IListOrdersResponse

ElementTypeDescription
orderListList<ICustomerOrder>A list of order details, including the orderId.

Scenarios and Responses

This sub-section covers the Scenarios and Response Codes related to Search Orders service.

Scenarios

ScenarioOutcomeExpected BehaviourStatus CodeResponse
The orders service recieves no query params.SuccessThe service should return the customer orders, limited to 10 and within the date range of today and 60 days ago.200IListOrdersResponse: OrderList: List of customer orders.
The orders service recieves a value for the earliestDate param.SuccessThe service should return the customer orders, limited to 10 and within the date range of today and <EarliestDateParam> days ago.200IListOrdersResponse: OrderList: List of customer orders.
The orders service recieves a value for the latestDate param.SuccessThe service should return the customer orders, limited to 10 and within the date range of <LatestDateParam>and 60 days ago.200IListOrdersResponse: OrderList: List of customer orders.
The orders service recieves a value for the pageSize param.SuccessThe service should return the customer orders, limited to <PageSizeParam> and within the date range of today and 60 days ago.200IListOrdersResponse: OrderList: List of customer orders.
The orders service recieves a value for the pageOffset param.SuccessThe service should return the customer orders, limited to 10, with an offset of <PageOffsetParam> and within the date range of today and 60 days ago.200IListOrdersResponse: OrderList: List of customer orders.

Response Codes

HTTP Status Code / PhraseDetail Message IDDescription / Potential Causes

Request & Response Examples

Request:

GET:
http://[SWARM_LEADER_IP]/WebRestApi/rest/orders?typeId=CUSTOMER_ORDER

Response:

Status: 200 OK

{
"orderList": [
{
"products": [
{
"productId": "VV639JS-12",
"type": "skuProduct",
"productDescription": {
"string": [
{
"country": "GB",
"language": "en",
"string": "Vans Canvas Shoes"
}
]
},
"productLongDescription": {
"string": [
{
"country": "GB",
"language": "en",
"string": "From Vans"
}
]
},
"productInfo": "Length 39in/99cm. Sits on the knee.\nMachine washable.\nCotton.",
"imageURL": "image://PRODUCT/VV639JS-1.jpg",
"posDetails": {
"productOptionSetDetails": {
"isTemplate": false
},
"isTemplate": false
},
"isTemplate": false,
"status": "LIVE",
"lastUpdated": 1544090247382,
"taxExemptProhibited": false,
"exportDetails": {
"notForExport": false,
"isTemplate": false
},
"inventoryDetails": {
"allowForLoan": false,
"allowCustomerOrder": true,
"allowPurchaseOrder": true,
"customerOrderOnly": false,
"directToStoreDelivery": false,
"isStocked": true,
"isTemplate": false
},
"productDimensions": {
"isTemplate": false
},
"warrantyDetails": {
"isTemplate": false
},
"standardCostPrice": 0,
"standardMargin": 0,
"styleId": "VV639JS",
"fasciaId": {},
"imageFilenameId": {
"id": "VV639JS-1",
"category": "PRODUCT",
"type": "jpg"
},
"taxGroupId": {
"id": "A"
},
"mmGroupId": {
"id": "MENS_SHOES",
"groupTypeId": "mmGroup",
"groupHierarchyId": "FASHION",
"variantGroupTypeId": "region",
"variantGroupId": "All",
"variantGroupHierarchyId": "All"
},
"brandId": {
"id": "VANS",
"groupTypeId": "brand",
"groupHierarchyId": "FASHION",
"variantGroupTypeId": "region",
"variantGroupId": "All",
"variantGroupHierarchyId": "All"
},
"rangeId": {},
"seasonId": {
"id": "ALL"
},
"colourId": {
"id": "RED",
"colourRangeId": "MENS_SHOES"
},
"sizeId": {
"id": "12",
"sizeRangeId": "MENS_SHOES"
}
}
],
"customerOrderItems": [
{
"item": {
"sourceLineNumber": 1,
"parentLineNumber": 0,
"fulfilmentId": 1,
"transactionId": "00010001000011811291048036",
"userId": {
"id": "1"
},
"locationId": {
"id": "0001"
},
"productId": {
"id": "VV639JS-12"
},
"createdDate": "2018-11-29T10:48:03.000+00:00",
"customerOrderId": "19",
"lastUpdated": 1543488556000,
"lineNumber": 1,
"netPrice": 5995,
"orderedQty": 1,
"reservedQty": 0,
"shippedQty": 0,
"status": "SUBMITTED",
"taxAmount": 0,
"unitPrice": 5995,
"voided": false,
"effectiveNetValue": 5995,
"destinationLocationId": {},
"reasonId": {
"regionId": {
"groupTypeId": "region"
}
}
}
}
],
"customerOrderPayments": [
{
"customerOrderCashPayment": {
"transactionId": "00010001000011811291048036",
"customerOrderId": "19",
"paymentNumber": 1,
"paymentType": "customerOrderCashPayment",
"voided": false,
"amount": 5995,
"status": "COMMITTED",
"createdDate": "2018-11-29T10:49:01.000+00:00",
"exchangeRate": 0,
"foreignValue": 0,
"lastUpdated": 1543488541000,
"isRefund": false,
"refundAvailable": 5995,
"tenderId": {
"tenderId": "CASH_UK",
"groupId": {
"id": "UK",
"groupTypeId": "region",
"groupHierarchyId": "All"
}
},
"currencyId": {
"id": "GBP"
},
"userId": {
"id": "1"
}
}
}
],
"customerOrderHeader": {
"transactionId": "00010001000011811291048036",
"customerOrderId": "19",
"customerOrderTypeId": "CUSTOMER_ORDER",
"referenceId": "19",
"internalReferenceId": "b91e7311-3b85-4c95-8c59-e02006dafac8",
"locationId": {
"id": "0001"
},
"userId": {
"id": "1"
},
"createdDate": "2018-11-29T10:48:37.000+00:00",
"authorisedByUserKey": {},
"authorisedDate": "2018-11-29T10:48:37.000+00:00",
"preferredContactTypeKey": {
"id": "CX_ORD_CONTACT"
},
"notificationContactTypeKey": {
"id": "CX_ORD_NOTIFICATION"
},
"customerNumber": "1",
"customerTitle": "Mr",
"customerFirstName": "Mark",
"customerSurname": "Harrison",
"customerPostcode": "SG141PB",
"currencyId": {
"id": "GBP"
},
"orderValue": 5995,
"balanceOwed": -5995,
"taxAmount": 0,
"taxInclusive": false,
"totalPayments": 5995,
"totalsLastCalculated": 1543488561000,
"voided": false,
"status": "SUBMITTED",
"lastUpdatedByUserKey": {},
"lastUpdated": 1543488561000,
"address": [
{
"county": "Hertfordshire",
"email": "demo@enactor.co.uk",
"phone1": "01295768256",
"postCode": "SG141PB",
"street1": "1 Enactor House",
"street2": "Bluecoats Avenue",
"town": "Hertford",
"organisation": "Enactor",
"isTemplate": false,
"lastUpdated": 1543488541000,
"countryCodeId": {},
"typeId": {
"id": "CX_ORD_CONTACT"
}
}
],
"deviceId": {
"id": "pos1@0001.enactor"
},
"reasonId": {
"regionId": {
"groupTypeId": "region"
}
}
},
"customerOrderFulfilments": [
{
"customerOrderId": "19",
"fulfilmentId": 1,
"sourceType": "locationStockFulfilment",
"sourceId": "0100",
"destinationType": "COLLECTION",
"destinationLocationId": {
"id": "0001"
},
"destinationAddress": {
"isTemplate": false,
"countryCodeId": {},
"typeId": {}
},
"destinationName": {},
"deliveryCharge": 0,
"deliveryChargeForeignCurrencyId": {},
"deliveryChargeForeignAmount": 0,
"lastUpdated": 1543488572000,
"deliveryTypeId": {},
"trackingDetails": {}
}
]
},
{
"products": [
{
"productId": "DF517XM-1",
"type": "skuProduct",
"productDescription": {
"string": [
{
"country": "GB",
"language": "en",
"string": "Button Down Collar Red"
}
]
},
"productLongDescription": {
"string": [
{
"country": "GB",
"language": "en",
"string": "Check Button Down Collar Western Shirt"
}
]
},
"productInfo": "Machine washable. Cotton.",
"imageURL": "image://PRODUCT/DF517XM-2.jpg",
"posDetails": {
"operatorMessage": {},
"customerMessage": {},
"cashierAgeRestrict": 0,
"numberCopyReceipts": 0,
"maxDiscount": 0,
"maxEmployeeDiscount": 0,
"returnsTimeLimit": 0,
"maxQtyPerTransaction": 0,
"customerAgeRestriction": 0,
"receiptMessage": {},
"productOptionSetDetails": {
"isTemplate": false
},
"isTemplate": false
},
"isTemplate": false,
"status": "LIVE",
"lastUpdated": 1436467475060,
"taxExemptProhibited": false,
"exportDetails": {
"notForExport": false,
"isTemplate": false
},
"inventoryDetails": {
"allowForLoan": false,
"allowCustomerOrder": true,
"allowPurchaseOrder": true,
"customerOrderOnly": false,
"directToStoreDelivery": false,
"warehouseUnitOfMeasureId": "1",
"isStocked": true,
"isTemplate": false
},
"productDimensions": {
"isTemplate": false
},
"warrantyDetails": {
"isTemplate": false
},
"salesUnitOfMeasureId": "1",
"inventoryUnitOfMeasureId": "1",
"standardCostPrice": 0,
"standardMargin": 0,
"styleId": "DF517XM",
"fasciaId": {},
"imageFilenameId": {
"id": "DF517XM-2",
"category": "PRODUCT",
"type": "jpg"
},
"taxGroupId": {
"id": "A"
},
"mmGroupId": {
"id": "MENS_SHIRTS",
"groupTypeId": "mmGroup",
"groupHierarchyId": "FASHION",
"variantGroupTypeId": "region",
"variantGroupId": "All",
"variantGroupHierarchyId": "All"
},
"brandId": {
"id": "INTERNAL",
"groupTypeId": "brand",
"groupHierarchyId": "FASHION",
"variantGroupTypeId": "region",
"variantGroupId": "All",
"variantGroupHierarchyId": "All"
},
"rangeId": {},
"measureSystemId": {
"id": "CASE_PACK"
},
"seasonId": {
"id": "ALL"
},
"colourId": {
"id": "RED",
"colourRangeId": "MENS_SHIRTS"
},
"sizeId": {
"id": "S",
"sizeRangeId": "MENS_SHIRTS"
}
},
{
"productId": "MB709SN-4",
"type": "skuProduct",
"productDescription": {
"string": [
{
"country": "GB",
"language": "en",
"string": "Rose Print Tea Dress"
}
]
},
"productLongDescription": {
"string": [
{
"country": "GB",
"language": "en",
"string": "Lightweight cotton tea dress. Back shirring for improved fit."
}
]
},
"productInfo": "Length 39in/99cm. Sits on the knee.\nMachine washable.\nCotton.",
"imageURL": "image://PRODUCT/MB709SN-2.jpg",
"posDetails": {
"productOptionSetDetails": {
"isTemplate": false
},
"isTemplate": false
},
"isTemplate": false,
"status": "LIVE",
"lastUpdated": 1557908691938,
"taxExemptProhibited": false,
"exportDetails": {
"notForExport": false,
"isTemplate": false
},
"inventoryDetails": {
"allowForLoan": false,
"allowCustomerOrder": true,
"allowPurchaseOrder": true,
"customerOrderOnly": false,
"directToStoreDelivery": false,
"isStocked": true,
"isTemplate": false
},
"productDimensions": {
"isTemplate": false
},
"warrantyDetails": {
"isTemplate": false
},
"standardCostPrice": 0,
"standardMargin": 0,
"styleId": "MB709SN",
"fasciaId": {},
"imageFilenameId": {
"id": "MB709SN-2",
"category": "PRODUCT",
"type": "jpg"
},
"taxGroupId": {
"id": "A"
},
"mmGroupId": {
"id": "WOMENS_DRESSES",
"groupTypeId": "mmGroup",
"groupHierarchyId": "FASHION",
"variantGroupTypeId": "region",
"variantGroupId": "All",
"variantGroupHierarchyId": "All"
},
"brandId": {
"id": "INTERNAL",
"groupTypeId": "brand",
"groupHierarchyId": "FASHION",
"variantGroupTypeId": "region",
"variantGroupId": "All",
"variantGroupHierarchyId": "All"
},
"rangeId": {},
"seasonId": {
"id": "SUMMER"
},
"colourId": {
"id": "NAVY_BLUE",
"colourRangeId": "WOMENS_DRESSES"
},
"sizeId": {
"id": "14",
"sizeRangeId": "WOMENS_DRESSES"
}
}
],
"customerOrderItems": [
{
"item": {
"sourceLineNumber": 1,
"parentLineNumber": 0,
"fulfilmentId": 1,
"userId": {},
"locationId": {
"id": "0001"
},
"productId": {
"id": "MB709SN-4"
},
"createdDate": "2018-11-26T09:34:52.000+00:00",
"customerOrderId": "75YA7IQ7LVCDJJOMTBT2SIS2MI",
"lastUpdated": 1543224947000,
"lineNumber": 1,
"netPrice": 1000,
"orderedQty": 2,
"reservedQty": 0,
"shippedQty": 0,
"status": "NEW",
"taxAmount": 0,
"unitPrice": 0,
"voided": false,
"effectiveNetValue": 1000,
"destinationLocationId": {},
"reasonId": {
"regionId": {
"groupTypeId": "region"
}
}
}
},
{
"item": {
"sourceLineNumber": 0,
"parentLineNumber": 0,
"fulfilmentId": 1,
"userId": {},
"locationId": {
"id": "0001"
},
"productId": {
"id": "DF517XM-1"
},
"createdDate": "2018-11-26T09:34:52.000+00:00",
"customerOrderId": "75YA7IQ7LVCDJJOMTBT2SIS2MI",
"lastUpdated": 1543224947000,
"lineNumber": 2,
"netPrice": 1000,
"orderedQty": 5,
"reservedQty": 0,
"shippedQty": 0,
"status": "NEW",
"taxAmount": 0,
"unitPrice": 0,
"voided": false,
"effectiveNetValue": 1000,
"destinationLocationId": {},
"reasonId": {
"regionId": {
"groupTypeId": "region"
}
}
}
}
],
"customerOrderPayments": [
{
"customerOrderCardPayment": {
"cardDetails": {
"cardDescription": "Mastercard",
"panToken": "476173B0000H0119",
"panIIN": "530125",
"mangledPAN": "*********0192",
"hashedPan": "i0PLbox7WJ7iPWJbzNbGBSbn3O5nn2K0MzrYv5+k81Q="
},
"isPreAuth": false,
"hostAuthorised": false,
"hostDeclined": false,
"isManuallyRecorded": false,
"billingAddressContactTypeId": {},
"customerOrderId": "75YA7IQ7LVCDJJOMTBT2SIS2MI",
"paymentNumber": 1,
"paymentType": "customerOrderCardPayment",
"voided": false,
"amount": 2000,
"status": "COMMITTED",
"createdDate": "2018-11-26T09:35:47.000+00:00",
"exchangeRate": 0,
"foreignValue": 0,
"lastUpdated": 1543224947000,
"isRefund": false,
"refundAvailable": 2000,
"tenderId": {
"groupId": {
"id": "ALL",
"groupTypeId": "region",
"groupHierarchyId": "ALL"
}
},
"currencyId": {
"id": "GBP"
},
"userId": {
"id": "1"
}
}
}
],
"customerOrderHeader": {
"customerOrderId": "75YA7IQ7LVCDJJOMTBT2SIS2MI",
"customerOrderTypeId": "CUSTOMER_ORDER",
"referenceId": "75YA7IQ7",
"internalReferenceId": "3b8f6789-5f94-48af-9b9d-01df06d0e5aa",
"locationId": {
"id": "estatemanager"
},
"userId": {},
"createdDate": "2018-11-26T09:34:52.000+00:00",
"authorisedByUserKey": {},
"preferredContactTypeKey": {
"id": "CX_ORD_CONTACT"
},
"notificationContactTypeKey": {
"id": "CX_ORD_NOTIFICATION"
},
"customerNumber": "1",
"customerTitle": "MR",
"customerFirstName": "James Hanson",
"customerSurname": "Hanson",
"customerPostcode": "SG12 9TE",
"currencyId": {},
"orderValue": 3000,
"balanceOwed": -1000,
"taxAmount": 0,
"taxInclusive": false,
"adjustments": [
{
"adjustmentNumber": 1,
"fulfilmentId": 1,
"description": "£10.00 off",
"voided": false,
"amount": 1000,
"percentage": 0,
"taxAmount": 0,
"canCancel": false,
"lastUpdated": 1543224947000
}
],
"totalPayments": 2000,
"totalsLastCalculated": 1543224949000,
"voided": false,
"status": "IN_PROGRESS",
"lastUpdatedByUserKey": {},
"lastUpdated": 1543224949000,
"address": [
{
"country": "Britain",
"email": "james.hanson@enactor.co.uk",
"mobilePhone": "07777 9999999",
"postCode": "SG14 9TG",
"street1": "Bluecoats",
"street2": "Avenue",
"town": "Hertford",
"isTemplate": false,
"lastUpdated": 1543224947000,
"countryCodeId": {},
"typeId": {
"id": "CX_ORD_CONTACT"
}
},
{
"isTemplate": false,
"lastUpdated": 1543224947000,
"countryCodeId": {},
"typeId": {
"id": "CX_ORD_NOTIFICATION"
}
}
],
"deviceId": {
"id": "estateManager.enactor"
},
"reasonId": {
"regionId": {
"groupTypeId": "region"
}
}
},
"customerOrderNotes": [
{
"customerOrderId": "75YA7IQ7LVCDJJOMTBT2SIS2MI",
"lineNumber": 1,
"messageNumber": 1,
"type": "GENERAL",
"note": "This is a test note",
"locationId": {
"id": "0001"
},
"userId": {
"id": "1"
},
"lastUpdated": 1543224947000
},

List Order Headers

This service can be used to list all order headers.

Request

Request Service URL

GET /orders/headers

Request Tokens

There are no request tokens.

Request Parameters

There are no request parameters.

Request Body

There is no request body.

Response

Response Headers

There are no response headers.

Response Body

ListOrderHeaderResponse

ElementTypeDescription
listList<CustomerOrderHeaderListElementList>The list of customer order headers.

Scenarios and Responses

This sub-section covers the Primary Basket Scenarios, Wishlist Basket

Scenarios and Response Codes related to Add Basket Item service.

Scenarios

ScenarioOutcomeExpected BehaviourStatus CodeResponse

Response Codes

HTTP Status Code / PhraseDetail Message IDDescription / Potential Causes

Request & Response Examples

Request:

GET: http://[SWARM_LEADER_IP]/WebRestApi/rest/baskets/orders/headers

Response:

Status 200 OK
{
"list": [
{
"customerOrderHeaderKey": {
"id": "2"
},
"status": "SUBMITTED",
"transactionId": "00030106000022312221314100",
"referenceId": "2",
"customerNumber": "100",
"currencyKey": {
"id": "GBP"
},
"voided": false,
"balanceOwed": -29900,
"totalsLastCalculated": 1703251022000,
"orderValue": 29900,
"createdDate": "2023-12-22T13:15:29.000+00:00",
"customerTitle": "Mrs",
"customerFirstName": "Amelia",
"customerSurname": "Baldwin",
"customerPostcode": "SG14 3AG",
"customerDateOfBirth": 539308800000,
"entityQName": "{http://www.enactor.com/orders}customerOrderHeaderListElement"
},
{
"customerOrderHeaderKey": {
"id": "1"
},
"status": "SUBMITTED",
"transactionId": "00030002000032312221308352",
"referenceId": "1",
"customerNumber": "100",
"currencyKey": {
"id": "GBP"
},
"voided": false,
"balanceOwed": -29900,
"totalsLastCalculated": 1703250732000,
"orderValue": 29900,
"createdDate": "2023-12-22T13:10:15.000+00:00",
"customerTitle": "Mrs",
"customerFirstName": "Amelia",
"customerSurname": "Baldwin",
"customerPostcode": "SG14 3AG",
"customerDateOfBirth": 539308800000,
"entityQName": "{http://www.enactor.com/orders}customerOrderHeaderListElement"
}
]
}

Create an Order

This service creates an order for a given transaction. The transaction must have a user and customer order ID associated with it.

Request

Request Service URL

POST /orders

Request Tokens

There are no request tokens.

Request Parameters

There are no request parameters.

Request Body

ElementRequired / OptionalTypeDescription
requestRequiredICreateOrderTransactionThe details of the order to create.

Response

Response Headers

There are no response headers.

Response Body

There is no response body.

Scenarios and Responses

This sub-section covers the Primary Basket Scenarios, Wishlist Basket Scenarios and Response Codes related to Add Basket Item service.

Scenarios

ScenarioOutcomeExpected BehaviourStatus CodeResponse

Response Codes

HTTP Status Code / PhraseDetail Message IDDescription / Potential Causes

Request & Response Examples

Request:

POST http://[SWARM_LEADER_IP]/WebRestApi/rest/baskets/orders
{
"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"
}

Response:

Status: 200 OK

Find Order

This service provides the list of order headers for the search criteria provided in the request from the POS.

Request

Request Service URL

POST /orders/pos/headers

Request Tokens

There are no request tokens.

Request Parameters

There are no request parameters.

Request Body

ElementMandatory / OptionalTypeDescription
criteriaMandatorycomplexThis contains the search criteria that is applied to find the order. This consists of the following filters:
- distinct
- maxRows
- orderByColumns
- suppressDefaultOrderBy
- createdDateStartFilter
- createdDateEndFilter
- customerNameFilter
- customerFirstNameFilter
- customerSurnameFilter
- customerNumberFilter
- customerOrderIdFilter
- customerPostcodeFilter
- referenceIdFilter
- transactionIdFilter
- searchMultipleIdFilter
- customerOrderTypeIdFilter
- locationIdFilter
- emailFilter
- phoneCompoundFilter
- userIdFilter

Response

The FindOrder API fetches data from the customerorderheaders Table.

Response Headers

There are no response headers.

Response Body

ElementTypeDescription
listComplexObject containing the information about each order of the customer.
outcomeComplexThe final status of the response.

Request & Response Examples

Request

Find Order using Customer surname of 'baldwin':

Request
POST: http://{{SWARM_LEADER_IP}}/WebRestApi/rest/orders/pos/headers

Body: {
"criteria" : {
"customerFirstNameFilter" : {
"filter" : {
"MatchTextValueFilter" : {
"id" : "CustomerFirstName",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : true,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false
}
}
},
"customerSurnameFilter" : {
"filter" : {
"MatchTextValueFilter" : {
"id" : "CustomerSurname",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : true,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"defaultValue" : "baldwin",
"valueRequired" : false,
"supportValues" : [ {
"value" : "baldwin"
} ]
}
}
},
"customerNumberFilter" : {
"filter" : {
"MatchTextValueFilter" : {
"id" : "CustomerNumber",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false
}
}
},
"customerOrderIdFilter" : {
"filter" : {
"MatchTextValueFilter" : {
"id" : "CustomerOrderId",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false
}
}
},
"referenceIdFilter" : {
"filter" : {
"MatchTextValueFilter" : {
"id" : "ReferenceId",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false
}
}
},
"transactionIdFilter" : {
"filter" : {
"MatchTextValueFilter" : {
"id" : "TransactionId",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false
}
}
},
"customerOrderTypeIdFilter" : {
"filter" : {
"MatchTextValueFilter" : {
"id" : "CustomerOrderTypeId",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "NOT_EQUALS",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"defaultValue" : "LAYAWAY_FUTURE_SALE",
"valueRequired" : false,
"supportValues" : [ {
"value" : "LAYAWAY_FUTURE_SALE"
} ]
}
}
},
"emailFilter" : {
"filter" : {
"MatchTextValueFilter" : {
"id" : "Email",
"forceApplicable" : false,
"orColumns" : false,
"comparisonOperator" : "STARTS_WITH",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false
}
}
},
"phoneCompoundFilter" : {
"filter" : {
"CompoundListFilter" : {
"filters" : [ {
"@type" : "MatchTextValueFilter",
"id" : "Phone1",
"forceApplicable" : false,
"orColumns" : true,
"comparisonOperator" : "STARTS_WITH",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false
}, {
"@type" : "MatchTextValueFilter",
"id" : "MobilePhone",
"forceApplicable" : false,
"orColumns" : true,
"comparisonOperator" : "STARTS_WITH",
"orNull" : false,
"width" : 20,
"useValueForAllProperties" : false,
"caseInsensitive" : false,
"submitOnChange" : true,
"disabled" : false,
"hidden" : false,
"fuzzyLevel" : 4,
"customQueryFilter" : false,
"valueRequired" : false
} ],
"orFilters" : true,
"forceApplicable" : false,
"id" : "CompoundFilter",
"fuzzyLevel" : 4
}
}
},
"maxRows" : 0,
"distinct" : false,
"orderByColumns" : [ {
"propertyName" : "createdDate.localDateTime",
"sortOrder" : "DESCENDING"
}, {
"propertyName" : "customerOrderId",
"sortOrder" : "DESCENDING"
} ],
"suppressDefaultOrderBy" : false
}
}

Response

Following is an example response that includes orders for the customer searched with the surname of 'baldwin':

Response
Body: {
"list" : [ {
"balanceOwed" : -29900,
"createdDate" : 1728023471,
"currencyKey" : {
"id" : "GBP"
},
"orderValue" : 29900,
"customerOrderHeaderId" : {
"id" : "13"
},
"voided" : false,
"customerTitle" : "Mrs",
"customerFirstName" : "Amelia",
"customerNumber" : "100",
"customerPostcode" : "SG14 3AG",
"customerSurname" : "Baldwin",
"customerDateOfBirth" : 539308800000,
"status" : "IN_PROGRESS",
"totalsLastCalculated" : 1728023594000,
"transactionId" : "00050796000872410041143404"
}, {
"balanceOwed" : -29900,
"createdDate" : 1727867023,
"currencyKey" : {
"id" : "GBP"
},
"orderValue" : 29900,
"customerOrderHeaderId" : {
"id" : "7"
},
"voided" : false,
"customerTitle" : "Mrs",
"customerFirstName" : "Amelia",
"customerNumber" : "100",
"customerPostcode" : "SG14 3AG",
"customerSurname" : "Baldwin",
"customerDateOfBirth" : 539308800000,
"status" : "SUBMITTED",
"totalsLastCalculated" : 1727932132000,
"transactionId" : "00050796000732410021628226"
} ],
"outcome" : {
"name" : "Success"
}
}

Get an Order’s Details

This service allows to retrieve details about a particular order.

Request

Request Service URL

GET /orders/{orderId}

Request Tokens

  • orderId: The ID of the order to retrieve.

Request Parameters

There are no request parameters.

Request Body

There is no request body.

Response

Response Headers

There are no response headers.

Response Body

ElementTypeDescription
orderICustomerOrderThe details of the specified order.

Scenarios and Responses

This sub-section covers the Scenarios and Response Codes related to Get an Order’s Details service.

Scenarios

ScenarioOutcomeExpected BehaviourStatus CodeResponse
The orders service receives a valid order ID and the order belongs to the customer.SuccessThe customer order is returned.200IGetOrderResponse: order <ICustomerOrder>
The orders service receives a valid order ID and the order does not belong to the customer.NotAllowedThe customer order is not returned. A NotAllowed error message is returned.405ErrorMessage: 405, Not allowed to retrieve order, outcome: NotAllowed.
The orders service receives an invalid order ID.FailThe customer order is not returned. An internal server error message is returned.500ErrorMessage: 500, Failed to retrieve order, outcome: Fail

Response Codes

HTTP Status Code / PhraseDetail Message IDDescription / Potential Causes

Request & Response Examples

Request:

GET: http://[SWARM_LEADER_IP]/WebRestApi/rest/baskets/orders/1

Response:

Status: 200 OK

{
"order": {
"products": [
{
"productId": "DF517XM-1",
"type": "skuProduct",
"productDescription": {
"string": [
{
"country": "GB",
"language": "en",
"string": "Button Down Collar Red"
}
]
},
"productLongDescription": {
"string": [
{
"country": "GB",
"language": "en",
"string": "Check Button Down Collar Western Shirt"
}
]
},
"productInfo": "Machine washable. Cotton.",
"imageURL": "image://PRODUCT/DF517XM-2.jpg",
"posDetails": {
"operatorMessage": {},
"customerMessage": {},
"cashierAgeRestrict": 0,
"numberCopyReceipts": 0,
"maxDiscount": 0,
"maxEmployeeDiscount": 0,
"returnsTimeLimit": 0,
"maxQtyPerTransaction": 0,
"customerAgeRestriction": 0,
"receiptMessage": {},
"productOptionSetDetails": {
"isTemplate": false
},
"isTemplate": false
},
"isTemplate": false,
"status": "LIVE",
"lastUpdated": 1436467475060,
"taxExemptProhibited": false,
"exportDetails": {
"notForExport": false,
"isTemplate": false
},
"inventoryDetails": {
"allowForLoan": false,
"allowCustomerOrder": true,
"allowPurchaseOrder": true,
"customerOrderOnly": false,
"directToStoreDelivery": false,
"warehouseUnitOfMeasureId": "1",
"isStocked": true,
"isTemplate": false
},
"productDimensions": {
"isTemplate": false
},
"warrantyDetails": {
"isTemplate": false
},
"salesUnitOfMeasureId": "1",
"inventoryUnitOfMeasureId": "1",
"standardCostPrice": 0,
"standardMargin": 0,
"styleId": "DF517XM",
"fasciaId": {},
"imageFilenameId": {
"id": "DF517XM-2",
"category": "PRODUCT",
"type": "jpg"
},
"taxGroupId": {
"id": "A"
},
"mmGroupId": {
"id": "MENS_SHIRTS",
"groupTypeId": "mmGroup",
"groupHierarchyId": "FASHION",
"variantGroupTypeId": "region",
"variantGroupId": "All",
"variantGroupHierarchyId": "All"
},
"brandId": {
"id": "INTERNAL",
"groupTypeId": "brand",
"groupHierarchyId": "FASHION",
"variantGroupTypeId": "region",
"variantGroupId": "All",
"variantGroupHierarchyId": "All"
},
"rangeId": {},
"measureSystemId": {
"id": "CASE_PACK"
},
"seasonId": {
"id": "ALL"
},
"colourId": {
"id": "RED",
"colourRangeId": "MENS_SHIRTS"
},
"sizeId": {
"id": "S",
"sizeRangeId": "MENS_SHIRTS"
}
},
{
"productId": "MB709SN-4",
"type": "skuProduct",
"productDescription": {
"string": [
{
"country": "GB",
"language": "en",
"string": "Rose Print Tea Dress"
}
]
},
"productLongDescription": {
"string": [
{
"country": "GB",
"language": "en",
"string": "Lightweight cotton tea dress. Back shirring for improved fit."
}
]
},
"productInfo": "Length 39in/99cm. Sits on the knee.\nMachine washable.\nCotton.",
"imageURL": "image://PRODUCT/MB709SN-2.jpg",
"posDetails": {
"productOptionSetDetails": {
"isTemplate": false
},
"isTemplate": false
},
"isTemplate": false,
"status": "LIVE",
"lastUpdated": 1557908691938,
"taxExemptProhibited": false,
"exportDetails": {
"notForExport": false,
"isTemplate": false
},
"inventoryDetails": {
"allowForLoan": false,
"allowCustomerOrder": true,
"allowPurchaseOrder": true,
"customerOrderOnly": false,
"directToStoreDelivery": false,
"isStocked": true,
"isTemplate": false
},
"productDimensions": {
"isTemplate": false
},
"warrantyDetails": {
"isTemplate": false
},
"standardCostPrice": 0,
"standardMargin": 0,
"styleId": "MB709SN",
"fasciaId": {},
"imageFilenameId": {
"id": "MB709SN-2",
"category": "PRODUCT",
"type": "jpg"
},
"taxGroupId": {
"id": "A"
},
"mmGroupId": {
"id": "WOMENS_DRESSES",
"groupTypeId": "mmGroup",
"groupHierarchyId": "FASHION",
"variantGroupTypeId": "region",
"variantGroupId": "All",
"variantGroupHierarchyId": "All"
},
"brandId": {
"id": "INTERNAL",
"groupTypeId": "brand",
"groupHierarchyId": "FASHION",
"variantGroupTypeId": "region",
"variantGroupId": "All",
"variantGroupHierarchyId": "All"
},
"rangeId": {},
"seasonId": {
"id": "SUMMER"
},
"colourId": {
"id": "NAVY_BLUE",
"colourRangeId": "WOMENS_DRESSES"
},
"sizeId": {
"id": "14",
"sizeRangeId": "WOMENS_DRESSES"
}
}
],
"customerOrderItems": [
{
"item": {
"sourceLineNumber": 1,
"parentLineNumber": 0,
"fulfilmentId": 1,
"userId": {},
"locationId": {
"id": "0001"
},
"productId": {
"id": "MB709SN-4"
},
"createdDate": "2018-11-26T09:44:51.000+00:00",
"customerOrderId": "3WQG6LAV6FHDTIXNP4WPWE2TQE",
"lastUpdated": 1543225531000,
"lineNumber": 1,
"netPrice": 1000,
"orderedQty": 2,
"reservedQty": 0,
"shippedQty": 0,
"status": "NEW",
"taxAmount": 0,
"unitPrice": 0,
"voided": false,
"effectiveNetValue": 1000,
"destinationLocationId": {},
"reasonId": {
"regionId": {
"groupTypeId": "region"
}
}
}
},
{
"item": {
"sourceLineNumber": 0,
"parentLineNumber": 0,
"fulfilmentId": 1,
"userId": {},
"locationId": {
"id": "0001"
},
"productId": {
"id": "DF517XM-1"
},
"createdDate": "2018-11-26T09:44:51.000+00:00",
"customerOrderId": "3WQG6LAV6FHDTIXNP4WPWE2TQE",
"lastUpdated": 1543225531000,
"lineNumber": 2,
"netPrice": 1000,
"orderedQty": 5,
"reservedQty": 0,
"shippedQty": 0,
"status": "NEW",
"taxAmount": 0,
"unitPrice": 0,
"voided": false,
"effectiveNetValue": 1000,
"destinationLocationId": {},
"reasonId": {
"regionId": {
"groupTypeId": "region"
}
}
}
}
],
"customerOrderPayments": [
{
"customerOrderCardPayment": {
"cardDetails": {
"cardDescription": "Mastercard",
"panToken": "476173B0000H0119",
"panIIN": "530125",
"mangledPAN": "*********0192",
"hashedPan": "i0PLbox7WJ7iPWJbzNbGBSbn3O5nn2K0MzrYv5+k81Q="
},
"isPreAuth": false,
"hostAuthorised": false,
"hostDeclined": false,
"isManuallyRecorded": false,
"billingAddressContactTypeId": {},
"customerOrderId": "3WQG6LAV6FHDTIXNP4WPWE2TQE",
"paymentNumber": 1,
"paymentType": "customerOrderCardPayment",
"voided": false,
"amount": 2000,
"status": "COMMITTED",
"createdDate": "2018-11-26T09:45:31.000+00:00",
"exchangeRate": 0,
"foreignValue": 0,
"lastUpdated": 1543225531000,
"isRefund": false,
"refundAvailable": 2000,
"tenderId": {
"groupId": {
"id": "ALL",
"groupTypeId": "region",
"groupHierarchyId": "ALL"
}
},
"currencyId": {
"id": "GBP"
},
"userId": {
"id": "1"
}
}
}
],
"customerOrderHeader": {
"customerOrderId": "3WQG6LAV6FHDTIXNP4WPWE2TQE",
"customerOrderTypeId": "CUSTOMER_ORDER",
"referenceId": "3WQG6LAV",
"internalReferenceId": "2afd8598-88a0-4ab5-904c-1d737c613574",
"locationId": {
"id": "estatemanager"
},
"userId": {},
"createdDate": "2018-11-26T09:44:51.000+00:00",
"authorisedByUserKey": {},
"preferredContactTypeKey": {
"id": "CX_ORD_CONTACT"
},
"notificationContactTypeKey": {
"id": "CX_ORD_NOTIFICATION"
},
"customerNumber": "1",
"customerTitle": "MR",
"customerFirstName": "James Hanson",
"customerSurname": "Hanson",
"customerPostcode": "SG12 9TE",
"currencyId": {},
"orderValue": 3000,
"balanceOwed": -1000,
"taxAmount": 0,
"taxInclusive": false,
"adjustments": [
{
"adjustmentNumber": 1,
"fulfilmentId": 1,
"description": "£10.00 off",
"voided": false,
"amount": 1000,
"percentage": 0,
"taxAmount": 0,
"canCancel": false,
"lastUpdated": 1543225531000
}
],
"totalPayments": 2000,
"totalsLastCalculated": 1543225534000,
"voided": false,
"status": "IN_PROGRESS",
"lastUpdatedByUserKey": {},
"lastUpdated": 1543225534000,
"address": [
{
"country": "Britain",
"email": "james.hanson@enactor.co.uk",
"mobilePhone": "07777 9999999",
"postCode": "SG14 9TG",
"street1": "Bluecoats",
"street2": "Avenue",
"town": "Hertford",
"isTemplate": false,
"lastUpdated": 1543225531000,
"countryCodeId": {},
"typeId": {
"id": "CX_ORD_CONTACT"
}
},
{
"isTemplate": false,
"lastUpdated": 1543225531000,
"countryCodeId": {},
"typeId": {
"id": "CX_ORD_NOTIFICATION"
}
}
],
"deviceId": {
"id": "estateManager.enactor"
},
"reasonId": {
"regionId": {
"groupTypeId": "region"
}
}
},
"customerOrderNotes": [
{
"customerOrderId": "3WQG6LAV6FHDTIXNP4WPWE2TQE",
"lineNumber": 1,
"messageNumber": 1,
"type": "GENERAL",
"note": "This is a test note",
"locationId": {
"id": "0001"
},
"userId": {
"id": "1"
},
"lastUpdated": 1543225531000
}
]
}
}

Get Order Number

This service will provide the Order Number when a new Order transaction is started.

Request

Request Service URL

POST /orders/pos/generateOrderNumber

Request Tokens

There are no request tokens.

Request Parameters

There are no request parameters.

Request Body

ElementMandatory / OptionalTypeDescription
orderTypeMandatoryStringThe order Type. The default out-of-the-box Enactor Order type is CUSTOMER_ORDER.
locationIdMandatoryComplexObject that contains the ID of the POS Location.
deviceIdMandatoryComplexObject that contains the ID of the POS Device.
userIdMandatoryComplexObject that contains the ID of the POS User.

Response

Response Headers

There are no response headers.

Response Body

ElementTypeDescription
orderNumberStringThe order number that the POS will use for the order.
outcomeComplexAn indication whether the order number could be generated. This would ideally be Success.

Request & Response Examples

Request

Get Order Number request using a POS that in the location with an ID of '0005', has a device ID of pos9@0005.enactor and has a user logged in with the ID of 000101:

POST: http://{{SWARM_LEADER_IP}}/WebRestApi/rest/orders/pos/generateOrderNumber

Body: {
"orderType" : "CUSTOMER_ORDER",
"locationId" : {
"id" : "0005"
},
"deviceId" : {
"id" : "pos9@0005.enactor"
},
"userId" : "000101"
}

Response

Following is an example response for the above Get Order Number request:

Body: {
"orderNumber" : "22",
"outcome" : {
"name" : "Success"
}
}

Load Order

This service will provide the details of an order when the order is selected from the search results of the POS.

Request

Request Service URL

POST /orders/pos/loadorder

Request Tokens

There are no request tokens.

Request Parameters

There are no request parameters.

Request Body

ElementMandatory / OptionalTypeDescription
customerOrderHeaderIdMandatoryComplexObject that contains the Order ID that is to be loaded.

Response

The 'loadOrder' API fetches data from the following tables of the database:

  • customerorderheaders

  • customerorderitems

  • customerordernotes

  • customerorderpayments

  • customerorderfulfilments

  • customerorderassociations

Response Body

ElementTypeDescription
customerOrderHeaderComplexObject containing the order header related information about the requested order such as transactionId, customerOrderId, status, createdDate, etc. All properties within this object can be seen in the example response provided.
customerOrderItemsComplexObject containing the details of all the order items in the requested order such as lineNumber, status, orderedQty, createdDate, unitPrice, netPrice, etc. All properties within this object can be seen in the example response provided.
customerOrderPaymentsComplexObject containing the details of all the payments that have been performed for the requested order such as paymentNumber, paymentType, orderedQty, amount, etc. All properties within this object can be seen in the example response provided.
customerOrderFulfilmentsComplexObject containing the fulfilment details of the requested order such as fulfilmentId, sourceType, destinationType, etc. All properties within this object can be seen in the example response provided.
outcomeComplexThe final status of the response.

Request & Response Examples

Request

Load Order request for Order ID '14':

POST: http://{{SWARM_LEADER_IP}}/WebRestApi/rest/orders/pos/loadorder

Body: {
"customerOrderHeaderId" : {
"id" : "14"
}
}

Response

Example Response Following is an example response for the order loaded for Order ID '14':

Response
Body: {
"customerOrderHeader" : {
"customerOrderHeader" : {
"authorisedByUserKey" : { },
"authorisedDate" : "2024-10-04T12:01:54.000+05:30",
"notificationContactTypeKey" : {
"contactTypeId" : "CX_ORD_CONTACT",
"id" : "CX_ORD_CONTACT"
},
"balanceOwed" : -15999,
"totalPayments" : 15999,
"totalsLastCalculated" : 1728023654000,
"voided" : false,
"reasonId" : {
"regionId" : {
"groupTypeId" : "region"
}
},
"orderHeaderAdditionalData" : { },
"transactionId" : "00050796000882410041201168",
"internalReferenceId" : "b3ed6a9c-89db-417c-b79c-4b6348fd3f0e",
"customerOrderId" : "14",
"customerOrderTypeId" : "CUSTOMER_ORDER",
"status" : "IN_PROGRESS",
"createdDate" : "2024-10-04T12:01:54.000+05:30",
"lastUpdatedByUserKey" : { },
"customerNumber" : "100",
"customerFirstName" : "Amelia",
"customerTitle" : "Mrs",
"customerSurname" : "Baldwin",
"customerPostcode" : "SG14 3AG",
"orderValue" : 35999,
"taxAmount" : 0.0,
"taxInclusive" : false,
"lastUpdated" : 1728023686000,
"preferredContactTypeKey" : {
"contactTypeId" : "CX_ORD_CONTACT",
"id" : "CX_ORD_CONTACT"
},
"locationId" : {
"id" : "0005"
},
"userId" : {
"id" : "000101"
},
"customerDateOfBirth" : 539308800000,
"deviceId" : {
"id" : "pos9@0005.enactor"
},
"currencyId" : {
"id" : "GBP"
},
"address" : [ {
"country" : "United Kingdom",
"email" : "abaldwin@enactordata.co",
"mobilePhone" : "0777906111",
"phone1" : "0778103309",
"postCode" : "SG14 3AG",
"street1" : "137 Newport Road",
"town" : "Carmel",
"isTemplate" : false,
"lastUpdated" : 1728023654000,
"countryCodeId" : {
"countryId" : "GBR",
"id" : "GBR"
},
"typeId" : {
"contactTypeId" : "CX_ORD_CONTACT",
"id" : "CX_ORD_CONTACT"
}
} ]
}
},
"customerOrderItems" : [ {
"item" : {
"customerOrderId" : "14",
"lineNumber" : 1,
"fulfilmentId" : 1,
"voided" : false,
"status" : "NEW",
"createdDate" : "2024-10-04T12:01:16.000+01:00",
"orderedQty" : 1,
"reservedQty" : 0,
"shippedQty" : 0,
"unitPrice" : 35999,
"netPrice" : 35999,
"effectiveNetValue" : 35999,
"taxAmount" : 0.0,
"transactionId" : "00050796000882410041201168",
"parentLineNumber" : 0,
"sourceLineNumber" : 2,
"lastUpdated" : 1728023654000,
"cancelRequested" : false,
"locationId" : {
"id" : "0005"
},
"userId" : {
"id" : "000101"
},
"productId" : {
"id" : "500101"
},
"destinationLocationId" : { },
"reasonId" : {
"regionId" : {
"groupTypeId" : "region"
}
},
"depositDetails" : {
"depositDetail" : [ {
"depositAmount" : 15999,
"depositTax" : [ {
"taxRateId" : "UK_1",
"taxRateKey" : {
"taxRateId" : "UK_1",
"effectiveDate" : 1427155200000
},
"displayTaxCode" : "UK VAT 20%",
"taxAmount" : 26665000,
"scale" : 4,
"taxRatePercentage" : 0.2,
"taxAdjustment" : 0,
"taxRateOverridden" : false
} ]
} ]
},
"itemTaxDetails" : {
"roundedTaxAmount" : 6000,
"taxableValue" : 35999,
"taxGroupId" : {
"taxGroupId" : "GENERAL",
"id" : "GENERAL"
},
"taxAmounts" : [ {
"taxRateId" : "UK_1",
"taxRateKey" : {
"taxRateId" : "UK_1",
"effectiveDate" : 1427155200000
},
"displayTaxCode" : "UK VAT 20%",
"taxAmount" : 59998332,
"scale" : 4,
"taxRatePercentage" : 0.2,
"taxableAmount" : 35999
} ]
},
"orderItemAdditionalData" : { }
}
} ],
"customerOrderPayments" : [ {
"customerOrderCashPayment" : {
"transactionId" : "00050796000882410041201168",
"customerOrderId" : "14",
"paymentNumber" : 1,
"paymentType" : "customerOrderCashPayment",
"voided" : false,
"amount" : 15999,
"status" : "COMMITTED",
"createdByUserKey" : {
"id" : "000101"
},
"createdDate" : "2024-10-04T07:34:14.000+01:00",
"exchangeRate" : 0.0,
"foreignValue" : 0,
"lastUpdated" : 1728023654000,
"isRefund" : false,
"refundAvailable" : 15999,
"transactionLineNumber" : 4,
"description" : "Cash",
"tenderId" : {
"tenderId" : "CSH",
"groupId" : {
"groupTypeId" : "region",
"groupHierarchyId" : "All",
"groupId" : "UK",
"id" : "UK"
}
},
"currencyId" : {
"id" : "GBP"
}
}
} ],
"customerOrderFulfilments" : [ {
"customerOrderId" : "14",
"fulfilmentId" : 1,
"sourceType" : "locationStockFulfilment",
"sourceId" : "0001",
"destinationType" : "COLLECTION",
"destinationLocationId" : {
"id" : "0005"
},
"destinationAddress" : {
"isTemplate" : false,
"countryCodeId" : { },
"typeId" : { }
},
"destinationName" : { },
"deliveryCharge" : 0,
"deliveryChargeForeignCurrencyId" : { },
"deliveryChargeForeignAmount" : 0,
"lastUpdated" : 1728023654000,
"deliveryTypeId" : { },
"trackingDetails" : { }
} ],
"outcome" : {
"name" : "Success"
}
}

Load Customer Order Type

This service allows the retrieval of the Customer Order Type configuration.

Request

Request Service URL

POST /orders/pos/loadCustomerOrderType

Request Tokens

There are no request tokens.

Request Parameters

There are no request parameters.

Request Body

ElementMandatory / OptionalTypeDescription
orderTypeIdMandatoryStringThe order Type. The default out-of-the-box Enactor Order type is CUSTOMER_ORDER.
userIdMandatoryComplexObject that contains the ID of the POS User.

Response

The customer order type returned will depend on the exact configuration that is required.

Response Headers

There are no response headers.

Response Body

ElementTypeDescription
customerOrderTypeComplexObject containing all configuration details of the Customer Order Type.

Request & Response Examples

Request

Requesting for the Customer Order Type by the user with an ID of '000101':

POST: http://{{SWARM_LEADER_IP}}/WebRestApi/rest/orders/pos/loadCustomerOrderType

Body: {
"orderTypeId" : "CUSTOMER_ORDER",
"userId" : "000101"
}

Response

Following is an example response of Load Customer Order Type:

Response
Body: {
"customerOrderType" : {
"typeID" : "CUSTOMER_ORDER",
"description" : "Customer Order",
"transactionProcessMap" : {
"changeHeaderStatusTransaction" : "OrderManager/Processing/ChangeHeaderStatus",
"createOrderTransaction" : "OrderManager/Processing/CreateOrder",
"addItemTransaction" : "OrderManager/Processing/AddOrderItem",
"cancelItemTransaction" : "OrderManager/Processing/CancelOrderItem",
"createAdjustmentTransaction" : "OrderManager/Processing/CreateOrderAdjustment",
"changePaymentStatus" : "OrderManager/Processing/UpdateOrderPaymentStatus",
"changeItemStatusTransaction" : "OrderManager/Processing/ChangeItemStatus",
"addNoteTransaction" : "OrderManager/Processing/AddOrderNode",
"changeItemQuantityOrderedTransaction" : "OrderManager/Processing/ChangeQuantityOrdered",
"cancelAdjustmentTransaction" : "OrderManager/Processing/CancelOrderAdjustment",
"collectItemsTransaction" : "OrderManager/Processing/CollectOrderItems",
"addFulfilmentOptions" : "OrderManager/Processing/AddFulfilmentOptions",
"deleteNoteTransaction" : "OrderManager/Processing/DeleteOrderNote",
"submitOrderTransaction" : "OrderManager/Processing/SubmitOrder",
"changeDestinationTypeTransaction" : "OrderManager/Processing/ChangeDestinationType",
"voidItemTransaction" : "OrderManager/Processing/VoidOrderItem",
"cancelPaymentTransaction" : "OrderManager/Processing/CancelOrderPayment",
"addPaymentTransaction" : "OrderManager/Processing/AddOrderPayment",
"changeItemQuantityShippedTransaction" : "OrderManager/Processing/ChangeQuantityShipped",
"changeItemNetPriceTransaction" : "OrderManager/Processing/ChangeNetPrice",
"changeItemQuantityReservedTransaction" : "OrderManager/Processing/ChangeQuantityReserved"
},
"serviceOperationProcessMap" : {
"createOrder" : "Service/CustomerOrderService/QueueTransaction",
"loadOrderItem" : "Service/CustomerOrderService/LoadOrderEntity",
"returnItems" : "Service/CustomerOrderService/InvokeProcessor",
"cancelOrder" : "Service/CustomerOrderService/InvokeProcessor",
"loadOrderPayment" : "Service/CustomerOrderService/LoadOrderEntity",
"loadOrderHeader" : "Service/CustomerOrderService/LoadOrderEntity",
"getOrderNumber" : "Service/CustomerOrderService/GetOrderNumber",
"addItem" : "Service/CustomerOrderService/InvokeProcessor",
"changeQuantityOrdered" : "Service/CustomerOrderService/InvokeProcessor",
"changeDestinationType" : "Service/CustomerOrderService/InvokeProcessor",
"createNewEmptyOrder" : "Service/CustomerOrderService/CreateNewEmptyOrder",
"cancelPayment" : "Service/CustomerOrderService/InvokeProcessor",
"deleteNote" : "Service/CustomerOrderService/InvokeProcessor",
"listDeliveryOptions" : "Service/CustomerOrderService/ListDeliveryOptions",
"loadNotes" : "Service/CustomerOrderService/LoadOrderNotes",
"changeNetPrice" : "Service/CustomerOrderService/InvokeProcessor",
"loadPayments" : "Service/CustomerOrderService/LoadOrderPayments",
"listOrderHeaders" : "Service/CustomerOrderService/ListOrderHeaders",
"cancelItem" : "Service/CustomerOrderService/InvokeProcessor",
"changeQuantityReserved" : "Service/CustomerOrderService/InvokeProcessor",
"checkOrderHeaderExists" : "Service/CustomerOrderService/CheckOrderHeaderExists",
"loadItems" : "Service/CustomerOrderService/LoadOrderItems",
"loadOrderNote" : "Service/CustomerOrderService/LoadOrderEntity",
"voidItem" : "Service/CustomerOrderService/InvokeProcessor",
"createAdjustment" : "Service/CustomerOrderService/InvokeProcessor",
"changeItemStatus" : "Service/CustomerOrderService/InvokeProcessor",
"changeQuantityShipped" : "Service/CustomerOrderService/InvokeProcessor",
"addNote" : "Service/CustomerOrderService/InvokeProcessor",
"collectItems" : "Service/CustomerOrderService/QueueTransaction",
"cancelAdjustment" : "Service/CustomerOrderService/InvokeProcessor",
"loadOrder" : "Service/CustomerOrderService/LoadOrder",
"addPayments" : "Service/CustomerOrderService/InvokeProcessor",
"addPayment" : "Service/CustomerOrderService/InvokeProcessor",
"processItemRefunds" : "Service/CustomerOrderService/InvokeProcessor"
},
"fulfilmentBusinessProcessID" : "CustomerOrders/FulfilCustomerOrder",
"businessProcessGroup" : {
"groupTypeId" : "businessProcessGroup",
"groupHierarchyId" : "Customer Order",
"variantGroupTypeId" : "region",
"variantGroupId" : "All",
"variantGroupHierarchyId" : "All",
"groupId" : "Customer Order",
"id" : "Customer Order"
},
"headerTypeQName" : "{http://www.enactor.com/orders}customerOrderHeader",
"itemTypeQName" : "{http://www.enactor.com/orders}customerOrderItem",
"lastUpdated" : 1727774224954,
"orderStatuses" : [ {
"isActive" : true,
"status" : "QUOTE",
"description" : { }
}, {
"isActive" : false,
"status" : "DISCARDED",
"description" : { }
}, {
"isActive" : true,
"status" : "AVAILABLE",
"description" : { }
}, {
"isActive" : true,
"status" : "SUBMITTED",
"description" : { }
}, {
"isActive" : true,
"status" : "NEW",
"description" : { }
}, {
"isActive" : true,
"status" : "STARTING",
"description" : { }
}, {
"isActive" : false,
"status" : "REJECTED",
"description" : { }
}, {
"isActive" : true,
"status" : "RESUBMIT_REQUESTED",
"description" : { }
}, {
"isActive" : false,
"status" : "NEW_PENDING",
"description" : { }
}, {
"isActive" : false,
"status" : "ATTENTION",
"description" : { }
}, {
"isActive" : false,
"status" : "COMPLETED",
"description" : { }
}, {
"isActive" : false,
"status" : "ATTENTION",
"description" : { }
}, {
"isActive" : false,
"status" : "COMPLETED",
"description" : { }
}, {
"isActive" : false,
"status" : "CANCELLED",
"description" : { }
}, {
"isActive" : true,
"status" : "IN_PROGRESS",
"description" : { }
} ],
"orderItemStatuses" : [ {
"isActive" : false,
"status" : "NEW",
"description" : { }
}, {
"isActive" : false,
"status" : "REJECTED",
"description" : { }
}, {
"isActive" : false,
"status" : "RETURNED",
"description" : { }
}, {
"isActive" : false,
"status" : "CANCELLING",
"description" : { }
}, {
"isActive" : false,
"status" : "COLLECTING",
"description" : { }
}, {
"isActive" : false,
"status" : "IN_PROGRESS",
"description" : { }
}, {
"isActive" : false,
"status" : "CANCEL_REQUESTED",
"description" : { }
}, {
"isActive" : false,
"status" : "AVAILABLE",
"description" : { }
}, {
"isActive" : false,
"status" : "SUBMITTED",
"description" : { }
}, {
"isActive" : false,
"status" : "STARTING",
"description" : { }
}, {
"isActive" : false,
"status" : "DISPATCHED",
"description" : { }
}, {
"isActive" : false,
"status" : "CANCELLED",
"description" : { }
} ],
"orderPaymentStatuses" : [ {
"isActive" : false,
"status" : "PARTIALLY_REFUNDED",
"description" : { }
}, {
"isActive" : false,
"status" : "PENDING",
"description" : { }
}, {
"isActive" : false,
"status" : "DECLINED",
"description" : { }
}, {
"isActive" : false,
"status" : "PROCESSING",
"description" : { }
}, {
"isActive" : false,
"status" : "NEW",
"description" : { }
}, {
"isActive" : false,
"status" : "REFUNDED",
"description" : { }
}, {
"isActive" : false,
"status" : "COMMITTED",
"description" : { }
}, {
"isActive" : false,
"status" : "TAKEN",
"description" : { }
} ],
"functionStatusMap" : {
"enactor.customerOrders.EditItemDiscount" : {
"itemStatuses" : [ "IN_PROGRESS", "AVAILABLE", "NEW", "SUBMITTED", "DISPATCHED", "REJECTED" ]
},
"enactor.customerOrders.ExtendPickupDate" : {
"itemStatuses" : [ "AVAILABLE" ]
},
"enactor.customerOrders.AddHeaderDiscount" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "SUBMITTED" ]
},
"enactor.customerOrders.SubmitItem" : {
"itemStatuses" : [ "NEW" ]
},
"enactor.customerOrders.EditHeaderDiscount" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "SUBMITTED" ]
},
"enactor.customerOrders.ChangeDeliveryAddress" : {
"itemStatuses" : [ "IN_PROGRESS", "NEW", "SUBMITTED", "REJECTED" ]
},
"enactor.customerOrders.CancelOrder" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "SUBMITTED" ]
},
"enactor.customerOrders.CancelItem" : {
"itemStatuses" : [ "AVAILABLE", "NEW", "SUBMITTED", "DISPATCHED", "REJECTED" ]
},
"enactor.customerOrders.CancelItems" : {
"itemStatuses" : [ "IN_PROGRESS", "AVAILABLE", "NEW", "SUBMITTED", "DISPATCHED", "REJECTED" ]
},
"enactor.customerOrders.SubmitOrder" : {
"headerStatuses" : [ "QUOTE", "NEW", "STARTING" ]
},
"enactor.customerOrders.ChangeCustomerDetails" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.DeleteHeaderNote" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.EditPaymentNote" : {
"paymentStatuses" : [ "NEW", "REFUNDED", "PROCESSING", "TAKEN", "PENDING" ]
},
"enactor.customerOrders.AddItemNote" : {
"itemStatuses" : [ "NEW", "STARTING", "COLLECTING", "IN_PROGRESS", "AVAILABLE", "CANCELLED", "COMPLETED", "CANCEL_REQUESTED", "CANCELLING", "RETURNED", "SUBMITTED", "DISPATCHED", "REJECTED" ]
},
"enactor.customerOrders.AddItemDiscount" : {
"itemStatuses" : [ "IN_PROGRESS", "AVAILABLE", "NEW", "SUBMITTED", "DISPATCHED", "REJECTED" ]
},
"enactor.customerOrders.AddItemCharge" : {
"itemStatuses" : [ "IN_PROGRESS", "AVAILABLE", "NEW", "SUBMITTED", "DISPATCHED", "REJECTED" ]
},
"enactor.customerOrders.NewCustomer" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.AddAccountPayment" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "SUBMITTED" ]
},
"enactor.customerOrders.RefundItem" : {
"headerStatuses" : [ "AVAILABLE", "COMPLETED", "SUBMITTED" ],
"itemStatuses" : [ "COMPLETED", "DISPATCHED" ]
},
"enactor.customerOrders.ChangeOrderStatus" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED", "REJECTED" ]
},
"enactor.customerOrders.CancelReservation" : {
"itemStatuses" : [ "AVAILABLE" ]
},
"enactor.customerOrders.CancelItemDiscount" : {
"itemStatuses" : [ "IN_PROGRESS", "AVAILABLE", "NEW", "SUBMITTED", "DISPATCHED", "REJECTED" ]
},
"enactor.customerOrders.CommitPayment" : {
"paymentStatuses" : [ "PENDING" ]
},
"enactor.customerOrders.EditHeaderNote" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.ChangeItemStatus" : {
"itemStatuses" : [ "NEW", "STARTING", "COLLECTING", "IN_PROGRESS", "AVAILABLE", "CANCELLED", "COMPLETED", "CANCEL_REQUESTED", "CANCELLING", "RETURNED", "SUBMITTED", "DISPATCHED", "REJECTED" ]
},
"enactor.customerOrders.RefundCardPayment" : {
"paymentStatuses" : [ "TAKEN" ]
},
"enactor.customerOrders.AddItem" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "SUBMITTED" ]
},
"enactor.customerOrders.RefundAccountPayment" : {
"paymentStatuses" : [ "TAKEN" ]
},
"enactor.customerOrders.ChangeDeliveryType" : {
"itemStatuses" : [ "IN_PROGRESS", "NEW", "SUBMITTED", "REJECTED" ]
},
"enactor.customerOrders.SubmitPayment" : {
"paymentStatuses" : [ "NEW" ]
},
"enactor.customerOrders.ChangeOrderContactDetails" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.CheckOrderContactDetails" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "SUBMITTED" ]
},
"enactor.customerOrders.ChangeDeliveryDate" : {
"itemStatuses" : [ "IN_PROGRESS", "NEW", "SUBMITTED", "REJECTED" ]
},
"enactor.customerOrders.ChangeDeliveryStore" : {
"itemStatuses" : [ "IN_PROGRESS", "NEW", "SUBMITTED", "REJECTED" ]
},
"enactor.customerOrders.AddPaymentNote" : {
"paymentStatuses" : [ "NEW", "REFUNDED", "PROCESSING", "TAKEN", "PENDING" ]
},
"enactor.customerOrders.ChangeDeliveryInstructions" : {
"itemStatuses" : [ "IN_PROGRESS", "NEW", "SUBMITTED", "REJECTED" ]
},
"enactor.customerOrders.CancelHeaderDiscount" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "SUBMITTED" ]
},
"enactor.customerOrders.ChangeOrderReferences" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED", "REJECTED" ]
},
"enactor.customerOrders.ChangePaymentStatus" : {
"paymentStatuses" : [ "NEW", "REFUNDED", "PROCESSING", "TAKEN", "PENDING" ]
},
"enactor.customerOrders.AddHeaderNote" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.SearchCustomer" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.RecalculatePromotions" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "SUBMITTED" ]
},
"enactor.customerOrders.DeletePaymentNote" : {
"paymentStatuses" : [ "NEW", "REFUNDED", "PROCESSING", "TAKEN", "PENDING" ]
},
"enactor.customerOrders.EditItemNote" : {
"itemStatuses" : [ "NEW", "STARTING", "COLLECTING", "IN_PROGRESS", "AVAILABLE", "CANCELLED", "COMPLETED", "CANCEL_REQUESTED", "CANCELLING", "RETURNED", "SUBMITTED", "DISPATCHED", "REJECTED" ]
},
"enactor.customerOrders.CollectItem" : {
"itemStatuses" : [ "AVAILABLE" ]
},
"enactor.customerOrders.DeleteItemNote" : {
"itemStatuses" : [ "NEW", "STARTING", "COLLECTING", "IN_PROGRESS", "AVAILABLE", "CANCELLED", "COMPLETED", "CANCEL_REQUESTED", "CANCELLING", "RETURNED", "SUBMITTED", "DISPATCHED", "REJECTED" ]
},
"enactor.customerOrders.ResubmitOrder" : {
"headerStatuses" : [ "STARTING" ]
},
"enactor.customerOrders.AddCardPayment" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "SUBMITTED" ]
},
"enactor.customerOrders.TakePortalPayment" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "SUBMITTED" ]
},
"enactor.customerOrders.ItemDelivered" : {
"itemStatuses" : [ "DISPATCHED" ]
},
"enactor.customerOrders.RecordPayment" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "COMPLETED", "SUBMITTED" ]
},
"enactor.customerOrders.RefundNonCompletedItem" : {
"itemStatuses" : [ "AVAILABLE", "COMPLETED", "SUBMITTED", "DISPATCHED" ]
},
"enactor.customerOrders.ReturnNonCompletedItems" : {
"headerStatuses" : [ "COMPLETED", "SUBMITTED" ],
"itemStatuses" : [ "COMPLETED", "SUBMITTED", "DISPATCHED" ]
},
"enactor.customerOrders.ReturnItems" : {
"headerStatuses" : [ "COMPLETED", "SUBMITTED" ],
"itemStatuses" : [ "COMPLETED", "DISPATCHED" ]
},
"enactor.customerOrders.SubmitReturnOrder" : {
"headerStatuses" : [ "NEW_PENDING" ]
},
"enactor.customerOrders.OrderManagerAllowRefundNow" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.RefundPayment" : {
"paymentStatuses" : [ "COMMITTED", "PARTIALLY_REFUNDED" ]
},
"enactor.customerOrders.CancelDeliveryAdjustment" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "SUBMITTED" ]
},
"enactor.customerOrders.CancelStoreCollectionItem" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "NEW", "STARTING", "SUBMITTED", "RESUBMIT_REQUESTED" ],
"itemStatuses" : [ "IN_PROGRESS", "AVAILABLE", "NEW", "STARTING", "PARTIALLY_DISPATCHED", "SUBMITTED", "DISPATCHED" ]
},
"enactor.customerOrders.CancelHomeDeliveryItem" : {
"headerStatuses" : [ "IN_PROGRESS", "NEW", "STARTING" ],
"itemStatuses" : [ "IN_PROGRESS", "NEW", "STARTING" ]
},
"enactor.customerOrders.AllowChangeCancelItemQuantity" : {
"itemStatuses" : [ "NEW", "STARTING", "COLLECTING", "IN_PROGRESS", "AVAILABLE", "CANCELLED", "COMPLETED", "CANCEL_REQUESTED", "CANCELLING", "RETURNED", "SUBMITTED", "DISPATCHED", "REJECTED" ]
},
"enactor.customerOrders.DiscountDeliveryCharge" : {
"itemStatuses" : [ "IN_PROGRESS", "AVAILABLE", "NEW", "SUBMITTED", "DISPATCHED", "REJECTED" ]
},
"enactor.customerOrders.VoidItem" : {
"headerStatuses" : [ "NEW" ]
},
"enactor.customerOrders.ChangeOrderTransactionReference" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED", "REJECTED" ]
},
"enactor.customerOrders.SubmitNewOrder" : {
"headerStatuses" : [ "NEW", "STARTING" ]
},
"enactor.customerOrders.GetOrderNumber" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED", "REJECTED" ]
},
"enactor.customerOrders.LoadOrder" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "ATTENTION", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED", "REJECTED" ]
},
"enactor.customerOrders.LoadCustomerOrderType" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED", "REJECTED" ]
},
"enactor.customerOrders.LoadOrderHeader" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "ATTENTION", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED", "REJECTED" ]
},
"enactor.customerOrders.CheckOrderHeaderExists" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED", "REJECTED" ]
},
"enactor.customerOrders.ListOrderHeaders" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "ATTENTION", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.LoadOrderItem" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "ATTENTION", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.LoadOrderNote" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.LoadOrderPayment" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.LoadItems" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.LoadNotes" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.LoadPayments" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.ListDeliveryOptions" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.FetchOrderStatus" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED", "REJECTED" ]
},
"enactor.customerOrders.OrderReservation" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.FetchItemsValue" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.CreateNewEmptyOrder" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.NotifyCustomer" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED", "REJECTED" ]
},
"enactor.customerOrders.LoadOrders" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.AvailableHeaderFunctions" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.AvailableItemsFunctions" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.AvailablePaymentsFunctions" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.CustomerOrderNumber" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.GetOrderTotal" : {
"headerStatuses" : [ "IN_PROGRESS", "AVAILABLE", "QUOTE", "NEW", "CANCELLED", "STARTING", "COMPLETED", "RETURNED", "DISCARDED", "SUBMITTED" ]
},
"enactor.customerOrders.AuthoriseWithPaymentPortal" : {
"paymentStatuses" : [ "PENDING", "DECLINED" ]
}
},
"returnOrderRequired" : false,
"defaultReturnToRefundNow" : false,
"messageFunctionMap" : {
"customerOrderNumberRequest" : {
"operationName" : "CustomerOrderNumber",
"functions" : [ "enactor.customerOrders.CustomerOrderNumber" ]
},
"loadOrderRequest" : {
"operationName" : "LoadOrder",
"functions" : [ "enactor.customerOrders.LoadOrder" ]
},
"loadCustomerOrderTypeRequest" : {
"operationName" : "LoadCustomerOrderTypeRequest",
"functions" : [ "enactor.customerOrders.LoadCustomerOrderType" ]
},
"loadOrderHeaderRequest" : {
"operationName" : "LoadOrderHeader",
"functions" : [ "enactor.customerOrders.LoadOrderHeader" ]
},
"checkOrderHeaderExistsRequest" : {
"operationName" : "checkOrderHeaderExists",
"functions" : [ "enactor.customerOrders.CheckOrderHeaderExists" ]
},
"listOrderHeadersRequest" : {
"operationName" : "ListOrderHeaders",
"functions" : [ "enactor.customerOrders.ListOrderHeaders" ]
},
"loadOrderItemRequest" : {
"operationName" : "LoadOrderItem",
"functions" : [ "enactor.customerOrders.LoadOrderItem" ]
},
"loadOrderNoteRequest" : {
"operationName" : "LoadOrderNote",
"functions" : [ "enactor.customerOrders.LoadOrderNote" ]
},
"loadOrderPaymentRequest" : {
"operationName" : "LoadOrderPayment",
"functions" : [ "enactor.customerOrders.LoadOrderPayment" ]
},
"loadItemsRequest" : {
"operationName" : "LoadItems",
"functions" : [ "enactor.customerOrders.LoadItems" ]
},
"loadNotesRequest" : {
"operationName" : "LoadNotes",
"functions" : [ "enactor.customerOrders.LoadNotes" ]
},
"loadPaymentsRequest" : {
"operationName" : "LoadPayments",
"functions" : [ "enactor.customerOrders.LoadPayments" ]
},
"listDeliveryOptionsRequest" : {
"operationName" : "listDeliveryOptions",
"functions" : [ "enactor.customerOrders.ListDeliveryOptions" ]
},
"fetchOrderStatusRequest" : {
"operationName" : "FetchOrderStatus",
"functions" : [ "enactor.customerOrders.FetchOrderStatus" ]
},
"fetchItemsValueRequest" : {
"operationName" : "FetchItemsValue",
"functions" : [ "enactor.customerOrders.FetchItemsValue" ]
},
"loadOrdersRequest" : {
"operationName" : "LoadOrders",
"functions" : [ "enactor.customerOrders.LoadOrders" ]
},
"availableHeaderFunctionsRequest" : {
"operationName" : "AvailableHeaderFunctions",
"functions" : [ "enactor.customerOrders.AvailableHeaderFunctions" ]
},
"availableItemsFunctionsRequest" : {
"operationName" : "AvailableItemsFunctions",
"functions" : [ "enactor.customerOrders.AvailableItemsFunctions" ]
},
"availablePaymentsFunctionsRequest" : {
"operationName" : "AvailablePaymentsFunctions",
"functions" : [ "enactor.customerOrders.AvailablePaymentsFunctions" ]
},
"getOrderTotalRequest" : {
"operationName" : "GetOrderTotal",
"functions" : [ "enactor.customerOrders.GetOrderTotal" ]
},
"collectItemsTransaction" : {
"operationName" : "CollectItems",
"functions" : [ "enactor.customerOrders.CollectItem" ]
},
"returnItemsTransaction" : {
"operationName" : "ReturnItems",
"functions" : [ "enactor.customerOrders.ReturnItems" ]
},
"cancelItemsTransaction" : {
"operationName" : "CancelItems",
"functions" : [ "enactor.customerOrders.CancelItem" ]
},
"resubmitForFulfilmentTransaction" : {
"operationName" : "ResubmitForFulfilment",
"functions" : [ "enactor.customerOrders.ResubmitForFulfilment" ]
},
"cancelOrderTransaction" : {
"operationName" : "CancelOrder",
"functions" : [ "enactor.customerOrders.CancelOrder", "enactor.customerOrders.CancelItem" ]
},
"orderReservationTransaction" : {
"operationName" : "OrderReservation",
"functions" : [ "enactor.customerOrders.OrderReservation" ]
},
"addItemTransaction" : {
"operationName" : "AddItem",
"functions" : [ "enactor.customerOrders.AddItem" ]
},
"voidItemTransaction" : {
"operationName" : "VoidItem",
"functions" : [ "enactor.customerOrders.VoidItem" ]
},
"cancelItemTransaction" : {
"operationName" : "CancelItem",
"functions" : [ "enactor.customerOrders.CancelItem" ]
},
"addNoteTransaction" : {
"operationName" : "AddNote"
},
"deleteNoteTransaction" : {
"operationName" : "DeleteNote"
},
"customerOrderCreatePaymentMessage" : {
"operationName" : "AddPayment",
"functions" : [ "enactor.customerOrders.AddCardPayment" ]
},
"customerOrderCreateCardPaymentMessage" : {
"operationName" : "AddCardPayment",
"functions" : [ "enactor.customerOrders.AddCardPayment" ]
},
"customerOrderCreateCardPaymentMessageRecorded" : {
"operationName" : "AddRecordedCardPayment",
"functions" : [ "enactor.customerOrders.RecordPayment" ]
},
"customerOrderCreateCardPaymentMessagePortal" : {
"operationName" : "AddPortalPayment",
"functions" : [ "enactor.customerOrders.TakePortalPayment" ]
},
"changePaymentStatusTransaction" : {
"operationName" : "ChangePaymentStatus",
"functions" : [ "enactor.customerOrders.ChangePaymentStatus" ]
},
"addAdjustmentTransaction" : {
"operationName" : "AddAdjustment"
},
"cancelAdjustmentTransaction" : {
"operationName" : "CancelAdjustment"
},
"changeItemStatusTransaction" : {
"operationName" : "ChangeItemStatus"
},
"changeHeaderStatusTransaction" : {
"operationName" : "ChangeHeaderStatus"
},
"changeDestinationTypeTransaction" : {
"operationName" : "ChangeDestinationType"
},
"changeItemNetPriceTransaction" : {
"operationName" : "ChangeItemNetPrice"
},
"changeItemQuantityOrderedTransaction" : {
"operationName" : "ChangeItemQuantityOrdered"
},
"changeItemQuantityReservedTransaction" : {
"operationName" : "ChangeItemQuantityReserved"
},
"changeItemQuantityShippedTransaction" : {
"operationName" : "ChangeItemQuantityShipped"
},
"changeItemNotesTransaction" : {
"operationName" : "ChangeItemNotes"
},
"changeOrderReferencesTransaction" : {
"operationName" : "ChangeOrderReferences",
"functions" : [ "enactor.customerOrders.ChangeOrderTransactionReference" ]
},
"changeOrderContactDetailsTransaction" : {
"operationName" : "ChangeOrderContactDetails"
},
"changeOrderCustomerTransaction" : {
"operationName" : "ChangeOrderCustomerTransaction"
},
"updateCustomerNumberTransaction" : {
"operationName" : "UpdateCustomerNumber"
},
"updateDestinationTransaction" : {
"operationName" : "UpdateDestination"
},
"createNewEmptyOrderRequest" : {
"operationName" : "CreateNewEmptyOrder",
"functions" : [ "enactor.customerOrders.CreateNewEmptyOrder" ]
},
"submitNewOrderTransaction" : {
"operationName" : "SubmitNewOrder",
"functions" : [ "enactor.customerOrders.SubmitNewOrder" ]
},
"addFulfilmentOptionsTransaction" : {
"operationName" : "AddFulfilmentOptions"
},
"inventoryUpdateNotification" : {
"operationName" : "InventoryUpdateNotification"
},
"processItemRefundsTransaction" : {
"operationName" : "ProcessItemRefunds",
"functions" : [ "enactor.customerOrders.RefundItem" ]
},
"notifyCustomerTransaction" : {
"operationName" : "NotifyCustomer",
"functions" : [ "enactor.customerOrders.NotifyCustomer" ]
},
"updateOrderHeaderTotalsRequest" : {
"operationName" : "UpdateOrderHeaderTotals"
},
"getOrderRequest" : {
"operationName" : "GetOrder"
},
"cancelOrderRequest" : {
"operationName" : "CancelOrder",
"functions" : [ "enactor.customerOrders.CancelOrder" ]
},
"returnOrderRequest" : {
"operationName" : "ReturnOrder",
"functions" : [ "enactor.customerOrders.ReturnItems" ]
},
"cancelOrderItemRequest" : {
"operationName" : "CancelItem",
"functions" : [ "enactor.customerOrders.CancelItem" ]
},
"returnOrderItemRequest" : {
"operationName" : "ReturnItems",
"functions" : [ "enactor.customerOrders.ReturnItems" ]
}
},
"fulfilmentMethod" : "FULFILLED_AT_ORDER_TAKE_ON",
"orderUpdateTypes" : {
"CREATE_ORDER" : {
"string" : [ {
"country" : "GB",
"language" : "en",
"string" : "Create Order"
} ]
},
"COLLECT_ORDER" : {
"string" : [ {
"country" : "GB",
"language" : "en",
"string" : "Collect Items"
} ]
},
"CHANGE_ORDER_CUSTOMER_NUMBER" : {
"string" : [ {
"country" : "GB",
"language" : "en",
"string" : "Update Customer Number"
} ]
},
"RETURN_ITEMS" : {
"string" : [ {
"country" : "GB",
"language" : "en",
"string" : "Return Items"
} ]
},
"CANCEL_ITEMS" : {
"string" : [ {
"country" : "GB",
"language" : "en",
"string" : "Cancel Items"
} ]
},
"CANCEL_ORDER" : {
"string" : [ {
"country" : "GB",
"language" : "en",
"string" : "Cancel Order"
} ]
},
"ADD_ITEM" : {
"string" : [ {
"country" : "GB",
"language" : "en",
"string" : "Add Item"
} ]
},
"VOID_ITEM" : {
"string" : [ {
"country" : "GB",
"language" : "en",
"string" : "Void Item"
} ]
},
"CANCEL_ITEM" : {
"string" : [ {
"country" : "GB",
"language" : "en",
"string" : "Cancel Item"
} ]
},
"ADD_NOTE" : {
"string" : [ {
"country" : "GB",
"language" : "en",
"string" : "Add Note"
} ]
},
"REMOVE_NOTE" : {
"string" : [ {
"country" : "GB",
"language" : "en",
"string" : "Delete Note"
} ]
},
"ADD_PAYMENT" : {
"string" : [ {
"country" : "GB",
"language" : "en",
"string" : "Add Payment"
} ]
},
"ADD_ADJUSTMENT" : {
"string" : [ {
"country" : "GB",
"language" : "en",
"string" : "Add Adjustment"
} ]
},
"CANCEL_ADJUSTMENT" : {
"string" : [ {
"country" : "GB",
"language" : "en",
"string" : "Cancel Adjustment"
} ]
},
"CHANGE_ORDER_ID" : {
"string" : [ {
"country" : "GB",
"language" : "en",
"string" : "Change Order References"
} ]
},
"CHANGE_ORDER_CONTACT" : {
"string" : [ {
"country" : "GB",
"language" : "en",
"string" : "Change Order Contact Details"
} ]
},
"CHANGE_ORDER_CUSTOMER" : {
"string" : [ {
"country" : "GB",
"language" : "en",
"string" : "Change Order Customer"
} ]
},
"SUBMIT_NEW_ORDER" : {
"string" : [ {
"country" : "GB",
"language" : "en",
"string" : "Submit New Order"
} ]
},
"ADD_FULFILMENT_OPTIONS" : {
"string" : [ {
"country" : "GB",
"language" : "en",
"string" : "Add Fulfilment Options"
} ]
},
"RESERVE_ORDER" : {
"string" : [ {
"country" : "GB",
"language" : "en",
"string" : "Order Reservation"
} ]
},
"CREATE_EMPTY_ORDER" : {
"string" : [ {
"country" : "GB",
"language" : "en",
"string" : "Create New Empty Order"
} ]
}
},
"localeDescription" : {
"string" : [ {
"country" : "GB",
"language" : "en",
"string" : "Customer Order"
} ]
}
}
}

Cancel an Order

This service allows to request cancellation of an order.

If the order cannot be cancelled at this time, the service would respond with a 405 (Method Not Allowed) status code. Otherwise, the cancellation request will be recorded and processed late where the service should respond with a 202 (Accepted) status code – this does not guarantee that cancellation will be possible.

Note: The Order Status, returned on the Get an Order’s Details service, will provide a hint to the client if a cancellation is possible.

Request

Request Service URL

DELETE /orders/{orderId}

Request Tokens

  • orderId: The ID of the order to request cancellation for.

Request Parameters

There are no request parameters.

Request Body

There is no request body.

Response

Response Headers

There are no response headers.

Response Body

There is no response body.

Scenarios and Responses

This sub-section covers the Scenarios and Response Codes related to Cancel an Order service.

Scenarios

ScenarioOutcomeExpected BehaviourStatus CodeResponse
The orders service receives a valid order ID and the order belongs to the customer.SuccessThe customer’s order has been requested to be cancelled by the order manager.202Response: 202 Accepted.
The orders service receives a valid order ID and the order does not belong to the customer.NotAllowedThe customer order is not cancelled. A NotAllowed error message is returned.405ErrorMessage: 405, Not allowed to cancel order, outcome: NotAllowed.
The orders service receives an invalid order ID.FailThe customer order is not cancelled. An Internal server error message is returned.500ErrorMessage: 500, Failed to cancel order, outcome: Fail.

Response Codes

HTTP Status Code / PhraseDetail Message IDDescription / Potential Causes

Request & Response Examples

Request:

DELETE: http://[SWARM_LEADER_IP]/WebRestApi/rest/baskets/orders/1

Response:

Status: 202 Accepted

Cancel an Order Item

This service allows to request cancellation of an order item.

If the order cannot be cancelled at this time, the service would respond with a 405 (Method Not Allowed) status code. Otherwise, the cancellation request will be recorded and processed late where the service should respond with a 202 (Accepted) status code – this does not guarantee that cancellation will be possible.

Note: The Order Item Status and Order Status, returned on the Get an Order’s Details service, will provide a hint to the client if a cancellation is possible.

Request

Request Service URL

DELETE /orders/{orderId}/items/{lineNumber}

Request Tokens

  • orderId: The ID of the order that holds the line to be cancelled.

  • lineNumber: The line number of the item to be cancelled.

Request Parameters

There are no request parameters.

Request Body

ElementRequired / OptionalTypeDescription
quantityOptionalThe number of items to be cancelled (optional). Defaults to the ordered quantity.
reasonKeyThe reason key for the customer order cancel reason.

Response

Response Headers

There are no response headers.

Response Body

There is no response body.

Scenarios and Responses

This sub-section covers the Scenarios and Response Codes related to Cancel an Order Item service.

Scenarios

ScenarioOutcomeExpected BehaviourStatus CodeResponse
The orders service receives a valid order ID, a valid line number and the order belongs to the customer.SuccessThe customers order item has been requested to be cancelled by the order manager.202Response: 202 Accepted.
The orders service receives a valid order ID, a valid line number and but the order does not belong to the customer.NotAllowedThe customers order item is not cancelled. A NotAllowed error message is returned.405ErrorMessage: 405, Not allowed to cancel order item, outcome: NotAllowed.
The orders service receives a valid order ID, an invalid line number and but the order does not belong to the customer.NotAllowedThe customers order item is not cancelled. A NotAllowed error message is returned.405ErrorMessage: 405, Not allowed to cancel order item, outcome: NotAllowed.
The orders service receives an invalid order ID.FailThe customer order is not cancelled. An Internal server error message is returned.500ErrorMessage: 500, Failed to cancel order item, outcome: Fail.

Response Codes

HTTP Status Code / PhraseDetail Message IDDescription / Potential Causes

Request & Response Examples

Request:

DELETE http://[SWARM_LEADER_IP]/WebRestApi/rest/baskets/orders/1/items/1

Response:

Status: 202 Accepted

Request Return of an Order

This service allows to request return of an order.

If the order cannot be cancelled at this time, the service would respond with a 405 (Method Not Allowed) status code. Otherwise, the cancellation request will be recorded and processed late where the service should respond with a 202 (Accepted) status code – this does not guarantee that cancellation will be possible.

Note: The Order Status, returned on the Get an Order’s Details service, will provide a hint to the client if a cancellation is possible.

Request

Request Service URL

PATCH /orders/{orderId}/return

Request Tokens

  • orderId: The ID of the order to be returned.

Request Parameters

There are no request parameters.

Request Body

There is no request body.

Response

Response Headers

There are no response headers.

Response Body

There is no response body.

Scenarios and Responses

This sub-section covers the Scenarios and Response Codes related to Request Return of an Order service.

Scenarios

ScenarioOutcomeExpected BehaviourStatus CodeResponse
The orders service receives a valid order ID and the order belongs to the customer.SuccessThe customer’s order has been requested to be cancelled by the order manager.202Response: 202 Accepted.
The orders service receives a valid order ID and the order does not belong to the customer.NotAllowedThe customer order is not cancelled. A NotAllowed error message is returned.405ErrorMessage: 405, Not allowed to cancel order, outcome: NotAllowed.
The orders service receives an invalid order ID.FailThe customer order is not cancelled. An Internal server error message is returned.500ErrorMessage: 500, Failed to cancel order, outcome: Fail.

Response Codes

HTTP Status Code / PhraseDetail Message IDDescription / Potential Causes

Request & Response Examples

Request:

PATCH: http://[SWARM_LEADER_IP]/WebRestApi/rest/orders/1/return

Response:

Status: 202 Accepted

Request Return of an Order Item

This service allows to request return of an order item.

If the order cannot be cancelled at this time, the service would respond with a 405 (Method Not Allowed) status code. Otherwise, the cancellation request will be recorded and processed late where the service should respond with a 202 (Accepted) status code – this does not guarantee that cancellation will be possible.

Note: The Order Item Status and Order Status, returned on the Get an Order’s Details service, will provide a hint to the client if a cancellation is possible.

Request

Request Service URL

PATCH /orders/{orderId}/items/{lineNumber}/return

Request Tokens

  • orderId: The ID of the order that holds the line to be returned.

  • lineNumber: The line number of the item to be returned.

Request Parameters

There are no request parameters.

Request Body

ElementRequired / OptionalTypeDescription
quantityOptionalThe number of items to be cancelled (optional). Defaults to the ordered quantity.
reasonKeyThe reason key for the customer order cancel reason.

Response

Response Headers

There are no response headers.

Response Body

There is no response body.

Scenarios and Responses

This sub-section covers the Scenarios and Response Codes related to Request Return of an Order Item service.

Scenarios

ScenarioOutcomeExpected BehaviourStatus CodeResponse
The orders service receives a valid order ID, a valid line number and the order belongs to the customer.SuccessThe customers order item has been requested to be cancelled by the order manager.202Response: 202 Accepted.
The orders service receives a valid order ID, a valid line number and but the order does not belong to the customer.NotAllowedThe customers order item is not cancelled. A NotAllowed error message is returned.405ErrorMessage: 405, Not allowed to cancel order item, outcome: NotAllowed.
The orders service receives a valid order ID, an invalid line number and but the order does not belong to the customer.NotAllowedThe customers order item is not cancelled. A NotAllowed error message is returned.405ErrorMessage: 405, Not allowed to cancel order item, outcome: NotAllowed.
The orders service receives an invalid order ID.FailThe customer order is not cancelled. An Internal server error message is returned.500ErrorMessage: 500, Failed to cancel order item, outcome: Fail.

Response Codes

HTTP Status Code / PhraseDetail Message IDDescription / Potential Causes

Request & Response Examples

Request:

PATCH:
http://[SWARM_LEADER_IP]/WebRestApi/rest/baskets/orders/1/items/1/return

Response:

Status: 202 Accepted

Update Order?

PUT /orders/{orderId}
PATCH /orders/{orderId}

Remarks:

Not sure we need/want this?

Orders Task API

The Orders Task API is used to provide a clean view of task information relevant to the order system. It will typically use other services to provide a response but will combine and augment their responses as required. Following is the list of Orders Task APIs covered in this section:

  • List Available Picks

List Available Picks

This service requires authentication and will return a list of Picks that can be performed by the authenticated user.

Request

Request Service URL

GET /tasks/orders/availablePicks

Request Tokens

There are no request tokens.

Request Parameters

There are no request parameters.

Request Body

There is no request body.

Response

Response Headers

There are no response headers.

Response Body

IListAvailablePicksResponse

ElementTypeDescription
availablePicksListList<IAvailablePick>A list of the available picks.

Scenarios and Responses

This sub-section covers the Scenarios and Response Codes related to List Available Picks service.

Scenarios

ScenarioOutcomeExpected BehaviourStatus CodeResponse
The service is not supplied any Authorisation headerErrorThe service will fail to perform any query401No response body
The service is supplied an invalid Authorisation headerErrorThe service will fail to perform any query401No response body
The service is supplied a valid Authorisation headerSuccessThe service should return a list of available picks that can be performed by the authenticated user.200IListAvailablePicksResponse

Response Codes

HTTP Status Code / PhraseDetail Message IDDescription / Potential Causes

Request & Response Examples

Request:

GET http://[SWARM_LEADER_IP]/WebRestApi/rest/tasks/orders/availablePicks

Response:

Status: 200 OK

{
"availablePicksList": [
{
"orderId": "1",
"fulfilmentId": "1",
"taskId": "a39c48a9-0b1e-471c-b0b5-050a18bbc4d0",
"customerTitle": "Miss",
"customerFistName": "Amelia",
"customerSurname": "Baldwin",
"orderTotal": 995,
"orderCurrency": "GBP",
"dateCreated": 1604662300000
}
]
}