Skip to main content

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.status

Instance Methods

Built-in updateStatus(), update(), and save() methods

Auto-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.)
Returns: OrderInstance with direct property access and methods Example:

get()

Retrieve orders, optionally filtered by status.
Examples:

getById()

Get a specific order by ID.
Returns: OrderInstance with direct property access Example:

updateStatus()

Update order status.
Or use instance method:
Returns: OrderInstance with updated status Example:

updateData()

Update order data/metadata.
Example:

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.
Returns: Promise resolving to 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 return OrderInstance objects with: Direct Property Access:
Instance Methods:
Backward Compatible:

Complete Examples

Create Order Tool

Track Order Tool

Update Order Status Tool

Use Cases

Order Fulfillment Workflow

Customer Service Lookup

Order Analytics

Best Practices

Next Steps

Baskets API

Create baskets before orders

Order Examples

See complete order workflows