Fluent Commerce Logo
Docs

GQL mutation createOrder Example

Essential knowledgeCore knowledge to understand Fluent Commerce

Intended Audience:

Technical User

Author:

Darren Brice

Changed on:

7 Oct 2026

Overview

GQL createOrder example`createOrder` differs from `createOrderAndCustomer` in one key respect: it expects an existing customer, referenced by numeric ID, rather than a customer object to be created inline. Use `createOrder` when the customer already exists in the retailer's Fluent tenant. Use `createOrderAndCustomer` when the customer needs to be created as part of the same call.

Key points

  • Example GQL of `createOrder`
  • `customer` is passed as `{ id: <customer-id> }`. This is a required field on `CreateOrderInput`. A customer must exist and be linked before the order can be created.
  • Each item on `CreateOrderItemWithOrderInput` accepts `price`, `taxPrice`, `taxType`, `totalPrice`, `totalTaxPrice`, and precise equivalents (`precisePrice`, `preciseTaxPrice`, `preciseTotalPrice`, `preciseTotalTaxPrice`, `precisePaidPrice`), in addition to `paidPrice` and `currency`. 
  • `fulfilmentChoiceRef` on each item must match the `ref` of a `fulfilmentChoice` exactly, but fulfilmentChoiceRef is not mandatory
  • Omit `latitude` and `longitude` entirely when coordinates are unknown, do not pass `0`
  • `status` is assigned by the platform and cannot be set on create

Click & Collect sample:

POST {{fluentApiHost}}/graphqlMutation:Input Variables:

Home Delivery sample:

POST {{fluentApiHost}}/graphqlMutation: Input Variables: