v1

latestOpenAPI 3.0.22026-07-24154101.1 MB
Time Punches

List Time Punches

get/v2/company/{company_id}/time_punches

Path parameters

company_idinteger required

Company ID

Query parameters

location_idinteger

Location ID

department_idinteger

Department ID

role_idinteger

Role ID

user_idinteger

User ID

approvedboolean nullable

Returns time punches that have been approved. Default null, returns both approved and unapproved punches. If true returns only approved punches. If false returns only unapproved punches.

limitinteger

The limit of results that will be returned.

modified_sincestring date-time

Return time punches that have been modified after the specified date time. UTC in ISO8601 Format

clocked_in[lte]string date-time

Return time punches with clocked in before or on the specified date. UTC in ISO8601 format

clocked_in[gte]string date-time

Return time punches with clocked in after or on the specified date. UTC in ISO8601 format

clocked_out[lte]string date-time

Return time punches with clocked out before or on the specified date. UTC in ISO8601 format

clocked_out[gte]string date-time

Return time punches with clocked out after or on the specified date. UTC in ISO8601 format

include_deletedboolean

Deprecated, see 'deleted'

deletedboolean nullable

Returns punches filtered by deleted status. Default false, returns undeleted punches. If true returns only deleted punches. if value is null then returns both deleted and undeleted punches.

localize_search_timeboolean

If true, convert any date ranges to consider the local timezone of the punches. If false, date ranges will be in UTC

flagsstring[] nullable

A comma separated list of flags to filter time punches by.

employee_approval_statusesstring[] nullable

A comma-separated list of employee approval statuses to filter time punches by.

cursorstring

Cursor for the next or previous page of results.

sort_bystring
Example:location.desc

The name of the field and direction you want the results ordered by.

business_date_startstring

Return time punches with business date (based on clocked in date) after or on the specified date. UTC in ISO8601 format. If used, it will take priority over all other clocked in/out date filters.

business_date_endstring

Return time punches with business date (based on clocked in date) before or on the specified date. UTC in ISO8601 format. If used, it will take priority over all other clocked in/out date filters.

Headers

x-api-versionstring

An API version

Example:2022-05-01

7shifts API version

x-company-guidstring uuid

Company GUID

Response

OK

object'time_punches' required

Example response

{
  "data": [
    {
      "clocked_in": "2020-01-20T12:00:00.000Z",
      "clocked_out": "2020-01-20T12:00:00.000Z",
      "pos_type": "web",
      "breaks": [
        {
          "in": "2020-01-20T12:00:00-0400",
          "out": "2020-01-20T12:00:00-0400"
        }
      ],
      "created": "2020-01-20T12:00:00.000Z",
      "modified": "2020-01-20T12:00:00.000Z"
    }
  ]
}