Подробная информация по одному клиенту
const url = 'https://api-admin.billz.ai/v1/customer/622c8993-9f82-45ae-a69d-63103d8506d5';const options = { method: 'GET', headers: { 'platform-id': '7d4a4c38-dd84-4902-b744-0488b80a4c01', Authorization: 'Bearer <token>' }};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api-admin.billz.ai/v1/customer/622c8993-9f82-45ae-a69d-63103d8506d5 \ --header 'Authorization: Bearer <token>' \ --header 'platform-id: 7d4a4c38-dd84-4902-b744-0488b80a4c01'Коды ошибок: 400 — ошибка валидации входных данных; 404 — объект не найден; 401, 403, 429, 500 — общие для всех методов. Форматы тела и семантика — Коды ответов и ошибки.
Authorizations
Заголовок раздела «Authorizations»Parameters
Заголовок раздела «Parameters»Path Parameters
Заголовок раздела «Path Parameters»Идентификатор клиента; должен быть валидным UUID
Example
622c8993-9f82-45ae-a69d-63103d8506d5Header Parameters
Заголовок раздела «Header Parameters»Идентификатор платформы. Для интеграций используется статичное значение.
Responses
Заголовок раздела «Responses»Успешный ответ
object
ID клиента
Внешний идентификатор
ID компании
Имя
Фамилия
Отчество
Enums: ru,en,uz
Дата рождения
Example: male, female (нижний регистр)
Телефоны
Example: single, married
Магазин регистрации
object
Дата последней покупки
Канал
object
SMS-уведомления
Телефонные уведомления
Уведомления в соцсетях
Сумма покупок
Сумма долга
Email-уведомления
Группы и теги; поля: id, company_id, name, session_id, loyalty_level_id, group_type, active, is_auto, description, external_id, created_at, discount_percent, customer_group_id, segment_conditions, customer_qty, works_on_retail_price, works_on_free_price, works_on_wholesale_price
object
object
Карты клиента
object
Дата создания
ID программы лояльности
ID уровня ЛП
Дата последнего обновления
Кешбэк-баланс
Название компании
Telegram chat_id
Дата первой покупки
Идентификатор источника
0 — не удалён; при другом значении метод отвечает 404
Адреса
object
Соцсети (дублирующееся объявление)
object
Родственники
object
Заметки
object
Задачи
object
Пользовательские поля
object
Средняя сумма покупки
Средняя цена товаров
Тип клиента
Средняя скидка
Среднее число товаров в чеке
Крупнейшая транзакция
Количество визитов
Признак обновления свойств
Examplegenerated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "external_id": "example", "company_id": "example", "first_name": "example", "last_name": "example", "middle_name": "example", "language": "example", "date_of_birth": "example", "gender": "example", "phone_numbers": [ "example" ], "marital_status": "example", "registered_shop": { "id": "example", "name": "example" }, "registered_shop_name": "example", "last_purchase_date": "example", "channel": { "id": "example", "company_id": "example", "name": "example", "session_id": "example" }, "sms_notification": true, "phone_notification": true, "social_network_notification": true, "purchase_amount": 1, "debt_amount": 1, "email_notification": true, "groups": [ { "id": "example", "company_id": "example", "name": "example", "session_id": "example", "loyalty_level_id": "example", "group_type": "example", "active": true, "is_auto": true, "description": "example", "external_id": "example", "created_at": "example", "discount_percent": 1, "customer_group_id": "example", "segment_conditions": [ {} ], "customer_qty": 1, "works_on_retail_price": true, "works_on_free_price": true, "works_on_wholesale_price": true } ], "group_names": [ "example" ], "tag_names": [ "example" ], "cards": [ { "id": "example", "name": "example", "code": "example", "is_active": true } ], "created_at": "example", "loyalty_program_id": "example", "loyalty_program_level_id": "example", "last_update_date": "example", "balance": 1, "company_name": "example", "chat_id": "example", "first_purchase_date": "example", "source_id": "example", "deleted_at": 1, "country_name": "example", "addresses": [ { "id": "example", "country_id": "example", "city": "example", "address": "example", "postcode": "example", "note": "example" } ], "social_networks": [ { "id": "example", "name": "example", "value": "example" } ], "relatives": [ { "id": "example", "first_name": "example", "last_name": "example", "middle_name": "example", "date_of_birth": "example", "relative_type": "example", "phone_numbers": "example", "note": "example" } ], "notes": [ { "id": "example", "note_type": "example", "value": "example", "created_by": "example", "created_at": "example" } ], "tasks": [ { "id": "example", "note_type": "example", "value": "example", "done": "example" } ], "custom_fields": [ { "id": "example", "name": "example", "type": "example", "values": "example" } ], "average_purchase_amount": 1, "average_products_price": 1, "client_type": "example", "average_discount": 1, "average_products_count": 1, "top_transaction": 1, "visits_count": 1, "props_updated": true, "imported_debt_amount": 1, "imported_debt_repayment_date": "example", "sort": [ "example" ]}