Overview
The Orders API manages order creation, status tracking, and fulfillment. Returns OrderInstance objects with direct property access.Direct Access
Access
order.status not order.common.statusInstance Methods
Built-in
updateStatus(), update(), and save() methodsAuto-Sync
Properties update after method calls
Type-Safe
Full TypeScript support
Order Statuses
1
PENDING
Order created, not yet confirmedInitial status for new orders
2
CONFIRMED
Order confirmed, being processedPayment successful, ready for fulfillment
3
FULFILLED
Order completed and deliveredFinal status for successful orders
4
CANCELLED
Order cancelled by user or systemNo further processing
Methods
create()
Create a new order.string
required
ID of the basket to convert to order
object
required
Order details (shipping, payment, etc.)
OrderInstance with direct property access and methods
Example:
get()
Retrieve orders, optionally filtered by status.getById()
Get a specific order by ID.OrderInstance with direct property access
Example:
updateStatus()
Update order status.OrderInstance with updated status
Example:
updateData()
Update order data/metadata.save() (Instance Method)
Save the current state of the order to the server. This is a convenience method that persists all changes made to the order instance.true if successful
Example:
New in Latest Version: The
save() method provides a simpler workflow - modify properties then save, rather than calling Orders.updateData() with the order ID.OrderInstance
All order methods returnOrderInstance objects with:
Direct Property Access:
Complete Examples
Create Order Tool
Track Order Tool
Update Order Status Tool
Use Cases
Order Fulfillment Workflow
Customer Service Lookup
Order Analytics
Best Practices
Store Tracking Information
Store Tracking Information
Send Status Notifications
Send Status Notifications
Handle Cancellations Gracefully
Handle Cancellations Gracefully
Validate Order Exists
Validate Order Exists
Next Steps
Baskets API
Create baskets before orders
Order Examples
See complete order workflows

