Request a Promotion Calculation

Service URL: PATCH /baskets/{basketReference}/promotions

Tokens:

basketReference – The basket reference of the basket to add the items to, or can be ‘PRIMARY’ to add to the PRIMARY basket.

Parameters:

returnBasket – Boolean – If true the updated basket is returned – Optional, defaults to false

Response Body:

BasketResponse – The updated basket if returnBasket is true

basket – IBasket – The basket associated with the given reference

basketReference – String – the reference of the basket

basketType – String – the type of the basket

basketDescription – String – the description of the basket

basketResponseCode – String – A specific basket code to indict whether the basket was implicitly created by the server.

basketStatus – String – the status of the basket. Fresh baskets have the status NEW. Baskets in progress have the status of IN_PROGRESS. Baskets will have been submitted to retail processing have the status SUBMITTED.

Remarks:

Recalculate promotions on the associated basket. Typically promotions will only be updated when items are added/removed/updated, this service can be called to force an update if required.

Example Request:

PATCH: http://localhost:8080/WebRestApi/rest/baskets/PRIMARY/promotions?returnBasket=trueid_token: <identity_token>

Example Response:

{
    "basket": {
        "items": [
            {
                "@type": "orderDetailsItem",
                "description": "###.###",
                "deviceId": "pos2@0001.enactor",
                "effectiveNetValue": 0,
                "lineNumber": 1,
                "netValue": 0,
                "value": 0,
                "dateTimeCreated": "2019-07-22T16:04:03.000+01:00",
                "userId": "CUST_USER",
                "type": "VALUE",
                "orderReference": "17",
                "customerOrderTypeId": "CUSTOMER_ORDER"
            },
            {
                "@type": "styleColourSizeItem",
                "colourId": {
                    "id": "RED",
                    "colourRangeId": "MENS_SHOES"
                },
                "description": "Vans Canvas Shoes",
                "deviceId": "pos2@0001.enactor",
                "effectiveNetValue": 5995,
                "lineNumber": 2,
                "netValue": 5995,
                "value": 5995,
                "dateTimeCreated": "2019-07-22T16:04:26.000+01:00",
                "userId": "CUST_USER",
                "modifiersNetValue": 0,
                "modifiersEffectiveNetValue": 0,
                "modifiersVoidQuantity": 0,
                "modifiersQuantity": 0,
                "notDiscountable": false,
                "maxDiscount": 0,
                "handKeyed": true,
                "productID": "VV639JS-8",
                "quantity": 1,
                "netQuantity": 1,
                "isReturn": false,
                "unitPrice": 5995,
                "sourceInventoryType": "AVA",
                "orderable": true,
                "priceTypeId": "R",
                "productTypeId": "skuProduct",
                "productImageURL": "image://PRODUCT/VV639JS-1.jpg",
                "type": "VALUE",
                "mmGroupId": "MENS_SHOES",
                "mmGroupHierarchyId": "FASHION",
                "mmGroupVariantGroupId": "All",
                "mmGroupVariantHierarchyId": "All",
                "mmGroupDescription": "Mens Shoes",
                "brandGroupId": "VANS",
                "brandGroupHierarchyId": "FASHION",
                "sizeId": {
                    "id": "8",
                    "sizeRangeId": "MENS_SHOES"
                }
            }
        ],
        "balance": 5995,
        "currencyId": "GBP",
        "currencyDescription": "Pounds Sterling",
        "taxInclusive": true,
        "taxSchemeId": "UK",
        "itemCount": 2,
        "saleItemQuantity": 1,
        "returnItemQuantity": 0,
        "saleItemNetValue": 5995,
        "returnItemNetValue": 0,
        "merchandiseItemQuantity": 1,
        "merchandiseItemValue": 5995,
        "total": 5995,
        "grossTotal": 5995,
        "taxTotal": 0,
        "totalTaxAdjustment": 0,
        "preAuthBalance": 0,
        "effectiveSaleValue": 5995
    },
    "basketReference": "PRIMARY",
    "basketType": "PRIMARY",
    "basketDescription": "Primary",
    "basketStatus": "IN_PROGRESS"
}
Go to Top