1. Overview
The grouped order line is used to organize order lines related to equipment, including a main order line (representing the main equipment) and several sub order lines (representing su equipment). It can be grouped by using POST /v1/order-lines
endpoint in two ways:
- Create the main order line first, followed by the sub-order lines.
- Create the sub-order lines first, followed by the main order line.
In the request body, the parentOrderLineImportId
field refers to the orderLineImportId
of the main order line. This means that if the request body includes parentOrderLineImportId
:
- The corresponding
orderLineImportId
in the request body is treated as a sub order line. - The
orderLineImportId
that is linked to theparentOrderLineImportId
in the request body is considered the main order line.
2. Prerequisite
Refer to Create or update an order line for more details.
3. General logic
- When creating main or sub order lines, the sub order line’s quantity must be a multiple of the main order line’s quantity.
- When updating the main order line’s quantity, all corresponding sub order line quantities will be updated accordingly.
4. Integrating suggestions
Refer to Create or update order line.
Additionally, due to the special logic for updating the quantity on the main order line, we recommend the following:
- For a normal order line or a specific sub order line: Send a request as usual.
- For a main order line: Send a request to update the quantity on only the main order line. There is no need to send additional requests to update the quantities of its sub order lines, as they will be automatically updated accordingly.