Optional filter query parameters

Parameter

Type

Description

location_id

Integer

Filter shifts by a specific location ID.

start[gte]

String

Shifts you wish to retrieve greater than or equal to the passed date/time. Either '2014-01-01 10:00:00' or just a date '2014-01-01'.

end[lte]

String

Shifts you wish to retrieve less or equal to than the passed date/time. Either '2014-01-01 10:00:00' or just a date '2014-01-01'.

start[date]

String

Shifts you wish to retrieve that start on the specified date. Format it Y-m-d: '2014-01-01'.

department_id

Integer

Shifts you wish to retrieve that fall under a department id.

user_id

Integer

Shifts you wish to retrieve by a specific user.

deleted

Integer

Retrieve shifts that were deleted. Either 0 or 1.

draft

Integer

Retrieve shifts that are in draft mode (not published). Either 0 or 1.

open

Integer

Retrieve only open shifts. 0 is false, 1 is true.

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: /shifts/?order_field=shift.modified

order_dir

String

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

Example request

https://api.7shifts.com/v1/shifts?location_id=123&start[date]=2021-08-15&role_id=334

Language
Authentication
Basic
base64
:
Response
Click Try It! to start a request and see the response here!