Get Group List
Important Note
This feature is available in the Business plan. If you haven't upgraded yet, please upgrade before using this feature.
API Overview
- Function: Get Group List
- Request Method: GET
- Request URL: /api/contacts/teams/{team_id}/groups?appid={appid}&access_token={access_token}&page={1}&per_page={10}
Request Parameters
| Parameter Name | Type | Required | Location | Description | Example |
|---|---|---|---|---|---|
| team_id | integer | Yes | uri | Team ID | 30 |
| page | integer | No | queryString | Current Page Number | 1 |
| per_page | integer | No | queryString | Items Per Page | 10 |
| remote_ids | array | No | queryString | Remote IDs | 1 |
| parent_id | integer | No | queryString | Parent ID |
Response Parameters
| Parameter Name | Type | Description |
|---|---|---|
| list | array[object] | Group List |
| list[_].id | integer | Group ID |
| list[_].team_id | integer | Team ID |
| list[_].parent_id | integer | Parent ID |
| list[_].source | integer | Source |
| list[_].remote_id | string | Remote ID |
| list[_].name | string | Group Name |
| list[_].full_name | string | Full Name |
| list[_].order | integer | Order |
| list[_].is_valid | bool | Is Valid |
| list[_].created_at | datetime | Creation Time |
| list[_].upd_at | datetime | Update Time |
| total | integer | Total Count |
Response Examples
- Successful Request
{
"code": "OK",
"error": {
"type": ""
},
"data": {
"list": [
{
"id": 6033,
"team_id": 53,
"parent_id": 6031,
"source": 2,
"remote_id": "1202",
"name": "Test Batch 2",
"full_name": "",
"order": 1002,
"is_valid": true,
"created_at": "2021-06-24T18:24:45+08:00",
"upd_at": "2021-06-24T18:24:45+08:00"
},
{
"id": 6031,
"team_id": 53,
"parent_id": 0,
"source": 2,
"remote_id": "",
"name": "Test Subgroup",
"full_name": "Test Group/Test Subgroup",
"order": 0,
"is_valid": true,
"created_at": "2021-06-24T17:59:03+08:00",
"updated_at": "2021-06-24T17:59:"
}
],
"total": 2
},
"request_id": "cb4e532d-1be0-42fd-983e-f8c69eba943f"
}
- Failed Request
{
"code": "PermissionDenied",
"error": {
"type": "claim_error"
},
"data": {},
"request_id": "5ffeb778-6046-42b2-b6f7-0c79ebc82288"
}
Error Codes
| error.type Code | Description |
|---|---|
| claim_error | No Permission |
| invalid_argument | Parameter Validation Failed |