Skip to main content

API Reference

Welcome to the ZenFlow API reference. This documentation covers all available endpoints for managing orders, products, stock, and webhooks.

Base URL

https://api.zenflow.com.ar/api/v1

Authentication

All API requests require authentication via API Key:
curl -X GET "https://api.zenflow.com.ar/api/v1/orders" \
  -H "X-API-Key: zenflow_live_your_key_here"
See Authentication for details.

Response Format

All responses follow a consistent JSON structure:

Success Response

{
  "success": true,
  "data": {
    // Response payload
  }
}

Paginated Response

{
  "success": true,
  "data": {
    "items": [...],
    "pagination": {
      "total": 100,
      "page": 1,
      "limit": 50,
      "total_pages": 2
    }
  }
}

Error Response

{
  "success": false,
  "error": {
    "code": "error_code",
    "message": "Descriptive error message"
  }
}

Available Endpoints

Orders

MethodEndpointDescriptionScope
GET/ordersList ordersread:orders
GET/orders/:idGet order detailsread:orders
POST/ordersCreate order(s)write:orders
PUT/orders/:idUpdate orderwrite:orders
POST/orders/:id/cancelCancel orderwrite:orders
GET/orders/:id/statusGet order statusread:orders

Products

MethodEndpointDescriptionScope
GET/productsList productsread:products
GET/products/:idGet product by IDread:products
GET/products/sku/:skuGet product by SKUread:products
GET/products/barcode/:barcodeGet product by barcoderead:products
POST/productsCreate productwrite:products
PUT/products/:idUpdate productwrite:products
POST/products/bulkBulk upsert productswrite:products
DELETE/products/:idDelete productwrite:products

Stock

MethodEndpointDescriptionScope
GET/stockGet stock levelsread:stock
GET/stock/product/:idGet product stockread:stock
GET/stock/sku/:skuGet stock by SKUread:stock
PUT/stock/product/:idUpdate product stockwrite:stock
POST/stock/bulkBulk update stockwrite:stock
GET/stock/movementsGet stock movementsread:stock
POST/stock/adjustmentCreate adjustmentwrite:stock

Webhooks

MethodEndpointDescriptionScope
GET/webhooks/eventsList available eventsread:webhooks
GET/webhooksList webhooksread:webhooks
GET/webhooks/:idGet webhook detailsread:webhooks
POST/webhooksCreate webhookwrite:webhooks
PUT/webhooks/:idUpdate webhookwrite:webhooks
DELETE/webhooks/:idDelete webhookwrite:webhooks
POST/webhooks/:id/rotate-secretRotate secretwrite:webhooks
POST/webhooks/:id/toggleEnable/disablewrite:webhooks
GET/webhooks/:id/deliveriesGet delivery historyread:webhooks
GET/webhooks/:id/statsGet statisticsread:webhooks
POST/webhooks/:id/testSend test eventwrite:webhooks

Common Parameters

Pagination

Most list endpoints support pagination:
ParameterTypeDefaultDescription
pageinteger1Page number
limitinteger50Items per page (max 100)

Filtering

Many endpoints support filtering via query parameters. See individual endpoint documentation for available filters.

Date Formats

All dates use ISO 8601 format:
  • 2024-01-15 (date only)
  • 2024-01-15T10:30:00Z (with time)

HTTP Status Codes

CodeDescription
200Success
201Created
400Bad Request
401Unauthorized
403Forbidden
404Not Found
409Conflict
429Rate Limited
500Internal Error

Rate Limiting

See Rate Limits for details.