updateOrder
Updates an existing order with new attributes. You can update order information, customer details, shipping preferences, order items, and fulfillment settings.
Requirements
- The order must exist and be in an editable status (
Ordered,Draft, orError) - User must have
update_orderpermission - All referenced entities (sales channels, carriers, products) must exist
Order Status Restrictions
Orders can only be updated when in specific statuses:
Ordered- Standard editable stateDraft- Pre-submission stateError- Orders with validation issues
Address Validation
Both shipping and billing addresses require:
address1- Street address (required)city- City name (required)country- ISO 2-letter country code (required)postal_code- Valid postal code for the country (required)
Order Items Behavior
- **New Items**: Require valid
product_idorskuand positivequantity - **Existing Items**: Use
idfield to update; setdelete: trueto remove - **Stock Impact**: Quantity changes automatically adjust inventory levels
- **Integration Sync**: Items are validated through source integration if applicable
Fulfillment Settings
fulfill_unpaid: Allows fulfillment of unpaid ordersallocate_to_external: Enables allocation to external/read-only facilitiesauto_fulfill: Automatically fulfills orders when conditions are metlocal_routing: Bypasses external integration routing rules
Financial Validation
shipping_costandtotal_taxcannot be negative- Financial amounts use decimal precision
Error Responses
OrderNotFoundError: Order ID does not existValidationError: Business rule violations (see specific error messages)PermissionError: Insufficient permissions for the operation
Integration Considerations
Orders from external integrations undergo additional validation:
- New items are processed through the source integration
- Items marked as non-processable may affect fulfillment method
- Local routing bypasses external validation requirements
updateOrder(
input: UpdateOrderInput!
): Order!
Arguments
updateOrder.input ● UpdateOrderInput! non-null input
Parameters for UpdateOrder
Type
Order object
The order type. This type represents an order in the system.