Quickstart
This guide will help you make your first API call to ZenFlow in under 5 minutes.
Step 1: Get Your API Key
- Log in to your ZenFlow Dashboard
- Navigate to Settings > API Keys
- Click Create API Key
- Give your key a name and select the required scopes
- Copy and securely store your API key
Your API key secret is only shown once. Store it securely - you won’t be able
to see it again.
Step 2: Make Your First Request
Let’s retrieve your orders to make sure everything is working:
curl -X GET "https://api.zenflow.com.ar/api/v1/orders" \
-H "X-API-Key: zenflow_live_your_api_key_here" \
-H "Content-Type: application/json"
You should receive a response like:
{
"success": true,
"data": {
"orders": [],
"pagination": {
"total": 0,
"page": 1,
"limit": 50,
"total_pages": 0
}
}
}
Step 3: Create Your First Order
Now let’s create an order:
curl -X POST "https://api.zenflow.com.ar/api/v1/orders" \
-H "X-API-Key: zenflow_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"order_tenant_id": "ORD-001",
"assembly_date": "2024-01-15",
"order_detail": [
{
"barcode": "7891234567890",
"quantity": 2
}
]
}'
Step 4: Set Up Webhooks (Optional)
To receive real-time notifications when orders are updated, set up a webhook:
curl -X POST "https://api.zenflow.com.ar/api/v1/webhooks" \
-H "X-API-Key: zenflow_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Order Updates",
"url": "https://your-server.com/webhooks/zenflow",
"events": ["order.created", "order.updated", "order.completed"]
}'
Make sure to store the webhook secret returned in the response - you’ll need
it to verify webhook signatures.
Next Steps