Get Basket Details

Service URL: GET /baskets/{basketReference}

Tokens:

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

Parameters:

basketType – String – the type of basket to query for

Response Body:

BasketResponse

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:

Load an existing basket and return it, without making any changes. A user should only be able to load baskets which belong to them.

Scenarios:

ScenarioOutcomeExpected behaviorStatus CodeResponse
1Get Basket service has been given a valid basket referenceSuccessThe basket is returned to the client200BaskerResponse
2Get Basket service has been given a basket reference that doesn’t existNotFoundThe basket is not returned. A NotFound outcome is returned with a 404 not found response.404Error Message: Failed to retrieve basket, outcome: NotFound
3Get Basket service has been given a PRIMARY basket reference with a valid token.SuccessThe primary basket for a customer is returned to the client200BaskerResponse
4Get Basket service has been given a PRIMARY basket reference but no token is suppliedFailThe basket is not returned. The service will fail because the customer’s information is missing500Error Message: Failed to retrieve basket, outcome: Fail

Cucumber (Deprecated):

NumberScenarioOutcomeResponse
1Call GetBasket process for a wishlist basket given a valid basket key/referenceSuccessBasketResponse
2Call GetBasket process for a primary basketSuccessBasketResponse

Rest Assured (Deprecated):

NumberScenarioStatusCodeResponse
1Call GetBasket service for a wishlist basket given a valid basket key/reference200BasketResponse
2Call GetBasket service for a basket given a invalid basket key/reference500ErrorMessage: Failed to retrieve basket
3Call GetBasket service for a primary basket200BasketResponse

Example Request:

GET: http://localhost:8080/WebRestApi/rest/baskets/PRIMARY

Example Response:

{
    "basket": {
        "items": [
            {
                "@type": "orderDetailsItem",
                "description": "###.###",
                "deviceId": "pos2@0001.enactor",
                "effectiveNetValue": 0,
                "lineNumber": 1,
                "netValue": 0,
                "value": 0,
                "dateTimeCreated": "2019-07-19T16:18:23.000+01:00",
                "userId": "CUST_USER",
                "type": "VALUE",
                "orderReference": "15",
                "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-19T16:18:26.000+01:00",
                "userId": "CUST_USER",
                "modifiersNetValue": 0,
                "modifiersEffectiveNetValue": 0,
                "modifiersVoidQuantity": 0,
                "modifiersQuantity": 0,
                "notDiscountable": false,
                "maxDiscount": 0,
                "handKeyed": true,
                "productID": "VV639JS-12",
                "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": "12",
                    "sizeRangeId": "MENS_SHOES"
                }
            },
            {
                "@type": "styleColourSizeItem",
                "colourId": {
                    "id": "RED",
                    "colourRangeId": "MENS_SHIRTS"
                },
                "description": "Button Down Collar Red",
                "deviceId": "pos2@0001.enactor",
                "effectiveNetValue": 2595,
                "lineNumber": 3,
                "netValue": 2595,
                "value": 2595,
                "dateTimeCreated": "2019-07-19T16:21:08.000+01:00",
                "userId": "CUST_USER",
                "modifiersNetValue": 0,
                "modifiersEffectiveNetValue": 0,
                "modifiersVoidQuantity": 0,
                "modifiersQuantity": 0,
                "notDiscountable": false,
                "maxDiscount": 0,
                "handKeyed": true,
                "productID": "DF517XM-1",
                "quantity": 1,
                "netQuantity": 1,
                "isReturn": false,
                "unitPrice": 2595,
                "sourceInventoryType": "AVA",
                "orderable": true,
                "priceTypeId": "R",
                "productTypeId": "skuProduct",
                "productImageURL": "image://PRODUCT/DF517XM-2.jpg",
                "type": "VALUE",
                "mmGroupId": "MENS_SHIRTS",
                "mmGroupHierarchyId": "FASHION",
                "mmGroupVariantGroupId": "All",
                "mmGroupVariantHierarchyId": "All",
                "mmGroupDescription": "Mens Shirts",
                "brandGroupId": "INTERNAL",
                "brandGroupHierarchyId": "FASHION",
                "sizeId": {
                    "id": "S",
                    "sizeRangeId": "MENS_SHIRTS"
                }
            },
            {
                "@type": "styleColourSizeItem",
                "colourId": {
                    "id": "RED",
                    "colourRangeId": "MENS_SHIRTS"
                },
                "description": "Button Down Collar Red",
                "deviceId": "pos2@0001.enactor",
                "effectiveNetValue": 2595,
                "lineNumber": 4,
                "netValue": 2595,
                "value": 2595,
                "dateTimeCreated": "2019-07-19T16:21:10.000+01:00",
                "userId": "CUST_USER",
                "modifiersNetValue": 0,
                "modifiersEffectiveNetValue": 0,
                "modifiersVoidQuantity": 0,
                "modifiersQuantity": 0,
                "notDiscountable": false,
                "maxDiscount": 0,
                "handKeyed": true,
                "productID": "DF517XM-1",
                "quantity": 1,
                "netQuantity": 1,
                "isReturn": false,
                "unitPrice": 2595,
                "sourceInventoryType": "AVA",
                "orderable": true,
                "priceTypeId": "R",
                "productTypeId": "skuProduct",
                "productImageURL": "image://PRODUCT/DF517XM-2.jpg",
                "type": "VALUE",
                "mmGroupId": "MENS_SHIRTS",
                "mmGroupHierarchyId": "FASHION",
                "mmGroupVariantGroupId": "All",
                "mmGroupVariantHierarchyId": "All",
                "mmGroupDescription": "Mens Shirts",
                "brandGroupId": "INTERNAL",
                "brandGroupHierarchyId": "FASHION",
                "sizeId": {
                    "id": "S",
                    "sizeRangeId": "MENS_SHIRTS"
                }
            },
            {
                "@type": "styleColourSizeItem",
                "colourId": {
                    "id": "RED",
                    "colourRangeId": "MENS_SHIRTS"
                },
                "description": "Button Down Collar Red",
                "deviceId": "pos2@0001.enactor",
                "effectiveNetValue": 2595,
                "lineNumber": 5,
                "netValue": 2595,
                "value": 2595,
                "dateTimeCreated": "2019-07-19T16:21:11.000+01:00",
                "userId": "CUST_USER",
                "modifiersNetValue": 0,
                "modifiersEffectiveNetValue": 0,
                "modifiersVoidQuantity": 0,
                "modifiersQuantity": 0,
                "notDiscountable": false,
                "maxDiscount": 0,
                "handKeyed": true,
                "productID": "DF517XM-1",
                "quantity": 1,
                "netQuantity": 1,
                "isReturn": false,
                "unitPrice": 2595,
                "sourceInventoryType": "AVA",
                "orderable": true,
                "priceTypeId": "R",
                "productTypeId": "skuProduct",
                "productImageURL": "image://PRODUCT/DF517XM-2.jpg",
                "type": "VALUE",
                "mmGroupId": "MENS_SHIRTS",
                "mmGroupHierarchyId": "FASHION",
                "mmGroupVariantGroupId": "All",
                "mmGroupVariantHierarchyId": "All",
                "mmGroupDescription": "Mens Shirts",
                "brandGroupId": "INTERNAL",
                "brandGroupHierarchyId": "FASHION",
                "sizeId": {
                    "id": "S",
                    "sizeRangeId": "MENS_SHIRTS"
                }
            },
            {
                "@type": "styleColourSizeItem",
                "colourId": {
                    "id": "RED",
                    "colourRangeId": "MENS_SHIRTS"
                },
                "description": "Button Down Collar Red",
                "deviceId": "pos2@0001.enactor",
                "effectiveNetValue": 2595,
                "lineNumber": 6,
                "netValue": 2595,
                "value": 2595,
                "dateTimeCreated": "2019-07-19T16:21:13.000+01:00",
                "userId": "CUST_USER",
                "modifiersNetValue": 0,
                "modifiersEffectiveNetValue": 0,
                "modifiersVoidQuantity": 0,
                "modifiersQuantity": 0,
                "notDiscountable": false,
                "maxDiscount": 0,
                "handKeyed": true,
                "productID": "DF517XM-1",
                "quantity": 1,
                "netQuantity": 1,
                "isReturn": false,
                "unitPrice": 2595,
                "sourceInventoryType": "AVA",
                "orderable": true,
                "priceTypeId": "R",
                "productTypeId": "skuProduct",
                "productImageURL": "image://PRODUCT/DF517XM-2.jpg",
                "type": "VALUE",
                "mmGroupId": "MENS_SHIRTS",
                "mmGroupHierarchyId": "FASHION",
                "mmGroupVariantGroupId": "All",
                "mmGroupVariantHierarchyId": "All",
                "mmGroupDescription": "Mens Shirts",
                "brandGroupId": "INTERNAL",
                "brandGroupHierarchyId": "FASHION",
                "sizeId": {
                    "id": "S",
                    "sizeRangeId": "MENS_SHIRTS"
                }
            }
        ],
        "balance": 16375,
        "currencyId": "GBP",
        "currencyDescription": "Pounds Sterling",
        "taxInclusive": true,
        "taxSchemeId": "UK",
        "itemCount": 6,
        "saleItemQuantity": 5,
        "returnItemQuantity": 0,
        "saleItemNetValue": 16375,
        "returnItemNetValue": 0,
        "merchandiseItemQuantity": 5,
        "merchandiseItemValue": 16375,
        "total": 16375,
        "grossTotal": 16375,
        "taxTotal": 0,
        "totalTaxAdjustment": 0,
        "preAuthBalance": 0,
        "effectiveSaleValue": 16375
    },
    "basketReference": "PRIMARY",
    "basketType": "PRIMARY",
    "basketDescription": "Primary",
    "basketStatus": "IN_PROGRESS"
}
Go to Top