Delete Basket

Service URL: DELETE /baskets/{basketReference}

Tokens:

basketReference – The basket reference of the basket to add the item to, or can be ‘PRIMARY’ to “delete” the PRIMARY basket.

Remarks:

Deletes a basket, identified by the basket reference. If the PRIMARY basket is specified, it is not deleted, but all items are removed from it.

Scenarios:

ScenarioOutcomeExpected behaviourStatus CodeResponse
1Delete basket service has recieved a request with a valid basket referenceSuccessThe basket should be deleted.200200 Success ok
2Delete basket service has recieved a request with a invalid basket referenceFailThe basket should not be deleted. An bad request error message should be returned to the user.400Error Message: Failed to delete basket. Bad Request
3Delete basket service has recieved a request with a PRIMARY basket referenceSuccesssThe basket should not be deleted. All items in the basket should be deleted200200 Success ok

Example Request:

DELETE: http://localhost:8080/WebRestApi/rest/baskets/MUCFJAIBTVDK3HHNC444ZALMV4

Example Response:

Status: 200 OK

Example Response:

{
    "basketItem": {
        "colourId": {
            "id": "RED",
            "colourRangeId": "MENS_SHOES"
        },
        "description": "Vans Canvas Shoes",
        "deviceId": "pos2@0001.enactor",
        "effectiveNetValue": 5995,
        "lineNumber": 1,
        "netValue": 5995,
        "value": 5995,
        "dateTimeCreated": "2019-07-19T15:35:52.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"
        }
    },
    "customerNumber": "1"
}
Go to Top