Orders API
Create, retrieve, and manage customer orders with full lifecycle tracking.
/admin/orders
List orders with status filtering and pagination
Query Parameters
?status=pending&limit=50&offset=0&customer_id=cust_123Response
{
"success": true,
"data": [
{
"id": "order_789",
"customer_id": "cust_123",
"status": "pending",
"total": 149.99,
"items_count": 3,
"created_at": "2026-03-20T12:00:00Z"
}
]
}/admin/orders
Create a new order
Request Body
{
"customer_id": "cust_123",
"items": [
{"product_id": "prod_123", "quantity": 2}
],
"shipping_address": {
"name": "Jane Doe",
"street": "123 Main St",
"city": "Springfield",
"state": "IL",
"zip": "62701"
}
}Response
{
"success": true,
"data": {
"id": "order_999",
"status": "pending",
"total": 59.98,
"created_at": "2026-03-20T15:00:00Z"
}
}/admin/orders/{order_id}Get full details of a specific order including items, customer, and timeline
Bearer Token Required/admin/orders/{order_id}/status
Update order status (pending, processing, shipped, delivered, cancelled)
Request Body
{
"status": "shipped",
"tracking_number": "TRK123456789",
"notify_customer": true
}Response
{
"success": true,
"data": {
"id": "order_999",
"status": "shipped",
"updated_at": "2026-03-20T16:00:00Z"
}
}/admin/orders/{order_id}/cancelCancel an order and optionally trigger refund
Bearer Token Required/admin/orders/countsGet order counts grouped by status (for dashboard badges)
Bearer Token RequiredMy Orders API (User Portal)
Customer-facing endpoints for viewing and placing orders.
/ordersList the authenticated user's own orders
Bearer Token Required/ordersPlace a new order as the authenticated customer
Bearer Token Required/orders/{order_id}Get details of a specific order belonging to the current user
Bearer Token RequiredOrder Attachments API
Upload and manage file attachments on orders (design proofs, receipts, etc.).
/admin/orders/{order_id}/attachmentsList all attachments on an order
Bearer Token Required/admin/orders/{order_id}/attachmentsUpload a new attachment to an order
Bearer Token Required/admin/orders/{order_id}/attachments/{attachment_id}Get a specific attachment's details
Bearer Token Required/admin/orders/{order_id}/attachments/{attachment_id}Update attachment metadata
Bearer Token Required/admin/orders/{order_id}/attachments/{attachment_id}Delete an attachment from an order
Bearer Token RequiredOrder Notes & Timeline API
Add internal notes, view timeline events, and manage attachments on orders.
/admin/orders/{order_id}/notesList all notes for an order
Response
{
"success": true,
"data": [
{ "id": "note_01", "content": "Customer called about shipping ETA", "author": "marc@example.com", "created_at": "2026-03-22T09:00:00Z" }
]
}/admin/orders/{order_id}/notesAdd a note to an order
Request Body
{ "content": "Expedited shipping approved per manager" }/admin/orders/{order_id}/timelineGet the full event timeline for an order (status changes, notes, payments, shipments)
Response
{
"success": true,
"data": [
{"type": "status_change", "status": "pending"},
{"type": "note", "content": "Order received"}
]
}Order Tracking API
Public endpoint for customers to track their order status without authentication.
/api/track-orderTrack an order by order ID and email (no auth required)
Query Parameters
?order_id=order_789&email=jane@example.comResponse
{
"success": true,
"data": {
"order_id": "order_789",
"status": "shipped",
"tracking_number": "1Z999AA10123456784",
"carrier": "UPS",
"estimated_delivery": "2026-03-25",
"items": [{ "name": "Custom Jersey", "quantity": 2, "status": "shipped" }]
}
}/orders/{order_id}/qrGenerate a QR code image for quick order lookup
Response
{
"success": true,
"data": {
"qr_code_url": "https://...",
"order_id": "order_789"
}
}Fulfillment API
Ship orders and dispatch in bulk with carrier integration.
/admin/fulfillment/shipMark an order as shipped with tracking information
Request Body
{
"order_id": "order_789",
"tracking_number": "1Z999AA10123456784",
"carrier": "UPS",
"notify_customer": true
}/admin/fulfillment/bulk-dispatchDispatch multiple orders at once with batch tracking updates
Request Body
{
"orders": [
{ "order_id": "order_100", "tracking_number": "1Z...", "carrier": "UPS" },
{ "order_id": "order_101", "tracking_number": "9400...", "carrier": "USPS" }
]
}Packing API
Generate packing slips, invoices, pick lists, and batch packing documents.
/admin/packing/slip/{order_id}
Generate packing slip HTML for an order
Response
{
"success": true,
"data": {
"order_id": "order_999",
"html_content": "<html>...</html>",
"download_url": "https://api.marcsinventory.com/files/slip_order_999.pdf"
}
}/admin/packing/invoice/{order_id}
Generate invoice HTML for an order
Response
{
"success": true,
"data": {
"order_id": "order_999",
"html_content": "<html>...</html>",
"download_url": "https://api.marcsinventory.com/files/invoice_order_999.pdf"
}
}/admin/packing/pick-list
Generate batch pick list for multiple orders
Query Parameters
?order_ids=order_123,order_456,order_789&format=pdfResponse
{
"success": true,
"data": {
"pick_list_id": "picklist_001",
"order_count": 3,
"item_count": 12,
"download_url": "https://api.marcsinventory.com/files/picklist_001.pdf"
}
}Backorders API
Manage and allocate inventory to backordered items when stock arrives.
/admin/backordersList all pending backorders
Response
{
"success": true,
"data": [
{"id": "bo_01", "product_id": "prod_123", "quantity": 10}
]
}/admin/backorders/{item_id}/allocateAllocate available stock to a specific backordered item
Response
{
"success": true,
"data": {"allocation_id": "alloc_01", "quantity_allocated": 10}
}/admin/backorders/auto-allocateAutomatically allocate stock across all eligible backorders (FIFO)
Response
{
"success": true,
"data": {"allocations_created": 5, "total_allocated": 45}
}Pre-Orders API
Accept orders before stock arrives, track expected dates, and auto-fulfill when inventory lands.
/admin/preordersList all pre-orders with allocation status
Response
{
"success": true,
"data": [
{ "id": "bo_01", "order_id": "order_100", "product_id": "prod_123", "quantity": 5, "status": "waiting", "expected_date": "2026-04-01" }
]
}/admin/preorders/allocateAllocate available inventory to a pre-order
Request Body
{ "backorder_id": "bo_01", "quantity": 5 }Cart API
Customer shopping cart with item management, coupon application, and checkout.
/cartGet the current user's shopping cart
Response
{
"success": true,
"data": {
"items": [{ "product_id": "prod_123", "name": "Custom T-Shirt", "quantity": 2, "unit_price": 29.99, "subtotal": 59.98 }],
"subtotal": 59.98, "discount": 0, "total": 59.98
}
}/cart/itemsAdd an item to the cart
Request Body
{ "product_id": "prod_123", "quantity": 2 }/cart/checkoutProceed to checkout and create an order from the current cart
Response
{
"success": true,
"data": {
"order_id": "order_789",
"status": "pending_payment",
"total": 59.98
}
}Bulk Operations API
Perform batch updates and exports on products, inventory, and orders.
/admin/bulk/products/updateBulk update product fields (price, status, category) across multiple products
Request Body
{
"product_ids": ["prod_123", "prod_456", "prod_789"],
"updates": { "status": "active", "category": "cat_02" }
}/admin/bulk/products/exportExport all products as CSV or JSON
Response
{
"success": true,
"data": {"export_id": "exp_01", "format": "csv", "url": "https://..."}
}/admin/inventory-history/bulk-adjustBulk adjust stock levels for multiple products at once
Request Body
{
"adjustments": [
{ "product_id": "prod_123", "quantity_change": 50, "reason": "restock" },
{ "product_id": "prod_456", "quantity_change": -5, "reason": "damaged" }
]
}