Skip to main content
GET
https://api.zenflow.com.ar
/
api
/
v1
/
orders
List Orders
curl --request GET \
  --url https://api.zenflow.com.ar/api/v1/orders \
  --header 'X-API-Key: <api-key>'
{
  "success": true,
  "data": {
    "orders": [
      {}
    ],
    "pagination": {
      "total": 123,
      "page": 123,
      "limit": 123,
      "total_pages": 123
    }
  }
}

List Orders

Retrieve a list of orders for your tenant with optional filtering and pagination.
Requires read:orders scope.

Request

GET /api/v1/orders

Query Parameters

page
integer
default:"1"
Page number for pagination
limit
integer
default:"50"
Number of orders per page (max 100)
state_id
integer | integer[]
Filter by order state ID(s)
start_date
string
Filter orders created on or after this date (YYYY-MM-DD)
end_date
string
Filter orders created on or before this date (YYYY-MM-DD)
assembly_date
string
Filter by assembly/ship date (YYYY-MM-DD)
include_details
boolean
default:"false"
Include order line items in response

Response

success
boolean
Whether the request was successful
data
object

Examples

Basic Request

curl -X GET "https://api.zenflow.com.ar/api/v1/orders?page=1&limit=20" \
  -H "X-API-Key: zenflow_live_your_key"

Response

{
  "success": true,
  "data": {
    "orders": [
      {
        "id": 12345,
        "order_tenant_id": "ORD-001",
        "state_id": 1,
        "state_name": "Pending",
        "assembly_date": "2024-01-15",
        "customer_name": "John Doe",
        "items_count": 3,
        "created_at": "2024-01-14T10:30:00Z",
        "updated_at": "2024-01-14T10:30:00Z"
      },
      {
        "id": 12346,
        "order_tenant_id": "ORD-002",
        "state_id": 2,
        "state_name": "In Progress",
        "assembly_date": "2024-01-15",
        "customer_name": "Jane Smith",
        "items_count": 1,
        "created_at": "2024-01-14T11:00:00Z",
        "updated_at": "2024-01-14T14:30:00Z"
      }
    ],
    "pagination": {
      "total": 150,
      "page": 1,
      "limit": 20,
      "total_pages": 8
    }
  }
}

With Filters

curl -X GET "https://api.zenflow.com.ar/api/v1/orders?state_id=1&state_id=2&start_date=2024-01-01&include_details=true" \
  -H "X-API-Key: zenflow_live_your_key"

Error Responses

401 Unauthorized

{
  "success": false,
  "error": {
    "code": "invalid_api_key",
    "message": "The API key provided is invalid"
  }
}

403 Forbidden

{
  "success": false,
  "error": {
    "code": "insufficient_scope",
    "message": "This API key does not have the required scope: read:orders"
  }
}