Crear reserva
curl --request POST \
--url https://api.service.getjusto.com/v3/reservations/reservation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"storeId": "123",
"startsAt": "2020-01-01T00:00:00.000Z",
"partySize": 2,
"clientData": {
"email": "juanperez@gmail.com",
"phone": "+573178901234",
"firstName": "Juan",
"lastName": "Perez"
},
"sectorId": "123",
"specialRequests": "Quiero una mesa cerca de la puerta",
"specialOcassion": "birthday",
"tableIds": [
"123"
]
}
'import requests
url = "https://api.service.getjusto.com/v3/reservations/reservation"
payload = {
"storeId": "123",
"startsAt": "2020-01-01T00:00:00.000Z",
"partySize": 2,
"clientData": {
"email": "juanperez@gmail.com",
"phone": "+573178901234",
"firstName": "Juan",
"lastName": "Perez"
},
"sectorId": "123",
"specialRequests": "Quiero una mesa cerca de la puerta",
"specialOcassion": "birthday",
"tableIds": ["123"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
storeId: '123',
startsAt: '2020-01-01T00:00:00.000Z',
partySize: 2,
clientData: {
email: 'juanperez@gmail.com',
phone: '+573178901234',
firstName: 'Juan',
lastName: 'Perez'
},
sectorId: '123',
specialRequests: 'Quiero una mesa cerca de la puerta',
specialOcassion: 'birthday',
tableIds: ['123']
})
};
fetch('https://api.service.getjusto.com/v3/reservations/reservation', 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.service.getjusto.com/v3/reservations/reservation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'storeId' => '123',
'startsAt' => '2020-01-01T00:00:00.000Z',
'partySize' => 2,
'clientData' => [
'email' => 'juanperez@gmail.com',
'phone' => '+573178901234',
'firstName' => 'Juan',
'lastName' => 'Perez'
],
'sectorId' => '123',
'specialRequests' => 'Quiero una mesa cerca de la puerta',
'specialOcassion' => 'birthday',
'tableIds' => [
'123'
]
]),
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.service.getjusto.com/v3/reservations/reservation"
payload := strings.NewReader("{\n \"storeId\": \"123\",\n \"startsAt\": \"2020-01-01T00:00:00.000Z\",\n \"partySize\": 2,\n \"clientData\": {\n \"email\": \"juanperez@gmail.com\",\n \"phone\": \"+573178901234\",\n \"firstName\": \"Juan\",\n \"lastName\": \"Perez\"\n },\n \"sectorId\": \"123\",\n \"specialRequests\": \"Quiero una mesa cerca de la puerta\",\n \"specialOcassion\": \"birthday\",\n \"tableIds\": [\n \"123\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.service.getjusto.com/v3/reservations/reservation")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"storeId\": \"123\",\n \"startsAt\": \"2020-01-01T00:00:00.000Z\",\n \"partySize\": 2,\n \"clientData\": {\n \"email\": \"juanperez@gmail.com\",\n \"phone\": \"+573178901234\",\n \"firstName\": \"Juan\",\n \"lastName\": \"Perez\"\n },\n \"sectorId\": \"123\",\n \"specialRequests\": \"Quiero una mesa cerca de la puerta\",\n \"specialOcassion\": \"birthday\",\n \"tableIds\": [\n \"123\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.service.getjusto.com/v3/reservations/reservation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"storeId\": \"123\",\n \"startsAt\": \"2020-01-01T00:00:00.000Z\",\n \"partySize\": 2,\n \"clientData\": {\n \"email\": \"juanperez@gmail.com\",\n \"phone\": \"+573178901234\",\n \"firstName\": \"Juan\",\n \"lastName\": \"Perez\"\n },\n \"sectorId\": \"123\",\n \"specialRequests\": \"Quiero una mesa cerca de la puerta\",\n \"specialOcassion\": \"birthday\",\n \"tableIds\": [\n \"123\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"_id": "res-abc123def456",
"clientToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
"code": "RES2024-001234",
"createdAt": "2024-01-15T10:30:00.000Z",
"startsAt": "2024-01-15T19:30:00.000Z",
"endsAt": "2024-01-15T21:30:00.000Z",
"completedAt": "2024-01-15T21:45:00.000Z",
"durationMinutes": 120,
"partySize": 4,
"websiteId": "w-restaurant123",
"storeId": "s-downtown-branch",
"countryCode": "US",
"sectorId": "rsec-main-dining",
"tableIds": [
"rtbl-table-12",
"rtbl-table-13"
],
"royaltyClientId": "rty-cli-johndoe123",
"tabId": "tab-active-session-789",
"clientData": {
"email": "john.doe@example.com",
"firstName": "John",
"lastName": "Doe",
"phone": "+1-555-123-4567",
"isOver18": true
},
"userId": "u-existing-user-456",
"specialRequests": "Please prepare a birthday cake. Allergic to nuts.",
"specialOccasion": "birthday",
"cancelledAt": "2024-01-15T16:00:00.000Z",
"cancelReason": "Customer requested to change date",
"modifiedAt": "2024-01-15T11:45:00.000Z",
"confirmedAt": "2024-01-15T11:45:00.000Z",
"cancelledByStoreAt": "2024-01-15T15:30:00.000Z",
"isWaitingList": false,
"waitingListAssignedAt": "2024-01-15T10:45:00.000Z",
"showStatus": "show",
"confirmedByClientAt": "2024-01-15T11:30:00.000Z",
"clientSaidItsLateAt": "2024-01-15T19:15:00.000Z",
"sendReminderAt": "2024-01-15T17:30:00.000Z",
"reminderSentAt": "2024-01-15T17:30:15.000Z",
"source": "website",
"referrer": "api:e2e",
"marketplaceAppId": "marketplace-app-123",
"sourceUserAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"evaluation": {
"createdById": "u-existing-user-456",
"createdByName": "John Doe",
"createdByEmail": "john.doe@example.com",
"evaluation": 5,
"comments": "Excellent service and food quality. Will definitely come back!",
"createdAt": "2024-01-15T22:00:00.000Z"
}
}
}{
"success": "false",
"error": {
"error": "error",
"message": "The request has an error"
}
}Endpoints
Crear reserva
POST
/
reservations
/
reservation
Crear reserva
curl --request POST \
--url https://api.service.getjusto.com/v3/reservations/reservation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"storeId": "123",
"startsAt": "2020-01-01T00:00:00.000Z",
"partySize": 2,
"clientData": {
"email": "juanperez@gmail.com",
"phone": "+573178901234",
"firstName": "Juan",
"lastName": "Perez"
},
"sectorId": "123",
"specialRequests": "Quiero una mesa cerca de la puerta",
"specialOcassion": "birthday",
"tableIds": [
"123"
]
}
'import requests
url = "https://api.service.getjusto.com/v3/reservations/reservation"
payload = {
"storeId": "123",
"startsAt": "2020-01-01T00:00:00.000Z",
"partySize": 2,
"clientData": {
"email": "juanperez@gmail.com",
"phone": "+573178901234",
"firstName": "Juan",
"lastName": "Perez"
},
"sectorId": "123",
"specialRequests": "Quiero una mesa cerca de la puerta",
"specialOcassion": "birthday",
"tableIds": ["123"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
storeId: '123',
startsAt: '2020-01-01T00:00:00.000Z',
partySize: 2,
clientData: {
email: 'juanperez@gmail.com',
phone: '+573178901234',
firstName: 'Juan',
lastName: 'Perez'
},
sectorId: '123',
specialRequests: 'Quiero una mesa cerca de la puerta',
specialOcassion: 'birthday',
tableIds: ['123']
})
};
fetch('https://api.service.getjusto.com/v3/reservations/reservation', 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.service.getjusto.com/v3/reservations/reservation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'storeId' => '123',
'startsAt' => '2020-01-01T00:00:00.000Z',
'partySize' => 2,
'clientData' => [
'email' => 'juanperez@gmail.com',
'phone' => '+573178901234',
'firstName' => 'Juan',
'lastName' => 'Perez'
],
'sectorId' => '123',
'specialRequests' => 'Quiero una mesa cerca de la puerta',
'specialOcassion' => 'birthday',
'tableIds' => [
'123'
]
]),
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.service.getjusto.com/v3/reservations/reservation"
payload := strings.NewReader("{\n \"storeId\": \"123\",\n \"startsAt\": \"2020-01-01T00:00:00.000Z\",\n \"partySize\": 2,\n \"clientData\": {\n \"email\": \"juanperez@gmail.com\",\n \"phone\": \"+573178901234\",\n \"firstName\": \"Juan\",\n \"lastName\": \"Perez\"\n },\n \"sectorId\": \"123\",\n \"specialRequests\": \"Quiero una mesa cerca de la puerta\",\n \"specialOcassion\": \"birthday\",\n \"tableIds\": [\n \"123\"\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.service.getjusto.com/v3/reservations/reservation")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"storeId\": \"123\",\n \"startsAt\": \"2020-01-01T00:00:00.000Z\",\n \"partySize\": 2,\n \"clientData\": {\n \"email\": \"juanperez@gmail.com\",\n \"phone\": \"+573178901234\",\n \"firstName\": \"Juan\",\n \"lastName\": \"Perez\"\n },\n \"sectorId\": \"123\",\n \"specialRequests\": \"Quiero una mesa cerca de la puerta\",\n \"specialOcassion\": \"birthday\",\n \"tableIds\": [\n \"123\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.service.getjusto.com/v3/reservations/reservation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"storeId\": \"123\",\n \"startsAt\": \"2020-01-01T00:00:00.000Z\",\n \"partySize\": 2,\n \"clientData\": {\n \"email\": \"juanperez@gmail.com\",\n \"phone\": \"+573178901234\",\n \"firstName\": \"Juan\",\n \"lastName\": \"Perez\"\n },\n \"sectorId\": \"123\",\n \"specialRequests\": \"Quiero una mesa cerca de la puerta\",\n \"specialOcassion\": \"birthday\",\n \"tableIds\": [\n \"123\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"_id": "res-abc123def456",
"clientToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
"code": "RES2024-001234",
"createdAt": "2024-01-15T10:30:00.000Z",
"startsAt": "2024-01-15T19:30:00.000Z",
"endsAt": "2024-01-15T21:30:00.000Z",
"completedAt": "2024-01-15T21:45:00.000Z",
"durationMinutes": 120,
"partySize": 4,
"websiteId": "w-restaurant123",
"storeId": "s-downtown-branch",
"countryCode": "US",
"sectorId": "rsec-main-dining",
"tableIds": [
"rtbl-table-12",
"rtbl-table-13"
],
"royaltyClientId": "rty-cli-johndoe123",
"tabId": "tab-active-session-789",
"clientData": {
"email": "john.doe@example.com",
"firstName": "John",
"lastName": "Doe",
"phone": "+1-555-123-4567",
"isOver18": true
},
"userId": "u-existing-user-456",
"specialRequests": "Please prepare a birthday cake. Allergic to nuts.",
"specialOccasion": "birthday",
"cancelledAt": "2024-01-15T16:00:00.000Z",
"cancelReason": "Customer requested to change date",
"modifiedAt": "2024-01-15T11:45:00.000Z",
"confirmedAt": "2024-01-15T11:45:00.000Z",
"cancelledByStoreAt": "2024-01-15T15:30:00.000Z",
"isWaitingList": false,
"waitingListAssignedAt": "2024-01-15T10:45:00.000Z",
"showStatus": "show",
"confirmedByClientAt": "2024-01-15T11:30:00.000Z",
"clientSaidItsLateAt": "2024-01-15T19:15:00.000Z",
"sendReminderAt": "2024-01-15T17:30:00.000Z",
"reminderSentAt": "2024-01-15T17:30:15.000Z",
"source": "website",
"referrer": "api:e2e",
"marketplaceAppId": "marketplace-app-123",
"sourceUserAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
"evaluation": {
"createdById": "u-existing-user-456",
"createdByName": "John Doe",
"createdByEmail": "john.doe@example.com",
"evaluation": 5,
"comments": "Excellent service and food quality. Will definitely come back!",
"createdAt": "2024-01-15T22:00:00.000Z"
}
}
}{
"success": "false",
"error": {
"error": "error",
"message": "The request has an error"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Crea una nueva reserva
ID del local
Example:
"123"
Fecha de inicio de la reserva
Example:
"2020-01-01T00:00:00.000Z"
Tamaño de la reserva
Example:
2
Show child attributes
Show child attributes
ID del sector
Example:
"123"
Peticiones especiales
Example:
"Quiero una mesa cerca de la puerta"
¿Es una ocasión especial?
Available options:
birthday, anniversary, date, business, celebration Example:
"birthday"
IDs de las mesas
⌘I