Get an Order Details

Service URL: GET /orders/{orderId}

Tokens:

orderId – The id of the order to retrieve

Response Body:

order – ICustomerOrder – The details of the specified order.

Remarks:

Retrieve details about a particular order.

Scenarios

ScenarioOutcomeExpected behaviourStatus CodeResponse
1The orders service recieves a valid order id and the order belongs to the customerSuccessThe customer order is returned.200IGetOrderResponse: order <ICustomerOrder>
2The orders service recieves 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.
3The orders service recieves a invalid order idFailThe customer order is not returned. A Internal server error message is returned 500ErrorMessage: 500, Failed to retrieve order, outcome: Fail

Example Request

GET http://localhost:8080/WebRestApi/rest/orders/1

Example Response

{
    "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
            }
        ]
    }
}
Go to Top