Actualizar local
curl --request PATCH \
--url https://api.getjusto.com/api/v2/stores \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"storeId": "<string>",
"name": "<string>",
"acceptDelivery": true,
"acceptGo": true,
"acceptServe": true,
"externalId": "<string>"
}
'import requests
url = "https://api.getjusto.com/api/v2/stores"
payload = {
"storeId": "<string>",
"name": "<string>",
"acceptDelivery": True,
"acceptGo": True,
"acceptServe": True,
"externalId": "<string>"
}
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({
storeId: '<string>',
name: '<string>',
acceptDelivery: true,
acceptGo: true,
acceptServe: true,
externalId: '<string>'
})
};
fetch('https://api.getjusto.com/api/v2/stores', 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",
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([
'storeId' => '<string>',
'name' => '<string>',
'acceptDelivery' => true,
'acceptGo' => true,
'acceptServe' => true,
'externalId' => '<string>'
]),
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"
payload := strings.NewReader("{\n \"storeId\": \"<string>\",\n \"name\": \"<string>\",\n \"acceptDelivery\": true,\n \"acceptGo\": true,\n \"acceptServe\": true,\n \"externalId\": \"<string>\"\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"storeId\": \"<string>\",\n \"name\": \"<string>\",\n \"acceptDelivery\": true,\n \"acceptGo\": true,\n \"acceptServe\": true,\n \"externalId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getjusto.com/api/v2/stores")
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 \"storeId\": \"<string>\",\n \"name\": \"<string>\",\n \"acceptDelivery\": true,\n \"acceptGo\": true,\n \"acceptServe\": true,\n \"externalId\": \"<string>\"\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
Actualizar la información básica del local
Usa este método para actualizar la información básica del local
PATCH
/
stores
Actualizar local
curl --request PATCH \
--url https://api.getjusto.com/api/v2/stores \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"storeId": "<string>",
"name": "<string>",
"acceptDelivery": true,
"acceptGo": true,
"acceptServe": true,
"externalId": "<string>"
}
'import requests
url = "https://api.getjusto.com/api/v2/stores"
payload = {
"storeId": "<string>",
"name": "<string>",
"acceptDelivery": True,
"acceptGo": True,
"acceptServe": True,
"externalId": "<string>"
}
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({
storeId: '<string>',
name: '<string>',
acceptDelivery: true,
acceptGo: true,
acceptServe: true,
externalId: '<string>'
})
};
fetch('https://api.getjusto.com/api/v2/stores', 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",
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([
'storeId' => '<string>',
'name' => '<string>',
'acceptDelivery' => true,
'acceptGo' => true,
'acceptServe' => true,
'externalId' => '<string>'
]),
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"
payload := strings.NewReader("{\n \"storeId\": \"<string>\",\n \"name\": \"<string>\",\n \"acceptDelivery\": true,\n \"acceptGo\": true,\n \"acceptServe\": true,\n \"externalId\": \"<string>\"\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"storeId\": \"<string>\",\n \"name\": \"<string>\",\n \"acceptDelivery\": true,\n \"acceptGo\": true,\n \"acceptServe\": true,\n \"externalId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getjusto.com/api/v2/stores")
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 \"storeId\": \"<string>\",\n \"name\": \"<string>\",\n \"acceptDelivery\": true,\n \"acceptGo\": true,\n \"acceptServe\": true,\n \"externalId\": \"<string>\"\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 facilita la actualización de la información esencial de un local. Resulta especialmente útil para modificar detalles específicos de una tienda.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
⌘I