Submit Basket

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

ScenarioOutcomeExpected behaviourStatus CodeResponse
1The submit basket service was given a valid basket reference to be submittedSuccessThe basket was submitted successfully200SubmitBasketResponse
2The submit basket service was given an invalid basket reference to be submittedNotFoundThe basket was not submitted. NotFound error response is returned.404ErrorMessage: Failed to submit basket, outcome: NotFound
3The submit basket service was given a valid basket reference to be submitted but the basket could not be submittedFailThe 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"
}

Go to Top