GET groups
From Social ID Developers
Contents |
Description
Searches for Groups.
Resource URL
GET https://api.socialidnow.com/v1/marketing/groups
Parameters
URL Parameters
name | optional | group name. |
---|---|---|
name:like | optional | part of group name. |
category | optional | group category. |
category:like | optional | part of group category. |
ids | optional | comma separated list of group ids. Example: ids=1,2,3. |
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. |
internal_server_error (500) | An unknown error happened. |
Response Body
A successful search returns the following fields:
total | total amount of groups found. |
---|---|
offset | amount of discarded groups (page start). |
count | amount of groups returned in this page. |
results | array with group details. See response from GET groups/:group_id |
Examples
Without search parameters
Request
curl -iX GET 'https://api.socialidnow.com/v1/marketing/groups' \ --user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf
Response
Response Headers
HTTP/1.1 200 Ok Status: 200
Response Body
{ "total": 50, "offset": 0, "count": 8, "results": [ { "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": "2022-11-17T19:30:00Z", "updated_at": "2022-11-17T19:30:00Z" }, { "id": 2, "name": "Group B", "category": "Category X", "description": "My Group B description", "child_group_ids": [], "parent_group_ids": [], "manager_group_ids": [], "managed_group_ids": [], "created_at": "2022-11-17T19:31:00Z", "updated_at": "2022-11-17T19:31:00Z" }, { "id": 3, "name": "Group C", "category": "Category X", "description": "My Group C description", "child_group_ids": [], "parent_group_ids": [], "manager_group_ids": [], "managed_group_ids": [], "created_at": "2022-11-17T19:32:00Z", "updated_at": "2022-11-17T19:32:00Z" }, { "id": 4, "name": "Group D", "category": "Category Y", "description": null, "child_group_ids": [], "parent_group_ids": [], "manager_group_ids": [], "managed_group_ids": [], "created_at": "2022-11-17T19:33:00Z", "updated_at": "2022-11-17T19:33:00Z" }, { "id": 5, "name": "Group E", "category": "Category Y", "description": null, "child_group_ids": [], "parent_group_ids": [], "manager_group_ids": [], "managed_group_ids": [], "created_at": "2022-11-17T19:34:00Z", "updated_at": "2022-11-17T19:34:00Z" }, { "id": 6, "name": "Group F", "category": "Category Y", "description": null, "child_group_ids": [], "parent_group_ids": [], "manager_group_ids": [], "managed_group_ids": [], "created_at": "2022-11-17T19:35:00Z", "updated_at": "2022-11-17T19:35:00Z" }, { "id": 7, "name": "Group G", "category": "Category Y", "description": null, "child_group_ids": [], "parent_group_ids": [], "manager_group_ids": [], "managed_group_ids": [], "created_at": "2022-11-17T19:36:00Z", "updated_at": "2022-11-17T19:36:00Z" }, { "id": 8, "name": "Group H", "category": "Category Y", "description": null, "child_group_ids": [], "parent_group_ids": [], "manager_group_ids": [], "managed_group_ids": [], "created_at": "2022-11-17T19:37:00Z", "updated_at": "2022-11-17T19:37:00Z" } ] }
With search parameters
Request
curl -iX GET 'https://api.socialidnow.com/v1/marketing/groups?category=Category+X&page_size=2&page=2' \ --user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf
Response
Response Headers
HTTP/1.1 200 Ok Status: 200
Response Body
{ "total": 3, "offset": 2, "count": 1, "results": [ { "id": 3, "name": "Group C", "category": "Category X", "description": "My Group C description", "child_group_ids": [], "parent_group_ids": [], "manager_group_ids": [], "managed_group_ids": [], "created_at": "2022-11-17T19:32:00Z", "updated_at": "2022-11-17T19:32:00Z" } ] }