Shifts
Retrieve information on work shifts and hours spent on individual tasks.
#The shift object
- #idstring (uuid)
Unique ID of the shift.
- #accountstring (uuid)
Unique ID of the account associated with the shift.
- #employerstring
Employer name.
- #created_atstring (datetime)
Timestamp (ISO 8601) when the shift object was created.
- #updated_atstring (datetime)
Timestamp (ISO 8601) when a property value of the shift object most recently changed.
- #statusstring (enum)
Current state of the shift.
- #typestring (enum)
The type of shift.
- #start_datetimestring (datetime)
Timestamp (ISO 8601) when the shift started.
- #end_datetimestring (datetime)
Timestamp (ISO 8601) when the shift ended.
- #all_datetimesobject
Contains information on when the shift started and ended, and any breaks taken in between.
- #hoursstring
Time duration of the shift, subtracting breaks. Up to four decimal places.
- #timezonestring (timezone)
Timezone (IANA) where the shift took place.
- #locationstring
Full address of where the shift took place.
- #metadataobject
Additional, non-categorized information.
1{
2 "id": "0183d245-b5c1-2a6d-5e37-1b831d765c5d",
3 "account": "0187c66e-e7e5-811c-b006-2232f00f426a",
4 "employer": "Whole Goods",
5 "created_at": "2023-04-27T07:02:01.279Z",
6 "updated_at": "2023-04-27T07:02:01.279Z",
7 "status": "completed",
8 "type": "hourly",
9 "start_datetime": "2023-04-26T00:00:00Z",
10 "end_datetime": "2023-04-26T08:00:00Z",
11 "all_datetimes": {
12 "shift_start": "2023-04-26T00:00:00Z",
13 "shift_end": "2023-04-26T08:00:00Z",
14 "breaks": [
15 {
16 "break_start": "2023-04-26T03:36:00Z",
17 "break_end": "2023-04-26T04:24:00Z"
18 }
19 ]
20 },
21 "hours": "7.2",
22 "timezone": "America/New_York",
23 "location": "302 East N St, New York, NY 10014, US",
24 "metadata": {}
25}
#Retrieve a shift
Retrieves a shift object.
- #idstring (uuid)required
ID of the shift object to be retrieved.
1curl --request GET \
2 --url https://api.argyle.com/v2/shifts/{id} \
3 --header 'accept: application/json' \
4 --header 'content-type: application/json'
1{
2 "id": "0183d245-b5c1-2a6d-5e37-1b831d765c5d",
3 "account": "0187c66e-e7e5-811c-b006-2232f00f426a",
4 "employer": "Whole Goods",
5 "created_at": "2023-04-27T07:02:01.279Z",
6 "updated_at": "2023-04-27T07:02:01.279Z",
7 "status": "completed",
8 "type": "hourly",
9 "start_datetime": "2023-04-26T00:00:00Z",
10 "end_datetime": "2023-04-26T08:00:00Z",
11 "all_datetimes": {
12 "shift_start": "2023-04-26T00:00:00Z",
13 "shift_end": "2023-04-26T08:00:00Z",
14 "breaks": [
15 {
16 "break_start": "2023-04-26T03:36:00Z",
17 "break_end": "2023-04-26T04:24:00Z"
18 }
19 ]
20 },
21 "hours": "7.2",
22 "timezone": "America/New_York",
23 "location": "302 East N St, New York, NY 10014, US",
24 "metadata": {}
25}
#List all shifts
Returns an array of all shift objects.
- #accountstring (uuid)optional
Filter by account ID.
- #userstring (uuid)optional
Filter by user ID.
- #from_start_datetimestring (datetime)optional
Filter by shifts with a
start_datetime
on or after this timestamp (ISO 8601). - #to_start_datetimestring (datetime)optional
Filter by shifts with a
start_datetime
on or before this timestamp (ISO 8601). - #limitintegeroptional
Number of shift objects returned per page. Default: 10. Maximum: 200.
1curl --request GET \
2 --url https://api.argyle.com/v2/shifts?limit=2 \
3 --header 'accept: application/json' \
4 --header 'content-type: application/json'
1[
2 {
3 "id": "0183c13c-5d3d-2d36-4d6d-5ac7a7eb2b2d",
4 "account": "0187c66e-e7e5-811c-b006-2232f00f426a",
5 "employer": "Bullseye",
6 "created_at": "2023-04-27T17:37:43.977Z",
7 "updated_at": "2023-04-27T17:37:43.977Z",
8 "status": "completed",
9 "type": "hourly",
10 "start_datetime": "2023-04-26T00:00:00Z",
11 "end_datetime": "2023-04-26T10:00:00Z",
12 "all_datetimes": {
13 "shift_start": "2023-04-26T00:00:00Z",
14 "shift_end": "2023-04-26T10:00:00Z",
15 "breaks": [
16 {
17 "break_start": "2023-04-26T04:30:00Z",
18 "break_end": "2023-04-26T05:30:00Z"
19 }
20 ]
21 },
22 "hours": "9.0",
23 "timezone": "America/New_York",
24 "location": "605 Far West Ave Suite 970, New York, NY 10019, US",
25 "metadata": {}
26 },
27 {
28 "id": "0183c5c3-2c9e-f2d1-3c7d-3ac5b73d3a5d",
29 "account": "0187c66e-e7e5-811c-b006-2232f00f426a",
30 "employer": "Bullseye",
31 "created_at": "2023-04-28T17:38:43.977Z",
32 "updated_at": "2023-04-28T17:38:43.977Z",
33 "status": "scheduled",
34 "type": "hourly",
35 "start_datetime": "2023-04-29T00:00:00Z",
36 "end_datetime": "2023-04-29T10:00:00Z",
37 "all_datetimes": {
38 "shift_start": "2023-04-29T00:00:00Z",
39 "shift_end": "2023-04-29T10:00:00Z",
40 "breaks": []
41 },
42 "hours": "10.0",
43 "timezone": "America/New_York",
44 "location": "605 Far West Ave Suite 970, New York, NY 10019, US",
45 "metadata": {}
46 }
47]