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
Related Types
- FulfillmentOrder - Orders to be fulfilled
- Recipient - Recipient information
- OrganizationService - Service configuration
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 Field | Type | Maps To | Description |
|---|---|---|---|
| ref | String! | order.ref | Unique order reference number |
| recipient | RecipientToCreateInput! | order.recipient | Delivery recipient details (see below) |
| fulfillmentOrders | [FulfillmentOrderToCreateInput!]! | order.fulfillmentOrders | List of fulfillments (see below) |
| channelId | ID | order.organizationService | Sales channel identifier |
| customerCMSId | String | - | External system customer reference |
| orderedAt | DateTime | order.orderedAt | Order placement timestamp |
RecipientToCreateInput
Maps to: Recipient (nested object in Order)
| Input Field | Type | Maps To | Description |
|---|---|---|---|
| firstName | String! | recipient.firstName | Recipient's first name |
| lastName | String! | recipient.lastName | Recipient's last name |
| EmailAddress! | recipient.email | Contact email address | |
| phone | PhoneNumber! | recipient.phone | Contact phone number |
| line1 | String! | recipient.address.street1 | Street address |
| line2 | String | recipient.address.street2 | Additional address line |
| city | String! | recipient.address.city | City name |
| zip | ZipCode! | recipient.address.postCode | Postal code |
| countryCode | CountryCode! | recipient.address.country | Country code (ISO 3166-1) |
| company | String | - | Company name (if applicable) |
| cmsId | String | - | External CMS identifier |
FulfillmentOrderToCreateInput
Maps to: FulfillmentOrder (array in Order)
| Input Field | Type | Maps To | Description |
|---|---|---|---|
| products | [ProductInput!]! | fulfillmentOrder.fulfillmentOrderProducts | Products to fulfill |
| service | WingService! | fulfillmentOrder.service | Shipping service/expeditor |
| carrierPickupId | String | order.carrierPickupId | Relay point pickup identifier |
| carrierPickupName | String | order.carrierPickupName | Relay point name |
| customLocation | String | order.customLocation | Custom delivery instructions |
| isInsuranceEnabled | Boolean | order.isInsuranceEnabled | Insurance coverage flag |
| isSignatureEnabled | Boolean | order.isSignatureEnabled | Signature required flag |
| isSaturdayDeliveryEnabled | Boolean | order.isSaturdayDeliveryEnabled | Saturday 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
| Field | Argument | Type | Description |
|---|---|---|---|
| id | ID! | Unique identifier for the order | |
| ref | String! | Order reference number | |
| status | OrderStatus! | Current order status | |
| recipient | Recipient! | Recipient information for delivery | |
| orderedAt | DateTime! | Timestamp when the order was placed | |
| createdAt | DateTime! | Timestamp when the order was created in the system | |
| organizationId | ID! | Organization that owns this order | |
| organization | Organization! | Organization object | |
| service | WingService! | Wing service configuration | |
| organizationService | OrganizationService! | 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 | |
| claim | Claim | Associated claim if applicable | |
| channelOrder | ChannelOrder | Original order from sales channel | |
| tags | [String!]! | Tags for organizing and filtering orders | |
| customLocation | String | Custom location information for delivery | |
| carrierPickupId | ID | Carrier pickup point ID if applicable | |
| carrierPickupName | String | Name of the carrier pickup point | |
| carrierPickupInfos | JSON | Additional carrier pickup information | |
| invoiceUrl | String | URL to access the order invoice | |
| isInsuranceEnabled | Boolean! | Whether insurance is enabled for this order | |
| isSignatureEnabled | Boolean! | Whether signature is required on delivery | |
| isSaturdayDeliveryEnabled | Boolean! | Whether Saturday delivery is enabled | |
| labellingAuthorizedBy | String | Person or system that authorized labelling | |
| warehouseAnomalyToProcessStatus | WarehouseAnomalyToProcessStatus! | Status of anomalies to be processed | |
| createdByOrganizationAccountId | ID | Organization account that created this order | |
| createdByOrganizationAccount | OrganizationAccount | Organization account object that created this order | |
| createdByWingAccountId | ID | Wing account that created this order | |
| createdByWingAccount | WingAccount | Wing account object that created this order | |