Build Cart and Branch on Order Status
A 4-step recipe with Commerce Layer. We can help you get access.
Recipe · 4 steps
Build Cart and Branch on Order Status
with Commerce Layer · Order Fulfilment Management
Create an order, add a line item, and place it only when still in draft.
- Create a draft order in the supplied market.
- Add a SKU line item to the order.
- Retrieve the order and read its status for branching.
- Toggle the documented _place transition flag to submit the draft order.
What you'll need to have ready
- accessToken: Bearer access token for the Commerce Layer organization.
- marketId: The id of the market the order belongs to.
- skuCode: The SKU code to add as a line item.
- quantity: The quantity of the SKU to add.
For your developer
Arazzo workflow commerce-layer:build-cart-branch-on-status, 4 operations: POST/orders → POST/line_items → GET/orders/orderId → PATCH/orders/orderId. Specs on APIs.io.