Open cash register
curl --request POST \
--url https://api.service.getjusto.com/v3/tabs/{storeId}/cash-registers/{cashRegisterId}/open \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"startBalances": [
{
"paymentMethodId": "tpm-4c48bf33",
"balance": 50000
}
]
}
'import requests
url = "https://api.service.getjusto.com/v3/tabs/{storeId}/cash-registers/{cashRegisterId}/open"
payload = { "startBalances": [
{
"paymentMethodId": "tpm-4c48bf33",
"balance": 50000
}
] }
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({startBalances: [{paymentMethodId: 'tpm-4c48bf33', balance: 50000}]})
};
fetch('https://api.service.getjusto.com/v3/tabs/{storeId}/cash-registers/{cashRegisterId}/open', 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}/cash-registers/{cashRegisterId}/open",
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([
'startBalances' => [
[
'paymentMethodId' => 'tpm-4c48bf33',
'balance' => 50000
]
]
]),
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}/cash-registers/{cashRegisterId}/open"
payload := strings.NewReader("{\n \"startBalances\": [\n {\n \"paymentMethodId\": \"tpm-4c48bf33\",\n \"balance\": 50000\n }\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/tabs/{storeId}/cash-registers/{cashRegisterId}/open")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"startBalances\": [\n {\n \"paymentMethodId\": \"tpm-4c48bf33\",\n \"balance\": 50000\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.service.getjusto.com/v3/tabs/{storeId}/cash-registers/{cashRegisterId}/open")
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 \"startBalances\": [\n {\n \"paymentMethodId\": \"tpm-4c48bf33\",\n \"balance\": 50000\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"_id": "<string>",
"name": "<string>",
"isDefault": true,
"status": "notOpened",
"shiftId": "<string>",
"openedAt": "<string>",
"openedByName": "<string>",
"closedAt": "<string>",
"closedByName": "<string>"
}
}{
"success": "false",
"error": {
"error": "error",
"message": "The request has an error"
}
}Caja
Abrir caja
Abre la caja en el turno actual. Si el local no tiene turno abierto, también abre el turno. Queda registrado a nombre del usuario que conectó el MCP de administración y usa sus permisos, como en el PDV. Con un token de la API responde userRequired.
POST
/
tabs
/
{storeId}
/
cash-registers
/
{cashRegisterId}
/
open
Open cash register
curl --request POST \
--url https://api.service.getjusto.com/v3/tabs/{storeId}/cash-registers/{cashRegisterId}/open \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"startBalances": [
{
"paymentMethodId": "tpm-4c48bf33",
"balance": 50000
}
]
}
'import requests
url = "https://api.service.getjusto.com/v3/tabs/{storeId}/cash-registers/{cashRegisterId}/open"
payload = { "startBalances": [
{
"paymentMethodId": "tpm-4c48bf33",
"balance": 50000
}
] }
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({startBalances: [{paymentMethodId: 'tpm-4c48bf33', balance: 50000}]})
};
fetch('https://api.service.getjusto.com/v3/tabs/{storeId}/cash-registers/{cashRegisterId}/open', 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}/cash-registers/{cashRegisterId}/open",
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([
'startBalances' => [
[
'paymentMethodId' => 'tpm-4c48bf33',
'balance' => 50000
]
]
]),
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}/cash-registers/{cashRegisterId}/open"
payload := strings.NewReader("{\n \"startBalances\": [\n {\n \"paymentMethodId\": \"tpm-4c48bf33\",\n \"balance\": 50000\n }\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/tabs/{storeId}/cash-registers/{cashRegisterId}/open")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"startBalances\": [\n {\n \"paymentMethodId\": \"tpm-4c48bf33\",\n \"balance\": 50000\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.service.getjusto.com/v3/tabs/{storeId}/cash-registers/{cashRegisterId}/open")
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 \"startBalances\": [\n {\n \"paymentMethodId\": \"tpm-4c48bf33\",\n \"balance\": 50000\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"_id": "<string>",
"name": "<string>",
"isDefault": true,
"status": "notOpened",
"shiftId": "<string>",
"openedAt": "<string>",
"openedByName": "<string>",
"closedAt": "<string>",
"closedByName": "<string>"
}
}{
"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 caja, de GET /tabs/{storeId}/cash-registers.
Body
application/json