Developer Docs

Table of contents

Search Contact List

Method for searching the list of contacts using operations like, =, >, >=, <, <=. Search is possible by the following fields: 

  • name
  • description
  • date
  • items
  • phone
  • id

To search Contact List, make a request to this server:

GET  http://one-api.bsg.world/api/groups/search

Request parameters:

ParameterRequiredTypeDefaultDescription
page[offset]Nointeger0Get contact groups starting from offset
page[limit]Nointeger50Number of contact groups in response
sortNostringidSort by conditions: id, items, name, description, date
wayNostringascSorting options: asc, desc
search[operation]Nostring=Operator for finding values: like, =, >, >=, <, <=
search[field]NostringnoFields for search: name, items, date, description, phone, id
search[value]Value for search:Nostringno
nameList name. Up to 50 characters
descriptionList description. Up to 250 characters
dateDate of the list creation in the format ISO 8601: yyyy-mm-dd hh:mm:ss
itemsNumber of contacts in the list
phonePhone number which a list contains/does not contain. 9 to 15 digits
idContact list ID

Response parameters:

ParameterTypeDescription
idintegerList ID
namestringList name
descriptionstringList description
is_defaultbooleanWhether the list is the default. Possible values: true, false
itemsintegerNumber of contacts in the list
created atstringDate 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",
      "operation": "like",
      "value": "string"
    }
  }
}

We use cookies (and other similar technologies) to collect data to improve your experience on our site. By using our website, you’re agreeing to the collection of data as described in our Website Data Collection Policy.