Skip to content
On this page

Fetch Orders ​

Retrieve a list of orders from your store.

Endpoint ​

GET /api/orders/search

Query Parameters ​

NameTypeDescription
pageintPage number (optional)
limitintItems per page (optional)
statusstringFilter by order status (optional)

Response ​

json
{
  "results": [
    {
      "_id": "string",
      "storeId": "string",
      "sellerId": "string",
      "customer": {
        "_id": "string",
        "firstname": "string",
        "lastname": "string",
        "email": "string",
        "ipAddress": "string",
        "source": "string",
        "type": "particular"
      },
      "orderId": 1234,
      "currency": "USD",
      "orderType": "PHYSICAL",
      "shipping": {
        "isFixed": false,
        "zone": { "_id": "string", "name": "string" },
        "shipper": { "_id": "string", "name": "string" },
        "price": 10,
        "trackingNumber": "string",
        "bill": "string",
        "note": "string",
        "address": { /* address object */ }
      },
      "discount": {
        "_id": "string",
        "code": "SUMMER2024",
        "type": "percentage",
        "value": 10,
        "percentage": 10,
        "price": 5
      },
      "details": [
        {
          "product": {
            "_id": "string",
            "name": "Product Name",
            "slug": "product-slug",
            "reference": "REF-001",
            "productType": "PHYSICAL",
            "variant": {
              "_id": "string",
              "name": "Red XL",
              "quantity": 1
            },
            "image": { "_id": "string", "src": "string" },
            "price": {
              "buyingPrice": 10,
              "salePrice": 20,
              "comparePrice": 25
            }
          },
          "upsell": {
            "_id": "string",
            "name": "Upsell Name",
            "code": "UPSELL2024",
            "type": "fixed_amount",
            "value": 5
          },
          "quantity": 2,
          "price": 40
        }
      ],
      "attachments": [
        { "type": "invoice", "url": "https://cdn.example.com/invoice.pdf" }
      ],
      "bookingInfo": {
        "startDate": "2024-06-01T10:00:00.000Z",
        "endDate": "2024-06-01T12:00:00.000Z",
        "guest": { "adults": 2, "children": 1 }
      },
      "isHashed": 0,
      "status": "PENDING",
      "shippingStatus": "",
      "deliveryMan": "string",
      "device": {},
      "total": 45,
      "histories": [
        {
          "status": "PENDING",
          "note": { "_id": "string", "name": "Order created", "color": "blue" },
          "type": "SYSTEM",
          "user": { "_id": "string", "name": "Admin" },
          "createdAt": "2024-06-01T09:00:00.000Z"
        }
      ],
      "adminNote": "",
      "orderFee": 0,
      "customerNote": "",
      "method": { "_id": "string", "name": "Credit Card" },
      "note": { "_id": "string", "name": "Urgent", "color": "red" },
      "payment": {
        "_id": "string",
        "method": "paypal",
        "isPaid": true
      },
      "createdAt": "2024-06-01T09:00:00.000Z"
    }
  ],
  "paginate": {
        "total": 1,
        "per_page": 20,
        "current_page": 1,
        "last_page": 1
    }
}

Released under the MIT License.