API for managing teams within the organization
API for managing teams within the organization
curl -i -X GET \
https://developer.boyahq.com/_mock/teams/teams \
-H 'X-API-KEY: YOUR_API_KEY_HERE' \
-H 'org_wallet_ref: string'
[ { "_id": "string", "name": "string", "status": "string", "reviewers": [ … ], "code": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "__v": 0, "updated_by": "string", "employee_count": 0, "employees": [ … ], "balance": 0 } ]
curl -i -X POST \
https://developer.boyahq.com/_mock/teams/teams \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: YOUR_API_KEY_HERE' \
-d '{
"name": "string",
"code": "string",
"status": "ACTIVE"
}'
{ "_id": "string", "name": "string", "status": "string", "reviewers": [ { … } ], "code": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "__v": 0, "updated_by": "string", "employee_count": 0, "employees": [ { … } ], "balance": 0 }
curl -i -X GET \
'https://developer.boyahq.com/_mock/teams/teams/{teamId}' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'
{ "_id": "string", "name": "string", "status": "string", "reviewers": [ { … } ], "code": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "__v": 0, "updated_by": "string", "employee_count": 0, "employees": [ { … } ], "balance": 0 }
curl -i -X PATCH \
'https://developer.boyahq.com/_mock/teams/teams/{teamId}' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: YOUR_API_KEY_HERE' \
-d '{
"name": "string",
"status": "string"
}'
{ "_id": "string", "name": "string", "status": "string", "reviewers": [ { … } ], "code": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "__v": 0, "updated_by": "string", "employee_count": 0, "employees": [ { … } ], "balance": 0 }
curl -i -X DELETE \
'https://developer.boyahq.com/_mock/teams/teams/{teamId}' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'
curl -i -X POST \
'https://developer.boyahq.com/_mock/teams/teams/{teamId}/reviewers' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: YOUR_API_KEY_HERE' \
-d '{
"employee_id": "string",
"name": "string",
"read_only": false
}'
{ "employee_id": "string", "name": "string", "read_only": true, "_id": "string", "added_on": "2019-08-24T14:15:22Z" }
curl -i -X PATCH \
'https://developer.boyahq.com/_mock/teams/teams/{teamId}/reviewers/{reviewerId}' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'
curl -i -X POST \
https://developer.boyahq.com/_mock/teams/teams/addEmployee/ \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: YOUR_API_KEY_HERE' \
-d '{
"team_code": "string",
"employee_id": "string"
}'
{ "name": "string", "phone": "string", "organization_email": "string", "employee_id": "string", "role": "CARD USER", "team_code": "string", "key": "string", "balance": 0 }