Service URL: GET /baskets/{basketReference}/items/{lineNumber}
Tokens:
basketReference – The basket reference of the basket to add the item to, or can be ‘PRIMARY’ to add to the PRIMARY basket.
Response Body:
IBasketItemRetrievalResponse:
basketItem – IBasketItem – The requested basket item
Remarks:
Loads an existing basket and extracts the basket item based on the line number.
Scenarios
Scenario | Outcome | Expected behaviour | Status Code | Response | |
---|---|---|---|---|---|
1 | Service recieves a valid basket reference and line number | Success | The item is extracted from the basket and returned. | 200 | IBasketItemRetrievalResponse: basketItem |
2 | Serivce recieves a valid basket and invalid line number | NotFound | Basket item with line number provided was not found. Error Message should be returned | 400 | Error Message: Item could not found for basket reference <basketReference> |
3 | Serivce recieves a valid basket and invalid line number | NotFound | Basket was not found given the basket reference. Error Message should be returned | 400 | Error Message: Item could not found for basket reference <basketReference> |
Example Request:
1GET: http://localhost:8080/WebRestApi/rest/baskets/PRIMARY/items/1 |