Place an order from the cart
Process the cart into a confirmed order.
Mutation
mutation PlaceOrder($cartId: String!) {
cartProcess(
id: $cartId
input: { orderStatus: "CONFIRMED" }
) {
cartOrderId
}
}
Variables
{
"cartId": "019c77b7-565f-7ea0-8660-42bc63a7f728"
}
Response
{
"data": {
"cartProcess": {
"cartOrderId": "34567"
}
}
}
How it works
cartProcess converts the cart into an order. The orderStatus determines the initial status — use "CONFIRMED" for a standard order or "REQUEST" for a quote request. The returned cartOrderId is the order ID you can use to query the order with order(orderId: 34567). Before calling this mutation, ensure the cart has addresses set, a payment method selected, and at least one item. The optional language field controls which language the order confirmation email is sent in.