Service URL: POST /baskets/{basketReference}/submit
Tokens:
basketReference – The basket reference of the basket to add the items to, or can be ‘PRIMARY’ to add to the PRIMARY basket.
Response
SubmitBasketResponse
orderId – String – the id of the order submitted
newBasketReference – String – the id of the new basket
Remarks
- Submits a basket for transaction processing. Once submitted, a new transaction is created and stored. The new transaction is returned in the response. The id of the order submitted is also returned.
Scenarios
Scenario | Outcome | Expected behaviour | Status Code | Response | |
---|---|---|---|---|---|
1 | The submit basket service was given a valid basket reference to be submitted | Success | The basket was submitted successfully | 200 | SubmitBasketResponse |
2 | The submit basket service was given an invalid basket reference to be submitted | NotFound | The basket was not submitted. NotFound error response is returned. | 404 | ErrorMessage: Failed to submit basket, outcome: NotFound |
3 | The submit basket service was given a valid basket reference to be submitted but the basket could not be submitted | Fail | The basket was not submitted. Fail error response is returned. | ErrorMessage: Failed to submit basket, outcome: Fail |
Example Request Collapse source
http: //localhost:8080/WebRestApi/rest/baskets/PRIMARY/submit |
Example Response
200 OK
{
"orderId" : "00000033",
"newBasketReference" : "A6U7KWLMYFCZ7CNFLAUE67HFKY"
}