Orders API

Manage orders, order items, and fulfillment workflow

19 endpoints

Base URL:https://api.nexapay.com/v1
MethodPathDescription
GET/ordersList all orders
POST/ordersCreate new order
GET/orders/{order_id}Get order details
PUT/orders/{order_id}Update order
DELETE/orders/{order_id}Cancel order
POST/orders/{order_id}/itemsAdd item to order
PUT/orders/{order_id}/items/{item_id}Update order item
DELETE/orders/{order_id}/items/{item_id}Remove item from order
POST/orders/{order_id}/holdPut order on hold
POST/orders/{order_id}/resumeResume held order
POST/orders/{order_id}/completeComplete order
POST/orders/{order_id}/refundRefund order
GET/orders/dine-inList dine-in orders
GET/orders/takeawayList takeaway orders
GET/orders/deliveryList delivery orders
POST/orders/{order_id}/deliverMark order for delivery
GET/orders/kitchenGet kitchen queue
POST/orders/{order_id}/readyMark order ready
POST/orders/{order_id}/servedMark order served

Detailed Examples

POST/orders

Request Body

{
  "store_id": "store_abc123",
  "type": "dine_in",
  "table_id": "table_05",
  "staff_id": "staff_john",
  "customer_id": "cust_001",
  "items": [
    {
      "product_id": "prod_cappuccino",
      "quantity": 2,
      "modifiers": [
        { "modifier_id": "mod_large", "price_adjustment": 0.50 },
        { "modifier_id": "mod_oat_milk", "price_adjustment": 0.75 }
      ],
      "notes": "Extra hot"
    },
    {
      "product_id": "prod_croissant",
      "quantity": 1
    }
  ],
  "discount_code": "MORNING10",
  "notes": "Window seat preference"
}

Response

{
  "success": true,
  "data": {
    "id": "order_20240115001",
    "order_number": "#1234",
    "type": "dine_in",
    "table": "Table 5",
    "status": "pending",
    "items": [
      {
        "id": "item_001",
        "name": "Cappuccino (Large, Oat Milk)",
        "quantity": 2,
        "unit_price": 5.75,
        "total": 11.50
      },
      {
        "id": "item_002", 
        "name": "Croissant",
        "quantity": 1,
        "unit_price": 3.50,
        "total": 3.50
      }
    ],
    "subtotal": 15.00,
    "discount": 1.50,
    "tax": 1.11,
    "total": 14.61,
    "created_at": "2024-01-15T09:30:00Z"
  }
}