Fulfill an order

Outcome: one order line is fulfilled with supported quantity and tracking data, then verified from the order.

Prerequisites

Use an Admin credential, an existing order ID, and the carrier and supply-channel information used by operations. Payment policy is project-specific; inspect paymentState before fulfilling but do not assume fulfillment automatically captures payment.

1. Read current quantities

Code in graphql

Subtract already fulfilled quantities per line. Do this immediately before creation so another operator cannot make the same stale decision.

2. Create the fulfillment

Code in graphql

Pass the order ID and a non-empty lines list. Add supplyChannelId when the shipment has a known source. Supplying tracking or shippedAt marks the created fulfillment shipped; omit them when it should begin ready.

3. Verify

Re-run the order query. Confirm the fulfillment lines and the aggregate shipment state. For managed catalog lines, reconcile the resulting inventory consumption; that integration is not atomic with fulfillment creation. See Fulfillments.