Cierre temporal del local
curl --request PATCH \
--url https://api.getjusto.com/api/v2/stores/{id}/temporaryCloseStore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"closedUntilDate": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.getjusto.com/api/v2/stores/{id}/temporaryCloseStore"
payload = { "closedUntilDate": "2023-11-07T05:31:56Z" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({closedUntilDate: '2023-11-07T05:31:56Z'})
};
fetch('https://api.getjusto.com/api/v2/stores/{id}/temporaryCloseStore', 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.getjusto.com/api/v2/stores/{id}/temporaryCloseStore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'closedUntilDate' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getjusto.com/api/v2/stores/{id}/temporaryCloseStore"
payload := strings.NewReader("{\n \"closedUntilDate\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.getjusto.com/api/v2/stores/{id}/temporaryCloseStore")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"closedUntilDate\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getjusto.com/api/v2/stores/{id}/temporaryCloseStore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"closedUntilDate\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"data": {
"_id": "xKoiiqdtKGaRA2ve4",
"externalId": 2345,
"websiteId": "ErCkmcyCEovseJq5E",
"name": "Peña",
"acceptDelivery": true,
"acceptServe": true,
"acceptGo": true,
"currentPreparationDuration": 10,
"phone": "null",
"address": {
"placeId": "EihBdmVuaWRhIEhvbGFuZGEgMTYwNSwgUHJvdmlkZW5jaWEsIENoaWxlIjESLwoUChIJCfBr63TPYpYRguPJ8LiSNSgQxQwqFAoSCbELmxJ1z2KWEdvDHqTQ",
"address": "Avenida Holanda 1605",
"addressLine2": 1234,
"addressSecondary": "Providencia, Chile",
"comment": "Dejar con el conserje",
"location": {
"lat": -33.4334297,
"lng": -70.59966380000002
}
},
"schedule": {
"closedUntilDate": "null",
"closedDays": [
"2023-11-07T05:31:56Z"
],
"availableAtPeriods": false,
"openPeriods": [
{
"daysOfWeek": [
1,
2,
3,
4,
5,
6,
7
],
"fromMinute": 480,
"toMinute": 1200
}
],
"timezone": "America/Santiago"
}
}
}{
"status": "error",
"error": "Error en la petición"
}{
"status": "error",
"error": "Unauthorized"
}Locales
Cierre temporal del local
Usa este método para cerrar temporalmente un local
PATCH
/
stores
/
{id}
/
temporaryCloseStore
Cierre temporal del local
curl --request PATCH \
--url https://api.getjusto.com/api/v2/stores/{id}/temporaryCloseStore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"closedUntilDate": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.getjusto.com/api/v2/stores/{id}/temporaryCloseStore"
payload = { "closedUntilDate": "2023-11-07T05:31:56Z" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({closedUntilDate: '2023-11-07T05:31:56Z'})
};
fetch('https://api.getjusto.com/api/v2/stores/{id}/temporaryCloseStore', 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.getjusto.com/api/v2/stores/{id}/temporaryCloseStore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'closedUntilDate' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getjusto.com/api/v2/stores/{id}/temporaryCloseStore"
payload := strings.NewReader("{\n \"closedUntilDate\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.getjusto.com/api/v2/stores/{id}/temporaryCloseStore")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"closedUntilDate\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getjusto.com/api/v2/stores/{id}/temporaryCloseStore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"closedUntilDate\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"data": {
"_id": "xKoiiqdtKGaRA2ve4",
"externalId": 2345,
"websiteId": "ErCkmcyCEovseJq5E",
"name": "Peña",
"acceptDelivery": true,
"acceptServe": true,
"acceptGo": true,
"currentPreparationDuration": 10,
"phone": "null",
"address": {
"placeId": "EihBdmVuaWRhIEhvbGFuZGEgMTYwNSwgUHJvdmlkZW5jaWEsIENoaWxlIjESLwoUChIJCfBr63TPYpYRguPJ8LiSNSgQxQwqFAoSCbELmxJ1z2KWEdvDHqTQ",
"address": "Avenida Holanda 1605",
"addressLine2": 1234,
"addressSecondary": "Providencia, Chile",
"comment": "Dejar con el conserje",
"location": {
"lat": -33.4334297,
"lng": -70.59966380000002
}
},
"schedule": {
"closedUntilDate": "null",
"closedDays": [
"2023-11-07T05:31:56Z"
],
"availableAtPeriods": false,
"openPeriods": [
{
"daysOfWeek": [
1,
2,
3,
4,
5,
6,
7
],
"fromMinute": 480,
"toMinute": 1200
}
],
"timezone": "America/Santiago"
}
}
}{
"status": "error",
"error": "Error en la petición"
}{
"status": "error",
"error": "Unauthorized"
}Descripción
Este método permite gestionar el cierre temporal de una tienda o local. Resulta esencial para gestionar el período activo del local y prevenir que los clientes realicen pedidos cuando el local no se encuentra operativo. Asimismo, posibilita la cancelación de un cierre temporal que se encontraba programado.Authorizations
Body
application/json