POST /v2/labor/shifts/search
Returns a paginated list of Shift
records for a business.
The list to be returned can be filtered by:
- Location IDs.
- Employee IDs.
- Shift status (
OPEN
andCLOSED
). - Shift start.
- Shift end.
- Workday details.
The list can be sorted by:
start_at
.end_at
.created_at
.updated_at
.
Servers
- https://connect.squareup.com
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
query |
Object | No |
The parameters of a |
query.filter |
Object | No |
Defines a filter used in a search for |
query.filter.end |
Object | No |
Represents a generic time range. The start and end values are represented in RFC 3339 format. Time ranges are customized to be inclusive or exclusive based on the needs of a particular endpoint. Refer to the relevant endpoint-specific documentation to determine how time ranges are handled. |
query.filter.end.start_at |
String | No |
A datetime value in RFC 3339 format indicating when the time range starts. |
query.filter.end.end_at |
String | No |
A datetime value in RFC 3339 format indicating when the time range ends. |
query.filter.team_member_ids[] |
Array | Yes |
Fetch shifts for the specified team members. Replaced |
query.filter.location_ids[] |
Array | Yes |
Fetch shifts for the specified location. |
query.filter.workday |
Object | No |
A |
query.filter.workday.default_timezone |
String | No |
Location-specific timezones convert workdays to datetime filters. Every location included in the query must have a timezone or this field must be provided as a fallback. Format: the IANA timezone database identifier for the relevant timezone. |
query.filter.workday.date_range |
Object | No |
A range defined by two dates. Used for filtering a query for Connect v2 objects that have date properties. |
query.filter.workday.date_range.start_date |
String | No |
A string in |
query.filter.workday.date_range.end_date |
String | No |
A string in |
query.filter.workday.match_shifts_by |
String | No |
The strategy on which the dates are applied. |
query.filter.status |
String | No |
Fetch a |
query.filter.employee_ids[] |
Array | No |
Fetch shifts for the specified employees. DEPRECATED at version 2020-08-26. Use |
query.filter.start |
Object | No |
Represents a generic time range. The start and end values are represented in RFC 3339 format. Time ranges are customized to be inclusive or exclusive based on the needs of a particular endpoint. Refer to the relevant endpoint-specific documentation to determine how time ranges are handled. |
query.filter.start.start_at |
String | No |
A datetime value in RFC 3339 format indicating when the time range starts. |
query.filter.start.end_at |
String | No |
A datetime value in RFC 3339 format indicating when the time range ends. |
query.sort |
Object | No |
Sets the sort order of search results. |
query.sort.field |
String | No |
The field to sort on. |
query.sort.order |
String | No |
The order in which results are returned. Defaults to DESC. |
limit |
Integer | No |
The number of resources in a page (200 by default). |
cursor |
String | No |
An opaque cursor for fetching the next page. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.