Get Shift

GET /staff/v1/businessLocations/{businessLocationId}/shift

Path parameters

Query parameters

  • page integer(int32)

    The page number, when paginating.

    Minimum value is 1. Default value is 1.

  • size integer(int32)

    Number of results to return per page, when paginating.

    Minimum value is 1. Default value is 10.

  • sort array[string]

    Sort by field and direction.

    Default value is ["date,desc"].

  • startTime string(date-time)

    Show results after this start time.

  • endTime string(date-time)

    Show results before this end time.

  • staffId integer(int64)

    Filter on the unique identifier for the employee.

Responses

  • 200 application/json

    List of shifts with related links.

    Hide response attributes Show response attributes object
    • data object
      Hide data attribute Show data attribute
      • shifts array[object]
        Hide shifts attributes Show shifts attributes object

        List of shifts.

        • uuid string

          The unique identifier for the shift.

        • businessId integer(int64)

          The unique identifier for the business.

        • businessLocationId integer(int64)

          The unique identifier for the business location.

        • deviceId integer(int64)

          The unique identifier for the device.

        • staffId integer(int64)

          The unique identifier for the employee.

        • dateInUTC string(date-time)

          The timestamp of the last update to the shift.

        • events array[object]

          List of events during the shift.

          Hide events attributes Show events attributes object

          Shift event such as clock in/out.

          • uuid string

            The unique identifier for the event.

          • timestamp string(date-time)

            The time of the event.

          • The type of event.

            Values are CLOCK_IN or CLOCK_OUT.

    • page object
      Hide page attributes Show page attributes
      • page integer

        The current page number.

      • size integer

        The number of elements in the page.

      • The total number of elements.

      • totalPages integer

        The total number of pages of results.

GET /staff/v1/businessLocations/{businessLocationId}/shift
curl \
 -X GET https://api.trial.lsk.lightspeed.app/staff/v1/businessLocations/{businessLocationId}/shift \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": {
    "shifts": [
      {
        "uuid": "REcdfpCwQJKUR53gdzIk5Q==",
        "businessId": 12345,
        "businessLocationId": 1234567890,
        "deviceId": 54321,
        "staffId": 1234,
        "dateInUTC": "2020-01-01T00:00:00Z",
        "events": [
          {
            "uuid": "REcdfpCwQJKUR53gdzIk5Q==",
            "timestamp": "2020-01-01T00:00:00Z",
            "eventType": "CLOCK_IN"
          }
        ]
      }
    ]
  },
  "links": {
    "first": {
      "href": "https://api-trial.ikentoo.com/staff/v1/businessLocations/40570261078018/userTypes/POS?page=1&size=1&sort=userId,desc"
    },
    "self": {
      "href": "https://api-trial.ikentoo.com/staff/v1/businessLocations/40570261078018/userTypes/POS?page=1&size=1&sort=userId,desc"
    },
    "next": {
      "href": "https://api-trial.ikentoo.com/staff/v1/businessLocations/40570261078018/userTypes/POS?page=2&size=1&sort=userId,desc"
    },
    "last": {
      "href": "https://api-trial.ikentoo.com/staff/v1/businessLocations/40570261078018/userTypes/POS?page=5&size=1&sort=userId,desc"
    }
  },
  "page": {
    "page": 1,
    "size": 10,
    "totalElements": 100,
    "totalPages": 10
  }
}