Optional filter query parameters

Parameter

Type

Description

clocked_in[gte]

DateTime

UTC date/time. Time punches you wish to retrieve with the clock in greater than or equal to the date/time value provided. '2013-03-01 10:00:00'.

clocked_in[lte]

DateTime

UTC date/time. Time punches you wish to retrieve with the clock in less than or equal to the date/time value provided. '2013-03-01 10:00:00'.

clocked_out[gte]

DateTime

UTC date/time. Time punches you wish to retrieve with the clock out greater than or equal to the date/time value provided. '2013-03-02 10:00:00'.

clocked_out[lte]

DateTime

UTC date/time. Time punches you wish to retrieve with the clock out less than or equal to the date/time value provided. '2013-03-02 10:00:00'.

location_id

Integer

Time punches you wish to retrieve by a specific location.

department_id

Integer

Time punches you wish to retrieve by a specific department.

limit

Integer

The limit of results that will be returned.

offset

Integer

Return results starting from an offset.

order_field

String

The field you would like the results to be ordered by. Format is {lowercased-singular-method}.{field}. Example: /time_punches/?order_field=time_punches.modified

order_dir

String

The direction you want the results ordered by. Accepted values are "asc" or "desc". Example: /time_punches/?order_dir=desc

Example request

https://api.7shifts.com/v1/time_punches?clocked_in[gte]=2014-04-05&clocked_in[lte]=2021-04-06

Example response

{
    "status": "success",
    "total": 2,
    "offset": 0,
    "limit": 20,
    "data": [{
            "time_punch": {
                "id": 123,
                "shift_id": 0,
                "user_id": 456,
                "editable_punch": true,
                "role_id": 0,
                "location_id": 789,
                "department_id": 101112,
                "approved": true,
                "clocked_in": "2014-04-05 06:30:00",
                "clocked_out": "2014-04-05 10:00:00",
                "notes": "",
                "auto_clocked_out": false,
                "clocked_in_offline": false,
                "clocked_out_offline": false,
                "tips": 0,
                "created": "2021-08-11 17:52:24",
                "modified": "2021-08-11 17:52:24",
                "pos_type": "web",
                "clocked_in_iso": "2014-04-05T06:30:00+00:00",
                "clocked_out_iso": "2014-04-05T10:00:00+00:00",
                "unused_enforceable_breaks": null
            },
            "time_punch_break": []
        },
        {
            "time_punch": {
                "id": 123,
                "shift_id": 0,
                "user_id": 456,
                "editable_punch": false,
                "role_id": 748,
                "location_id": 789,
                "department_id": 101112,
                "approved": true,
                "clocked_in": "2015-10-27 21:00:00",
                "clocked_out": "2015-10-28 05:00:00",
                "notes": "",
                "auto_clocked_out": false,
                "clocked_in_offline": false,
                "clocked_out_offline": false,
                "tips": 0,
                "created": "2015-10-27 22:26:20",
                "modified": "2015-10-27 22:26:20",
                "pos_type": "",
                "clocked_in_iso": "2015-10-27T21:00:00+00:00",
                "clocked_out_iso": "2015-10-28T05:00:00+00:00",
                "unused_enforceable_breaks": null
            },
            "time_punch_break": []
        }
    ]
}
Language
Authentication
Basic
base64
:
Response
Click Try It! to start a request and see the response here!