Guide: Ordering flow
Introduction
This guide explains the ordering flow throughout a unified solution, serving the purpose to facilitate integrations.
A pre-requisite to initiate the ordering flow is to have a wholesaler and an end customer account. - The wholesaler is the company who is selling the products to the end customers. - The end customer is the company who is buying the products from the wholesaler.
Please refer to the Administration section for details about how to create an account.
Before start interacting with the Ordering API, one needs to authenticate. See the Authentication section.
Swagger documentation is available to see all the endpoint options and models of the Ordering API.
Once authentication is in place, one should know the UUID of the wholesaler who is going to create the order. The wholesaler UUID is needed to GET all the products offered by the wholesaler to the end customer.
Order drafts
In order to use a distributed ordering flow where multiple departments could work out their speciality, it is possible to save a draft with all the subscriptions within an order to continue with it at any time without losing the data.
The order drafts allow to place an order in intermediate steps, specially when time between steps could potentially be days.
Subscription
A Subscription is a collection of Products bounded together.
Order
An order is a box where one can add one or multiple subscriptions to.
Products
Every order contains one or more Initial products. Products are referenced by their UUID. This UUID is unique for every product and different for every Wholesaler. See the Initial product section for details about how to GET the order-able products.
Order Validation
Every order request goes through a validation process. Once the fields of the order are validated, the products in the order are validated next. Not all products can go together in one order and there are dependencies between products.
There are validation rules to ensure the order is valid.
For example: If one orders Product A then one needs Product B as well, and with a certain quantity.
This quantity should be between two boundaries that are called min and max.