GET groups/:group id/child groups
From Social ID Developers
Contents |
Description
Searches for Group Children of a Group.
Resource URL
GET https://api.socialidnow.com/v1/marketing/groups/:group_id/child_groups
Parameters
URL Parameters
child_group_id | optional | group child id. |
---|---|---|
page | optional | page number (each page contains page_size results). Default: 1. |
page_size | optional | maximum amount of results to be returned. Default: 8. |
Authentication
This API requires Account authentication. See Authentication.
Response
Response Status
ok (200) | The request was successful. |
---|---|
unauthorized (401) | The authentication is wrong. See Authentication. |
forbidden (403) | The account does not have access to this group. |
internal_server_error (500) | An unknown error happened. |
Response Body
A successful search returns the following fields:
total | total amount of group children found. |
---|---|
offset | amount of discarded group children (page start). |
count | amount of group children returned in this page. |
results | array with group children details: |
created_at | date when the group child was added to the group. |
child_group_id | group child identifier |
child_group | group child details. See response from GET groups/:group_id |
Examples
Without search parameters
Request
curl -iX GET 'https://api.socialidnow.com/v1/marketing/groups/40/child_groups' \ --user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf
Response
Response Headers
HTTP/1.1 200 Ok Status: 200
Response Body
{ "total": 3, "offset": 0, "count": 3, "results": [ { "created_at": "2023-08-10T18:02:00Z", "child_group_id": 1, "child_group: { "id": 1, "name": "Group A", "category": "Category X", "description": "My Group A description", "child_group_ids": [10,20,30], "parent_group_ids": [30,40,50], "manager_group_ids": [60,70,80], "managed_group_ids": [90,100,110], "created_at": "2023-08-10T18:02:00Z", "updated_at": "2023-08-10T18:02:00Z" } }, { "created_at": "2023-08-10T18:03:00Z", "child_group_id": 2, "child_group: { "id": 2, "name": "Group B", "category": "Category Y", "description": "My Group B description", "child_group_ids": [10,20,30], "parent_group_ids": [30,40,50], "manager_group_ids": [60,70,80], "managed_group_ids": [90,100,110], "created_at": "2023-08-10T18:03:00Z", "updated_at": "2023-08-10T18:03:00Z" } }, { "created_at": "2023-08-10T18:04:00Z", "child_group_id": 3, "child_group: { "id": 3, "name": "Group C", "category": "Category Z", "description": "My Group C description", "child_group_ids": [10,20,30], "parent_group_ids": [30,40,50], "manager_group_ids": [60,70,80], "managed_group_ids": [90,100,110], "created_at": "2023-08-10T18:04:00Z", "updated_at": "2023-08-10T18:04:00Z" } } ] }
With search parameters
Request
curl -iX GET 'https://api.socialidnow.com/v1/marketing/groups/40/child_groups?page_size=1&page=2' \ --user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf
Response
Response Headers
HTTP/1.1 200 Ok Status: 200
Response Body
{ "total": 3, "offset": 1, "count": 1, "results": [ { "created_at": "2023-08-10T18:03:00Z", "child_group_id": 2, "child_group: { "id": 2, "name": "Group B", "category": "Category Y", "description": "My Group B description", "child_group_ids": [10,20,30], "parent_group_ids": [30,40,50], "manager_group_ids": [60,70,80], "managed_group_ids": [90,100,110], "created_at": "2023-08-10T18:03:00Z", "updated_at": "2023-08-10T18:03:00Z" } } ] }