curl --request PATCH \
--url https://api.service.getjusto.com/v3/tabs/{storeId}/tabs/{tabId}/items/{tabItemId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"quantity": 1,
"message": "Pidieron una sola"
}
'import requests
url = "https://api.service.getjusto.com/v3/tabs/{storeId}/tabs/{tabId}/items/{tabItemId}"
payload = {
"quantity": 1,
"message": "Pidieron una sola"
}
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({quantity: 1, message: 'Pidieron una sola'})
};
fetch('https://api.service.getjusto.com/v3/tabs/{storeId}/tabs/{tabId}/items/{tabItemId}', 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/tabs/{storeId}/tabs/{tabId}/items/{tabItemId}",
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([
'quantity' => 1,
'message' => 'Pidieron una sola'
]),
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/tabs/{storeId}/tabs/{tabId}/items/{tabItemId}"
payload := strings.NewReader("{\n \"quantity\": 1,\n \"message\": \"Pidieron una sola\"\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.service.getjusto.com/v3/tabs/{storeId}/tabs/{tabId}/items/{tabItemId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quantity\": 1,\n \"message\": \"Pidieron una sola\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.service.getjusto.com/v3/tabs/{storeId}/tabs/{tabId}/items/{tabItemId}")
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 \"quantity\": 1,\n \"message\": \"Pidieron una sola\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"_id": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
"code": "CJXEQZK",
"description": "Justo C#16699-02",
"comments": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"websiteId": "ErCkmcyCEovseJq5E",
"storeId": "Li4eEa3W2hiuGGCFa",
"shiftId": "tsft-b6fda21f-b638-428b-a785-849fdbe3fe0b",
"tabCounter": 1,
"createdById": "a3W2hiuGGLi4eECFa",
"operatorUserId": "a3W2hiuGGLi4eECFa",
"driverUserId": "a3W2hiuGGLi4eECFa",
"createdAtDeviceId": "W2hiuGGLa3W2hW2hiuGGLiuGGLWW2hiuGGL2hiuGGLW2hiuGGLi4eECFa",
"countryCode": "CL",
"createdAt": "2020-01-01T00:00:00.000Z",
"closedAt": "2020-01-01T00:00:00.000Z",
"deletedAt": "2020-01-01T00:00:00.000Z",
"cancelledAt": "2020-01-01T00:00:00.000Z",
"cancellationPrompt": "El pedido fue cancelado por el cliente.",
"tableIds": [
"<string>"
],
"tableNames": [
"<string>"
],
"sectorIds": [
"<string>"
],
"reservationId": "<string>",
"paymentStatus": "pending",
"statusLabel": "<string>",
"statusLabelForClient": "<string>",
"totalPrice": 123,
"totalNetPrice": 123,
"totalTaxPrice": 123,
"totalPriceBeforeDiscounts": 123,
"discountsAmount": 123,
"amountPaid": 123,
"amountDue": 123,
"tipAmountPaid": 123,
"netTipAmountPaid": 123,
"taxTipAmountPaid": 123,
"mustBeReadyAt": "2020-01-01T00:00:00.000Z",
"mustBeDeliveredAt": "2020-01-01T00:00:00.000Z",
"readyToPickupAt": "2020-01-01T00:00:00.000Z",
"activatesAt": "2020-01-01T00:00:00.000Z",
"source": "pos",
"salesChannelConfigId": "<string>",
"channelName": "<string>",
"clientData": {
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"addressLine1": "<string>",
"addressLine2": "<string>",
"addressExtra": "<string>"
},
"integrationClientId": "<string>",
"deliveryType": "delivery",
"hasExternalDeliveryProvider": true,
"generateInvoiceAtClose": true,
"integrationOrderId": "<string>",
"integrationIsPending": true,
"integrationComments": [
"<string>"
],
"eaterLabels": [
"<string>"
],
"externalInvoiceId": "<string>",
"payments": [
{
"_id": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
"code": "CJXEQZK",
"shiftId": "Li4eEa3W2hiuGGCFa",
"paymentMethodId": "a3W2hiuGGLi4eECFa",
"paymentMethodName": "Efectivo",
"amount": 100,
"tipAmount": 10,
"createdAt": "2020-01-01T00:00:00.000Z",
"voidedAt": "2020-01-01T00:00:00.000Z",
"shiftEndedAt": "2020-01-01T00:00:00.000Z",
"createdById": "a3W2hiuGGLi4eECFa",
"shouldMakeInvoice": true,
"payerName": "John Doe",
"payerUserId": "a3W2hiuGGLi4eECFa"
}
],
"invoices": [
{
"_id": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
"providerId": "openFactura",
"storeId": "sto-4c48bf33-1411-4c3f-adac-db39b4631cb8",
"tabId": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
"inventorySaleId": "isale-4c48bf33-1411-4c3f-adac-db39b4631cb8",
"createdAt": "2020-01-01T00:00:00.000Z",
"generatedAt": "2020-01-01T00:00:00.000Z",
"status": "pending",
"externalInvoiceId": "123456",
"externalVoidInvoiceId": "654321",
"errorMessage": "Error al generar la factura.",
"voidedAt": "2020-01-01T00:00:00.000Z",
"statusLabel": "Pendiente",
"invoiceURL": "https://getjusto.com/invoice/123456",
"totalAmount": 100,
"taxAmount": 10,
"netAmount": 90
}
],
"discounts": [
{
"_id": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
"shiftId": "Li4eEa3W2hiuGGCFa",
"createdAt": "2020-01-01T00:00:00.000Z",
"voidedAt": "2020-01-01T00:00:00.000Z",
"discountedAmount": 100,
"discountMethodId": "a3W2hiuGGLi4eECFa",
"discountMethodName": "Cupón",
"type": "fixedAmount",
"fixedAmount": 100,
"percentage": 0.1
}
],
"items": [
{
"_id": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
"createdAt": "2020-01-01T00:00:00.000Z",
"amount": 2,
"price": 100,
"priceWithModifiers": 120,
"unitPrice": 50,
"productId": "a3W2hiuGGLi4eECFa",
"productName": "Café",
"productInternalName": "Café",
"productUnitItemsCount": 1,
"comment": "Sin azúcar",
"type": "product",
"sentToKDSAt": "2020-01-01T00:00:00.000Z",
"addedByClientUserId": "a3W2hiuGGLi4eECFa",
"addedByClientName": "Juan",
"addedByUserId": "a3W2hiuGGLi4eECFa",
"addedByUserName": "Juan",
"eaterLabels": [
"<string>"
],
"modifiers": [
{
"_id": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
"modifierGroupId": "Li4eEa3W2hiuGGCFa",
"modifierId": "a3W2hiuGGLi4eECFa",
"amount": 2,
"modifierQuantity": 1,
"price": 100,
"unitPrice": 50,
"modifierName": "Azúcar",
"modifierInternalName": "Azúcar",
"modifierGroupName": "Azúcar",
"modifierUnitItemsCount": 1,
"modifierUnitWeight": 100
}
],
"unitProductWeight": 100,
"totalWeight": 100
}
]
}
}{
"success": "false",
"error": {
"error": "error",
"message": "The request has an error"
}
}Editar producto de la cuenta
Cambia la cantidad o el comentario de un producto de una cuenta abierta. Si baja la cantidad de un producto ya enviado a cocina, se registra la baja con su motivo y se imprime en cocina.
curl --request PATCH \
--url https://api.service.getjusto.com/v3/tabs/{storeId}/tabs/{tabId}/items/{tabItemId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"quantity": 1,
"message": "Pidieron una sola"
}
'import requests
url = "https://api.service.getjusto.com/v3/tabs/{storeId}/tabs/{tabId}/items/{tabItemId}"
payload = {
"quantity": 1,
"message": "Pidieron una sola"
}
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({quantity: 1, message: 'Pidieron una sola'})
};
fetch('https://api.service.getjusto.com/v3/tabs/{storeId}/tabs/{tabId}/items/{tabItemId}', 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/tabs/{storeId}/tabs/{tabId}/items/{tabItemId}",
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([
'quantity' => 1,
'message' => 'Pidieron una sola'
]),
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/tabs/{storeId}/tabs/{tabId}/items/{tabItemId}"
payload := strings.NewReader("{\n \"quantity\": 1,\n \"message\": \"Pidieron una sola\"\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.service.getjusto.com/v3/tabs/{storeId}/tabs/{tabId}/items/{tabItemId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quantity\": 1,\n \"message\": \"Pidieron una sola\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.service.getjusto.com/v3/tabs/{storeId}/tabs/{tabId}/items/{tabItemId}")
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 \"quantity\": 1,\n \"message\": \"Pidieron una sola\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"_id": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
"code": "CJXEQZK",
"description": "Justo C#16699-02",
"comments": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"websiteId": "ErCkmcyCEovseJq5E",
"storeId": "Li4eEa3W2hiuGGCFa",
"shiftId": "tsft-b6fda21f-b638-428b-a785-849fdbe3fe0b",
"tabCounter": 1,
"createdById": "a3W2hiuGGLi4eECFa",
"operatorUserId": "a3W2hiuGGLi4eECFa",
"driverUserId": "a3W2hiuGGLi4eECFa",
"createdAtDeviceId": "W2hiuGGLa3W2hW2hiuGGLiuGGLWW2hiuGGL2hiuGGLW2hiuGGLi4eECFa",
"countryCode": "CL",
"createdAt": "2020-01-01T00:00:00.000Z",
"closedAt": "2020-01-01T00:00:00.000Z",
"deletedAt": "2020-01-01T00:00:00.000Z",
"cancelledAt": "2020-01-01T00:00:00.000Z",
"cancellationPrompt": "El pedido fue cancelado por el cliente.",
"tableIds": [
"<string>"
],
"tableNames": [
"<string>"
],
"sectorIds": [
"<string>"
],
"reservationId": "<string>",
"paymentStatus": "pending",
"statusLabel": "<string>",
"statusLabelForClient": "<string>",
"totalPrice": 123,
"totalNetPrice": 123,
"totalTaxPrice": 123,
"totalPriceBeforeDiscounts": 123,
"discountsAmount": 123,
"amountPaid": 123,
"amountDue": 123,
"tipAmountPaid": 123,
"netTipAmountPaid": 123,
"taxTipAmountPaid": 123,
"mustBeReadyAt": "2020-01-01T00:00:00.000Z",
"mustBeDeliveredAt": "2020-01-01T00:00:00.000Z",
"readyToPickupAt": "2020-01-01T00:00:00.000Z",
"activatesAt": "2020-01-01T00:00:00.000Z",
"source": "pos",
"salesChannelConfigId": "<string>",
"channelName": "<string>",
"clientData": {
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"addressLine1": "<string>",
"addressLine2": "<string>",
"addressExtra": "<string>"
},
"integrationClientId": "<string>",
"deliveryType": "delivery",
"hasExternalDeliveryProvider": true,
"generateInvoiceAtClose": true,
"integrationOrderId": "<string>",
"integrationIsPending": true,
"integrationComments": [
"<string>"
],
"eaterLabels": [
"<string>"
],
"externalInvoiceId": "<string>",
"payments": [
{
"_id": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
"code": "CJXEQZK",
"shiftId": "Li4eEa3W2hiuGGCFa",
"paymentMethodId": "a3W2hiuGGLi4eECFa",
"paymentMethodName": "Efectivo",
"amount": 100,
"tipAmount": 10,
"createdAt": "2020-01-01T00:00:00.000Z",
"voidedAt": "2020-01-01T00:00:00.000Z",
"shiftEndedAt": "2020-01-01T00:00:00.000Z",
"createdById": "a3W2hiuGGLi4eECFa",
"shouldMakeInvoice": true,
"payerName": "John Doe",
"payerUserId": "a3W2hiuGGLi4eECFa"
}
],
"invoices": [
{
"_id": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
"providerId": "openFactura",
"storeId": "sto-4c48bf33-1411-4c3f-adac-db39b4631cb8",
"tabId": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
"inventorySaleId": "isale-4c48bf33-1411-4c3f-adac-db39b4631cb8",
"createdAt": "2020-01-01T00:00:00.000Z",
"generatedAt": "2020-01-01T00:00:00.000Z",
"status": "pending",
"externalInvoiceId": "123456",
"externalVoidInvoiceId": "654321",
"errorMessage": "Error al generar la factura.",
"voidedAt": "2020-01-01T00:00:00.000Z",
"statusLabel": "Pendiente",
"invoiceURL": "https://getjusto.com/invoice/123456",
"totalAmount": 100,
"taxAmount": 10,
"netAmount": 90
}
],
"discounts": [
{
"_id": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
"shiftId": "Li4eEa3W2hiuGGCFa",
"createdAt": "2020-01-01T00:00:00.000Z",
"voidedAt": "2020-01-01T00:00:00.000Z",
"discountedAmount": 100,
"discountMethodId": "a3W2hiuGGLi4eECFa",
"discountMethodName": "Cupón",
"type": "fixedAmount",
"fixedAmount": 100,
"percentage": 0.1
}
],
"items": [
{
"_id": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
"createdAt": "2020-01-01T00:00:00.000Z",
"amount": 2,
"price": 100,
"priceWithModifiers": 120,
"unitPrice": 50,
"productId": "a3W2hiuGGLi4eECFa",
"productName": "Café",
"productInternalName": "Café",
"productUnitItemsCount": 1,
"comment": "Sin azúcar",
"type": "product",
"sentToKDSAt": "2020-01-01T00:00:00.000Z",
"addedByClientUserId": "a3W2hiuGGLi4eECFa",
"addedByClientName": "Juan",
"addedByUserId": "a3W2hiuGGLi4eECFa",
"addedByUserName": "Juan",
"eaterLabels": [
"<string>"
],
"modifiers": [
{
"_id": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
"modifierGroupId": "Li4eEa3W2hiuGGCFa",
"modifierId": "a3W2hiuGGLi4eECFa",
"amount": 2,
"modifierQuantity": 1,
"price": 100,
"unitPrice": 50,
"modifierName": "Azúcar",
"modifierInternalName": "Azúcar",
"modifierGroupName": "Azúcar",
"modifierUnitItemsCount": 1,
"modifierUnitWeight": 100
}
],
"unitProductWeight": 100,
"totalWeight": 100
}
]
}
}{
"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.
Path Parameters
ID Justo del local.
ID de la cuenta (_id en GET /tabs/{storeId}/tabs).
ID del producto en la cuenta (items[]._id), no el productId.
Body
Cambios al producto de la cuenta. Envía quantity, comment o ambos. Las opciones no cambian: para cambiarlas, quita el producto y agrégalo de nuevo.
Nueva cantidad total de la línea. Para quitarla entera usa DELETE. Solo se puede aumentar en productos que aún no se envían a cocina; si el precio del menú cambió, las unidades nuevas quedan en otra línea con el precio actual.
Nuevo comentario para cocina. Vacío lo borra.
Motivo, si la cantidad baja en un producto ya enviado a cocina. Queda en el historial de la cuenta.
Motivo de la marca para esa baja, de GET /tabs/{storeId}/item-deletion-categories.
Si la cantidad baja en un producto ya enviado a cocina, true devuelve los ingredientes de esas unidades al inventario. Por defecto false.