Consultar pedidos (polling)
curl --request GET \
--url https://api.automationhub.one/api:07fkGLk_/v1/orders \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.automationhub.one/api:07fkGLk_/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.automationhub.one/api:07fkGLk_/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.automationhub.one/api:07fkGLk_/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.automationhub.one/api:07fkGLk_/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.automationhub.one/api:07fkGLk_/v1/orders")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.automationhub.one/api:07fkGLk_/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{
"orders": [
{
"order_id": 123,
"created_at": 123,
"created_at_iso": "<string>",
"status": "<string>",
"delivery_type": "pick_up",
"delivery_address": "<string>",
"domicilio": {
"calle": "<string>",
"numero": "<string>",
"piso_depto": "<string>",
"localidad": "<string>",
"referencia": "<string>"
},
"cliente": {
"nombre": "<string>",
"telefono": "<string>",
"telefono_pais": "<string>",
"telefono_area": "<string>",
"telefono_numero": "<string>"
},
"pago": {
"modo": "en_entrega",
"pagado": true,
"monto": 123
},
"costo_envio": 123,
"total": 123,
"lineas": [
{
"codigo": "<string>",
"nombre": "<string>",
"cantidad": 123,
"precio_unitario": 123,
"subtotal": 123,
"opciones": [
{
"codigo": "<string>",
"nombre": "<string>",
"precio_adicional": 123
}
]
}
]
}
],
"page": 123,
"per_page": 123,
"total": 123,
"has_more": true
}{
"code": "ERROR_CODE_ACCESS_DENIED",
"message": "Invalid API key.",
"payload": ""
}API Reference
Consultar pedidos (polling)
Pedidos de la sucursal de la key, por estado. Pensado para polling cada 1-2
minutos con status=pendiente. Las líneas vienen con tus códigos
(los del catálogo que empujaste), congelados al momento del pedido.
GET
/
v1
/
orders
Consultar pedidos (polling)
curl --request GET \
--url https://api.automationhub.one/api:07fkGLk_/v1/orders \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.automationhub.one/api:07fkGLk_/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.automationhub.one/api:07fkGLk_/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.automationhub.one/api:07fkGLk_/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.automationhub.one/api:07fkGLk_/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.automationhub.one/api:07fkGLk_/v1/orders")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.automationhub.one/api:07fkGLk_/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{
"orders": [
{
"order_id": 123,
"created_at": 123,
"created_at_iso": "<string>",
"status": "<string>",
"delivery_type": "pick_up",
"delivery_address": "<string>",
"domicilio": {
"calle": "<string>",
"numero": "<string>",
"piso_depto": "<string>",
"localidad": "<string>",
"referencia": "<string>"
},
"cliente": {
"nombre": "<string>",
"telefono": "<string>",
"telefono_pais": "<string>",
"telefono_area": "<string>",
"telefono_numero": "<string>"
},
"pago": {
"modo": "en_entrega",
"pagado": true,
"monto": 123
},
"costo_envio": 123,
"total": 123,
"lineas": [
{
"codigo": "<string>",
"nombre": "<string>",
"cantidad": 123,
"precio_unitario": 123,
"subtotal": 123,
"opciones": [
{
"codigo": "<string>",
"nombre": "<string>",
"precio_adicional": 123
}
]
}
]
}
],
"page": 123,
"per_page": 123,
"total": 123,
"has_more": true
}{
"code": "ERROR_CODE_ACCESS_DENIED",
"message": "Invalid API key.",
"payload": ""
}Authorizations
Key por sucursal provista por Xenda (formato xnd_...).
Query Parameters
Available options:
pendiente, en_preparacion, listo, asignado, en_camino, entregado, rechazado, cancelado Solo pedidos creados después de este timestamp (ISO 8601).
Response
Página de pedidos (20 por página, más viejos primero).
Show child attributes
Show child attributes
Cantidad total de pedidos en ese estado (no solo los de esta página).
Si es mayor que per_page, hay más para traer.
true si queda al menos una página más. Pedila con page=2, page=3, etc.
Los pedidos vienen del más viejo al más nuevo, así que la página 1 siempre
trae los más urgentes.

