Конфигурация кнопки
<div id="listok-oauth-widget"
data-oauth-url="https://yourdomain.listokcrm.ru/oauth/authorize"
data-client-id="9e3db8c5-02f5-4fa8-a8cf-d19fa69f1ec5"
data-redirect-uri="https://yourapp.com"
data-button-text="Авторизоваться через ListOk CRM
data-button-classes="btn custom-btn-class">
</div>
<script src="https://yourdomain.listokcrm.ru/assets/public/js/listok-oauth-widget.js"></script>
https://yourdomain.listokcrm.ru/oauth/authorize?client_id=9e3db2d2-4054-43bb-bdd4-554d55da27a0&redirect_uri=http%3A%2F%2Fsomesite.test&response_type=code&scope&state=qwerqwerqwerqwerqwerqwerqwerqwerqwerqwer
curl --request POST \
"https://yourdomain.listokcrm.ru/oauth/token" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest" \
--data "{
\"grant_type\": \"authorization_code\",
\"client_id\": \"{your_app_client_id}\",
\"client_secret\": \"{your_app_client_secret}\",
\"redirect_uri\": \"{your_app_redirect_uri}\",
\"code\": \"{code}\"
}"
curl --request POST \
"https://yourdomain.listokcrm.ru/oauth/token" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest" \
--data "{
\"grant_type\": \"refresh_token\",
\"client_id\": \"{your_app_client_id}\",
\"client_secret\": \"{your_app_client_secret}\",
\"refresh_token\": \"{your_refresh_token}\",
\"scope\": ""
}"
Метод предоставляет данные о всех неудаленных абонементах в аккаунте
Страница
curl --request GET \
--get "https://yourdomain.listokcrm.ru/api/external/v2/passes?page=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest"
{
"data": [
{
"pass_id": 1,
"name": "Абонемент на 10 занятий",
"description": "",
"admit_number": 10,
"valid_for_days": 31,
"valid_for_months": 0,
"freeze_times": 100,
"freeze_days": 100,
"pass_type": 1,
"price": 2000,
"allowed_times": [],
"disabled_days": [],
"allow_buying_pass_mobile": 0,
"allow_buying_pass_online": 0
},
{
"pass_id": 1,
"name": "Абонемент на 10 занятий",
"description": "",
"admit_number": 10,
"valid_for_days": 31,
"valid_for_months": 0,
"freeze_times": 100,
"freeze_days": 100,
"pass_type": 1,
"price": 2000,
"allowed_times": [],
"disabled_days": [],
"allow_buying_pass_mobile": 0,
"allow_buying_pass_online": 0
}
],
"meta": {
"pagination": {
"total": 2,
"count": 2,
"per_page": 10,
"current_page": 1,
"total_pages": 1,
"links": {}
}
}
}
Метод предоставляет данные о всех неудаленных группах
Страница
curl --request GET \
--get "https://yourdomain.listokcrm.ru/api/external/v2/groups?page=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest"
{
"data": [
{
"group_id": 1,
"name": "Тестовая группа",
"description": "<div><span style=\"font-size:12.0pt;font-family:"Times New Roman",serif\">Тренировка по плаванию проходит с персональным тренером. Подходит для детей в возрасте от 2 месяцев до 8 лет. Все тренеры имеют большой профессиональный опыт. </span><span style=\"font-size:12.0pt;font-family:"Times New Roman",serif\">Продолжительность занятия - 30 мин.</span></div>",
"duration": 60,
"teacher_name": "Только Ассистент",
"second_teacher_name": null,
"color": "",
"video": "",
"photo": "",
"max_attendance_limit": 3,
"office_name": "Основной 12",
"created_at": "2016-01-27T15:46:51.000000Z",
"updated_at": "2024-12-25T05:18:33.000000Z",
"deleted_at": "1970-01-01T00:00:00.000000Z",
"disable_online_listing": 0,
"private_group": 0,
"group_type_name": "Второе направление"
},
{
"group_id": 1,
"name": "Тестовая группа",
"description": "<div><span style=\"font-size:12.0pt;font-family:"Times New Roman",serif\">Тренировка по плаванию проходит с персональным тренером. Подходит для детей в возрасте от 2 месяцев до 8 лет. Все тренеры имеют большой профессиональный опыт. </span><span style=\"font-size:12.0pt;font-family:"Times New Roman",serif\">Продолжительность занятия - 30 мин.</span></div>",
"duration": 60,
"teacher_name": "Только Ассистент",
"second_teacher_name": null,
"color": "",
"video": "",
"photo": "",
"max_attendance_limit": 3,
"office_name": "Основной 12",
"created_at": "2016-01-27T15:46:51.000000Z",
"updated_at": "2024-12-25T05:18:33.000000Z",
"deleted_at": "1970-01-01T00:00:00.000000Z",
"disable_online_listing": 0,
"private_group": 0,
"group_type_name": "Второе направление"
}
],
"meta": {
"pagination": {
"total": 2,
"count": 2,
"per_page": 10,
"current_page": 1,
"total_pages": 1,
"links": {}
}
}
}
Метод предоставляет данные о конкретной группе по ID
ID группы
curl --request GET \
--get "https://yourdomain.listokcrm.ru/api/external/v2/groups/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest"
{
"group_id": 1,
"name": "Тестовая группа",
"description": "<div><span style=\"font-size:12.0pt;font-family:"Times New Roman",serif\">Тренировка по плаванию проходит с персональным тренером. Подходит для детей в возрасте от 2 месяцев до 8 лет. Все тренеры имеют большой профессиональный опыт. </span><span style=\"font-size:12.0pt;font-family:"Times New Roman",serif\">Продолжительность занятия - 30 мин.</span></div>",
"duration": 60,
"teacher_name": "Только Ассистент",
"second_teacher_name": null,
"color": "",
"video": "",
"photo": "",
"max_attendance_limit": 3,
"office_name": "Основной 12",
"created_at": "2016-01-27T15:46:51.000000Z",
"updated_at": "2024-12-25T05:18:33.000000Z",
"deleted_at": "1970-01-01T00:00:00.000000Z",
"disable_online_listing": 0,
"private_group": 0,
"group_type_name": "Второе направление"
}
Метод производит поиск всех не удаленных занятий по всем филиалам. Поиск необходимо запускать с параметром date, формат даты должен быть ГГГГ-ММ-ДД
Дата занятия. Значение поля не является датой.
Дата занятия. Значение поля не является датой.
Дата занятия. Значение поля не является датой.
curl --request GET \
--get "https://yourdomain.listokcrm.ru/api/external/v2/events?date=2024-01-01&from=2024-01-01&to=2024-01-01" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest"
{
"data": [
{
"event_id": 9,
"description": null,
"type": "copy",
"week_day": 0,
"date": "2023-10-09",
"end_date_time": null,
"start_time": "07:00",
"end_time": "08:00",
"admission_coef": 1,
"created_at": "2023-10-09T07:13:40.000000Z",
"updated_at": "2023-10-09T07:13:40.000000Z",
"deleted_at": 0,
"group_id": 1,
"event_comment": "",
"teacher_name": null,
"second_teacher_name": null,
"room_name": "Тренажерный Зал 1",
"group_name": "Тестовая группа",
"group_type_name": "Второе направление",
"office_name": "Основной 12"
},
{
"event_id": 9,
"description": null,
"type": "copy",
"week_day": 0,
"date": "2023-10-09",
"end_date_time": null,
"start_time": "07:00",
"end_time": "08:00",
"admission_coef": 1,
"created_at": "2023-10-09T07:13:40.000000Z",
"updated_at": "2023-10-09T07:13:40.000000Z",
"deleted_at": 0,
"group_id": 1,
"event_comment": "",
"teacher_name": null,
"second_teacher_name": null,
"room_name": "Тренажерный Зал 1",
"group_name": "Тестовая группа",
"group_type_name": "Второе направление",
"office_name": "Основной 12"
}
],
"meta": {
"pagination": {
"total": 2,
"count": 2,
"per_page": 10,
"current_page": 1,
"total_pages": 1,
"links": {}
}
}
}
Метод предоставляет данные о конкретном неудаленном занятии по ID. Также метод предоставляет данные о записанных, в том числе в Лист ожидания, и отмеченных клиентах
ID занятия
curl --request GET \
--get "https://yourdomain.listokcrm.ru/api/external/v2/events/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest"
{
"event_id": 9,
"description": null,
"type": "copy",
"week_day": 0,
"date": "2023-10-09",
"end_date_time": null,
"start_time": "07:00",
"end_time": "08:00",
"admission_coef": 1,
"created_at": "2023-10-09T07:13:40.000000Z",
"updated_at": "2023-10-09T07:13:40.000000Z",
"deleted_at": 0,
"group_id": 1,
"event_comment": "",
"teacher_name": null,
"second_teacher_name": null,
"room_name": "Тренажерный Зал 1",
"group_name": "Тестовая группа",
"group_type_name": "Второе направление",
"office_name": "Основной 12"
}
Метод создает заявки от конкретного клиента
curl --request POST \
"https://yourdomain.listokcrm.ru/api/external/v2/inquiry" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest" \
--data "{
\"cform_id\": \"12345\",
\"contact_id\": \"12345\",
\"note\": \"Новый клиент\",
\"source\": \"call\"
}"
Метод предоставляет список источников
Страница
curl --request GET \
--get "https://yourdomain.listokcrm.ru/api/external/v2/sources?page=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest"
{
"data": [
{
"source_id": -6,
"name": "Telegram"
},
{
"source_id": -6,
"name": "Telegram"
}
],
"meta": {
"pagination": {
"total": 2,
"count": 2,
"per_page": 10,
"current_page": 1,
"total_pages": 1,
"links": {}
}
}
}
Метод предоставляет данные о всех неудаленных клиентах
Страница
ФИО.
Телефон. Must match the regex /^\d{10}$/.
Email. Значение поля должно быть действительным электронным адресом.
curl --request GET \
--get "https://yourdomain.listokcrm.ru/api/external/v2/contacts?page=1&name=%D0%98%D0%B2%D0%B0%D0%BD%D0%BE%D0%B2+%D0%98%D0%B2%D0%B0%D0%BD+%D0%98%D0%B2%D0%B0%D0%BD%D0%BE%D0%B2%D0%B8%D1%87&phone=%2B79529991122%2C+%D0%B2+%D0%BB%D1%8E%D0%B1%D0%BE%D0%BC+%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%82%D0%B5&email=test%40test.ru" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest"
{
"data": [
{
"contact_id": 1,
"name": "Иванов Иван Иваныч",
"name_short": "",
"gender": "male",
"birth_date": "1990-01-02",
"email": "ivanov2@mail.co",
"phone_alt": "",
"phone": "9991111111",
"note": "",
"sticky_note": "",
"photo": "",
"barcode": "0000000000001",
"created_at": "2016-03-17T05:48:50.000000Z",
"updated_at": "2025-02-06T07:14:58.000000Z",
"deleted_at": 0,
"balance": 0,
"bonus_balance": 0,
"parent_name": "",
"parent_phone": "0",
"parent_email": "",
"parent_name2": "",
"parent_phone2": "",
"parent_email2": "0",
"search_score": null,
"added_office_id": 0,
"customer_status": "client",
"vkid": "",
"fbid": "",
"instaid": "",
"has_trial_passes": 0,
"has_non_trial_passes": 0,
"last_admission_date": 0,
"last_pass_purchased": 0,
"first_non_trial": 0,
"last_non_trial": 0,
"utm_source": "",
"utm_medium": "",
"utm_campaign": "",
"utm_content": "",
"utm_term": "",
"can_email": 0,
"can_sms": 0,
"can_wa": 0,
"can_tg": 0
},
{
"contact_id": 1,
"name": "Иванов Иван Иваныч",
"name_short": "",
"gender": "male",
"birth_date": "1990-01-02",
"email": "ivanov2@mail.co",
"phone_alt": "",
"phone": "9991111111",
"note": "",
"sticky_note": "",
"photo": "",
"barcode": "0000000000001",
"created_at": "2016-03-17T05:48:50.000000Z",
"updated_at": "2025-02-06T07:14:58.000000Z",
"deleted_at": 0,
"balance": 0,
"bonus_balance": 0,
"parent_name": "",
"parent_phone": "0",
"parent_email": "",
"parent_name2": "",
"parent_phone2": "",
"parent_email2": "0",
"search_score": null,
"added_office_id": 0,
"customer_status": "client",
"vkid": "",
"fbid": "",
"instaid": "",
"has_trial_passes": 0,
"has_non_trial_passes": 0,
"last_admission_date": 0,
"last_pass_purchased": 0,
"first_non_trial": 0,
"last_non_trial": 0,
"utm_source": "",
"utm_medium": "",
"utm_campaign": "",
"utm_content": "",
"utm_term": "",
"can_email": 0,
"can_sms": 0,
"can_wa": 0,
"can_tg": 0
}
],
"meta": {
"pagination": {
"total": 2,
"count": 2,
"per_page": 10,
"current_page": 1,
"total_pages": 1,
"links": {}
}
}
}
Метод создает нового клиента
curl --request POST \
"https://yourdomain.listokcrm.ru/api/external/v2/contacts" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest" \
--data "{
\"name\": \"sihlpyccpogzacwaymmfa\",
\"phone\": \"6282856086\",
\"gender\": \"female\",
\"can_sms\": false,
\"can_email\": true,
\"email\": 0,
\"added_office_id\": 17
}"
{
"contact_id": 1,
"name": "Иванов Иван Иваныч",
"name_short": "",
"gender": "male",
"birth_date": "1990-01-02",
"email": "ivanov2@mail.co",
"phone_alt": "",
"phone": "9991111111",
"note": "",
"sticky_note": "",
"photo": "",
"barcode": "0000000000001",
"created_at": "2016-03-17T05:48:50.000000Z",
"updated_at": "2025-02-06T07:14:58.000000Z",
"deleted_at": 0,
"balance": 0,
"bonus_balance": 0,
"parent_name": "",
"parent_phone": "0",
"parent_email": "",
"parent_name2": "",
"parent_phone2": "",
"parent_email2": "0",
"search_score": null,
"added_office_id": 0,
"customer_status": "client",
"vkid": "",
"fbid": "",
"instaid": "",
"has_trial_passes": 0,
"has_non_trial_passes": 0,
"last_admission_date": 0,
"last_pass_purchased": 0,
"first_non_trial": 0,
"last_non_trial": 0,
"utm_source": "",
"utm_medium": "",
"utm_campaign": "",
"utm_content": "",
"utm_term": "",
"can_email": 0,
"can_sms": 0,
"can_wa": 0,
"can_tg": 0
}
Метод предоставляет данные о конкретном клиенте по ID
ID клиента
curl --request GET \
--get "https://yourdomain.listokcrm.ru/api/external/v2/contacts/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest"
{
"contact_id": 1,
"name": "Иванов Иван Иваныч",
"name_short": "",
"gender": "male",
"birth_date": "1990-01-02",
"email": "ivanov2@mail.co",
"phone_alt": "",
"phone": "9991111111",
"note": "",
"sticky_note": "",
"photo": "",
"barcode": "0000000000001",
"created_at": "2016-03-17T05:48:50.000000Z",
"updated_at": "2025-02-06T07:14:58.000000Z",
"deleted_at": 0,
"balance": 0,
"bonus_balance": 0,
"parent_name": "",
"parent_phone": "0",
"parent_email": "",
"parent_name2": "",
"parent_phone2": "",
"parent_email2": "0",
"search_score": null,
"added_office_id": 0,
"customer_status": "client",
"vkid": "",
"fbid": "",
"instaid": "",
"has_trial_passes": 0,
"has_non_trial_passes": 0,
"last_admission_date": 0,
"last_pass_purchased": 0,
"first_non_trial": 0,
"last_non_trial": 0,
"utm_source": "",
"utm_medium": "",
"utm_campaign": "",
"utm_content": "",
"utm_term": "",
"can_email": 0,
"can_sms": 0,
"can_wa": 0,
"can_tg": 0
}
Метод позволяет оформить абонемент клиенту
ID клиента
ID абонемента
curl --request POST \
"https://yourdomain.listokcrm.ru/api/external/v2/contacts/1/passes/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest" \
--data "{
\"amount\": 1000,
\"cashregister_id\": 1
}"
{
"pass_contact_id": 1,
"pass_id": 1,
"is_trial": 0,
"sold_at": 1696852602,
"created_at": "2023-10-09T11:56:42.000000Z",
"updated_at": "2024-08-22T04:40:02.000000Z",
"deleted_at": "1970-01-01T00:00:00.000000Z",
"debt_dead_line_at": "1970-01-01T00:00:00.000000Z",
"expires_at": "2023-12-15T17:00:00.000000Z",
"expired_at": "0000-00-00",
"activated_at": "2023-10-08T17:00:00.000000Z",
"frozen_till_at": "2024-07-11T17:00:00.000000Z",
"planned_freeze_at": null,
"paid_price": 2000,
"full_price": 2000,
"discounted": 0,
"status": "frozen",
"class_type": "ege",
"points_left": 11,
"points_total": 10,
"freeze_times": 100,
"comment": "",
"revoke_comment": "",
"pass": {
"pass_id": 1,
"name": "Абонемент на 10 занятий",
"description": "",
"admit_number": 10,
"valid_for_days": 31,
"valid_for_months": 0,
"freeze_times": 100,
"freeze_days": 100,
"pass_type": 1,
"price": 2000,
"allowed_times": [],
"disabled_days": [],
"allow_buying_pass_mobile": 0,
"allow_buying_pass_online": 0
}
}
Метод предоставляет данные о всех абонементах клиента. Абонементы фильтруются по статусу: активный, неактивированный, замороженный, истекший, отозванный
ID клиента
Статус
Страница
curl --request GET \
--get "https://yourdomain.listokcrm.ru/api/external/v2/contacts/1/passes?status=active%2C+expired%2C+frozen%2C+inactive%2C+revoked&page=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest"
{
"data": [
{
"pass_contact_id": 1,
"pass_id": 1,
"is_trial": 0,
"sold_at": 1696852602,
"created_at": "2023-10-09T11:56:42.000000Z",
"updated_at": "2024-08-22T04:40:02.000000Z",
"deleted_at": "1970-01-01T00:00:00.000000Z",
"debt_dead_line_at": "1970-01-01T00:00:00.000000Z",
"expires_at": "2023-12-15T17:00:00.000000Z",
"expired_at": "0000-00-00",
"activated_at": "2023-10-08T17:00:00.000000Z",
"frozen_till_at": "2024-07-11T17:00:00.000000Z",
"planned_freeze_at": null,
"paid_price": 2000,
"full_price": 2000,
"discounted": 0,
"status": "frozen",
"class_type": "ege",
"points_left": 11,
"points_total": 10,
"freeze_times": 100,
"comment": "",
"revoke_comment": "",
"pass": {
"pass_id": 1,
"name": "Абонемент на 10 занятий",
"description": "",
"admit_number": 10,
"valid_for_days": 31,
"valid_for_months": 0,
"freeze_times": 100,
"freeze_days": 100,
"pass_type": 1,
"price": 2000,
"allowed_times": [],
"disabled_days": [],
"allow_buying_pass_mobile": 0,
"allow_buying_pass_online": 0
}
},
{
"pass_contact_id": 1,
"pass_id": 1,
"is_trial": 0,
"sold_at": 1696852602,
"created_at": "2023-10-09T11:56:42.000000Z",
"updated_at": "2024-08-22T04:40:02.000000Z",
"deleted_at": "1970-01-01T00:00:00.000000Z",
"debt_dead_line_at": "1970-01-01T00:00:00.000000Z",
"expires_at": "2023-12-15T17:00:00.000000Z",
"expired_at": "0000-00-00",
"activated_at": "2023-10-08T17:00:00.000000Z",
"frozen_till_at": "2024-07-11T17:00:00.000000Z",
"planned_freeze_at": null,
"paid_price": 2000,
"full_price": 2000,
"discounted": 0,
"status": "frozen",
"class_type": "ege",
"points_left": 11,
"points_total": 10,
"freeze_times": 100,
"comment": "",
"revoke_comment": "",
"pass": {
"pass_id": 1,
"name": "Абонемент на 10 занятий",
"description": "",
"admit_number": 10,
"valid_for_days": 31,
"valid_for_months": 0,
"freeze_times": 100,
"freeze_days": 100,
"pass_type": 1,
"price": 2000,
"allowed_times": [],
"disabled_days": [],
"allow_buying_pass_mobile": 0,
"allow_buying_pass_online": 0
}
}
],
"meta": {
"pagination": {
"total": 2,
"count": 2,
"per_page": 10,
"current_page": 1,
"total_pages": 1,
"links": {}
}
}
}
Метод предоставляет данные о конкретном абонементе конкретного клиента
ID клиента
ID абонемента клиента
curl --request GET \
--get "https://yourdomain.listokcrm.ru/api/external/v2/contacts/1/passes/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest"
{
"pass_contact_id": 1,
"pass_id": 1,
"is_trial": 0,
"sold_at": 1696852602,
"created_at": "2023-10-09T11:56:42.000000Z",
"updated_at": "2024-08-22T04:40:02.000000Z",
"deleted_at": "1970-01-01T00:00:00.000000Z",
"debt_dead_line_at": "1970-01-01T00:00:00.000000Z",
"expires_at": "2023-12-15T17:00:00.000000Z",
"expired_at": "0000-00-00",
"activated_at": "2023-10-08T17:00:00.000000Z",
"frozen_till_at": "2024-07-11T17:00:00.000000Z",
"planned_freeze_at": null,
"paid_price": 2000,
"full_price": 2000,
"discounted": 0,
"status": "frozen",
"class_type": "ege",
"points_left": 11,
"points_total": 10,
"freeze_times": 100,
"comment": "",
"revoke_comment": "",
"pass": {
"pass_id": 1,
"name": "Абонемент на 10 занятий",
"description": "",
"admit_number": 10,
"valid_for_days": 31,
"valid_for_months": 0,
"freeze_times": 100,
"freeze_days": 100,
"pass_type": 1,
"price": 2000,
"allowed_times": [],
"disabled_days": [],
"allow_buying_pass_mobile": 0,
"allow_buying_pass_online": 0
}
}
Метод предоставляет данные о всех записях на занятия конкретного клиента. Дополнительно метод производит поиск по id занятия, чтобы проверить запись клиента на конкретное занятие
ID клиента
Страница
Id занаятия.
Пропуск.
curl --request GET \
--get "https://yourdomain.listokcrm.ru/api/external/v2/contacts/1/listings?page=1&event_id=12345&missed=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest"
{
"data": [
{
"listing_id": 55,
"event_id": 163308,
"contact_id": 15,
"source": "",
"missed_pass_contact_id": 0,
"is_missed": false
},
{
"listing_id": 55,
"event_id": 163308,
"contact_id": 15,
"source": "",
"missed_pass_contact_id": 0,
"is_missed": false
}
],
"meta": {
"pagination": {
"total": 2,
"count": 2,
"per_page": 10,
"current_page": 1,
"total_pages": 1,
"links": {}
}
}
}
Метод позволяет отменить одну запись конкретного клиента с конкретного занятия
ID клиента
ID записи
curl --request DELETE \
"https://yourdomain.listokcrm.ru/api/external/v2/contacts/1/listings/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest"
Метод позволяет записать конкретного клиента на конкретное занятие. Не позволит записать клиента в лист ожидания. Для этого используется отдельные метод: «Добавить в лист ожидания»
ID клиента
curl --request POST \
"https://yourdomain.listokcrm.ru/api/external/v2/contacts/1/listings" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest" \
--data "{
\"event_id\": \"12345\"
}"
{
"listing_id": 55,
"event_id": 163308,
"contact_id": 15,
"source": "",
"missed_pass_contact_id": 0,
"is_missed": false
}
Метод предоставляет список всех посещений конкретного клиента. По дополнительному параметру eventId,метод предоставит данные о посещении на конкретном занятии
ID клиента
Страница
Id занаятия.
curl --request GET \
--get "https://yourdomain.listokcrm.ru/api/external/v2/contacts/1/admissions?page=1&event_id=12345" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest"
{
"data": [
{
"admission_id": 2,
"event_id": 18,
"contact_id": 4,
"is_debt": false,
"pass_contact_id": 2,
"created_at": "2023-10-31T04:21:53.000000Z"
},
{
"admission_id": 2,
"event_id": 18,
"contact_id": 4,
"is_debt": false,
"pass_contact_id": 2,
"created_at": "2023-10-31T04:21:53.000000Z"
}
],
"meta": {
"pagination": {
"total": 2,
"count": 2,
"per_page": 10,
"current_page": 1,
"total_pages": 1,
"links": {}
}
}
}
Метод позволяет отменить посещение конкретного клиента
ID клиента
ID посещения
curl --request DELETE \
"https://yourdomain.listokcrm.ru/api/external/v2/contacts/1/admissions/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest"
Метод позволит отметить конкретного клиента на конкретном занятии
ID клиента
curl --request POST \
"https://yourdomain.listokcrm.ru/api/external/v2/contacts/1/admissions" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest" \
--data "{
\"event_id\": \"12345\",
\"pass_contact_id\": \"12345\"
}"
{
"admission_id": 2,
"event_id": 18,
"contact_id": 4,
"is_debt": false,
"pass_contact_id": 2,
"created_at": "2023-10-31T04:21:53.000000Z"
}
Метод предоставляет все записи из листа ожидания конкретного клиента. Условие: на аккаунте включен лист ожидания
ID клиента
Страница
curl --request GET \
--get "https://yourdomain.listokcrm.ru/api/external/v2/contacts/1/queue?page=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest"
{
"data": [
{
"queue_id": 5,
"event_id": 23,
"contact_id": 4
},
{
"queue_id": 5,
"event_id": 23,
"contact_id": 4
}
],
"meta": {
"pagination": {
"total": 2,
"count": 2,
"per_page": 10,
"current_page": 1,
"total_pages": 1,
"links": {}
}
}
}
Метод позволяет отменить запись клиента в листе ожидания. Условие: на аккаунте включен лист ожидания
ID клиента
ID листа ожидания
curl --request DELETE \
"https://yourdomain.listokcrm.ru/api/external/v2/contacts/1/queue/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest"
{
"queue_id": 5,
"event_id": 23,
"contact_id": 4
}
Метод позволяет добавить конкретного клиента в лист ожидания на занятие. Условие: на аккаунте включен лист ожидания
ID клиента
curl --request POST \
"https://yourdomain.listokcrm.ru/api/external/v2/contacts/1/queue" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest" \
--data "{
\"event_id\": \"12345\"
}"
{
"queue_id": 5,
"event_id": 23,
"contact_id": 4
}
Метод предоставляет все неудаленные платежи по конкретному клиенту
ID клиента
Страница
curl --request GET \
--get "https://yourdomain.listokcrm.ru/api/external/v2/contacts/1/payments?page=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest"
{
"data": [
{
"payment_id": 1,
"from_id": 4,
"to_id": -1,
"user_id": 1,
"direction": "income",
"reason": "Покупка абонемента "Абонемент на 10 занятий" #1. ",
"date": "09.10.2023",
"amount": 2000,
"full_price": 2000,
"balance_paid": 0,
"total_discount_amount": 0,
"discount_bonus_amount": null,
"discount_amount": 0,
"payment_type": "pass",
"init_price": 0,
"discounts": {
"discounts": [
{
"name": "Another one",
"original_name": "Another one",
"type": "regular",
"amount": 0,
"amount_fixed": 0,
"amount_percent": 15,
"amount_type": null,
"code_word": "",
"contact_id": 0,
"country_id": 1,
"discount_id": 3,
"discounts_left": 0,
"discountslot_id": null,
"dynamic_calculator": null,
"dynamic_type": null,
"limit_per_contact": null,
"limited": 0,
"master_id": 0,
"use_for": "any",
"used": 0,
"valid_til": null,
"pivot": {
"amount": 2000,
"amountPaid": 2000,
"contactId": null,
"discountAlgorithm": "sum",
"discountAmount": 0,
"discountId": 3,
"discount_amountFixed": 0,
"discount_amountPercent": 15,
"discount_codeWord": null,
"discount_name": "Another one",
"discount_useFor": "any",
"order": null,
"paymentId": 1
}
}
]
}
},
{
"payment_id": 1,
"from_id": 4,
"to_id": -1,
"user_id": 1,
"direction": "income",
"reason": "Покупка абонемента "Абонемент на 10 занятий" #1. ",
"date": "09.10.2023",
"amount": 2000,
"full_price": 2000,
"balance_paid": 0,
"total_discount_amount": 0,
"discount_bonus_amount": null,
"discount_amount": 0,
"payment_type": "pass",
"init_price": 0,
"discounts": {
"discounts": [
{
"name": "Another one",
"original_name": "Another one",
"type": "regular",
"amount": 0,
"amount_fixed": 0,
"amount_percent": 15,
"amount_type": null,
"code_word": "",
"contact_id": 0,
"country_id": 1,
"discount_id": 3,
"discounts_left": 0,
"discountslot_id": null,
"dynamic_calculator": null,
"dynamic_type": null,
"limit_per_contact": null,
"limited": 0,
"master_id": 0,
"use_for": "any",
"used": 0,
"valid_til": null,
"pivot": {
"amount": 2000,
"amountPaid": 2000,
"contactId": null,
"discountAlgorithm": "sum",
"discountAmount": 0,
"discountId": 3,
"discount_amountFixed": 0,
"discount_amountPercent": 15,
"discount_codeWord": null,
"discount_name": "Another one",
"discount_useFor": "any",
"order": null,
"paymentId": 1
}
}
]
}
}
],
"meta": {
"pagination": {
"total": 2,
"count": 2,
"per_page": 10,
"current_page": 1,
"total_pages": 1,
"links": {}
}
}
}
Метод предоставляет список всех созданных типов способов оплаты
Страница
curl --request GET \
--get "https://yourdomain.listokcrm.ru/api/external/v2/cash-register?page=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest"
{
"data": [
{
"cashregister_id": 1,
"type": "cash",
"name": "Наличный",
"is_system": 1
},
{
"cashregister_id": 1,
"type": "cash",
"name": "Наличный",
"is_system": 1
}
],
"meta": {
"pagination": {
"total": 2,
"count": 2,
"per_page": 10,
"current_page": 1,
"total_pages": 1,
"links": {}
}
}
}
Метод предоставляет список всех созданных форм захвата
Страница
curl --request GET \
--get "https://yourdomain.listokcrm.ru/api/external/v2/inquiry-forms?page=1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "X-Requested-With: XMLHttpRequest"
{
"data": [
{
"cform_id": 1,
"name": "еуые"
},
{
"cform_id": 1,
"name": "еуые"
}
],
"meta": {
"pagination": {
"total": 2,
"count": 2,
"per_page": 10,
"current_page": 1,
"total_pages": 1,
"links": {}
}
}
}