Return API
Introduction
The Return API provides endpoints for creating a return cart.
For more details about this API usage, check out the documentation
Preparation
- Have an authenticated token from the authentication service, this token should be used as an authorization
bearer token
in the header for every request made to this API (more information about the authorization service here). - Have the cart ID you wish to make a return for (more information about carts here).
- That the cart ID you are using has been purchased using the payment API (more information about payments here).
Create Return Cart
This endpoint is for creating a return cart with reference to a previously purchased cart. To create the return,
make a POST request to /returns
. It is necessary to provide the refCartId
inside the request body,
alongside with a list of items that will be returned.
Example request:
In the response we expect to get a new cart. This cart will hold a list of items that are returned.
It also keeps a refCartId
which is a reference to the previously purchased cart.
Create manual Return Cart
This endpoint is for creating a manual return cart with no reference to a previously purchased cart. To create the return,
make a POST request to /returns/manual
. Provide a refLegacyBarcode
and manualReturnCartReason
alongside the list of items that will be returned.
Example request: