Passbooks
List passbook shifts
List passbook shifts. Access is subject to the permissions, authentication, and branch requirements documented for this operation.
GET
/
passbooks
/
shifts
List passbook shifts
curl --request GET \
--url https://{tenantDomain}/api/v1/staff/passbooks/shifts \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenantDomain}/api/v1/staff/passbooks/shifts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenantDomain}/api/v1/staff/passbooks/shifts', 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://{tenantDomain}/api/v1/staff/passbooks/shifts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenantDomain}/api/v1/staff/passbooks/shifts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenantDomain}/api/v1/staff/passbooks/shifts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v1/staff/passbooks/shifts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"userId": "<string>",
"branchId": "<string>",
"workstationId": "<string>",
"printerId": "<string>",
"currentSupervisorUserId": "<string>",
"createdByUserId": "<string>",
"openingApprovedByUserId": "<string>",
"closingApprovedByUserId": "<string>",
"endedByUserId": "<string>",
"carryForwardFromShiftSessionId": "<string>",
"openingCashCountId": "<string>",
"closingCashCountId": "<string>",
"openingFundingLedgerTransactionId": "<string>",
"closingSettlementLedgerTransactionId": "<string>",
"openingFundingLedgerTransactionIds": [
"<string>"
],
"closingSettlementLedgerTransactionIds": [
"<string>"
],
"startedAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"endedReason": "logout",
"status": "<string>",
"cashState": {
"opening": {},
"expectedClosing": {},
"actualClosing": {},
"difference": {}
},
"drawerInventory": [
{
"id": "<string>",
"cashDenominationId": "<string>",
"currencyCode": "<string>",
"denominationValue": 123,
"denominationKind": "<string>",
"denominationLabel": "<string>",
"displayOrder": 123,
"quantity": 123,
"amountCents": 123
}
],
"drawerBreakdownStatuses": [
{
"currencyCode": "<string>",
"cashTotalCents": 123,
"inventoryTotalCents": 123,
"unallocatedTotalCents": 123,
"deficitTotalCents": 123,
"needsBreakdown": true,
"hasDeficit": true
}
],
"hasCashDifference": true,
"cashDifferenceRequiresReview": true,
"openingNotes": "<string>",
"closingNotes": "<string>",
"openingConfirmedAt": "2023-11-07T05:31:56Z",
"closingConfirmedAt": "2023-11-07T05:31:56Z",
"openingCashRequest": {
"id": "<string>",
"decisionType": "<string>",
"status": "pending",
"requestedByUserId": "<string>",
"decidedByUserId": "<string>",
"reason": "<string>",
"decidedAt": "2023-11-07T05:31:56Z",
"metadata": {}
},
"closingCashRequest": {
"id": "<string>",
"decisionType": "<string>",
"status": "pending",
"requestedByUserId": "<string>",
"decidedByUserId": "<string>",
"reason": "<string>",
"decidedAt": "2023-11-07T05:31:56Z",
"metadata": {}
},
"workstation": {
"id": "<string>",
"code": "<string>",
"name": "<string>"
},
"user": {
"id": "<string>",
"email": "<string>",
"displayName": "<string>",
"code": "<string>"
}
}
]
}Authorizations
⌘I
List passbook shifts
curl --request GET \
--url https://{tenantDomain}/api/v1/staff/passbooks/shifts \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenantDomain}/api/v1/staff/passbooks/shifts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenantDomain}/api/v1/staff/passbooks/shifts', 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://{tenantDomain}/api/v1/staff/passbooks/shifts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenantDomain}/api/v1/staff/passbooks/shifts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenantDomain}/api/v1/staff/passbooks/shifts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v1/staff/passbooks/shifts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"userId": "<string>",
"branchId": "<string>",
"workstationId": "<string>",
"printerId": "<string>",
"currentSupervisorUserId": "<string>",
"createdByUserId": "<string>",
"openingApprovedByUserId": "<string>",
"closingApprovedByUserId": "<string>",
"endedByUserId": "<string>",
"carryForwardFromShiftSessionId": "<string>",
"openingCashCountId": "<string>",
"closingCashCountId": "<string>",
"openingFundingLedgerTransactionId": "<string>",
"closingSettlementLedgerTransactionId": "<string>",
"openingFundingLedgerTransactionIds": [
"<string>"
],
"closingSettlementLedgerTransactionIds": [
"<string>"
],
"startedAt": "2023-11-07T05:31:56Z",
"endedAt": "2023-11-07T05:31:56Z",
"endedReason": "logout",
"status": "<string>",
"cashState": {
"opening": {},
"expectedClosing": {},
"actualClosing": {},
"difference": {}
},
"drawerInventory": [
{
"id": "<string>",
"cashDenominationId": "<string>",
"currencyCode": "<string>",
"denominationValue": 123,
"denominationKind": "<string>",
"denominationLabel": "<string>",
"displayOrder": 123,
"quantity": 123,
"amountCents": 123
}
],
"drawerBreakdownStatuses": [
{
"currencyCode": "<string>",
"cashTotalCents": 123,
"inventoryTotalCents": 123,
"unallocatedTotalCents": 123,
"deficitTotalCents": 123,
"needsBreakdown": true,
"hasDeficit": true
}
],
"hasCashDifference": true,
"cashDifferenceRequiresReview": true,
"openingNotes": "<string>",
"closingNotes": "<string>",
"openingConfirmedAt": "2023-11-07T05:31:56Z",
"closingConfirmedAt": "2023-11-07T05:31:56Z",
"openingCashRequest": {
"id": "<string>",
"decisionType": "<string>",
"status": "pending",
"requestedByUserId": "<string>",
"decidedByUserId": "<string>",
"reason": "<string>",
"decidedAt": "2023-11-07T05:31:56Z",
"metadata": {}
},
"closingCashRequest": {
"id": "<string>",
"decisionType": "<string>",
"status": "pending",
"requestedByUserId": "<string>",
"decidedByUserId": "<string>",
"reason": "<string>",
"decidedAt": "2023-11-07T05:31:56Z",
"metadata": {}
},
"workstation": {
"id": "<string>",
"code": "<string>",
"name": "<string>"
},
"user": {
"id": "<string>",
"email": "<string>",
"displayName": "<string>",
"code": "<string>"
}
}
]
}