This guide describes how to integrate and send shifts data to twinzo's REST API.
Configuration
To connect sensor values with 3D spaces, visit this course page:
The main information about how to use twinzo´s REST API and how to authorize your access:
1f331Basics
1f510Authorization
Swagger Shift Section
The Swagger Shift section provides a detailed description of the API for shift data. There are two main endpoints in the Shift section for send or update data:
POST /shifts/
Used to create a new shift
PATCH /shifts/{id}
Used to update shift
Example
POST Shifts create a new shift
PATCH Shifts update already exists shift
POST Shifts
[ { "Id": 1, "Title": "Morning Shift", "BranchId": 1, "StartTime": 21600000, "StopTime": 50400000 } ]
PATCH Shifts
[ { "StopTime": 60400000 } ]
Data Properties
Data payload JSON object has five properties:
Id | Shift ID |
Title | Shift´s title |
BranchId | Branch ID where the shift will be used |
StartTime | Start time of the shift [in miliseconds] |
StopTime | End time of the shift [in miliseconds] |
StartTime / StopTime explanation:
60000 - 00:01 (12:01 AM)
21600000 - 06:00 (6:00 AM)
79200000 - 22:00 (10:00 PM)
108000000 - 06:00 (6:00 AM) - NEXT DAY! - Used for night shifts that last from the evening until the next morning