Skip to main content

Order Object Definition

Complete reference for the Order type in the GraphQL schema.

Overview

Represents a customer order that needs to be fulfilled. Orders contain customer information, shipping details, and the products being ordered.

Use Cases

  • Retrieve customer orders - Query all orders for a specific customer
  • Order status tracking - Monitor order status changes
  • Create new orders - Add new orders from external systems (e.g., marketplace integrations)
  • Order history - Access order details for reporting and analytics

Creating Orders - Input Types

When creating an order using the createOrder mutation, the following input types are used:

OrderToCreateInput

Maps to: Order (output type)

Input FieldTypeMaps ToDescription
refString!order.refUnique order reference number
recipientRecipientToCreateInput!order.recipientDelivery recipient details (see below)
fulfillmentOrders[FulfillmentOrderToCreateInput!]!order.fulfillmentOrdersList of fulfillments (see below)
channelIdIDorder.organizationServiceSales channel identifier
customerCMSIdString-External system customer reference
orderedAtDateTimeorder.orderedAtOrder placement timestamp

RecipientToCreateInput

Maps to: Recipient (nested object in Order)

Input FieldTypeMaps ToDescription
firstNameString!recipient.firstNameRecipient's first name
lastNameString!recipient.lastNameRecipient's last name
emailEmailAddress!recipient.emailContact email address
phonePhoneNumber!recipient.phoneContact phone number
line1String!recipient.address.street1Street address
line2Stringrecipient.address.street2Additional address line
cityString!recipient.address.cityCity name
zipZipCode!recipient.address.postCodePostal code
countryCodeCountryCode!recipient.address.countryCountry code (ISO 3166-1)
companyString-Company name (if applicable)
cmsIdString-External CMS identifier

FulfillmentOrderToCreateInput

Maps to: FulfillmentOrder (array in Order)

Input FieldTypeMaps ToDescription
products[ProductInput!]!fulfillmentOrder.fulfillmentOrderProductsProducts to fulfill
serviceWingService!fulfillmentOrder.serviceShipping service/expeditor
carrierPickupIdStringorder.carrierPickupIdRelay point pickup identifier
carrierPickupNameStringorder.carrierPickupNameRelay point name
customLocationStringorder.customLocationCustom delivery instructions
isInsuranceEnabledBooleanorder.isInsuranceEnabledInsurance coverage flag
isSignatureEnabledBooleanorder.isSignatureEnabledSignature required flag
isSaturdayDeliveryEnabledBooleanorder.isSaturdayDeliveryEnabledSaturday delivery flag

Note: When you call createOrder, these input types are processed by the resolver and converted into their corresponding output types (Order, Recipient, FulfillmentOrder, etc.) with all nested relationships resolved.

Schema Definition

FieldArgumentTypeDescription
idID!Unique identifier for the order
refString!Order reference number
statusOrderStatus!Current order status
recipientRecipient!Recipient information for delivery
orderedAtDateTime!Timestamp when the order was placed
createdAtDateTime!Timestamp when the order was created in the system
organizationIdID!Organization that owns this order
organizationOrganization!Organization object
serviceWingService!Wing service configuration
organizationServiceOrganizationService!Organization-specific service configuration
orderProducts[OrderProduct!]!Products included in the order
fulfillmentOrders[FulfillmentOrder!]!Associated fulfillment orders for shipping
parcels[Parcel!]!Parcels created for this order
orderEvents[OrderEvent!]!Historical events for this order
anomalies[Anomaly!]!Any anomalies detected for this order
collectOrderProducts[CollectOrderProduct!]!Products for collection
claimClaimAssociated claim if applicable
channelOrderChannelOrderOriginal order from sales channel
tags[String!]!Tags for organizing and filtering orders
customLocationStringCustom location information for delivery
carrierPickupIdIDCarrier pickup point ID if applicable
carrierPickupNameStringName of the carrier pickup point
carrierPickupInfosJSONAdditional carrier pickup information
invoiceUrlStringURL to access the order invoice
isInsuranceEnabledBoolean!Whether insurance is enabled for this order
isSignatureEnabledBoolean!Whether signature is required on delivery
isSaturdayDeliveryEnabledBoolean!Whether Saturday delivery is enabled
labellingAuthorizedByStringPerson or system that authorized labelling
warehouseAnomalyToProcessStatusWarehouseAnomalyToProcessStatus!Status of anomalies to be processed
createdByOrganizationAccountIdIDOrganization account that created this order
createdByOrganizationAccountOrganizationAccountOrganization account object that created this order
createdByWingAccountIdIDWing account that created this order
createdByWingAccountWingAccountWing account object that created this order