Cerrar la sucursal ahora
curl --request POST \
--url https://app.fooddelivery.cl/api/v1/locations/{location_id}/close \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.fooddelivery.cl/api/v1/locations/{location_id}/close"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.fooddelivery.cl/api/v1/locations/{location_id}/close', 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/locations/{location_id}/close",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/locations/{location_id}/close"
req, _ := http.NewRequest("POST", 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.post("https://app.fooddelivery.cl/api/v1/locations/{location_id}/close")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.fooddelivery.cl/api/v1/locations/{location_id}/close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"address": "<string>",
"is_active": true,
"open_now": true,
"reason": "caja_abierta",
"next_opening_at": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}Locales
Cerrar la sucursal ahora
Requiere permiso de escritura. En register_mode manual cierra la caja abierta (idempotente). En schedule registra una excepción de día cerrado para HOY (“Cerrado vía API”) que la tienda online respeta de inmediato; mañana vuelve a regir el horario semanal. Con llave sandbox la respuesta es idéntica pero no cambia el estado real ("simulated": true).
POST
/
locations
/
{location_id}
/
close
Cerrar la sucursal ahora
curl --request POST \
--url https://app.fooddelivery.cl/api/v1/locations/{location_id}/close \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.fooddelivery.cl/api/v1/locations/{location_id}/close"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.fooddelivery.cl/api/v1/locations/{location_id}/close', 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/locations/{location_id}/close",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/locations/{location_id}/close"
req, _ := http.NewRequest("POST", 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.post("https://app.fooddelivery.cl/api/v1/locations/{location_id}/close")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.fooddelivery.cl/api/v1/locations/{location_id}/close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"address": "<string>",
"is_active": true,
"open_now": true,
"reason": "caja_abierta",
"next_opening_at": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<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).
Path Parameters
Response
Estado resultante de la sucursal.
false = sucursal desactivada en el panel.
Available options:
caja_abierta, caja_cerrada, dentro_del_horario, fuera_del_horario, sucursal_desactivada Próxima apertura según horario (solo si está cerrada).
