Search for contacts in the stop list
Method for searching contacts in the stop list.
In the search, it is possible to use operations: like,=,>,>=,<,<=.
Request URL
GET http://one-api.bsg.world/api/stoplists/search |
Request parameters
Parameter |
Required |
Type |
Default |
Description |
||||||||
page[offset] |
No |
int |
0 |
Get contacts starting from offset |
||||||||
page[limit] |
No |
int |
50 |
Number of contacts in response |
||||||||
sort |
No |
string |
id |
Sort by conditions: id, phone |
||||||||
way |
No |
string |
asc |
Sorting options: asc, desc |
||||||||
search[operation] |
No |
string |
= |
Operator for finding values: like, =, >, >=, <, <= |
||||||||
search[field] |
No |
string |
no |
Field for search: id, type, phone, date |
||||||||
search[value] |
No |
string |
no |
Value for search:
|
Response parameters
Parameter |
Type |
Description |
id |
integer |
Contact ID |
phone |
integer |
Phone number |
created_at |
string |
Date of adding the contact to the stop list. Display format ISO 8601: yyyy-mm-dd hh:mm:ss |
sms_stoplist |
boolean |
Whether the contact was added to the SMS stop list. Possible values: true or false. |
viber_stoplist |
boolean |
Whether the contact was added to the Viber stop list. Possible values: true or false. |
Response sample
If the request is successful, you will receive a response:
{ "data": [ { "id": 9392897, "phone": 12345678900, "created_at": "2022-04-18 19:22:16", "sms_stoplist": true, "viber_stoplist": false } ], "meta": { "page": { "total": 1, "limit": 30, "offset": 0 }, "search": { "field": "id", "operation": "like", "value": "string" } } } |
Comments
0 comments
Article is closed for comments.