Listar Pedidos
curl --request GET \
--url https://api.zenflow.com.ar/api/v1/orders \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.zenflow.com.ar/api/v1/orders"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.zenflow.com.ar/api/v1/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zenflow.com.ar/api/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zenflow.com.ar/api/v1/orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.zenflow.com.ar/api/v1/orders")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zenflow.com.ar/api/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"orders": [
{}
],
"pagination": {
"total": 123,
"page": 123,
"limit": 123,
"total_pages": 123
}
}
}Pedidos
Listar Pedidos
Obtener una lista paginada de pedidos con filtros opcionales
GET
/
api
/
v1
/
orders
Listar Pedidos
curl --request GET \
--url https://api.zenflow.com.ar/api/v1/orders \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.zenflow.com.ar/api/v1/orders"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.zenflow.com.ar/api/v1/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zenflow.com.ar/api/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zenflow.com.ar/api/v1/orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.zenflow.com.ar/api/v1/orders")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zenflow.com.ar/api/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"orders": [
{}
],
"pagination": {
"total": 123,
"page": 123,
"limit": 123,
"total_pages": 123
}
}
}Listar Pedidos
Obtén una lista de pedidos de tu tenant con filtrado y paginación opcionales.Requiere scope
read:orders.Solicitud
GET /api/v1/orders
Parámetros de Consulta
integer
default:"1"
Número de página para paginación
integer
default:"50"
Número de pedidos por página (máx 100)
integer | integer[]
Filtrar por ID(s) de estado del pedido
string
Filtrar pedidos creados en o después de esta fecha (YYYY-MM-DD)
string
Filtrar pedidos creados en o antes de esta fecha (YYYY-MM-DD)
string
Filtrar por fecha de ensamblaje/envío (YYYY-MM-DD)
boolean
default:"false"
Incluir líneas de pedido en la respuesta
Respuesta
boolean
Si la solicitud fue exitosa
object
Ejemplos
Solicitud Básica
curl -X GET "https://api.zenflow.com.ar/api/v1/orders?page=1&limit=20" \
-H "X-API-Key: zenflow_live_your_key"
const response = await fetch(
"https://api.zenflow.com.ar/api/v1/orders?page=1&limit=20",
{
headers: {
"X-API-Key": "zenflow_live_your_key",
},
}
);
const data = await response.json();
import requests
response = requests.get(
'https://api.zenflow.com.ar/api/v1/orders',
params={'page': 1, 'limit': 20},
headers={'X-API-Key': 'zenflow_live_your_key'}
)
data = response.json()
Respuesta
{
"success": true,
"data": {
"orders": [
{
"id": 12345,
"order_tenant_id": "ORD-001",
"state_id": 1,
"state_name": "Pending",
"assembly_date": "2024-01-15",
"customer_name": "Juan Pérez",
"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": "María García",
"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
}
}
}
Con Filtros
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"
Respuestas de Error
401 No Autorizado
{
"success": false,
"error": {
"code": "invalid_api_key",
"message": "La API key proporcionada es inválida"
}
}
403 Prohibido
{
"success": false,
"error": {
"code": "insufficient_scope",
"message": "Esta API key no tiene el scope requerido: read:orders"
}
}
⌘I

