curl --request POST \
--url https://api.exowpee.com/v1/order/cash-registers/{cashRegister}/lock \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"remove_cashiers": true
}
'import requests
url = "https://api.exowpee.com/v1/order/cash-registers/{cashRegister}/lock"
payload = { "remove_cashiers": True }
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({remove_cashiers: true})
};
fetch('https://api.exowpee.com/v1/order/cash-registers/{cashRegister}/lock', 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.exowpee.com/v1/order/cash-registers/{cashRegister}/lock",
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([
'remove_cashiers' => true
]),
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.exowpee.com/v1/order/cash-registers/{cashRegister}/lock"
payload := strings.NewReader("{\n \"remove_cashiers\": true\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.exowpee.com/v1/order/cash-registers/{cashRegister}/lock")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"remove_cashiers\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/order/cash-registers/{cashRegister}/lock")
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 \"remove_cashiers\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"is_seller": true,
"auto_print_invoice": true,
"linear_pos": true,
"is_locked": true,
"session_status": "<string>",
"cash_account_id": "<string>",
"last_closed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"cashiers": "<array>"
}{
"message": "<string>",
"errors": {}
}Lock a cash register
Locks a closed cash register so it cannot be opened or edited, and deactivates its sellers. Used when a register is taken out of service.
curl --request POST \
--url https://api.exowpee.com/v1/order/cash-registers/{cashRegister}/lock \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"remove_cashiers": true
}
'import requests
url = "https://api.exowpee.com/v1/order/cash-registers/{cashRegister}/lock"
payload = { "remove_cashiers": True }
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({remove_cashiers: true})
};
fetch('https://api.exowpee.com/v1/order/cash-registers/{cashRegister}/lock', 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.exowpee.com/v1/order/cash-registers/{cashRegister}/lock",
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([
'remove_cashiers' => true
]),
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.exowpee.com/v1/order/cash-registers/{cashRegister}/lock"
payload := strings.NewReader("{\n \"remove_cashiers\": true\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.exowpee.com/v1/order/cash-registers/{cashRegister}/lock")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"remove_cashiers\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/order/cash-registers/{cashRegister}/lock")
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 \"remove_cashiers\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"is_seller": true,
"auto_print_invoice": true,
"linear_pos": true,
"is_locked": true,
"session_status": "<string>",
"cash_account_id": "<string>",
"last_closed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"cashiers": "<array>"
}{
"message": "<string>",
"errors": {}
}cash_registers.update
Conditions
- The register must be closed.
- remove_cashiers=true is refused because it is not supported yet.
- Marks the register locked and sets all its sellers to inactive. Cashiers are kept.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the cash register (27-character KSUID).
Query Parameters
Response mode. Default none; none answers 204 No Content.
none, resource Comma-separated JSON keys of the root resource (id is always rendered). Available: id, name, is_seller, auto_print_invoice, linear_pos, is_locked, session_status, cash_account_id, last_closed_at, created_at, updated_at.
Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: cashiers.
Body
When true, would delete the register's cashiers and sellers; this is not supported yet and is refused. Default false: sellers are only deactivated.
Response
Resource (only with response=resource).
Identifier of the cash register (27-character KSUID).
Name of the register, unique within the company.
True when the cashiers of this register are also sellers who can be credited with sales.
True when the point of sale prints the invoice automatically after a sale.
True when the register uses the linear point-of-sale layout; it is copied to the register's seller records.
True when the register is locked and cannot be opened or edited.
Whether a register session is running: open or closed.
Identifier of the cash account created for this register.
Closing time of the most recently opened register session of this register (ISO 8601); null when no register session was ever opened or while that session is still open. Omitted when the register session was not loaded (for example in the public available list).
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).
Cashiers assigned to this register, as summaries with their id.