Open a cash register session
curl --request POST \
--url https://api.exowpee.com/v1/order/cash-registers/{cashRegister}/open \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cash_register_instance_id": "<string>",
"cash_register_instance_secret": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/order/cash-registers/{cashRegister}/open"
payload = {
"cash_register_instance_id": "<string>",
"cash_register_instance_secret": "<string>"
}
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({
cash_register_instance_id: '<string>',
cash_register_instance_secret: '<string>'
})
};
fetch('https://api.exowpee.com/v1/order/cash-registers/{cashRegister}/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.exowpee.com/v1/order/cash-registers/{cashRegister}/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([
'cash_register_instance_id' => '<string>',
'cash_register_instance_secret' => '<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.exowpee.com/v1/order/cash-registers/{cashRegister}/open"
payload := strings.NewReader("{\n \"cash_register_instance_id\": \"<string>\",\n \"cash_register_instance_secret\": \"<string>\"\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}/open")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cash_register_instance_id\": \"<string>\",\n \"cash_register_instance_secret\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/order/cash-registers/{cashRegister}/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 \"cash_register_instance_id\": \"<string>\",\n \"cash_register_instance_secret\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body"<string>"{
"message": "<string>",
"errors": {}
}Run a register session
Open a cash register session
A cashier opens a register from a linked cash register computer, using the computer’s secret, and starts a register session with the current register balance as the opening balance. Returns a login token tied to this register.
POST
/
order
/
cash-registers
/
{cashRegister}
/
open
Open a cash register session
curl --request POST \
--url https://api.exowpee.com/v1/order/cash-registers/{cashRegister}/open \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cash_register_instance_id": "<string>",
"cash_register_instance_secret": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/order/cash-registers/{cashRegister}/open"
payload = {
"cash_register_instance_id": "<string>",
"cash_register_instance_secret": "<string>"
}
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({
cash_register_instance_id: '<string>',
cash_register_instance_secret: '<string>'
})
};
fetch('https://api.exowpee.com/v1/order/cash-registers/{cashRegister}/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.exowpee.com/v1/order/cash-registers/{cashRegister}/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([
'cash_register_instance_id' => '<string>',
'cash_register_instance_secret' => '<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.exowpee.com/v1/order/cash-registers/{cashRegister}/open"
payload := strings.NewReader("{\n \"cash_register_instance_id\": \"<string>\",\n \"cash_register_instance_secret\": \"<string>\"\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}/open")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cash_register_instance_id\": \"<string>\",\n \"cash_register_instance_secret\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/order/cash-registers/{cashRegister}/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 \"cash_register_instance_id\": \"<string>\",\n \"cash_register_instance_secret\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body"<string>"{
"message": "<string>",
"errors": {}
}Company space
For: Cashier and seller
Conditions
- The register must be closed and must not be locked.
- The device (cash_register_instance_id) must be active, belong to this register, and its secret must match; a wrong secret is refused with 403.
- If the device is linked to a POS sync instance, that instance must still be active on the same computer.
- The caller must be an active cashier of this register.
- The caller cannot already be the current cashier of another open register of the company.
- No register session may remain open on this register.
- Marks the register open and sets the caller as its current cashier.
- Sets the cashier last_login_at.
- Starts a register session on the computer whose opening balance is the current balance of the register’s ledger account (in minor units).
- Refreshes the last seen time of the device.
- Returns a login token carrying the register, cashier, seller and device identifiers.
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).
Body
application/json
Identifier of the device (cash register instance) used to open the register. It must be active and linked to this register.
Required string length:
27Secret of the device: 64 lowercase hexadecimal characters. A wrong secret is refused with 403.
Required string length:
64Response
JsonResource
The response is of type string.