Method for searching the list of contacts using operations like, =, >, >=, <, <=. Search is possible by the following fields:
To search Contact List, make a request to this server:
| GET http://one-api.bsg.world/api/groups/search |
| Parameter | Required | Type | Default | Description | |
|---|---|---|---|---|---|
| page[offset] | No | integer | 0 | Get contact groups starting from offset | |
| page[limit] | No | integer | 50 | Number of contact groups in response | |
| sort | No | string | id | Sort by conditions: id, items, name, description, date | |
| way | No | string | asc | Sorting options: asc, desc | |
| search[operator] | No | string | = | Operator for finding values: like, =, >, >=, <, <= | |
| search[field] | No | string | no | Fields for search: name, items, date, description, phone, id | |
| search[value] | Value for search: | No | string | no | |
| name | List name. Up to 50 characters | ||||
| description | List description. Up to 250 characters | ||||
| date | Date of the list creation in the format ISO 8601: yyyy-mm-dd hh:mm:ss | ||||
| items | Number of contacts in the list | ||||
| phone | Phone number which a list contains/does not contain. 9 to 15 digits | ||||
| id | Contact list ID |
| Parameter | Type | Description |
|---|---|---|
| id | integer | List ID |
| name | string | List name |
| description | string | List description |
| is_default | boolean | Whether the list is the default. Possible values: true, false |
| items | integer | Number of contacts in the list |
| created at | string | Date and time the list was created. Format ISO 8601 yyyy-mm-dd hh:mm:ss |
If the request is successful, you will receive a response:
{
"data": [
{
"id": 1,
"name": "string",
"description": "string",
"is_default": true,
"items": 0,
"created_at": "2022-04-28 14:21:16"
}
],
"meta": {
"page": {
"total": 1,
"offset": 20,
"limit": 40
},
"search": {
"field": "id",
"operator": "like",
"value": "string"
}
}
}