Skip to main content
GET
/
orders
List orders
curl --request GET \
  --url https://store.salesive.com/api/v1/orders \
  --header 'Authorization: Bearer <token>' \
  --header 'x-shop-id: <api-key>'
{
  "status": 123,
  "success": true,
  "message": "<string>",
  "data": {
    "orders": [
      {
        "_id": "<string>",
        "orderId": 123,
        "user": "<string>",
        "shop": "<string>",
        "items": [
          {
            "product": "<string>",
            "name": "<string>",
            "price": 123,
            "quantity": 2,
            "variant": "<string>",
            "sku": "<string>",
            "variantAttributes": {},
            "imageUrl": "<string>"
          }
        ],
        "status": "pending",
        "subtotal": 123,
        "shippingCost": 123,
        "total": 123,
        "shippingAddress": {
          "fullName": "<string>",
          "addressLine1": "<string>",
          "city": "<string>",
          "state": "<string>",
          "zipCode": "<string>",
          "country": "<string>",
          "phoneNumber": "<string>",
          "addressLine2": "<string>"
        },
        "payment": "<string>",
        "shipment": "<string>",
        "notes": "<string>",
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z"
      }
    ],
    "pagination": {
      "page": 123,
      "limit": 123,
      "total": 123,
      "pages": 123
    }
  }
}

Request

GET /orders
Authorization: Bearer {{token}}
x-shop-id: {{shopId}}

Headers

HeaderTypeDescription
AuthorizationstringProvide the customer token in the format Bearer <jwt>.
x-shop-idstringIdentify the shop that owns the orders.

Query parameters

ParameterTypeDescription
statusstringFilter by order status. Can be specified multiple times. Valid values: pending, processing, paid, cancelled, refunded.
orderIdnumberFilter by specific order ID.
minTotalnumberFilter orders with total greater than or equal to this value.
maxTotalnumberFilter orders with total less than or equal to this value.
fromstringFilter orders created after this date (ISO 8601 format).
tostringFilter orders created before this date (ISO 8601 format).
pagenumberPage number for pagination (default: 1).
limitnumberNumber of items per page (default: 10).

Request examples

Get all orders

GET /orders

Filter by single status

GET /orders?status=pending

Filter by multiple statuses

GET /orders?status=pending&status=paid

Filter by total range

GET /orders?minTotal=100&maxTotal=500

Filter by date range

GET /orders?from=2025-01-01T00:00:00.000Z&to=2025-12-31T23:59:59.999Z

Filter by order ID

GET /orders?orderId=12345

Pagination

GET /orders?page=2&limit=5

Successful response

{
  "status": 200,
  "success": true,
  "message": "Orders retrieved successfully",
  "data": {
    "orders": [
      {
        "_id": "690ff00acf4de460fd1f6114",
        "orderId": 1001,
        "user": "68f976e92bb0b821425fdda6",
        "shop": "68b8f52575da81b332af29f1",
        "items": [
          {
            "product": "68e5bb463a1fc56a8ac150bf",
            "name": "Head phone",
            "price": 10000,
            "quantity": 2
          }
        ],
        "status": "pending",
        "subtotal": 20000,
        "shippingCost": 0,
        "total": 20000,
        "createdAt": "2025-11-14T15:30:00.000Z",
        "updatedAt": "2025-11-14T15:30:00.000Z"
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 10,
      "total": 1,
      "pages": 1
    }
  }
}

Error response

{
  "status": 401,
  "success": false,
  "message": "Unauthorized",
  "data": {}
}

Authorizations

Authorization
string
header
required

JWT issued by the Salesive Store API for authenticated shoppers.

x-shop-id
string
header
required

Optional storefront identifier sent as a header to scope responses to a specific shop. Try It requests remember this value once provided.

Headers

x-shop-id
string

Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.

Query Parameters

status
enum<string>

Filter by order status. Can be specified multiple times.

Available options:
pending,
processing,
paid,
cancelled,
refunded
orderId
integer

Filter by specific order ID.

minTotal
number

Filter orders with total greater than or equal to this value.

maxTotal
number

Filter orders with total less than or equal to this value.

from
string<date-time>

Filter orders created after this date (ISO 8601 format).

to
string<date-time>

Filter orders created before this date (ISO 8601 format).

page
integer
default:1

Page number for pagination (default: 1).

Required range: x >= 1
limit
integer
default:10

Number of items per page (default: 10).

Required range: x >= 1

Response

Orders retrieved successfully.

status
integer
required
success
boolean
required
message
string
required
data
object
required