curl --request GET \
--url https://app.fooddelivery.cl/api/v1/orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.fooddelivery.cl/api/v1/orders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.fooddelivery.cl/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://app.fooddelivery.cl/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 => [
"Authorization: Bearer <token>"
],
]);
$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://app.fooddelivery.cl/api/v1/orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.fooddelivery.cl/api/v1/orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.fooddelivery.cl/api/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "#0041-150726",
"status": "pendiente_pago",
"type": "delivery",
"location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer": {
"name": "<string>",
"phone": "<string>",
"email": "<string>"
},
"address": "<string>",
"items": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"quantity": 123,
"unit_price": 123,
"notes": "<string>",
"modifiers": [
{
"group": "<string>",
"name": "<string>",
"price": 123
}
]
}
],
"subtotal": 123,
"shipping_fee": 123,
"discount": 123,
"total": 123,
"payment": {
"method": "<string>",
"paid": true
},
"delivery": {
"provider": "uber",
"status": "<string>",
"tracking_url": "<string>"
},
"scheduled_for": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
],
"has_more": true,
"next_cursor": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}Listar pedidos
Devuelve los pedidos del restaurante ordenados del más reciente al más antiguo, con paginación por cursor: mientras has_more sea true, repite la llamada pasando cursor=next_cursor. Cada llave ve su mundo: una llave sandbox solo devuelve pedidos de prueba y una de producción solo pedidos reales.
curl --request GET \
--url https://app.fooddelivery.cl/api/v1/orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.fooddelivery.cl/api/v1/orders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.fooddelivery.cl/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://app.fooddelivery.cl/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 => [
"Authorization: Bearer <token>"
],
]);
$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://app.fooddelivery.cl/api/v1/orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.fooddelivery.cl/api/v1/orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.fooddelivery.cl/api/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": "#0041-150726",
"status": "pendiente_pago",
"type": "delivery",
"location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer": {
"name": "<string>",
"phone": "<string>",
"email": "<string>"
},
"address": "<string>",
"items": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"quantity": 123,
"unit_price": 123,
"notes": "<string>",
"modifiers": [
{
"group": "<string>",
"name": "<string>",
"price": 123
}
]
}
],
"subtotal": 123,
"shipping_fee": 123,
"discount": 123,
"total": 123,
"payment": {
"method": "<string>",
"paid": true
},
"delivery": {
"provider": "uber",
"status": "<string>",
"tracking_url": "<string>"
},
"scheduled_for": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
],
"has_more": true,
"next_cursor": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}Authorizations
API key del restaurante, generada en el panel de administración (Integraciones → API pública): fd_live_... para producción o fd_test_... para sandbox (modo prueba sobre el mismo restaurante).
Query Parameters
Filtra por estado del pedido.
pendiente_pago = esperando el pago online; programado = pagado pero retenido hasta su fecha-hora (pedidos programados); el resto es el flujo de cocina y despacho.
pendiente_pago, programado, recibido, en_preparacion, listo, en_reparto, entregado, cancelado Filtra por sucursal.
Solo pedidos creados desde esta fecha-hora (inclusive).
Solo pedidos creados hasta esta fecha-hora (exclusive).
1 <= x <= 100Cursor de la página anterior (next_cursor).
