Поиск контакта
Метод для поиска контактов в Книге контактов.
В поиске можно использовать операции like, =, >, >=, <, <=.
Поиск возможен по следующим полям:
  • id: =, >, >=, <, <=
  • phone: like, =
  • {field_id}:
  • для поля с типом "Текст": like, =
  • для поля с типом "Число": =, >, >=, <, <=
  • для поля с типом "Дата": =, >, >=, <, <=
Чтобы выполнить поиск контактов, отправьте запрос по этому URL:
GET http://one-api.notificore.ru/api/contacts/search
Request parameters
ParameterRequiredTypeDefaultDescription
page[offset]Noint0Get contacts starting from offset
page[limit]Noint50Number of contacts in response
sortNostringidSort by conditions: id, phone
wayNostringascSorting options: asc, desc
search[operation]Nostring=Operator for finding values: like, =, >, >=, <, <=
search[field]NostringnoField for search. Possible values: id, phone, group_id, date, {field_id}
search[value]NostringnoValue for search
Response parameters
ParameterTypeDescription
idintegerContact ID
phoneintegerContact phone number
fieldsContains nested custom field parameters
created_atdatetimeContact creation date – set automatically by the Notificore system when adding a contact to the Contact Book. Format ISO 8601 yyyy-mm-dd hh:mm:ss
groupsContains nested parameters of the list to which the contact is added
hlr_statusstringStatus of checking the contact’s phone number in HLR. Possible values: barred, absent, active, unknown, failed.
hlr_last_checkdatetimeDate and time when the contact’s phone number was last checked in HLR. Format ISO 8601 yyyy-mm-dd hh:mm:ss
Если запрос успешен, вы получите ответ:
{
  "data": [
    {
      "id": 1,
      "phone": 33601148802,
      "fields": [
        {
          "code": 0,
          "text": "string"
        }
      ],
      "created_at": "2022-04-28 14:21:16",
      "groups": [
        {
          "id": 1,
          "name": "string",
          "description": "string",
          "default": 0,
          "created_at": "2022-04-28 14:21:16"
        }
      ],
      "hlr_status": "string",
      "hlr_last_check": "2022-04-28 14:21:16"
    }
  ],
  "meta": {
    "page": {
      "total": 1,
      "limit": 50,
      "offset": 0
    },
    "search": {
      "field": 0,
      "operation": "like",
      "value": "string"
    }
  }
}