Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This guide describes how to integrate and send shifts shift 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 twinzo's REST API and how to authorize your access:

Swagger Shift Section

image-20240820-054726.pngImage Removedimage-20240820-054726.pngImage Added

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 sending 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 a shift

POST Shifts

Code Block
languagejson
[
  {
    "Id": 1,
    "Title": "Morning Shift",
    "BranchId": 1,
    "StartTime": 21600000,
    "StopTime": 50400000
  }
]
image-20240820-061827.png

PATCH Shifts

Code Block
languagejson
[
  {
    "StopTime": 60400000
  }
]
image-20240821-075538.png

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 milisecondsmilliseconds]

StopTime

End time of the shift [in milisecondsmilliseconds]

Note

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