For the complete documentation index, see llms.txt. This page is also available as Markdown.
API Order Process (WIP Draft)
API: Order Process (WIP/Draft)
Workflow
Creating the Order
We first create an order entity in the database that we later use to continue the process.
Request:
Authorization
Bearer Token
Method
POST
Endpoint
{{API_URL_SHOP}}/orders
Request Code (Success)
201 Created
Request Body:
Example Response Body:
The most important part of the response is the “tokenValue”, which will be used as {{OrderTokenValue}} to reference the Order we just created.
Adding an Item to the Order
In the next step we need to add an Item to our new Order.
Authorization
Bearer Token
Method
PATCH
Endpoint
{{API_URL_SHOP}}/orders/{{OrderTokenValue}}
Request Code (Success)
200 OK
Example Request Body:
Example Response Body:
To note: In the Backend we also created a payments entity. We will later require its id to choose a payment method.
Adding an Address
Due to other use cases a billing address must be given, so any user trying to proceed past this point in the Order Process needs to have an address present. This does not need to be repeated for every Order Process.
Authorization
Bearer Token
Method
POST
Endpoint
{{API_URL_SHOP}}/addresses
Request Code (Success)
201 Created
Example Request Body
Confirming Documents
Due to other use cases users are required to confirm that they received certain legal documents. While this is not always needed for a project, this confirmation is required to progress in the Order process. If the process of sending, and confirming these documents is not needed, a simple call to this endpoint in the background of the frontend will be enough to continue in the process.