Orders API

Manage orders programmatically.

Overview

The Orders API lets you manage orders programmatically. All admin endpoints are under /api/admin/orders.

Endpoints

MethodPathDescription
GET/api/admin/ordersList orders with pagination and filters
POST/api/admin/ordersCreate a manual order
GET/api/admin/orders/[id]Get order details with line items
PATCH/api/admin/orders/[id]Update order status, assign sales rep
DELETE/api/admin/orders/[id]Delete an order (Owner only)

Query parameters

  • search β€” search by order number, customer name, or email
  • status β€” filter by order status
  • excludeStatus β€” exclude specific statuses
  • source β€” filter by order source
  • page and limit β€” pagination

Creating orders via API

When creating an order via API, you can specify:

  • Customer (by ID or create inline)
  • Line items with product variants and quantities
  • Order source (IN_PERSON, PRIVATE_COMMISSION, etc.)
  • Sales rep assignment
  • Custom order date (for backdating)
  • Notes and tags

Was this article helpful?

Orders API β€” Manage Orders Programmatically | KATURA