curl --request GET \
--url https://app.fooddelivery.cl/api/v1/orders/{order_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.fooddelivery.cl/api/v1/orders/{order_id}"
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/{order_id}', 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/{order_id}",
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/{order_id}"
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/{order_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.fooddelivery.cl/api/v1/orders/{order_id}")
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{
"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"
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}Obtener un pedido
Detalle completo de un pedido. Un pedido de otro restaurante responde 404 (la API no revela la existencia de datos ajenos).
curl --request GET \
--url https://app.fooddelivery.cl/api/v1/orders/{order_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.fooddelivery.cl/api/v1/orders/{order_id}"
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/{order_id}', 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/{order_id}",
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/{order_id}"
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/{order_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.fooddelivery.cl/api/v1/orders/{order_id}")
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{
"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"
}{
"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).
Path Parameters
Response
Detalle completo del pedido.
Número corto visible para el cliente.
"#0041-150726"
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 delivery, retiro Show child attributes
Show child attributes
Dirección de entrega (solo pedidos delivery).
Show child attributes
Show child attributes
Costo de envío cobrado al cliente, en CLP.
Descuento aplicado (cupones/promociones), en CLP.
Total pagado por el cliente, en CLP.
Show child attributes
Show child attributes
null en pedidos de retiro o sin despacho asociado.
Show child attributes
Show child attributes
Fecha-hora comprometida si es un pedido programado.
