This guide provides information about how to work with shifts. The shifts are important for your digital twin since work time is often divided into shifts.
Configuration
To connect shifts with twinzo digital twinDigital Twin, visit the course page and find out, how to set up a shift:
The main information about how to use twinzo´s twinzo's REST API and how to authorize your access:
Swagger Shifts Section
The Swagger Shifts section provides a detailed description of the API for the shifts. We can use /shifts or /shifts/{id} for specific shifts to get information about shifts.
/shifts
use for getting a list of shifts from branche
/shifts/{id}
get specific shift’s shift information according to the id
Example
There are examples for both /shifts and /shifts/{id} calls below. First is the response you get and then the image with the parameters you have to call for the correct answer. The whole request URL: https://api.twinzo.eu/v3.0/shifts
/ https://api.twinzo.eu/v3.0/shifts/21
/shifts
Code Block | ||
---|---|---|
| ||
[ { "Id": 4, "Title": "Morning Shift", "BranchId": 7, "StartTime": 21600000, "StopTime": 50400000 }, { "Id": 5, "Title": "Afternoon Shift", "BranchId": 7, "StartTime": 50400000, "StopTime": 79200000 }, { "Id": 21, "Title": "Evening Shift", "BranchId": 7, "StartTime": 64800000, "StopTime": 108000000 } ] |
/shifts/{id} (/shifts/21)
Code Block | ||
---|---|---|
| ||
{ "Id": 21, "Title": "Evening Shift", "BranchId": 7, "StartTime": 64800000, "StopTime": 108000000 } |
Data Properties
Data payload JSON object has five properties:
Id | Shift ID |
Title | Shift´s Shift's title |
BranchId | Branch ID where the shift will be used |
StartTime | Start time of the shift [in milisecondsmilliseconds] |
StopTime | End time of the shift [in milisecondsmilliseconds] |
Note |
---|
StartTime / StopTime explanation: 60000 - 00:01 (12:01 AM) |