Teams
Teams are named entities that bring together administrators and workers belonging to the same organization. Teams have hubs from where its workers may start and end their shifts.
Create team
Name | Type | Description |
---|---|---|
name | string | A unique name for the team. |
workers | string array | An array of worker IDs. |
managers | string array | An array of managing administrator IDs. |
hub | string | Optional. The ID of the team's hub. |
enableSelfAssignment | boolean | Optional. Defaults false if not included. This toggles Team Self-Assignment that allows Drivers to Self Assign Tasks that are in the Team unassigned container. |
curl -X POST "https://store.bponi.com/api/v2/teams" \
-u "cd3b3de84cc1ee040bf06512d233719c:" \
-d '{"name":"Sunset","workers":["1LjhGUWdxFbvdsTAAXs0TFos","F8WPCqGmQYWpCkQ2c8zJTCpW"],"managers":["Mrq7aKqzPFKX22pmjdLx*ohM"],"hub":"tKxSfU7psqDQEBVn5e2VQ~*O"}'
1
2
3
2
3
{
"id": "FFqPs1KHayxorfA~~xIj0us4",
"timeCreated": 1455156655000,
"timeLastModified": 1455156655647,
"name": "Sunset",
"workers": [
"1LjhGUWdxFbvdsTAAXs0TFos",
"F8WPCqGmQYWpCkQ2c8zJTCpW"
],
"managers": [
"Mrq7aKqzPFKX22pmjdLx*ohM"
],
"hub": "tKxSfU7psqDQEBVn5e2VQ~*O",
"enableSelfAssignment": false
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
As team names are unique within each organization, errors will be thrown if a duplicate name is used.
Update team
When attempting to update a team's information, ensure that the worker and manager resources exist within your organization. Otherwise, errors will be thrown as invalid managers or workers.
curl -X PUT "https://store.bponi.com/api/v2/teams/FFqPs1KHayxorfA~~xIj0us4" \
-u "cd3b3de84cc1ee040bf06512d233719c:" \
-d '{"workers":["1LjhGUWdxFbvdsTAAXs0TFos","F8WPCqGmQYWpCkQ2c8zJTCpW","3joS0Jh19VpJZgSTxFOK9fTf"]}'
1
2
3
2
3
{
"id": "FFqPs1KHayxorfA~~xIj0us4",
"timeCreated": 1455156655000,
"timeLastModified": 1455156656399,
"name": "Sunset",
"workers": [
"1LjhGUWdxFbvdsTAAXs0TFos",
"F8WPCqGmQYWpCkQ2c8zJTCpW",
"3joS0Jh19VpJZgSTxFOK9fTf"
],
"managers": [
"Mrq7aKqzPFKX22pmjdLx*ohM"
],
"hub": "tKxSfU7psqDQEBVn5e2VQ~*O"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
List teams
curl -X GET "https://store.bponi.com/api/v2/teams" \
-u "cd3b3de84cc1ee040bf06512d233719c:"
1
2
2
[
{
"id": "yKpCnWprM1Rvp3NGGlVa5TMa",
"timeCreated": 1455048584000,
"timeLastModified": 1455049756016,
"name": "FiDi",
"workers": [
"1LjhGUWdxFbvdsTAAXs0TFos"
],
"managers": [
"Mrq7aKqzPFKX22pmjdLx*ohM"
],
"hub": null,
"tasks": [
"bKD0XoVZNFyBlE1rB~xvAdvp"
]
},
// ...
{
"id": "R4P7jhuzaIZ4cHHZE1ghmTtB",
"timeCreated": 1455048567000,
"timeLastModified": 1455073711646,
"name": "Tenderloin",
"workers": [
"h*wSb*apKlDkUFnuLTtjPke7",
"3joS0Jh19VpJZgSTxFOK9fTf"
],
"managers": [
"9ZGGl3R~T7lXxZOuOkZwuaPf"
],
"hub": "E4s6bwGpOZp6pSU3Hz*2ngFA",
"tasks": [
"fYevkkuxafYOGNI0hGRwNm2t"
]
}
]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Get single team
curl -X GET "https://store.bponi.com/api/v2/teams/9dyuPqHt6kDK5JKHFhE0xihh" \
-u "cd3b3de84cc1ee040bf06512d233719c:"
1
2
2
{
"id": "9dyuPqHt6kDK5JKHFhE0xihh",
"timeCreated": 1455048578000,
"timeLastModified": 1455049756002,
"name": "Nob Hill",
"workers": [
"C**JneR4Jgd49ujNp7WsDE9Z",
"1LjhGUWdxFbvdsTAAXs0TFos"
],
"managers": [
"9ZGGl3R~T7lXxZOuOkZwuaPf"
],
"hub": null,
"tasks": []
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Delete team
curl -X DELETE "https://store.bponi.com/api/v2/teams/FFqPs1KHayxorfA~~xIj0us4" \
-u "cd3b3de84cc1ee040bf06512d233719c:"
1
2
2
HTTP/1.1 200 OK
1