Palms Club API
Документация описывает интеграцию клубов с Palms. Вы можете интегрировать CRM клуба для получения бронирований из Palms.
Общая информация
-
Мы строим REST API. Все общение с Palms API проходит через HTTP в JSON формате. Мы стараемся следовать REST, но следуем common-sense и отходим от REST, когда это имеет смысл.
-
В каждом ответе, при котором меняется, создается модель мы возвращаем обновленное значение в ответе.
Среды
Среда | URL | Когда использовать |
---|---|---|
Dev | https://api-dev.palms.tennis | Для разработки. Может очищаться и валиться. Она для внутренней работы. Лучше не использовать для интеграции |
Test | https://api-test.palms.tennis | Тестовая среда. Тоже может очищаться и валиться. Мы ее используем как тестовый полигон перед продакшеном. Если нужно провести миграцию на проде, то мы сначала ее пробуем накатывать их на тесте, а потом, если все прошло гладко, применяем их для продакшена |
Prod | https://api.palms.tennis | Боевой сервер. Данные с продакшена используются в приложении и показываются клиентам. Мы максимально аккуратны с этой средой, она надежна и стабильна. |
Стандартные HTTP коды ответов
Код | Значение |
---|---|
200 | Все ок, ответ успешный |
401 | Запрос не прошел авторизацию. Проверьте ключи доступа |
422 | Ошибки валидации как данных, так и логические |
404 | Модель или роут не найден |
Авторизация
Внешние клиенты авторизацию по API Key. Чтобы его получить - обратитесь в поддержку hello@palms.tennis.
Для авторизации запроса, нужно передать хедер Authorization с указанием API Key.
Например,
Authorization: Bearer XXXXX
где XXXXX
- ваш API Key
Пейджинация
Большинство роутов получения коллекций обьектов имеют пейджинацию. Пейджинация страничная, включает два URL параметра:
-
page_size
(number) - количество элементов на страницы -
page
(number) - номер страницы
Например
https://api.palms.tennis/club/slots?page=1&page_size=10
Ошибки
Ошибка валидации
{
"error": {
"message": "Validation failed",
"type": "validation",
"validations": {} // ответы валидаторов для дебага
}
}
Ошибка авторизации
{
"error": {
"message": "You are not authorized for this action",
"type": "authorization_error"
}
}
Другие ошибки
{
"error": {
"message": "Error message. Long readable text",
"type": "error_type"
}
}
Форматы данных
Даты
Даты хранятся в формате ISO 8601 c указанием времени и часового пояса.
Например, 2019-05-29T15:15:43+00:00
Валюты
Валюты мы храним в формате ISO 4217 в трех символьной строке.
Например, USD
, UAH
, или EUR
.
Суммы
Суммы мы храним целым числом без разделителя.
Например, сумма 5 грн 40 коп. будет храниться как 540
Номера телефонов
Согласно стандарту E.164 в международном формате.
Например, +380932345678
Типы помещения ¶
Получить список ¶
Получить списокGET/club/area-types/{?page_size,page}
Example URI
- page_size
number
(optional)количество записей на странице
- page
number
(optional)номер страницы
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"meta": {
"pagination": {
"total_number": 22,
"current_page": 1,
"total_pages": 2,
"page_size": 20
}
},
"data": [
{
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
},
{
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"pagination": {
"type": "object",
"properties": {
"total_number": {
"type": "number",
"description": "общее количество сущностей"
},
"current_page": {
"type": "number",
"description": "текущая страница"
},
"total_pages": {
"type": "number",
"description": "всего страниц"
},
"page_size": {
"type": "number",
"description": "записей на страницу"
}
}
}
}
},
"data": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
}
},
{
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
}
}
]
}
}
}
Получить модель ¶
Получить модельGET/club/area-types/{id}
Example URI
- id
number
(required) Example: 1идентификатор корта
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
}
}
}
}
Корты ¶
Получить список ¶
Получить списокGET/club/areas{?page_size,page}
Example URI
- page_size
number
(optional)количество записей на странице
- page
number
(optional)номер страницы
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"meta": {
"pagination": {
"total_number": 22,
"current_page": 1,
"total_pages": 2,
"page_size": 20
}
},
"data": [
{
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
{
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"pagination": {
"type": "object",
"properties": {
"total_number": {
"type": "number",
"description": "общее количество сущностей"
},
"current_page": {
"type": "number",
"description": "текущая страница"
},
"total_pages": {
"type": "number",
"description": "всего страниц"
},
"page_size": {
"type": "number",
"description": "записей на страницу"
}
}
}
}
},
"data": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
}
},
{
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
}
}
]
}
}
}
Получить модель ¶
Получить модельGET/club/areas/{id}
Example URI
- id
number
(required) Example: 1идентификатор корта
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"required": [
"id",
"title",
"created_at",
"updated_at",
"enabled",
"parameters",
"area_type"
],
"additionalProperties": false
}
}
}
Создать модель ¶
Создать модельPOST/club/areas/
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"title": "Корт1",
"enabled": true,
"area_type": 1,
"parameters": [
{
"key_id": 1,
"options_id": 1
},
{
"key_id": 1,
"value": "произвольная опция"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "название корта"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"area_type": {
"type": "number",
"description": "id типа помещения"
},
"parameters": {
"type": "array",
"description": "набор параметров для ипа помещения"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"required": [
"id",
"title",
"created_at",
"updated_at",
"enabled",
"parameters",
"area_type"
],
"additionalProperties": false
}
}
}
Обновить модель ¶
Обновить модельPATCH/club/areas/{id}
Example URI
- id
number
(required) Example: 1идентификатор корта
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"enabled": true,
"area_type": 1,
"parameters": [
{
"key_id": 1,
"options_id": 1
},
{
"key_id": 1,
"value": "произвольная опция"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"area_type": {
"type": "number",
"description": "id типа помещения"
},
"parameters": {
"type": "array",
"description": "набор параметров для ипа помещения. Для удаления старых опций нужно передать пустой список []"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"required": [
"id",
"title",
"created_at",
"updated_at",
"enabled",
"parameters",
"area_type"
],
"additionalProperties": false
}
}
}
Клуб ¶
Получить информацию о клубе ¶
Получить информацию о клубеGET/club/me
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"title": "Palms club",
"subtitle": "Теннисный клуб",
"description": "На линии корта сомкнулись ракетки, Хотелось бы форхенд, но мяч попал в сетку",
"prices": "Форматированный текст в markdown с ценами клуба",
"working_hours_tag": "7:00 - 23:00 без выходных",
"pricing_tag": "270 - 530 грн/час",
"address_tag": "Киев, ул. Академика Ботичелли, 3А",
"contact_phone": "+380441234567",
"contact_phone_two": "+380987654321",
"contact_email": "hello@palms.tennis",
"free_services": "Описание бесплатный услуг в markdown",
"additional_services": "Описание дополнительных услуг в markdown",
"rules": "описание правил клуба в markdown",
"facebook_title": "Теннисный клуб \"Palms\"",
"facebook_link": "https://www.facebook.com/sasha.goreniuk",
"areas": [
{
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
}
],
"area_types": [
{
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
],
"options": {
"default_cancelation_time": 10800,
"autocapture": true
},
"features": {
"online_payments": true
},
"coordinates": {
"latitude": "50.26421",
"longitude": "30.31432"
},
"images": [
"https://domain.com",
"https://domain.com",
"https://domain.com",
"https://domain.com"
]
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клуба"
},
"title": {
"type": "string",
"description": "название клуба"
},
"subtitle": {
"type": "string",
"description": "видовое описание клуба"
},
"description": {
"type": "string",
"description": "описание клуба. Что он говорит о себе"
},
"prices": {
"type": "string",
"description": "форматированный текст в markdown с ценами клуба"
},
"working_hours_tag": {
"type": "string",
"description": "короткая строка с режимом работы клуба"
},
"pricing_tag": {
"type": "string"
},
"address_tag": {
"type": "string"
},
"contact_phone": {
"type": "string"
},
"contact_phone_two": {
"type": "string"
},
"contact_email": {
"type": "string"
},
"free_services": {
"type": "string",
"description": "описание бесплатный услуг в markdown"
},
"additional_services": {
"type": "string",
"description": "описание дополнительных услуг в markdown"
},
"rules": {
"type": "string",
"description": "описание правил клуба в markdown"
},
"facebook_title": {
"type": "string",
"description": "название FB страницы клуба"
},
"facebook_link": {
"type": "string",
"description": "ссылка на FB страницу клуба"
},
"areas": {
"type": "array",
"description": "корты клуба"
},
"area_types": {
"type": "array",
"description": "тип помещенияс доступными параметрами"
},
"options": {
"type": "object",
"properties": {
"default_cancelation_time": {
"type": "number",
"description": "время в секундах для бесплатной отмены бронирования. Считает от даты старта бронирования. 0 - нет бесплатной отмены"
},
"autocapture": {
"type": "boolean",
"description": "автоматическое списание денег со счета, после наступления статусов Shown, Not shown."
}
},
"description": "настройки клуба в Palms. Зависит от бизнес-процессов клуба"
},
"features": {
"type": "object",
"properties": {
"online_payments": {
"type": "boolean",
"description": "доступно онлайн оплата"
}
},
"description": "возможности клуба в Palms. Зависит от интеграции и настроек клуба"
},
"coordinates": {
"type": "object",
"properties": {
"latitude": {
"type": "string",
"description": "широта"
},
"longitude": {
"type": "string",
"description": "долгота"
}
},
"description": "координаты клуба"
},
"images": {
"type": "array",
"description": "изображения клуба"
}
},
"required": [
"id",
"title",
"subtitle",
"description",
"prices",
"working_hours_tag",
"pricing_tag",
"address_tag",
"contact_phone",
"contact_phone_two",
"contact_email",
"free_services",
"additional_services",
"rules",
"facebook_title",
"facebook_link",
"areas",
"area_types",
"options",
"features",
"coordinates",
"images"
],
"additionalProperties": false
}
}
}
Игроки ¶
Игрок - это человек, который хотя бы раз бронировал время в клубе.
Поиск игроков ¶
Поиск игроковGET/club/users{?search,page,page_size}
Только по клиентам клуба
Example URI
- page_size
number
(optional) Example: 10количество записей на странице
- page
number
(optional) Example: 1номер страницы
- search
string
(optional) Example: 380строка для поиска. поиск по номеру телефону или имени
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"meta": {
"pagination": {
"total_number": 22,
"current_page": 1,
"total_pages": 2,
"page_size": 20
}
},
"data": [
{
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
{
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
{
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"pagination": {
"type": "object",
"properties": {
"total_number": {
"type": "number",
"description": "общее количество сущностей"
},
"current_page": {
"type": "number",
"description": "текущая страница"
},
"total_pages": {
"type": "number",
"description": "всего страниц"
},
"page_size": {
"type": "number",
"description": "записей на страницу"
}
}
}
}
},
"data": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
}
},
{
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
}
},
{
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
}
}
]
}
}
}
Поиск игроков ¶
Поиск игроковPOST/club/users-palms/{phone_number}
Только по клиентам клуба
Example URI
- page_size
number
(optional) Example: 10количество записей на странице
- page
number
(optional) Example: 1номер страницы
- phone_number
string
(optional) Example: +380932685446номер телефона
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"required": [
"id",
"name",
"phone_number",
"note",
"has_palms"
],
"additionalProperties": false
}
}
}
Создать модель ¶
Создать модельPOST/club/users
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
}
}
}
201
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"required": [
"id",
"name",
"phone_number",
"note",
"has_palms"
],
"additionalProperties": false
}
}
}
Получить модель ¶
Получить модельGET/club/users/{id}
Example URI
- id
number
(required) Example: 1идентификатор игрока
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"required": [
"id",
"name",
"phone_number",
"note",
"has_palms"
],
"additionalProperties": false
}
}
}
Обновить модель ¶
Обновить модельPATCH/club/users/{id}
Example URI
- id
number
(required) Example: 1идентификатор игрока
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"name": "Иван",
"note": "some text"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "имя клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"required": [
"id",
"name",
"phone_number",
"note",
"has_palms"
],
"additionalProperties": false
}
}
}
Удалить модель ¶
Удалить модельDELETE/club/users/{id}
Example URI
- id
number
(required) Example: 1идентификатор игрока
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
204
Headers
Content-Type: application/json
Импорт из CSV ¶
Импорт из CSVPOST/club/users/import
Example URI
Headers
Authorization: Bearer XXXXX
Content-Type: multipart/form-data, boundary=AaB03x
Content-Disposition: form-data; name="file"; filename="*.csv"
200
Headers
Content-Type: application/json
Body
{
"data": {
"tolal": 10,
"added": 9,
"not_added": 1
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"tolal": {
"type": "number"
},
"added": {
"type": "number"
},
"not_added": {
"type": "number"
}
},
"required": [
"tolal",
"added",
"not_added"
],
"additionalProperties": false
}
}
}
CrmUsers для клуба ¶
Создать модель ¶
Создать модельPOST/club/crm-user/
По указанному емейлу создается CrmUser и на почту высылается сгенерированный пароль
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"name": "Иван",
"email": "foo@bar.com",
"note": "some text"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "имя клиента"
},
"email": {
"type": "string",
"description": "email пользователя"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
}
}
}
201
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"name": "Иван",
"email": "foo@bar.com",
"note": "some text"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"email": {
"type": "string",
"description": "email пользователя"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
}
},
"required": [
"id",
"name",
"email",
"note"
],
"additionalProperties": false
}
}
}
Получить список ¶
Получить списокGET/club/crm-user{?page_size,page}
Example URI
- page_size
number
(optional) Example: 1количество записей на странице
- page
number
(optional) Example: 10номер страницы
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"meta": {
"pagination": {
"total_number": 22,
"current_page": 1,
"total_pages": 2,
"page_size": 20
}
},
"data": {
"id": 1,
"name": "Иван",
"email": "foo@bar.com",
"note": "some text"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"pagination": {
"type": "object",
"properties": {
"total_number": {
"type": "number",
"description": "общее количество сущностей"
},
"current_page": {
"type": "number",
"description": "текущая страница"
},
"total_pages": {
"type": "number",
"description": "всего страниц"
},
"page_size": {
"type": "number",
"description": "записей на страницу"
}
}
}
}
},
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"email": {
"type": "string",
"description": "email пользователя"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"email": {
"type": "string",
"description": "email пользователя"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
}
}
}
},
"required": [
"id",
"name",
"email",
"note",
""
],
"additionalProperties": false
}
}
}
Получить модель ¶
Получить модельGET/club/crm-user/{id}
Example URI
- id
number
(required) Example: 1идентификатор юзера
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"name": "Иван",
"email": "foo@bar.com",
"note": "some text"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"email": {
"type": "string",
"description": "email пользователя"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
}
},
"required": [
"id",
"name",
"email",
"note"
],
"additionalProperties": false
}
}
}
Обновить модель ¶
Обновить модельPATCH/club/crm-user/{id}
Example URI
- id
number
(required) Example: 1идентификатор юзера
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"name": "Иван",
"note": "some text"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "имя клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о тренре"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"name": "Иван",
"email": "foo@bar.com",
"note": "some text"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"email": {
"type": "string",
"description": "email пользователя"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
}
},
"required": [
"id",
"name",
"email",
"note"
],
"additionalProperties": false
}
}
}
Удалить модель ¶
Удалить модельDELETE/club/crm-user/{id}
Example URI
- id
number
(required) Example: 1идентификатор юзера
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
204
Headers
Content-Type: application/json
CrmUsers ¶
Получить информацию о себе ¶
Получить информацию о себеGET/crm-user/me
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"name": "Иван",
"email": "foo@bar.com",
"note": "some text"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"email": {
"type": "string",
"description": "email пользователя"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
}
},
"required": [
"id",
"name",
"email",
"note"
],
"additionalProperties": false
}
}
}
Обновить модель ¶
Обновить модельPATCH/crm-user/me
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"name": "Иван",
"note": "some text",
"price_per_hour": 10000,
"price_with_area": 20000,
"allow_book_in_palms": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "имя клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о тренре"
},
"price_per_hour": {
"type": "number",
"description": "цена за час"
},
"price_with_area": {
"type": "number",
"description": "цена за час с кортом"
},
"allow_book_in_palms": {
"type": "boolean",
"description": "доступен ли для бронирования"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"name": "Иван",
"email": "foo@bar.com",
"note": "some text"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"email": {
"type": "string",
"description": "email пользователя"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
}
},
"required": [
"id",
"name",
"email",
"note"
],
"additionalProperties": false
}
}
}
Авторизация по email/пароль ¶
Авторизация по email/парольPOST/crm-user/signin
Example URI
Headers
Content-Type: application/json
Body
{
"email": "foo@bar.com",
"password": "12345678"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "email пользователя"
},
"password": {
"type": "string",
"description": "пароль"
}
},
"required": [
"email",
"password"
]
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"access": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNTU5ODI5Mzg4LCJqdGkiOiI0NmI2OTRhOGMxNWU0NjU1YjQ5ZGYzOTMyNjFiMDQxMCIsInVzZXJfaWQiOjN9.rlhzqQ37cue97ExsGRhaOG_CZxUWYNsrfk7wGrPe4mE",
"refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTU5MTM1NDU4OCwianRpIjoiYzZkNGUyMWQwNGFlNDIxNGI1YzY2ODJjZWVkMTljMjgiLCJ1c2VyX2lkIjozfQ.VOtlheethd4ad3yOjQYM09lI4YDDWo9UOQ94Q1r40Ws"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"access": {
"type": "string",
"description": "токен доступ"
},
"refresh": {
"type": "string",
"description": "токен получения нового токена доступа"
}
},
"required": [
"access",
"refresh"
],
"additionalProperties": false
}
}
}
Восстановление пароля 1/3. Отплавка ссылки почтой ¶
Восстановление пароля 1/3. Отплавка ссылки почтойPOST/crm-user/reset
Запрашиваем код восстановления по email. На почту приходит ссылка вида crm.com/?token='some token’ Сслыка валидна в течении часа. При отправке повторной ссылки, старая инвалидируется. Значение токена надо передать на проверку (шаг 2/3). Если вернулся ответ 200, значит переходим к шагу 3/3
Example URI
Headers
Content-Type: application/json
Body
{
"email": "foo@bar.com"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "email пользователя"
}
},
"required": [
"email"
]
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"name": "Иван",
"email": "foo@bar.com",
"note": "some text"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"email": {
"type": "string",
"description": "email пользователя"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
}
},
"required": [
"id",
"name",
"email",
"note"
],
"additionalProperties": false
}
}
}
Восстановление пароля 2/3. Проверка токена из email ¶
Восстановление пароля 2/3. Проверка токена из emailPOST/crm-user/check-token
Example URI
Headers
Content-Type: application/json
Body
{
"token": "YWwub3J6aEBnbWFpbC5jb20-cWVydmd4Mmp5bHM4amQ2N2l5MnFpajdrdmpnMGhobXNvY3B2Z3FndXd2dGZkaXJkOWpucHBuejJpcHpzbW9idw-MTA1"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "токен для восстановления пароля по коду из ссылки в email"
}
}
}
200
Headers
Content-Type: application/json
Восстановление пароля 3/3. Установка нового пароля ¶
Восстановление пароля 3/3. Установка нового пароляPOST/crm-user/reset/confirm
Запрос на установку нового пароля. Чтобы его выполнить нужно получить первым запросом token
(приходит в письме пользователю) и отправить все это вместе с новым паролем.
Example URI
Headers
Content-Type: application/json
Body
{
"token": "YWwub3J6aEBnbWFpbC5jb20-cWVydmd4Mmp5bHM4amQ2N2l5MnFpajdrdmpnMGhobXNvY3B2Z3FndXd2dGZkaXJkOWpucHBuejJpcHpzbW9idw-MTA1",
"new_password": "12345678"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "токен для восстановления пароля по коду из ссылки в email"
},
"new_password": {
"type": "string",
"description": "новый пароль пользователя"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"access": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNTU5ODI5Mzg4LCJqdGkiOiI0NmI2OTRhOGMxNWU0NjU1YjQ5ZGYzOTMyNjFiMDQxMCIsInVzZXJfaWQiOjN9.rlhzqQ37cue97ExsGRhaOG_CZxUWYNsrfk7wGrPe4mE",
"refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTU5MTM1NDU4OCwianRpIjoiYzZkNGUyMWQwNGFlNDIxNGI1YzY2ODJjZWVkMTljMjgiLCJ1c2VyX2lkIjozfQ.VOtlheethd4ad3yOjQYM09lI4YDDWo9UOQ94Q1r40Ws"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"access": {
"type": "string",
"description": "токен доступ"
},
"refresh": {
"type": "string",
"description": "токен получения нового токена доступа"
}
},
"required": [
"access",
"refresh"
],
"additionalProperties": false
}
}
}
Изменение пароля находясь в системе ¶
Изменение пароля находясь в системеPOST/crm-user/change-password
Example URI
Headers
Content-Type: application/json
Body
{
"new_password": "12345678"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"new_password": {
"type": "string",
"description": "новый пароль пользователя"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"access": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNTU5ODI5Mzg4LCJqdGkiOiI0NmI2OTRhOGMxNWU0NjU1YjQ5ZGYzOTMyNjFiMDQxMCIsInVzZXJfaWQiOjN9.rlhzqQ37cue97ExsGRhaOG_CZxUWYNsrfk7wGrPe4mE",
"refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTU5MTM1NDU4OCwianRpIjoiYzZkNGUyMWQwNGFlNDIxNGI1YzY2ODJjZWVkMTljMjgiLCJ1c2VyX2lkIjozfQ.VOtlheethd4ad3yOjQYM09lI4YDDWo9UOQ94Q1r40Ws"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"access": {
"type": "string",
"description": "токен доступ"
},
"refresh": {
"type": "string",
"description": "токен получения нового токена доступа"
}
},
"required": [
"access",
"refresh"
],
"additionalProperties": false
}
}
}
Логаут ¶
ЛогаутPOST/crm-user/logout
В поцессе логаута мы инвалидируем токен доступа переданный нам в шапке запроса.
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {}
}
200
Headers
Content-Type: application/json
Body
{
"data": {}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {},
"additionalProperties": false
}
}
}
Тренеры ¶
Поиск тренеров ¶
Поиск тренеровGET/club/coaches{?search,page,page_size}
Example URI
- page_size
number
(optional) Example: 10количество записей на странице
- page
number
(optional) Example: 1номер страницы
- search
string
(optional) Example: 380строка для поиска. поиск по номеру телефону или имени
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"meta": {
"pagination": {
"total_number": 22,
"current_page": 1,
"total_pages": 2,
"page_size": 20
}
},
"data": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"price_per_hour": 10000,
"price_with_area": 20000,
"coach_picture": "file.jpg",
"allow_book_in_palms": true
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"pagination": {
"type": "object",
"properties": {
"total_number": {
"type": "number",
"description": "общее количество сущностей"
},
"current_page": {
"type": "number",
"description": "текущая страница"
},
"total_pages": {
"type": "number",
"description": "всего страниц"
},
"page_size": {
"type": "number",
"description": "записей на страницу"
}
}
}
}
},
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"price_per_hour": {
"type": "number",
"description": "цена за час"
},
"price_with_area": {
"type": "number",
"description": "цена за час с кортом"
},
"coach_picture": {
"type": "string",
"description": "путь к фото"
},
"allow_book_in_palms": {
"type": "boolean",
"description": "доступен ли для бронирования"
},
"": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"price_per_hour": {
"type": "number",
"description": "цена за час"
},
"price_with_area": {
"type": "number",
"description": "цена за час с кортом"
},
"coach_picture": {
"type": "string",
"description": "путь к фото"
},
"allow_book_in_palms": {
"type": "boolean",
"description": "доступен ли для бронирования"
}
}
}
},
"required": [
"id",
"name",
"phone_number",
"note",
"price_per_hour",
"price_with_area",
"coach_picture",
"allow_book_in_palms",
""
],
"additionalProperties": false
}
}
}
Создать модель ¶
Создать модельPOST/club/coaches
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Content-Disposition: form-data; name="coach_picture"; filename="*.jpg"
Body
{
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"price_per_hour": 10000,
"price_with_area": 20000,
"allow_book_in_palms": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"price_per_hour": {
"type": "number",
"description": "цена за час"
},
"price_with_area": {
"type": "number",
"description": "цена за час с кортом"
},
"allow_book_in_palms": {
"type": "boolean",
"description": "доступен ли для бронирования"
}
}
}
201
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"price_per_hour": 10000,
"price_with_area": 20000,
"coach_picture": "file.jpg",
"allow_book_in_palms": true
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"price_per_hour": {
"type": "number",
"description": "цена за час"
},
"price_with_area": {
"type": "number",
"description": "цена за час с кортом"
},
"coach_picture": {
"type": "string",
"description": "путь к фото"
},
"allow_book_in_palms": {
"type": "boolean",
"description": "доступен ли для бронирования"
}
},
"required": [
"id",
"name",
"phone_number",
"note",
"price_per_hour",
"price_with_area",
"coach_picture",
"allow_book_in_palms"
],
"additionalProperties": false
}
}
}
Получить модель ¶
Получить модельGET/club/coaches/{id}
Example URI
- id
number
(required) Example: 1идентификатор игрока
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"price_per_hour": 10000,
"price_with_area": 20000,
"coach_picture": "file.jpg",
"allow_book_in_palms": true
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"price_per_hour": {
"type": "number",
"description": "цена за час"
},
"price_with_area": {
"type": "number",
"description": "цена за час с кортом"
},
"coach_picture": {
"type": "string",
"description": "путь к фото"
},
"allow_book_in_palms": {
"type": "boolean",
"description": "доступен ли для бронирования"
}
},
"required": [
"id",
"name",
"phone_number",
"note",
"price_per_hour",
"price_with_area",
"coach_picture",
"allow_book_in_palms"
],
"additionalProperties": false
}
}
}
Обновить модель ¶
Обновить модельPATCH/club/coaches/{id}
Example URI
- id
number
(required) Example: 1идентификатор игрока
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Content-Disposition: form-data; name="coach_picture"; filename="*.jpg"
Body
{
"name": "Иван",
"note": "some text",
"price_per_hour": 10000,
"price_with_area": 20000,
"allow_book_in_palms": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "имя клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о тренре"
},
"price_per_hour": {
"type": "number",
"description": "цена за час"
},
"price_with_area": {
"type": "number",
"description": "цена за час с кортом"
},
"allow_book_in_palms": {
"type": "boolean",
"description": "доступен ли для бронирования"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"price_per_hour": 10000,
"price_with_area": 20000,
"coach_picture": "file.jpg",
"allow_book_in_palms": true
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"price_per_hour": {
"type": "number",
"description": "цена за час"
},
"price_with_area": {
"type": "number",
"description": "цена за час с кортом"
},
"coach_picture": {
"type": "string",
"description": "путь к фото"
},
"allow_book_in_palms": {
"type": "boolean",
"description": "доступен ли для бронирования"
}
},
"required": [
"id",
"name",
"phone_number",
"note",
"price_per_hour",
"price_with_area",
"coach_picture",
"allow_book_in_palms"
],
"additionalProperties": false
}
}
}
Удалить модель ¶
Удалить модельDELETE/club/coaches/{id}
Example URI
- id
number
(required) Example: 1идентификатор тренера
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
204
Headers
Content-Type: application/json
Слоты бронирования ¶
Слот - это ячейка времени на корте, которую пользователь может забронировать для игры.
Статусы
Слот бронирования может иметь ряд статусов.
Статус | Описание |
---|---|
AVAILABLE |
слот доступен для бронирования в Palms |
BOOKED |
слот забронирован через Palms |
DISABLED |
слот недоступен для бронирования |
Пользователи Palms будут видеть слоты со статусом AVAILABLE
.
Чтобы убрать слот из выдачи, нужно изменить статус слота на DISABLED
.
Статус BOOKED
ставится автоматически, когда пользователь бронирует слот через Palms.
Получить список ¶
Получить списокGET/club/slots{?page_size,page,date_from,date_to,status,area_type_id}
Example URI
- page_size
number
(optional) Example: 10количество записей на странице
- page
number
(optional) Example: 1номер страницы
- date_from
string
(optional) Example: 2019-05-12вернуть слоты начиная с этой даты
- date_to
string
(optional) Example: 2019-05-13вернуть слоты заканчивая этой датой
- status
string
(optional) Example: BOOKEDстатус слота
- area_type_id
number
(required) Example: 1тип помещения
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"meta": {
"pagination": {
"total_number": 22,
"current_page": 1,
"total_pages": 2,
"page_size": 20
}
},
"data": [
{
"id": 1,
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"status": "AVAILABLE",
"price": 20000,
"currency": "UAH",
"area": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
"note `some text`": "",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z"
},
{
"id": 1,
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"status": "AVAILABLE",
"price": 20000,
"currency": "UAH",
"area": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
"note `some text`": "",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z"
},
{
"id": 1,
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"status": "AVAILABLE",
"price": 20000,
"currency": "UAH",
"area": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
"note `some text`": "",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"pagination": {
"type": "object",
"properties": {
"total_number": {
"type": "number",
"description": "общее количество сущностей"
},
"current_page": {
"type": "number",
"description": "текущая страница"
},
"total_pages": {
"type": "number",
"description": "всего страниц"
},
"page_size": {
"type": "number",
"description": "записей на страницу"
}
}
}
}
},
"data": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор слота"
},
"date_from": {
"type": "string",
"description": "дата и время начала слота"
},
"date_to": {
"type": "string",
"description": "дата и время окончания слота"
},
"status": {
"type": "string",
"enum": [
"AVAILABLE",
"BOOKED",
"DISABLED",
"AVAILABLE"
],
"description": "статус слота"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"area": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"description": "корт, к которому относится слот"
},
"note `some text`": {
"type": "string",
"description": "заметка, отображается клубу"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
}
}
},
{
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор слота"
},
"date_from": {
"type": "string",
"description": "дата и время начала слота"
},
"date_to": {
"type": "string",
"description": "дата и время окончания слота"
},
"status": {
"type": "string",
"enum": [
"AVAILABLE",
"BOOKED",
"DISABLED",
"AVAILABLE"
],
"description": "статус слота"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"area": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"description": "корт, к которому относится слот"
},
"note `some text`": {
"type": "string",
"description": "заметка, отображается клубу"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
}
}
},
{
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор слота"
},
"date_from": {
"type": "string",
"description": "дата и время начала слота"
},
"date_to": {
"type": "string",
"description": "дата и время окончания слота"
},
"status": {
"type": "string",
"enum": [
"AVAILABLE",
"BOOKED",
"DISABLED",
"AVAILABLE"
],
"description": "статус слота"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"area": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"description": "корт, к которому относится слот"
},
"note `some text`": {
"type": "string",
"description": "заметка, отображается клубу"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
}
}
}
]
}
}
}
Создать модель ¶
Создать модельPOST/club/slots
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"status": "AVAILABLE",
"price": 20000,
"currency": "UAH",
"area_id": 1,
"note": "Hello, world!"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"date_from": {
"type": "string",
"description": "дата и время начала слота"
},
"date_to": {
"type": "string",
"description": "дата и время окончания слота"
},
"status": {
"type": "string",
"description": "статус слота"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"area_id": {
"type": "number",
"description": "идентификатор корта, к которому относится слот"
},
"note": {
"type": "string",
"description": "заметка, отображается клубу"
}
}
}
201
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"status": "AVAILABLE",
"price": 20000,
"currency": "UAH",
"area": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
"note `some text`": "",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор слота"
},
"date_from": {
"type": "string",
"description": "дата и время начала слота"
},
"date_to": {
"type": "string",
"description": "дата и время окончания слота"
},
"status": {
"type": "string",
"enum": [
"AVAILABLE",
"BOOKED",
"DISABLED",
"AVAILABLE"
],
"description": "статус слота"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"area": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"description": "корт, к которому относится слот"
},
"note `some text`": {
"type": "string",
"description": "заметка, отображается клубу"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
}
},
"required": [
"id",
"date_from",
"date_to",
"status",
"price",
"currency",
"area",
"note `some text`",
"created_at",
"updated_at"
],
"additionalProperties": false
}
}
}
Получить модель ¶
Получить модельGET/club/slots/{id}
Example URI
- id
number
(required) Example: 1идентификатор слота бронирования
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"status": "AVAILABLE",
"price": 20000,
"currency": "UAH",
"area": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
"note `some text`": "",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор слота"
},
"date_from": {
"type": "string",
"description": "дата и время начала слота"
},
"date_to": {
"type": "string",
"description": "дата и время окончания слота"
},
"status": {
"type": "string",
"enum": [
"AVAILABLE",
"BOOKED",
"DISABLED",
"AVAILABLE"
],
"description": "статус слота"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"area": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"description": "корт, к которому относится слот"
},
"note `some text`": {
"type": "string",
"description": "заметка, отображается клубу"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
}
},
"required": [
"id",
"date_from",
"date_to",
"status",
"price",
"currency",
"area",
"note `some text`",
"created_at",
"updated_at"
],
"additionalProperties": false
}
}
}
Обновить модель ¶
Обновить модельPATCH/club/slots/{id}
Example URI
- id
number
(required) Example: 1идентификатор слота бронирования
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"status": "Hello, world!",
"price": 20000,
"currency": "UAH",
"area_id": 1,
"note": "Hello, world!"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"date_from": {
"type": "string",
"description": "дата и время начала слота"
},
"date_to": {
"type": "string",
"description": "дата и время окончания слота"
},
"status": {
"type": "string",
"enum": [
"AVAILABLE",
"BOOKED",
"DISABLED",
"AVAILABLE"
],
"description": "статус слота"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"area_id": {
"type": "number",
"description": "идентификатор корта, к которому относится слот"
},
"note": {
"type": "string",
"description": "заметка, отображается клубу"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"status": "AVAILABLE",
"price": 20000,
"currency": "UAH",
"area": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
"note `some text`": "",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор слота"
},
"date_from": {
"type": "string",
"description": "дата и время начала слота"
},
"date_to": {
"type": "string",
"description": "дата и время окончания слота"
},
"status": {
"type": "string",
"enum": [
"AVAILABLE",
"BOOKED",
"DISABLED",
"AVAILABLE"
],
"description": "статус слота"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"area": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"description": "корт, к которому относится слот"
},
"note `some text`": {
"type": "string",
"description": "заметка, отображается клубу"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
}
},
"required": [
"id",
"date_from",
"date_to",
"status",
"price",
"currency",
"area",
"note `some text`",
"created_at",
"updated_at"
],
"additionalProperties": false
}
}
}
Бронирование ¶
Статусы бронирования
Статус | Финальный | Обязательное указание причины | Описание |
---|---|---|---|
REQUESTED |
нет | нет | Клиент отправил заявку на бронирование. Администратор должен ее рассмотреть и подтвердить или отклонить |
APPROVED |
нет | нет | Администратор подтведил заявку. |
CONFIRMED |
нет | нет | Заявку нельзя отменить через приложение. Прошло время бесплатной отмены. Игрок подтвердил свое желание играть |
SHOWN |
да | нет | Игрок пришел играть |
NOT_SHOWN |
да | нет | Игрок не пришел играть |
CANCELED_BY_CLUB |
да | да | Заявка отменена клубом |
CANCELED_BY_CUSTOMER |
да | да | Заявка отменена игроком |
OTHER |
да | да | Другой финальный статус |
Схема смены статусов
Прогнозируемая последовательность смены статусов
REQUESTED -> APPROVED -> CONFIRMED
![](https://raw.githubusercontent.com/palmstennis/palms.api.docs/master/assets/status-changes-schema.jpg)
Ограничения
-
До установки статуса
APPROVED
, администратор может изменять стоимость бронирования. -
Запросить списание можно после установки финального статуса
SHOWN
илиNOT_SHOWN
. -
До статуса
CONFIRMED
пользователь может отменить бронь без согласования с клубом. После должен позвонить в клуб для отмены. -
Поле
reason
должно быть не менее 8 символов.
Финализация
После наступления финального статуса, в модели Booking проставляется поле finished_at
.
Получить список ¶
Получить списокGET/club/bookings{?page_size,page,status,date_from,date_to,area_type_id,player_id,coach_id,booking_source,payment_status}
Example URI
- page_size
number
(optional) Example: 1количество записей на странице
- page
number
(optional) Example: 10номер страницы
- status
string
(optional) Example: AVAILABLE(фильтр) статус бронирования
- payment_status
string
(optional) Example: APPROVED(фильтр) статус платежа
- date_from
string
(optional) Example: 2019-05-14вернуть бронирования после указанной даты
- date_to
string
(optional) Example: 2019-05-15вернуть бронирования до указанной даты
- area_type_id
number
(optional) Example: 1тип помещения
- player_id
number
(optional) Example: 1id клубного игрока
- coach_id
number
(optional) Example: 1id тренера
- booking_source
string
(optional) Example: CRMисточник бронирования
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"meta": {
"pagination": {
"total_number": 22,
"current_page": 1,
"total_pages": 2,
"page_size": 20
}
},
"data": [
{
"id": 1,
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"price": 20000,
"currency": "UAH",
"status": "APPROVED",
"area": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"slot": {
"id": 1,
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"status": "AVAILABLE",
"price": 20000,
"currency": "UAH",
"area": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
"note `some text`": "",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z"
},
"note": "some text",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"finished_at": "2019-08-23T12:23:23+00:00Z",
"payment": {
"id": 1,
"amount": 120,
"currency": "UAH",
"status": "CREATED",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"created_at": "2019-08-10T00:00:00",
"processed_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
},
{
"id": 1,
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"price": 20000,
"currency": "UAH",
"status": "APPROVED",
"area": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"slot": {
"id": 1,
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"status": "AVAILABLE",
"price": 20000,
"currency": "UAH",
"area": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
"note `some text`": "",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z"
},
"note": "some text",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"finished_at": "2019-08-23T12:23:23+00:00Z",
"payment": {
"id": 1,
"amount": 120,
"currency": "UAH",
"status": "CREATED",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"created_at": "2019-08-10T00:00:00",
"processed_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
},
{
"id": 1,
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"price": 20000,
"currency": "UAH",
"status": "APPROVED",
"area": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"slot": {
"id": 1,
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"status": "AVAILABLE",
"price": 20000,
"currency": "UAH",
"area": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
"note `some text`": "",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z"
},
"note": "some text",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"finished_at": "2019-08-23T12:23:23+00:00Z",
"payment": {
"id": 1,
"amount": 120,
"currency": "UAH",
"status": "CREATED",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"created_at": "2019-08-10T00:00:00",
"processed_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"pagination": {
"type": "object",
"properties": {
"total_number": {
"type": "number",
"description": "общее количество сущностей"
},
"current_page": {
"type": "number",
"description": "текущая страница"
},
"total_pages": {
"type": "number",
"description": "всего страниц"
},
"page_size": {
"type": "number",
"description": "записей на страницу"
}
}
}
}
},
"data": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор бронирования"
},
"date_from": {
"type": "string",
"description": "дата начала забронированного времени"
},
"date_to": {
"type": "string",
"description": "дата окончания забронированного отрезка времени"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"status": {
"type": "string",
"enum": [
"REQUESTED",
"APPROVED",
"CONFIRMED",
"CANCELED_BY_CUSTOMER",
"CANCELED_BY_CLUB",
"OTHER",
"SHOWN",
"NOT_SHOWN",
"APPROVED"
],
"description": "статус бронирования"
},
"area": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"description": "корт, на который создается бронь"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "пользователь, который забронировал корт"
},
"slot": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор слота"
},
"date_from": {
"type": "string",
"description": "дата и время начала слота"
},
"date_to": {
"type": "string",
"description": "дата и время окончания слота"
},
"status": {
"type": "string",
"enum": [
"AVAILABLE",
"BOOKED",
"DISABLED",
"AVAILABLE"
],
"description": "статус слота"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"area": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"description": "корт, к которому относится слот"
},
"note `some text`": {
"type": "string",
"description": "заметка, отображается клубу"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
}
},
"description": "пользователь, который забронировал корт"
},
"note": {
"type": "string",
"description": "какой то комментарий о бронировнии"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"finished_at": {
"type": "string",
"description": "дата завершения бронирования"
},
"payment": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор платежа в системе Palms"
},
"amount": {
"type": "number",
"description": "сумма платежа в копейках/центах без разделителей. 120 - 1 грн 20 коп"
},
"currency": {
"type": "string",
"description": "валюта платежа"
},
"status": {
"type": "string",
"enum": [
"CREATED",
"PROCESSING",
"DECLINED",
"APPROVED",
"EXPIRED",
"REVERSED",
"CREATED"
],
"description": "статус транзакции"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "плательщик"
},
"created_at": {
"type": "string",
"description": "дата создание платежная"
},
"processed_at": {
"type": "string",
"description": "дата совершения платежа"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления платежа"
}
},
"description": "оплата по бронированию"
}
}
},
{
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор бронирования"
},
"date_from": {
"type": "string",
"description": "дата начала забронированного времени"
},
"date_to": {
"type": "string",
"description": "дата окончания забронированного отрезка времени"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"status": {
"type": "string",
"enum": [
"REQUESTED",
"APPROVED",
"CONFIRMED",
"CANCELED_BY_CUSTOMER",
"CANCELED_BY_CLUB",
"OTHER",
"SHOWN",
"NOT_SHOWN",
"APPROVED"
],
"description": "статус бронирования"
},
"area": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"description": "корт, на который создается бронь"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "пользователь, который забронировал корт"
},
"slot": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор слота"
},
"date_from": {
"type": "string",
"description": "дата и время начала слота"
},
"date_to": {
"type": "string",
"description": "дата и время окончания слота"
},
"status": {
"type": "string",
"enum": [
"AVAILABLE",
"BOOKED",
"DISABLED",
"AVAILABLE"
],
"description": "статус слота"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"area": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"description": "корт, к которому относится слот"
},
"note `some text`": {
"type": "string",
"description": "заметка, отображается клубу"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
}
},
"description": "пользователь, который забронировал корт"
},
"note": {
"type": "string",
"description": "какой то комментарий о бронировнии"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"finished_at": {
"type": "string",
"description": "дата завершения бронирования"
},
"payment": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор платежа в системе Palms"
},
"amount": {
"type": "number",
"description": "сумма платежа в копейках/центах без разделителей. 120 - 1 грн 20 коп"
},
"currency": {
"type": "string",
"description": "валюта платежа"
},
"status": {
"type": "string",
"enum": [
"CREATED",
"PROCESSING",
"DECLINED",
"APPROVED",
"EXPIRED",
"REVERSED",
"CREATED"
],
"description": "статус транзакции"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "плательщик"
},
"created_at": {
"type": "string",
"description": "дата создание платежная"
},
"processed_at": {
"type": "string",
"description": "дата совершения платежа"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления платежа"
}
},
"description": "оплата по бронированию"
}
}
},
{
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор бронирования"
},
"date_from": {
"type": "string",
"description": "дата начала забронированного времени"
},
"date_to": {
"type": "string",
"description": "дата окончания забронированного отрезка времени"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"status": {
"type": "string",
"enum": [
"REQUESTED",
"APPROVED",
"CONFIRMED",
"CANCELED_BY_CUSTOMER",
"CANCELED_BY_CLUB",
"OTHER",
"SHOWN",
"NOT_SHOWN",
"APPROVED"
],
"description": "статус бронирования"
},
"area": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"description": "корт, на который создается бронь"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "пользователь, который забронировал корт"
},
"slot": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор слота"
},
"date_from": {
"type": "string",
"description": "дата и время начала слота"
},
"date_to": {
"type": "string",
"description": "дата и время окончания слота"
},
"status": {
"type": "string",
"enum": [
"AVAILABLE",
"BOOKED",
"DISABLED",
"AVAILABLE"
],
"description": "статус слота"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"area": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"description": "корт, к которому относится слот"
},
"note `some text`": {
"type": "string",
"description": "заметка, отображается клубу"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
}
},
"description": "пользователь, который забронировал корт"
},
"note": {
"type": "string",
"description": "какой то комментарий о бронировнии"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"finished_at": {
"type": "string",
"description": "дата завершения бронирования"
},
"payment": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор платежа в системе Palms"
},
"amount": {
"type": "number",
"description": "сумма платежа в копейках/центах без разделителей. 120 - 1 грн 20 коп"
},
"currency": {
"type": "string",
"description": "валюта платежа"
},
"status": {
"type": "string",
"enum": [
"CREATED",
"PROCESSING",
"DECLINED",
"APPROVED",
"EXPIRED",
"REVERSED",
"CREATED"
],
"description": "статус транзакции"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "плательщик"
},
"created_at": {
"type": "string",
"description": "дата создание платежная"
},
"processed_at": {
"type": "string",
"description": "дата совершения платежа"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления платежа"
}
},
"description": "оплата по бронированию"
}
}
}
]
}
}
}
Получить модель ¶
Получить модельGET/club/bookings/{id}
Example URI
- id
number
(required) Example: 1идентификатор бронирования
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"price": 20000,
"currency": "UAH",
"status": "APPROVED",
"area": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"slot": {
"id": 1,
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"status": "AVAILABLE",
"price": 20000,
"currency": "UAH",
"area": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
"note `some text`": "",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z"
},
"note": "some text",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"finished_at": "2019-08-23T12:23:23+00:00Z",
"payment": {
"id": 1,
"amount": 120,
"currency": "UAH",
"status": "CREATED",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"created_at": "2019-08-10T00:00:00",
"processed_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор бронирования"
},
"date_from": {
"type": "string",
"description": "дата начала забронированного времени"
},
"date_to": {
"type": "string",
"description": "дата окончания забронированного отрезка времени"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"status": {
"type": "string",
"enum": [
"REQUESTED",
"APPROVED",
"CONFIRMED",
"CANCELED_BY_CUSTOMER",
"CANCELED_BY_CLUB",
"OTHER",
"SHOWN",
"NOT_SHOWN",
"APPROVED"
],
"description": "статус бронирования"
},
"area": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"description": "корт, на который создается бронь"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "пользователь, который забронировал корт"
},
"slot": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор слота"
},
"date_from": {
"type": "string",
"description": "дата и время начала слота"
},
"date_to": {
"type": "string",
"description": "дата и время окончания слота"
},
"status": {
"type": "string",
"enum": [
"AVAILABLE",
"BOOKED",
"DISABLED",
"AVAILABLE"
],
"description": "статус слота"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"area": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"description": "корт, к которому относится слот"
},
"note `some text`": {
"type": "string",
"description": "заметка, отображается клубу"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
}
},
"description": "пользователь, который забронировал корт"
},
"note": {
"type": "string",
"description": "какой то комментарий о бронировнии"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"finished_at": {
"type": "string",
"description": "дата завершения бронирования"
},
"payment": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор платежа в системе Palms"
},
"amount": {
"type": "number",
"description": "сумма платежа в копейках/центах без разделителей. 120 - 1 грн 20 коп"
},
"currency": {
"type": "string",
"description": "валюта платежа"
},
"status": {
"type": "string",
"enum": [
"CREATED",
"PROCESSING",
"DECLINED",
"APPROVED",
"EXPIRED",
"REVERSED",
"CREATED"
],
"description": "статус транзакции"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "плательщик"
},
"created_at": {
"type": "string",
"description": "дата создание платежная"
},
"processed_at": {
"type": "string",
"description": "дата совершения платежа"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления платежа"
}
},
"description": "оплата по бронированию"
}
},
"required": [
"id",
"date_from",
"date_to",
"price",
"currency",
"status",
"area",
"user",
"note",
"created_at",
"updated_at",
"finished_at",
"payment"
],
"additionalProperties": false
}
}
}
Создать модель ¶
Создать модельPOST/club/bookings
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"price": 20000,
"currency": "UAH",
"area_id": 1,
"user_id": 1,
"coach_id": 1,
"default_cancelation_time": "2019-08-23T12:23:23+00:00Z"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"date_from": {
"type": "string",
"description": "дата и время начала бронирования"
},
"date_to": {
"type": "string",
"description": "дата и время начала бронирования"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"area_id": {
"type": "number",
"description": "идентификатор корта"
},
"user_id": {
"type": "number",
"description": "идентификатор пользователя"
},
"coach_id": {
"type": "number",
"description": "идентификатор тренера"
},
"default_cancelation_time": {
"type": "string",
"description": "дата бесплатной отмены бронирование"
}
},
"required": [
"date_from",
"date_to"
]
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"price": 20000,
"currency": "UAH",
"status": "APPROVED",
"area": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"slot": {
"id": 1,
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"status": "AVAILABLE",
"price": 20000,
"currency": "UAH",
"area": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
"note `some text`": "",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z"
},
"note": "some text",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"finished_at": "2019-08-23T12:23:23+00:00Z",
"payment": {
"id": 1,
"amount": 120,
"currency": "UAH",
"status": "CREATED",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"created_at": "2019-08-10T00:00:00",
"processed_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор бронирования"
},
"date_from": {
"type": "string",
"description": "дата начала забронированного времени"
},
"date_to": {
"type": "string",
"description": "дата окончания забронированного отрезка времени"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"status": {
"type": "string",
"enum": [
"REQUESTED",
"APPROVED",
"CONFIRMED",
"CANCELED_BY_CUSTOMER",
"CANCELED_BY_CLUB",
"OTHER",
"SHOWN",
"NOT_SHOWN",
"APPROVED"
],
"description": "статус бронирования"
},
"area": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"description": "корт, на который создается бронь"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "пользователь, который забронировал корт"
},
"slot": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор слота"
},
"date_from": {
"type": "string",
"description": "дата и время начала слота"
},
"date_to": {
"type": "string",
"description": "дата и время окончания слота"
},
"status": {
"type": "string",
"enum": [
"AVAILABLE",
"BOOKED",
"DISABLED",
"AVAILABLE"
],
"description": "статус слота"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"area": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"description": "корт, к которому относится слот"
},
"note `some text`": {
"type": "string",
"description": "заметка, отображается клубу"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
}
},
"description": "пользователь, который забронировал корт"
},
"note": {
"type": "string",
"description": "какой то комментарий о бронировнии"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"finished_at": {
"type": "string",
"description": "дата завершения бронирования"
},
"payment": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор платежа в системе Palms"
},
"amount": {
"type": "number",
"description": "сумма платежа в копейках/центах без разделителей. 120 - 1 грн 20 коп"
},
"currency": {
"type": "string",
"description": "валюта платежа"
},
"status": {
"type": "string",
"enum": [
"CREATED",
"PROCESSING",
"DECLINED",
"APPROVED",
"EXPIRED",
"REVERSED",
"CREATED"
],
"description": "статус транзакции"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "плательщик"
},
"created_at": {
"type": "string",
"description": "дата создание платежная"
},
"processed_at": {
"type": "string",
"description": "дата совершения платежа"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления платежа"
}
},
"description": "оплата по бронированию"
}
},
"required": [
"id",
"date_from",
"date_to",
"price",
"currency",
"status",
"area",
"user",
"note",
"created_at",
"updated_at",
"finished_at",
"payment"
],
"additionalProperties": false
}
}
}
Обновить статус модели ¶
Обновить статус моделиPOST/club/bookings/{id}/status
Example URI
- id
number
(required) Example: 1идентификатор бронирования
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"status": "APPROVED",
"reason": "Hello, world!"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "статус бронирования"
},
"reason": {
"type": "string",
"description": "причина смены статуса"
}
},
"required": [
"status",
"reason"
]
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"price": 20000,
"currency": "UAH",
"status": "APPROVED",
"area": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"slot": {
"id": 1,
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"status": "AVAILABLE",
"price": 20000,
"currency": "UAH",
"area": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
"note `some text`": "",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z"
},
"note": "some text",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"finished_at": "2019-08-23T12:23:23+00:00Z",
"payment": {
"id": 1,
"amount": 120,
"currency": "UAH",
"status": "CREATED",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"created_at": "2019-08-10T00:00:00",
"processed_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор бронирования"
},
"date_from": {
"type": "string",
"description": "дата начала забронированного времени"
},
"date_to": {
"type": "string",
"description": "дата окончания забронированного отрезка времени"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"status": {
"type": "string",
"enum": [
"REQUESTED",
"APPROVED",
"CONFIRMED",
"CANCELED_BY_CUSTOMER",
"CANCELED_BY_CLUB",
"OTHER",
"SHOWN",
"NOT_SHOWN",
"APPROVED"
],
"description": "статус бронирования"
},
"area": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"description": "корт, на который создается бронь"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "пользователь, который забронировал корт"
},
"slot": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор слота"
},
"date_from": {
"type": "string",
"description": "дата и время начала слота"
},
"date_to": {
"type": "string",
"description": "дата и время окончания слота"
},
"status": {
"type": "string",
"enum": [
"AVAILABLE",
"BOOKED",
"DISABLED",
"AVAILABLE"
],
"description": "статус слота"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"area": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"description": "корт, к которому относится слот"
},
"note `some text`": {
"type": "string",
"description": "заметка, отображается клубу"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
}
},
"description": "пользователь, который забронировал корт"
},
"note": {
"type": "string",
"description": "какой то комментарий о бронировнии"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"finished_at": {
"type": "string",
"description": "дата завершения бронирования"
},
"payment": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор платежа в системе Palms"
},
"amount": {
"type": "number",
"description": "сумма платежа в копейках/центах без разделителей. 120 - 1 грн 20 коп"
},
"currency": {
"type": "string",
"description": "валюта платежа"
},
"status": {
"type": "string",
"enum": [
"CREATED",
"PROCESSING",
"DECLINED",
"APPROVED",
"EXPIRED",
"REVERSED",
"CREATED"
],
"description": "статус транзакции"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "плательщик"
},
"created_at": {
"type": "string",
"description": "дата создание платежная"
},
"processed_at": {
"type": "string",
"description": "дата совершения платежа"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления платежа"
}
},
"description": "оплата по бронированию"
}
},
"required": [
"id",
"date_from",
"date_to",
"price",
"currency",
"status",
"area",
"user",
"note",
"created_at",
"updated_at",
"finished_at",
"payment"
],
"additionalProperties": false
}
}
}
Обновить модель ¶
Обновить модельPATCH/club/bookings/{id}
Ограничения
- Обновлять поля
price
иcurrency
можно только до установки статусаAPPROVED
. После подтверждения статуса изменять цену нельзя.
Example URI
- id
number
(required) Example: 1идентификатор бронирования
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"price": 20000,
"currency": "UAH",
"area_id": 1,
"slot_id": 1,
"note": "some text"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"date_from": {
"type": "string",
"description": "дата и время начала бронирования"
},
"date_to": {
"type": "string",
"description": "дата и время начала бронирования"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"area_id": {
"type": "number",
"description": "идентификатор корта (опциональный, если передан slot_id)"
},
"slot_id": {
"type": "number",
"description": "идентификатор слота (опциональный, если передан area_id)"
},
"note": {
"type": "string",
"description": "какой то комментарий о бронировнии"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"price": 20000,
"currency": "UAH",
"status": "APPROVED",
"area": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"slot": {
"id": 1,
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"status": "AVAILABLE",
"price": 20000,
"currency": "UAH",
"area": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
"note `some text`": "",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z"
},
"note": "some text",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"finished_at": "2019-08-23T12:23:23+00:00Z",
"payment": {
"id": 1,
"amount": 120,
"currency": "UAH",
"status": "CREATED",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"created_at": "2019-08-10T00:00:00",
"processed_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор бронирования"
},
"date_from": {
"type": "string",
"description": "дата начала забронированного времени"
},
"date_to": {
"type": "string",
"description": "дата окончания забронированного отрезка времени"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"status": {
"type": "string",
"enum": [
"REQUESTED",
"APPROVED",
"CONFIRMED",
"CANCELED_BY_CUSTOMER",
"CANCELED_BY_CLUB",
"OTHER",
"SHOWN",
"NOT_SHOWN",
"APPROVED"
],
"description": "статус бронирования"
},
"area": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"description": "корт, на который создается бронь"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "пользователь, который забронировал корт"
},
"slot": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор слота"
},
"date_from": {
"type": "string",
"description": "дата и время начала слота"
},
"date_to": {
"type": "string",
"description": "дата и время окончания слота"
},
"status": {
"type": "string",
"enum": [
"AVAILABLE",
"BOOKED",
"DISABLED",
"AVAILABLE"
],
"description": "статус слота"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"area": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"description": "корт, к которому относится слот"
},
"note `some text`": {
"type": "string",
"description": "заметка, отображается клубу"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
}
},
"description": "пользователь, который забронировал корт"
},
"note": {
"type": "string",
"description": "какой то комментарий о бронировнии"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"finished_at": {
"type": "string",
"description": "дата завершения бронирования"
},
"payment": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор платежа в системе Palms"
},
"amount": {
"type": "number",
"description": "сумма платежа в копейках/центах без разделителей. 120 - 1 грн 20 коп"
},
"currency": {
"type": "string",
"description": "валюта платежа"
},
"status": {
"type": "string",
"enum": [
"CREATED",
"PROCESSING",
"DECLINED",
"APPROVED",
"EXPIRED",
"REVERSED",
"CREATED"
],
"description": "статус транзакции"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "плательщик"
},
"created_at": {
"type": "string",
"description": "дата создание платежная"
},
"processed_at": {
"type": "string",
"description": "дата совершения платежа"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления платежа"
}
},
"description": "оплата по бронированию"
}
},
"required": [
"id",
"date_from",
"date_to",
"price",
"currency",
"status",
"area",
"user",
"note",
"created_at",
"updated_at",
"finished_at",
"payment"
],
"additionalProperties": false
}
}
}
Списать оплату за бронирование ¶
Списать оплату за бронированиеPOST/club/bookings/{id}/capture
Example URI
- id
number
(required) Example: 1идентификатор бронирования
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"price": 20000,
"currency": "UAH",
"status": "APPROVED",
"area": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"slot": {
"id": 1,
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"status": "AVAILABLE",
"price": 20000,
"currency": "UAH",
"area": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
"note `some text`": "",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z"
},
"note": "some text",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"finished_at": "2019-08-23T12:23:23+00:00Z",
"payment": {
"id": 1,
"amount": 120,
"currency": "UAH",
"status": "CREATED",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"created_at": "2019-08-10T00:00:00",
"processed_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор бронирования"
},
"date_from": {
"type": "string",
"description": "дата начала забронированного времени"
},
"date_to": {
"type": "string",
"description": "дата окончания забронированного отрезка времени"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"status": {
"type": "string",
"enum": [
"REQUESTED",
"APPROVED",
"CONFIRMED",
"CANCELED_BY_CUSTOMER",
"CANCELED_BY_CLUB",
"OTHER",
"SHOWN",
"NOT_SHOWN",
"APPROVED"
],
"description": "статус бронирования"
},
"area": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"description": "корт, на который создается бронь"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "пользователь, который забронировал корт"
},
"slot": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор слота"
},
"date_from": {
"type": "string",
"description": "дата и время начала слота"
},
"date_to": {
"type": "string",
"description": "дата и время окончания слота"
},
"status": {
"type": "string",
"enum": [
"AVAILABLE",
"BOOKED",
"DISABLED",
"AVAILABLE"
],
"description": "статус слота"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"area": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"description": "корт, к которому относится слот"
},
"note `some text`": {
"type": "string",
"description": "заметка, отображается клубу"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
}
},
"description": "пользователь, который забронировал корт"
},
"note": {
"type": "string",
"description": "какой то комментарий о бронировнии"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"finished_at": {
"type": "string",
"description": "дата завершения бронирования"
},
"payment": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор платежа в системе Palms"
},
"amount": {
"type": "number",
"description": "сумма платежа в копейках/центах без разделителей. 120 - 1 грн 20 коп"
},
"currency": {
"type": "string",
"description": "валюта платежа"
},
"status": {
"type": "string",
"enum": [
"CREATED",
"PROCESSING",
"DECLINED",
"APPROVED",
"EXPIRED",
"REVERSED",
"CREATED"
],
"description": "статус транзакции"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "плательщик"
},
"created_at": {
"type": "string",
"description": "дата создание платежная"
},
"processed_at": {
"type": "string",
"description": "дата совершения платежа"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления платежа"
}
},
"description": "оплата по бронированию"
}
},
"required": [
"id",
"date_from",
"date_to",
"price",
"currency",
"status",
"area",
"user",
"note",
"created_at",
"updated_at",
"finished_at",
"payment"
],
"additionalProperties": false
}
}
}
Зафиксировать оплату наличными или абонементом ¶
Зафиксировать оплату наличными или абонементомPOST/club/bookings/pay
Статус | Описание |
---|---|
CASH |
Оплата наличными |
SUBSCRIPTION |
Оплата абонементом |
PAYMENT_TERMINAL |
Оплата через платежный терминал |
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"price": 20000,
"usersubscription_id": 1,
"payment_method": "CASH"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"usersubscription_id": {
"type": "number",
"description": "абонемент"
},
"payment_method": {
"type": "string",
"description": "способ оплаты"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"price": 20000,
"currency": "UAH",
"status": "APPROVED",
"area": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"slot": {
"id": 1,
"date_from": "2019-08-23T12:23:23+00:00Z",
"date_to": "2019-08-23T12:23:23+00:00Z",
"status": "AVAILABLE",
"price": 20000,
"currency": "UAH",
"area": {
"id": 1,
"title": "Корт 1",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"enabled": true,
"parameters": [
{
"title": "Открытый",
"key": "outdoor",
"value": "tennis_court_type"
}
],
"area_type": {
"id": 1,
"value": "court",
"title": "somestring",
"parameters": [
{
"id": 1,
"key": {
"id": 1,
"title": "somestring",
"value": "tennis_court_covering_type",
"options": [
{
"id": 1,
"title": "somestring",
"value": "hard"
}
]
}
}
]
}
},
"note `some text`": "",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z"
},
"note": "some text",
"created_at": "2019-08-23T12:23:23+00:00Z",
"updated_at": "2019-08-23T12:23:23+00:00Z",
"finished_at": "2019-08-23T12:23:23+00:00Z",
"payment": {
"id": 1,
"amount": 120,
"currency": "UAH",
"status": "CREATED",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"created_at": "2019-08-10T00:00:00",
"processed_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор бронирования"
},
"date_from": {
"type": "string",
"description": "дата начала забронированного времени"
},
"date_to": {
"type": "string",
"description": "дата окончания забронированного отрезка времени"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"status": {
"type": "string",
"enum": [
"REQUESTED",
"APPROVED",
"CONFIRMED",
"CANCELED_BY_CUSTOMER",
"CANCELED_BY_CLUB",
"OTHER",
"SHOWN",
"NOT_SHOWN",
"APPROVED"
],
"description": "статус бронирования"
},
"area": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"description": "корт, на который создается бронь"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "пользователь, который забронировал корт"
},
"slot": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор слота"
},
"date_from": {
"type": "string",
"description": "дата и время начала слота"
},
"date_to": {
"type": "string",
"description": "дата и время окончания слота"
},
"status": {
"type": "string",
"enum": [
"AVAILABLE",
"BOOKED",
"DISABLED",
"AVAILABLE"
],
"description": "статус слота"
},
"price": {
"type": "number",
"description": "стоимость бронирования. Целое число без запятых (20000 - 200.00)"
},
"currency": {
"type": "string",
"description": "валюта стоимости."
},
"area": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор корта"
},
"title": {
"type": "string",
"description": "название корта"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"enabled": {
"type": "boolean",
"description": "включена или нет в выдачу игроку"
},
"parameters": {
"type": "array",
"description": "параметры корта. значения и ключи управляются из админки Palms."
},
"area_type": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"value": {
"type": "string"
},
"title": {
"type": "string",
"description": "тайтл, поддерживается локализация"
},
"parameters": {
"type": "array",
"description": "параметры доступные у типа помещения. значения и ключи управляются из админки Palms."
}
},
"description": "тип помещенияс доступными параметрами"
}
},
"description": "корт, к которому относится слот"
},
"note `some text`": {
"type": "string",
"description": "заметка, отображается клубу"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
}
},
"description": "пользователь, который забронировал корт"
},
"note": {
"type": "string",
"description": "какой то комментарий о бронировнии"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "дата последнего обновления"
},
"finished_at": {
"type": "string",
"description": "дата завершения бронирования"
},
"payment": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор платежа в системе Palms"
},
"amount": {
"type": "number",
"description": "сумма платежа в копейках/центах без разделителей. 120 - 1 грн 20 коп"
},
"currency": {
"type": "string",
"description": "валюта платежа"
},
"status": {
"type": "string",
"enum": [
"CREATED",
"PROCESSING",
"DECLINED",
"APPROVED",
"EXPIRED",
"REVERSED",
"CREATED"
],
"description": "статус транзакции"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "плательщик"
},
"created_at": {
"type": "string",
"description": "дата создание платежная"
},
"processed_at": {
"type": "string",
"description": "дата совершения платежа"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления платежа"
}
},
"description": "оплата по бронированию"
}
},
"required": [
"id",
"date_from",
"date_to",
"price",
"currency",
"status",
"area",
"user",
"note",
"created_at",
"updated_at",
"finished_at",
"payment"
],
"additionalProperties": false
}
}
}
Доступные методы оплаты букинга ¶
Доступные методы оплаты букингаGET/club/bookings/payment-methods
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"meta": {
"pagination": {
"total_number": 22,
"current_page": 1,
"total_pages": 2,
"page_size": 20
}
},
"data": {
"subscriptions": [
{
"id": 1,
"title": "somestring",
"price": 50000,
"currency": "UAH",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"games_number": 10,
"validity_period": 365,
"payment": {
"id": 1,
"amount": 120,
"currency": "UAH",
"status": "CREATED",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"created_at": "2019-08-10T00:00:00",
"processed_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
},
"area_types": [
"1",
"2",
"3"
],
"day_weeks": [
"1",
"2",
"3"
],
"hours": [
"8",
"20"
],
"trainer_included": true,
"is_valid": true,
"active": true
},
{
"id": 1,
"title": "somestring",
"price": 50000,
"currency": "UAH",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"games_number": 10,
"validity_period": 365,
"payment": {
"id": 1,
"amount": 120,
"currency": "UAH",
"status": "CREATED",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"created_at": "2019-08-10T00:00:00",
"processed_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
},
"area_types": [
"1",
"2",
"3"
],
"day_weeks": [
"1",
"2",
"3"
],
"hours": [
"8",
"20"
],
"trainer_included": true,
"is_valid": true,
"active": true
}
]
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"pagination": {
"type": "object",
"properties": {
"total_number": {
"type": "number",
"description": "общее количество сущностей"
},
"current_page": {
"type": "number",
"description": "текущая страница"
},
"total_pages": {
"type": "number",
"description": "всего страниц"
},
"page_size": {
"type": "number",
"description": "записей на страницу"
}
}
}
}
},
"data": {
"type": "object",
"properties": {
"subscriptions": {
"type": "array"
}
},
"required": [
"subscriptions"
],
"additionalProperties": false
}
}
}
Экспорт в CSV ¶
Экспорт в CSVGET/club/bookings/export{?status,date_from,date_to}
Example URI
- status
string
(optional) Example: AVAILABLE(фильтр) статус бронирования
- payment_status
string
(optional) Example: APPROVED(фильтр) статус платежа
- date_from
string
(optional) Example: 2019-05-14вернуть бронирования после указанной даты
- date_to
string
(optional) Example: 2019-05-15вернуть бронирования до указанной даты
- area_type_id
number
(optional) Example: 1тип помещения
- player_id
number
(optional) Example: 1id клубного игрока
- coach_id
number
(optional) Example: 1id тренера
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
204
Headers
Content-Type: application/json
Платежи ¶
Статусы платежей
Статус | Описание |
---|---|
CREATED |
Платеж создан, но не оплачен |
PROCESSING |
Платеж в обработке |
DECLINED |
Платеж не прошел |
APPROVED |
Плаатеж прошел успешно |
EXPIRED |
Вышло время оплаты платежа. Его больше нельзя оплатить |
REVERSED |
Платеж отменен. Средства вернутся плательщику |
Получить список ¶
Получить списокGET/club/payments{?page_size,page,statuses,date_from,date_to,player_id,coach_id,payment_method}
Example URI
- page_size
number
(optional) Example: 1количество записей на странице
- page
number
(optional) Example: 10номер страницы
- statuses
string
(optional) Example: APPROVED,DECLINED(фильтр) статус платежа
- date_from
string
(optional) Example: 2019-05-14вернуть платежи после указанной даты
- date_to
string
(optional) Example: 2019-05-15вернуть платежи до указанной даты
- player_id
number
(optional) Example: 1id клубного игрока
- coach_id
number
(optional) Example: 1id тренера
- payment_method
string
(optional) Example: ONLINE,CASH,SUBSCRIPTION(фильтр) тип платежа
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"meta": {
"pagination": {
"total_number": 22,
"current_page": 1,
"total_pages": 2,
"page_size": 20
}
},
"data": [
{
"id": 1,
"amount": 120,
"currency": "UAH",
"status": "CREATED",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"created_at": "2019-08-10T00:00:00",
"processed_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
},
{
"id": 1,
"amount": 120,
"currency": "UAH",
"status": "CREATED",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"created_at": "2019-08-10T00:00:00",
"processed_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"pagination": {
"type": "object",
"properties": {
"total_number": {
"type": "number",
"description": "общее количество сущностей"
},
"current_page": {
"type": "number",
"description": "текущая страница"
},
"total_pages": {
"type": "number",
"description": "всего страниц"
},
"page_size": {
"type": "number",
"description": "записей на страницу"
}
}
}
}
},
"data": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор платежа в системе Palms"
},
"amount": {
"type": "number",
"description": "сумма платежа в копейках/центах без разделителей. 120 - 1 грн 20 коп"
},
"currency": {
"type": "string",
"description": "валюта платежа"
},
"status": {
"type": "string",
"enum": [
"CREATED",
"PROCESSING",
"DECLINED",
"APPROVED",
"EXPIRED",
"REVERSED",
"CREATED"
],
"description": "статус транзакции"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "плательщик"
},
"created_at": {
"type": "string",
"description": "дата создание платежная"
},
"processed_at": {
"type": "string",
"description": "дата совершения платежа"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления платежа"
}
}
},
{
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор платежа в системе Palms"
},
"amount": {
"type": "number",
"description": "сумма платежа в копейках/центах без разделителей. 120 - 1 грн 20 коп"
},
"currency": {
"type": "string",
"description": "валюта платежа"
},
"status": {
"type": "string",
"enum": [
"CREATED",
"PROCESSING",
"DECLINED",
"APPROVED",
"EXPIRED",
"REVERSED",
"CREATED"
],
"description": "статус транзакции"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "плательщик"
},
"created_at": {
"type": "string",
"description": "дата создание платежная"
},
"processed_at": {
"type": "string",
"description": "дата совершения платежа"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления платежа"
}
}
}
]
}
}
}
Получить модель ¶
Получить модельGET/club/payments/{id}
Example URI
- id
number
(required) Example: 1идентификатор платежа
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"amount": 120,
"currency": "UAH",
"status": "CREATED",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"created_at": "2019-08-10T00:00:00",
"processed_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор платежа в системе Palms"
},
"amount": {
"type": "number",
"description": "сумма платежа в копейках/центах без разделителей. 120 - 1 грн 20 коп"
},
"currency": {
"type": "string",
"description": "валюта платежа"
},
"status": {
"type": "string",
"enum": [
"CREATED",
"PROCESSING",
"DECLINED",
"APPROVED",
"EXPIRED",
"REVERSED",
"CREATED"
],
"description": "статус транзакции"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "плательщик"
},
"created_at": {
"type": "string",
"description": "дата создание платежная"
},
"processed_at": {
"type": "string",
"description": "дата совершения платежа"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления платежа"
}
},
"required": [
"id",
"amount",
"currency",
"status",
"user",
"created_at",
"processed_at",
"updated_at"
],
"additionalProperties": false
}
}
}
Получить статистику ¶
Получить статистикуGET/club/payments/stats{?statuses,date_from,date_to,player_id,coach_id,payment_method}
total
- Все платежи типа PAYMENT
approved
- списаные деньги (APPROVED
+ processed_at_isnull=False
)
reserved
- деньги которые hold на fondy (APPROVED
+ processed_at_isnull=True
)
declined
- деньги которые к нам не дойдут (DECLINED, EXPIRED, REVERSED
)
CREATED
и PROCESSING
игнорируются так как они промежуточные и сущесвуют недолго (PROCESSING
может буть вообще меньше секунды)
Это касается только ONLINE
патежей. Кэш и абонемент вотоматически approved
Учитываются только платежи с типом PAYMENT
(AUTH
списывает минимальную сумму и возвращает ее обратно что в остатке равно 0
)
Example URI
- statuses
string
(optional) Example: APPROVED,DECLINED(фильтр) статус платежа
- date_from
string
(optional) Example: 2019-05-14вернуть платежи после указанной даты
- date_to
string
(optional) Example: 2019-05-15вернуть платежи до указанной даты
- player_id
number
(optional) Example: 1id клубного игрока
- coach_id
number
(optional) Example: 1id тренера
- payment_method
string
(optional) Example: ONLINE,CASH,SUBSCRIPTION(фильтр) тип платежа
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"data": {
"total": {
"count": 10,
"amount": 55000
},
"approved": {
"count": 5,
"amount": 30000
},
"reserved": {
"count": 3,
"amount": 5000
},
"declined": {
"count": 2,
"amount": 20000
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"total": {
"type": "object",
"properties": {
"count": {
"type": "number",
"description": "количество всех платежей"
},
"amount": {
"type": "number",
"description": "сумма всех платежей"
}
}
},
"approved": {
"type": "object",
"properties": {
"count": {
"type": "number",
"description": "количество платежей со статусом `APPROVED` которые успешно списаны"
},
"amount": {
"type": "number",
"description": "сумма платежей со статусом `APPROVED`которые успешно списаны"
}
}
},
"reserved": {
"type": "object",
"properties": {
"count": {
"type": "number",
"description": "количество платежей со статусом `APPROVED`, но которые еще не списаны в платежной системе"
},
"amount": {
"type": "number",
"description": "сумма платежей со статусом `APPROVED`, но которые еще не списаны в платежной системе"
}
}
},
"declined": {
"type": "object",
"properties": {
"count": {
"type": "number",
"description": "количество платежей со статусом `DECLINED`, `EXPIRED`, `REVERSED`"
},
"amount": {
"type": "number",
"description": "сумма платежей со статусами `DECLINED`, `EXPIRED`, `REVERSED`"
}
}
}
},
"required": [
"total",
"approved",
"reserved",
"declined"
],
"additionalProperties": false
}
}
}
Экспорт в CSV ¶
Экспорт в CSVGET/club/payments/export{?date_from,date_to}
Example URI
- statuses
string
(optional) Example: APPROVED,DECLINED(фильтр) статус платежа
- date_from
string
(optional) Example: 2019-05-14вернуть платежи после указанной даты
- date_to
string
(optional) Example: 2019-05-15вернуть платежи до указанной даты
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
204
Headers
Content-Type: application/json
Тарифы ¶
Получить список ¶
Получить списокGET/club/tarrifs{?page_size,page}
Example URI
- page_size
number
(optional) Example: 1количество записей на странице
- page
number
(optional) Example: 10номер страницы
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"meta": {
"pagination": {
"total_number": 22,
"current_page": 1,
"total_pages": 2,
"page_size": 20
}
},
"data": [
{
"id": 1,
"result": 20000,
"title": "в вс все корты по 200",
"day_weeks": [
6
],
"hours_range": [
8,
12
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
2
],
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
},
{
"id": 1,
"result": 20000,
"title": "в вс все корты по 200",
"day_weeks": [
6
],
"hours_range": [
8,
12
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
2
],
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"pagination": {
"type": "object",
"properties": {
"total_number": {
"type": "number",
"description": "общее количество сущностей"
},
"current_page": {
"type": "number",
"description": "текущая страница"
},
"total_pages": {
"type": "number",
"description": "всего страниц"
},
"page_size": {
"type": "number",
"description": "записей на страницу"
}
}
}
}
},
"data": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор тарифа в системе Palms"
},
"result": {
"type": "number",
"description": "стоимость в валюте клуба"
},
"title": {
"type": "string",
"description": "заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"hours_range": {
"type": "array",
"description": "отрезок времени в дне. с 8 до 12 часов"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует тариф"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создание тарифы"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления тарифы"
}
}
},
{
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор тарифа в системе Palms"
},
"result": {
"type": "number",
"description": "стоимость в валюте клуба"
},
"title": {
"type": "string",
"description": "заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"hours_range": {
"type": "array",
"description": "отрезок времени в дне. с 8 до 12 часов"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует тариф"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создание тарифы"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления тарифы"
}
}
}
]
}
}
}
Получить модель ¶
Получить модельGET/club/tarrifs/{id}
Example URI
- id
number
(required) Example: 1идентификатор тарифа
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"result": 20000,
"title": "в вс все корты по 200",
"day_weeks": [
6
],
"hours_range": [
8,
12
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
2
],
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор тарифа в системе Palms"
},
"result": {
"type": "number",
"description": "стоимость в валюте клуба"
},
"title": {
"type": "string",
"description": "заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"hours_range": {
"type": "array",
"description": "отрезок времени в дне. с 8 до 12 часов"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует тариф"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создание тарифы"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления тарифы"
}
},
"required": [
"id",
"result",
"title",
"day_weeks",
"hours_range",
"date_range",
"areas",
"priority",
"created_at",
"updated_at"
],
"additionalProperties": false
}
}
}
Обновить модель ¶
Обновить модельPUT/club/tarrifs/{id}
Example URI
- id
number
(required) Example: 1идентификатор тарифа
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"result": 20000,
"title": "в вс все корты по 200",
"day_weeks": [
1,
6
],
"hours_range": [
1,
8,
12
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
1,
2
],
"priority": 10
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"result": {
"type": "number",
"description": "стоимость в валюте клуба"
},
"title": {
"type": "string",
"description": "валюта платежа"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"hours_range": {
"type": "array",
"description": "отрезок времени в дне. с 8 до 12 часов"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует тариф"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"priority": {
"type": "number",
"description": "приоритет"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"result": 20000,
"title": "в вс все корты по 200",
"day_weeks": [
6
],
"hours_range": [
8,
12
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
2
],
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор тарифа в системе Palms"
},
"result": {
"type": "number",
"description": "стоимость в валюте клуба"
},
"title": {
"type": "string",
"description": "заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"hours_range": {
"type": "array",
"description": "отрезок времени в дне. с 8 до 12 часов"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует тариф"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создание тарифы"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления тарифы"
}
},
"required": [
"id",
"result",
"title",
"day_weeks",
"hours_range",
"date_range",
"areas",
"priority",
"created_at",
"updated_at"
],
"additionalProperties": false
}
}
}
Удалить модель ¶
Удалить модельDELETE/club/tarrifs/{id}
Нельзя удалить последнее правило тарифов
Example URI
- id
number
(required) Example: 1идентификатор тарифа
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Создать модель ¶
Создать модельPOST/club/tarrifs
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"result": 20000,
"title": "в вс все корты по 200",
"day_weeks": [
1,
6
],
"hours_range": [
1,
8,
12
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
1,
2
],
"priority": 10
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"result": {
"type": "number",
"description": "стоимость в валюте клуба"
},
"title": {
"type": "string",
"description": "валюта платежа"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"hours_range": {
"type": "array",
"description": "отрезок времени в дне. с 8 до 12 часов"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует тариф"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"priority": {
"type": "number",
"description": "приоритет"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"result": 20000,
"title": "в вс все корты по 200",
"day_weeks": [
6
],
"hours_range": [
8,
12
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
2
],
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор тарифа в системе Palms"
},
"result": {
"type": "number",
"description": "стоимость в валюте клуба"
},
"title": {
"type": "string",
"description": "заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"hours_range": {
"type": "array",
"description": "отрезок времени в дне. с 8 до 12 часов"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует тариф"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создание тарифы"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления тарифы"
}
},
"required": [
"id",
"result",
"title",
"day_weeks",
"hours_range",
"date_range",
"areas",
"priority",
"created_at",
"updated_at"
],
"additionalProperties": false
}
}
}
Посчитать стоимость ¶
Посчитать стоимостьPOST/club/tarrifs/calc
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"date_from": "2019-08-10T00:00:00",
"date_to": "2019-08-10T00:00:00",
"area_id": 1,
"ordering": [
1,
1,
2
],
"coach_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"date_from": {
"type": "string",
"description": "дата начала бронирования"
},
"date_to": {
"type": "string",
"description": "дата завершения бронирования"
},
"area_id": {
"type": "number",
"description": "зона бронирования"
},
"ordering": {
"type": "array",
"description": "очередность"
},
"coach_id": {
"type": "number",
"description": "id тренера"
}
},
"required": [
"area_id"
]
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"price": 300,
"currency": "UAH"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"price": {
"type": "number",
"description": "стоимость"
},
"currency": {
"type": "string",
"description": "валюта"
}
},
"required": [
"price",
"currency"
],
"additionalProperties": false
}
}
}
Обновить приоритет ¶
Обновить приоритетPOST/club/tarrifs/update-priority
Для обновления приоритетов надо передавать параметры списком [{rule_id: N, priority: 10}, …{}]
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"rule_id": 1,
"priority": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"rule_id": {
"type": "number"
},
"priority": {
"type": "number"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"result": 20000,
"title": "в вс все корты по 200",
"day_weeks": [
6
],
"hours_range": [
8,
12
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
2
],
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор тарифа в системе Palms"
},
"result": {
"type": "number",
"description": "стоимость в валюте клуба"
},
"title": {
"type": "string",
"description": "заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"hours_range": {
"type": "array",
"description": "отрезок времени в дне. с 8 до 12 часов"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует тариф"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создание тарифы"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления тарифы"
}
},
"required": [
"id",
"result",
"title",
"day_weeks",
"hours_range",
"date_range",
"areas",
"priority",
"created_at",
"updated_at"
],
"additionalProperties": false
}
}
}
Расписание ¶
Получить список ¶
Получить списокGET/club/schedule-rules{?page_size,page}
Example URI
- page_size
number
(optional) Example: 1количество записей на странице
- page
number
(optional) Example: 10номер страницы
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"meta": {
"pagination": {
"total_number": 22,
"current_page": 1,
"total_pages": 2,
"page_size": 20
}
},
"data": [
{
"id": 1,
"result": [
8,
12
],
"title": "в пн с 23 июля 2019 по 20 сент 2019 года 1ый корт работает с 8 до 12",
"day_weeks": [
6
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
2
],
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
},
{
"id": 1,
"result": [
8,
12
],
"title": "в пн с 23 июля 2019 по 20 сент 2019 года 1ый корт работает с 8 до 12",
"day_weeks": [
6
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
2
],
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"pagination": {
"type": "object",
"properties": {
"total_number": {
"type": "number",
"description": "общее количество сущностей"
},
"current_page": {
"type": "number",
"description": "текущая страница"
},
"total_pages": {
"type": "number",
"description": "всего страниц"
},
"page_size": {
"type": "number",
"description": "записей на страницу"
}
}
}
}
},
"data": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор правила расписания в системе Palms"
},
"result": {
"type": "array",
"description": "рабочие часы"
},
"title": {
"type": "string",
"description": "заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует правило расписания"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления"
}
}
},
{
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор правила расписания в системе Palms"
},
"result": {
"type": "array",
"description": "рабочие часы"
},
"title": {
"type": "string",
"description": "заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует правило расписания"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления"
}
}
}
]
}
}
}
Получить модель ¶
Получить модельGET/club/schedule-rules/{id}
Example URI
- id
number
(required) Example: 1идентификатор тарифа
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"result": [
8,
12
],
"title": "в пн с 23 июля 2019 по 20 сент 2019 года 1ый корт работает с 8 до 12",
"day_weeks": [
6
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
2
],
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор правила расписания в системе Palms"
},
"result": {
"type": "array",
"description": "рабочие часы"
},
"title": {
"type": "string",
"description": "заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует правило расписания"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления"
}
},
"required": [
"id",
"result",
"title",
"day_weeks",
"date_range",
"areas",
"priority",
"created_at",
"updated_at"
],
"additionalProperties": false
}
}
}
Обновить модель ¶
Обновить модельPUT/club/schedule-rules/{id}
Example URI
- id
number
(required) Example: 1идентификатор тарифа
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"result": [
1,
8,
12
],
"title": "в пн с 23 июля 2019 по 20 сент 2019 года 1ый корт работает с 8 до 12",
"day_weeks": [
1,
6
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
1,
2
],
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"result": {
"type": "array",
"description": "рабочие часы"
},
"title": {
"type": "string",
"description": "валюта платежа"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует правило расписания"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"result": [
8,
12
],
"title": "в пн с 23 июля 2019 по 20 сент 2019 года 1ый корт работает с 8 до 12",
"day_weeks": [
6
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
2
],
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор правила расписания в системе Palms"
},
"result": {
"type": "array",
"description": "рабочие часы"
},
"title": {
"type": "string",
"description": "заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует правило расписания"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления"
}
},
"required": [
"id",
"result",
"title",
"day_weeks",
"date_range",
"areas",
"priority",
"created_at",
"updated_at"
],
"additionalProperties": false
}
}
}
Удалить модель ¶
Удалить модельDELETE/club/schedule-rules/{id}
Нельзя удалить последнее правило тарифов
Example URI
- id
number
(required) Example: 1идентификатор правила
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Создать модель ¶
Создать модельPOST/club/schedule-rules
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"result": [
1,
8,
12
],
"title": "в пн с 23 июля 2019 по 20 сент 2019 года...",
"day_weeks": [
1,
6
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
1,
2
],
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"result": {
"type": "array",
"description": "рабочие часы"
},
"title": {
"type": "string",
"description": "заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует правило расписания"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"result": [
8,
12
],
"title": "в пн с 23 июля 2019 по 20 сент 2019 года 1ый корт работает с 8 до 12",
"day_weeks": [
6
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
2
],
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор правила расписания в системе Palms"
},
"result": {
"type": "array",
"description": "рабочие часы"
},
"title": {
"type": "string",
"description": "заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует правило расписания"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления"
}
},
"required": [
"id",
"result",
"title",
"day_weeks",
"date_range",
"areas",
"priority",
"created_at",
"updated_at"
],
"additionalProperties": false
}
}
}
Посчитать стоимость ¶
Посчитать стоимостьPOST/club/schedule-rules/calc
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"date_from": "2019-08-10T00:00:00",
"date_to": "2019-08-20T00:00:00",
"area_id": [
"1",
"2",
"3"
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"date_from": {
"type": "string",
"description": "начало отрезка"
},
"date_to": {
"type": "string",
"description": "конец отрезка"
},
"area_id": {
"type": "array",
"description": "зона бронирования"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"meta": {
"pagination": {
"total_number": 22,
"current_page": 1,
"total_pages": 2,
"page_size": 20
}
},
"data": [
{
"date": "2019-08-10T00:00:00",
"area_id": 1,
"hours": [
"8",
"20"
]
},
{
"date": "2019-08-10T00:00:00",
"area_id": 1,
"hours": [
"8",
"20"
]
},
{
"date": "2019-08-10T00:00:00",
"area_id": 1,
"hours": [
"8",
"20"
]
},
{
"date": "2019-08-10T00:00:00",
"area_id": 1,
"hours": [
"8",
"20"
]
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"pagination": {
"type": "object",
"properties": {
"total_number": {
"type": "number",
"description": "общее количество сущностей"
},
"current_page": {
"type": "number",
"description": "текущая страница"
},
"total_pages": {
"type": "number",
"description": "всего страниц"
},
"page_size": {
"type": "number",
"description": "записей на страницу"
}
}
}
}
},
"data": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "дата"
},
"area_id": {
"type": "number",
"description": "идентификатор корта"
},
"hours": {
"type": "array",
"description": "отрезок времени"
}
}
},
{
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "дата"
},
"area_id": {
"type": "number",
"description": "идентификатор корта"
},
"hours": {
"type": "array",
"description": "отрезок времени"
}
}
},
{
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "дата"
},
"area_id": {
"type": "number",
"description": "идентификатор корта"
},
"hours": {
"type": "array",
"description": "отрезок времени"
}
}
},
{
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "дата"
},
"area_id": {
"type": "number",
"description": "идентификатор корта"
},
"hours": {
"type": "array",
"description": "отрезок времени"
}
}
}
]
}
}
}
Обновить приоритет ¶
Обновить приоритетPOST/club/schedule-rules/update-priority
Для обновления приоритетов надо передавать параметры списком [{rule_id: N, priority: 10}, …{}]
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"rule_id": 1,
"priority": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"rule_id": {
"type": "number"
},
"priority": {
"type": "number"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"result": [
8,
12
],
"title": "в пн с 23 июля 2019 по 20 сент 2019 года 1ый корт работает с 8 до 12",
"day_weeks": [
6
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
2
],
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор правила расписания в системе Palms"
},
"result": {
"type": "array",
"description": "рабочие часы"
},
"title": {
"type": "string",
"description": "заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует правило расписания"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления"
}
},
"required": [
"id",
"result",
"title",
"day_weeks",
"date_range",
"areas",
"priority",
"created_at",
"updated_at"
],
"additionalProperties": false
}
}
}
Расписание Тренеров ¶
Получить список ¶
Получить списокGET/club/coach-rules{?page_size,page,coach_id}
Example URI
- page_size
number
(optional) Example: 1количество записей на странице
- page
number
(optional) Example: 10номер страницы
- coach_id
number
(optional) Example: 1id тренера
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"meta": {
"pagination": {
"total_number": 22,
"current_page": 1,
"total_pages": 2,
"page_size": 20
}
},
"data": [
{
"id": 1,
"result": [
8,
12
],
"title": "тайтл",
"day_weeks": [
6
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
2
],
"coach": 1,
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
},
{
"id": 1,
"result": [
8,
12
],
"title": "тайтл",
"day_weeks": [
6
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
2
],
"coach": 1,
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"pagination": {
"type": "object",
"properties": {
"total_number": {
"type": "number",
"description": "общее количество сущностей"
},
"current_page": {
"type": "number",
"description": "текущая страница"
},
"total_pages": {
"type": "number",
"description": "всего страниц"
},
"page_size": {
"type": "number",
"description": "записей на страницу"
}
}
}
}
},
"data": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор правила расписания в системе Palms"
},
"result": {
"type": "array",
"description": "рабочие часы"
},
"title": {
"type": "string",
"description": "произвольный заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует правило расписания"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"coach": {
"type": "number",
"description": "идентификатор тренера"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления"
}
}
},
{
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор правила расписания в системе Palms"
},
"result": {
"type": "array",
"description": "рабочие часы"
},
"title": {
"type": "string",
"description": "произвольный заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует правило расписания"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"coach": {
"type": "number",
"description": "идентификатор тренера"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления"
}
}
}
]
}
}
}
Получить модель ¶
Получить модельGET/club/coach-rules/{id}
Example URI
- id
number
(required) Example: 1идентификатор тарифа
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"result": [
8,
12
],
"title": "тайтл",
"day_weeks": [
6
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
2
],
"coach": 1,
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор правила расписания в системе Palms"
},
"result": {
"type": "array",
"description": "рабочие часы"
},
"title": {
"type": "string",
"description": "произвольный заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует правило расписания"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"coach": {
"type": "number",
"description": "идентификатор тренера"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления"
}
},
"required": [
"id",
"result",
"title",
"day_weeks",
"date_range",
"areas",
"coach",
"priority",
"created_at",
"updated_at"
],
"additionalProperties": false
}
}
}
Обновить модель ¶
Обновить модельPATCH/club/coach-rules/{id}
Example URI
- id
number
(required) Example: 1идентификатор тарифа
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"result": [
1,
8,
12
],
"title": "в пн с 23 июля 2019 по 20 сент 2019 года...",
"day_weeks": [
1,
6
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
1,
2
],
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"result": {
"type": "array",
"description": "рабочие часы"
},
"title": {
"type": "string",
"description": "заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует правило расписания"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"result": [
8,
12
],
"title": "тайтл",
"day_weeks": [
6
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
2
],
"coach": 1,
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор правила расписания в системе Palms"
},
"result": {
"type": "array",
"description": "рабочие часы"
},
"title": {
"type": "string",
"description": "произвольный заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует правило расписания"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"coach": {
"type": "number",
"description": "идентификатор тренера"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления"
}
},
"required": [
"id",
"result",
"title",
"day_weeks",
"date_range",
"areas",
"coach",
"priority",
"created_at",
"updated_at"
],
"additionalProperties": false
}
}
}
Удалить модель ¶
Удалить модельDELETE/club/coach-rules/{id}
Нельзя удалить последнее правило
Example URI
- id
number
(required) Example: 1идентификатор правила
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Создать модель ¶
Создать модельPOST/club/coach-rules
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"result": [
1,
8,
12
],
"title": "в пн с 23 июля 2019 по 20 сент 2019 года...",
"day_weeks": [
1,
6
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
1,
2
],
"coaсh_id": 1,
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"result": {
"type": "array",
"description": "рабочие часы"
},
"title": {
"type": "string",
"description": "заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует правило расписания"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"coaсh_id": {
"type": "number",
"description": "идентификатор тренера"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"result": [
8,
12
],
"title": "тайтл",
"day_weeks": [
6
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
2
],
"coach": 1,
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор правила расписания в системе Palms"
},
"result": {
"type": "array",
"description": "рабочие часы"
},
"title": {
"type": "string",
"description": "произвольный заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует правило расписания"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"coach": {
"type": "number",
"description": "идентификатор тренера"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления"
}
},
"required": [
"id",
"result",
"title",
"day_weeks",
"date_range",
"areas",
"coach",
"priority",
"created_at",
"updated_at"
],
"additionalProperties": false
}
}
}
Обновить приоритет ¶
Обновить приоритетPOST/club/coach-rules/update-priority
Для обновления приоритетов надо передавать параметры списком [{rule_id: N, priority: 10}, …{}]
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"rule_id": 1,
"priority": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"rule_id": {
"type": "number"
},
"priority": {
"type": "number"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"result": [
8,
12
],
"title": "тайтл",
"day_weeks": [
6
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
2
],
"coach": 1,
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор правила расписания в системе Palms"
},
"result": {
"type": "array",
"description": "рабочие часы"
},
"title": {
"type": "string",
"description": "произвольный заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует правило расписания"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"coach": {
"type": "number",
"description": "идентификатор тренера"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления"
}
},
"required": [
"id",
"result",
"title",
"day_weeks",
"date_range",
"areas",
"coach",
"priority",
"created_at",
"updated_at"
],
"additionalProperties": false
}
}
}
Тарифы Тренеров ¶
Получить список ¶
Получить списокGET/club/coach-tariffs{?page_size,page,coach_id}
Example URI
- page_size
number
(optional) Example: 1количество записей на странице
- page
number
(optional) Example: 10номер страницы
- coach_id
number
(optional) Example: 1id тренера
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"meta": {
"pagination": {
"total_number": 22,
"current_page": 1,
"total_pages": 2,
"page_size": 20
}
},
"data": [
{
"id": 1,
"result": [
8,
12
],
"title": "тайтл",
"day_weeks": [
6
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
2
],
"price_per_hour": 10000,
"price_per_hour_with_area": 20000,
"coach": 1,
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
},
{
"id": 1,
"result": [
8,
12
],
"title": "тайтл",
"day_weeks": [
6
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
2
],
"price_per_hour": 10000,
"price_per_hour_with_area": 20000,
"coach": 1,
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"pagination": {
"type": "object",
"properties": {
"total_number": {
"type": "number",
"description": "общее количество сущностей"
},
"current_page": {
"type": "number",
"description": "текущая страница"
},
"total_pages": {
"type": "number",
"description": "всего страниц"
},
"page_size": {
"type": "number",
"description": "записей на страницу"
}
}
}
}
},
"data": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор правила расписания в системе Palms"
},
"result": {
"type": "array",
"description": "рабочие часы"
},
"title": {
"type": "string",
"description": "произвольный заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует правило расписания"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"price_per_hour": {
"type": "number",
"description": "стоимость тренера за час"
},
"price_per_hour_with_area": {
"type": "number",
"description": "стоимость тренера за час вместе с кортом. В приоритете в рассчетах"
},
"coach": {
"type": "number",
"description": "идентификатор тренера"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления"
}
}
},
{
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор правила расписания в системе Palms"
},
"result": {
"type": "array",
"description": "рабочие часы"
},
"title": {
"type": "string",
"description": "произвольный заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует правило расписания"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"price_per_hour": {
"type": "number",
"description": "стоимость тренера за час"
},
"price_per_hour_with_area": {
"type": "number",
"description": "стоимость тренера за час вместе с кортом. В приоритете в рассчетах"
},
"coach": {
"type": "number",
"description": "идентификатор тренера"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления"
}
}
}
]
}
}
}
Получить модель ¶
Получить модельGET/club/coach-tariffs/{id}
Example URI
- id
number
(required) Example: 1идентификатор тарифа
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"result": [
8,
12
],
"title": "тайтл",
"day_weeks": [
6
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
2
],
"price_per_hour": 10000,
"price_per_hour_with_area": 20000,
"coach": 1,
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор правила расписания в системе Palms"
},
"result": {
"type": "array",
"description": "рабочие часы"
},
"title": {
"type": "string",
"description": "произвольный заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует правило расписания"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"price_per_hour": {
"type": "number",
"description": "стоимость тренера за час"
},
"price_per_hour_with_area": {
"type": "number",
"description": "стоимость тренера за час вместе с кортом. В приоритете в рассчетах"
},
"coach": {
"type": "number",
"description": "идентификатор тренера"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления"
}
},
"required": [
"id",
"result",
"title",
"day_weeks",
"date_range",
"areas",
"price_per_hour",
"price_per_hour_with_area",
"coach",
"priority",
"created_at",
"updated_at"
],
"additionalProperties": false
}
}
}
Обновить модель ¶
Обновить модельPATCH/club/coach-tariffs/{id}
Example URI
- id
number
(required) Example: 1идентификатор тарифа
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"result": [
1,
8,
12
],
"title": "в пн с 23 июля 2019 по 20 сент 2019 года...",
"day_weeks": [
1,
6
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
1,
2
],
"price_per_hour": 10000,
"price_per_hour_with_area": 20000,
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"result": {
"type": "array",
"description": "рабочие часы"
},
"title": {
"type": "string",
"description": "заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует правило расписания"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"price_per_hour": {
"type": "number",
"description": "стоимость тренера за час"
},
"price_per_hour_with_area": {
"type": "number",
"description": "стоимость тренера за час вместе с кортом. В приоритете в рассчетах"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"result": [
8,
12
],
"title": "тайтл",
"day_weeks": [
6
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
2
],
"price_per_hour": 10000,
"price_per_hour_with_area": 20000,
"coach": 1,
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор правила расписания в системе Palms"
},
"result": {
"type": "array",
"description": "рабочие часы"
},
"title": {
"type": "string",
"description": "произвольный заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует правило расписания"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"price_per_hour": {
"type": "number",
"description": "стоимость тренера за час"
},
"price_per_hour_with_area": {
"type": "number",
"description": "стоимость тренера за час вместе с кортом. В приоритете в рассчетах"
},
"coach": {
"type": "number",
"description": "идентификатор тренера"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления"
}
},
"required": [
"id",
"result",
"title",
"day_weeks",
"date_range",
"areas",
"price_per_hour",
"price_per_hour_with_area",
"coach",
"priority",
"created_at",
"updated_at"
],
"additionalProperties": false
}
}
}
Удалить модель ¶
Удалить модельDELETE/club/coach-tariffs/{id}
Example URI
- id
number
(required) Example: 1идентификатор правила
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Создать модель ¶
Создать модельPOST/club/coach-tariffs
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"result": [
1,
8,
12
],
"title": "в пн с 23 июля 2019 по 20 сент 2019 года...",
"day_weeks": [
1,
6
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
1,
2
],
"price_per_hour": 10000,
"price_per_hour_with_area": 20000,
"coaсh_id": 1,
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"result": {
"type": "array",
"description": "рабочие часы"
},
"title": {
"type": "string",
"description": "заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует правило расписания"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"price_per_hour": {
"type": "number",
"description": "стоимость тренера за час"
},
"price_per_hour_with_area": {
"type": "number",
"description": "стоимость тренера за час вместе с кортом. В приоритете в рассчетах"
},
"coaсh_id": {
"type": "number",
"description": "идентификатор тренера"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"result": [
8,
12
],
"title": "тайтл",
"day_weeks": [
6
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
2
],
"price_per_hour": 10000,
"price_per_hour_with_area": 20000,
"coach": 1,
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор правила расписания в системе Palms"
},
"result": {
"type": "array",
"description": "рабочие часы"
},
"title": {
"type": "string",
"description": "произвольный заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует правило расписания"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"price_per_hour": {
"type": "number",
"description": "стоимость тренера за час"
},
"price_per_hour_with_area": {
"type": "number",
"description": "стоимость тренера за час вместе с кортом. В приоритете в рассчетах"
},
"coach": {
"type": "number",
"description": "идентификатор тренера"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления"
}
},
"required": [
"id",
"result",
"title",
"day_weeks",
"date_range",
"areas",
"price_per_hour",
"price_per_hour_with_area",
"coach",
"priority",
"created_at",
"updated_at"
],
"additionalProperties": false
}
}
}
Обновить приоритет ¶
Обновить приоритетPOST/club/coach-tariffs/update-priority
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"rule_id": 1,
"priority": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"rule_id": {
"type": "number"
},
"priority": {
"type": "number"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"result": [
8,
12
],
"title": "тайтл",
"day_weeks": [
6
],
"date_range": [
"2019-08-10",
"2019-09-10"
],
"areas": [
1,
2
],
"price_per_hour": 10000,
"price_per_hour_with_area": 20000,
"coach": 1,
"priority": 10,
"created_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор правила расписания в системе Palms"
},
"result": {
"type": "array",
"description": "рабочие часы"
},
"title": {
"type": "string",
"description": "произвольный заголовок"
},
"day_weeks": {
"type": "array",
"description": "день недели"
},
"date_range": {
"type": "array",
"description": "даты в рамках которых действует правило расписания"
},
"areas": {
"type": "array",
"description": "идентификаторы кортов"
},
"price_per_hour": {
"type": "number",
"description": "стоимость тренера за час"
},
"price_per_hour_with_area": {
"type": "number",
"description": "стоимость тренера за час вместе с кортом. В приоритете в рассчетах"
},
"coach": {
"type": "number",
"description": "идентификатор тренера"
},
"priority": {
"type": "number",
"description": "приоритет"
},
"created_at": {
"type": "string",
"description": "дата создания"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления"
}
},
"required": [
"id",
"result",
"title",
"day_weeks",
"date_range",
"areas",
"price_per_hour",
"price_per_hour_with_area",
"coach",
"priority",
"created_at",
"updated_at"
],
"additionalProperties": false
}
}
}
Schedule Window ¶
Получить список ¶
Получить списокGET/club/schedule-window{?page_size,page}
Example URI
- page_size
number
(optional) Example: 1количество записей на странице
- page
number
(optional) Example: 10номер страницы
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"meta": {
"pagination": {
"total_number": 22,
"current_page": 1,
"total_pages": 2,
"page_size": 20
}
},
"data": [
{
"id": 1,
"club_id": 1,
"schedule_type": "AUTO",
"days": 7
},
{
"id": 1,
"club_id": 1,
"schedule_type": "AUTO",
"days": 7
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"pagination": {
"type": "object",
"properties": {
"total_number": {
"type": "number",
"description": "общее количество сущностей"
},
"current_page": {
"type": "number",
"description": "текущая страница"
},
"total_pages": {
"type": "number",
"description": "всего страниц"
},
"page_size": {
"type": "number",
"description": "записей на страницу"
}
}
}
}
},
"data": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "number"
},
"club_id": {
"type": "number"
},
"schedule_type": {
"type": "string",
"enum": [
"AUTO",
"MANUAL",
"AUTO"
]
},
"days": {
"type": "number"
}
}
},
{
"type": "object",
"properties": {
"id": {
"type": "number"
},
"club_id": {
"type": "number"
},
"schedule_type": {
"type": "string",
"enum": [
"AUTO",
"MANUAL",
"AUTO"
]
},
"days": {
"type": "number"
}
}
}
]
}
}
}
Получить модель ¶
Получить модельGET/club/schedule-window/{id}
Example URI
- id
number
(required) Example: 1идентификатор schedule window
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"club_id": 1,
"schedule_type": "AUTO",
"days": 7
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"club_id": {
"type": "number"
},
"schedule_type": {
"type": "string",
"enum": [
"AUTO",
"MANUAL",
"AUTO"
]
},
"days": {
"type": "number"
}
},
"required": [
"id",
"club_id",
"schedule_type",
"days"
],
"additionalProperties": false
}
}
}
Обновить модель ¶
Обновить модельPATCH/club/schedule-window/{id}
Example URI
- id
number
(required) Example: 1идентификатор schedule window
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"schedule_type": "Hello, world!",
"days": 7
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"schedule_type": {
"type": "string",
"enum": [
"AUTO",
"MANUAL",
"AUTO"
]
},
"days": {
"type": "number",
"description": "days обязателен если schedule_type AUTO"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"club_id": 1,
"schedule_type": "AUTO",
"days": 7
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"club_id": {
"type": "number"
},
"schedule_type": {
"type": "string",
"enum": [
"AUTO",
"MANUAL",
"AUTO"
]
},
"days": {
"type": "number"
}
},
"required": [
"id",
"club_id",
"schedule_type",
"days"
],
"additionalProperties": false
}
}
}
Создать модель ¶
Создать модельPOST/club/schedule-window
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"schedule_type": "Hello, world!",
"days": 7
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"schedule_type": {
"type": "string",
"enum": [
"AUTO",
"MANUAL",
"AUTO"
]
},
"days": {
"type": "number"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"club_id": 1,
"schedule_type": "AUTO",
"days": 7
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"club_id": {
"type": "number"
},
"schedule_type": {
"type": "string",
"enum": [
"AUTO",
"MANUAL",
"AUTO"
]
},
"days": {
"type": "number"
}
},
"required": [
"id",
"club_id",
"schedule_type",
"days"
],
"additionalProperties": false
}
}
}
Удалить модель ¶
Удалить модельDELETE/club/schedule-window/{id}
Example URI
- id
number
(required) Example: 1идентификатор schedule window
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
204
Headers
Content-Type: application/json
Schedule Window Date ¶
Получить список ¶
Получить списокGET/club/schedule-window-date{?page_size,page,date_from,date_to}
Example URI
- page_size
number
(optional) Example: 1количество записей на странице
- page
number
(optional) Example: 10номер страницы
- date_from
string
(optional) Example: 2019-05-12вернуть начиная с этой даты
- date_to
string
(optional) Example: 2019-05-13вернуть заканчивая этой датой
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"meta": {
"pagination": {
"total_number": 22,
"current_page": 1,
"total_pages": 2,
"page_size": 20
}
},
"data": [
{
"id": 1,
"club_id": 1,
"schedule_window_id": 1,
"schedule_window_date": "2019-08-10T00:00:00",
"enabled": true
},
{
"id": 1,
"club_id": 1,
"schedule_window_id": 1,
"schedule_window_date": "2019-08-10T00:00:00",
"enabled": true
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"pagination": {
"type": "object",
"properties": {
"total_number": {
"type": "number",
"description": "общее количество сущностей"
},
"current_page": {
"type": "number",
"description": "текущая страница"
},
"total_pages": {
"type": "number",
"description": "всего страниц"
},
"page_size": {
"type": "number",
"description": "записей на страницу"
}
}
}
}
},
"data": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "number"
},
"club_id": {
"type": "number"
},
"schedule_window_id": {
"type": "number"
},
"schedule_window_date": {
"type": "string",
"description": "дата"
},
"enabled": {
"type": "boolean"
}
}
},
{
"type": "object",
"properties": {
"id": {
"type": "number"
},
"club_id": {
"type": "number"
},
"schedule_window_id": {
"type": "number"
},
"schedule_window_date": {
"type": "string",
"description": "дата"
},
"enabled": {
"type": "boolean"
}
}
}
]
}
}
}
Получить модель ¶
Получить модельGET/club/schedule-window-date/{id}
Example URI
- id
number
(required) Example: 1идентификатор schedule window date
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"club_id": 1,
"schedule_window_id": 1,
"schedule_window_date": "2019-08-10T00:00:00",
"enabled": true
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"club_id": {
"type": "number"
},
"schedule_window_id": {
"type": "number"
},
"schedule_window_date": {
"type": "string",
"description": "дата"
},
"enabled": {
"type": "boolean"
}
},
"required": [
"id",
"club_id",
"schedule_window_id",
"schedule_window_date",
"enabled"
],
"additionalProperties": false
}
}
}
Обновить модель ¶
Обновить модельPATCH/club/schedule-window-date/{id}
Example URI
- id
number
(required) Example: 1идентификатор schedule window date
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"enabled": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"club_id": 1,
"schedule_window_id": 1,
"schedule_window_date": "2019-08-10T00:00:00",
"enabled": true
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"club_id": {
"type": "number"
},
"schedule_window_id": {
"type": "number"
},
"schedule_window_date": {
"type": "string",
"description": "дата"
},
"enabled": {
"type": "boolean"
}
},
"required": [
"id",
"club_id",
"schedule_window_id",
"schedule_window_date",
"enabled"
],
"additionalProperties": false
}
}
}
Создать модель ¶
Создать модельPOST/club/schedule-window-date
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"schedule_window_date": "2019-08-10T00:00:00",
"enabled": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"schedule_window_date": {
"type": "string",
"description": "дата"
},
"enabled": {
"type": "boolean"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"club_id": 1,
"schedule_window_id": 1,
"schedule_window_date": "2019-08-10T00:00:00",
"enabled": true
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"club_id": {
"type": "number"
},
"schedule_window_id": {
"type": "number"
},
"schedule_window_date": {
"type": "string",
"description": "дата"
},
"enabled": {
"type": "boolean"
}
},
"required": [
"id",
"club_id",
"schedule_window_id",
"schedule_window_date",
"enabled"
],
"additionalProperties": false
}
}
}
Удалить модель ¶
Удалить модельDELETE/club/schedule-window-date/{id}
Example URI
- id
number
(required) Example: 1идентификатор schedule window date
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
204
Headers
Content-Type: application/json
Абонементы клуба ¶
Получить список ¶
Получить списокGET/club/subscriptions{?page_size,page,show_inactive,active}
Example URI
- page_size
number
(optional) Example: 1количество записей на странице
- page
number
(optional) Example: 10номер страницы
- show_inactive
boolean
(optional) Example: trueфлаг для того чтобы показать в общем списке неактивные
- active
boolean
(optional) Example: true
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"meta": {
"pagination": {
"total_number": 22,
"current_page": 1,
"total_pages": 2,
"page_size": 20
}
},
"data": [
{
"id": 1,
"title": "somestring",
"club_id": 1,
"price": 50000,
"games_number": 10,
"validity_period": 365,
"area_types": [
{
"id": 1,
"title": "Somestring",
"value": "somestring",
"logo": "https://foo.bar/some.img"
},
{
"id": 1,
"title": "Somestring",
"value": "somestring",
"logo": "https://foo.bar/some.img"
}
],
"day_weeks": [
"1",
"2",
"3"
],
"hours": [
"8",
"20"
],
"active": true
},
{
"id": 1,
"title": "somestring",
"club_id": 1,
"price": 50000,
"games_number": 10,
"validity_period": 365,
"area_types": [
{
"id": 1,
"title": "Somestring",
"value": "somestring",
"logo": "https://foo.bar/some.img"
},
{
"id": 1,
"title": "Somestring",
"value": "somestring",
"logo": "https://foo.bar/some.img"
}
],
"day_weeks": [
"1",
"2",
"3"
],
"hours": [
"8",
"20"
],
"active": true
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"pagination": {
"type": "object",
"properties": {
"total_number": {
"type": "number",
"description": "общее количество сущностей"
},
"current_page": {
"type": "number",
"description": "текущая страница"
},
"total_pages": {
"type": "number",
"description": "всего страниц"
},
"page_size": {
"type": "number",
"description": "записей на страницу"
}
}
}
}
},
"data": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "number"
},
"title": {
"type": "string",
"description": "тайтл"
},
"club_id": {
"type": "number"
},
"price": {
"type": "number"
},
"games_number": {
"type": "number",
"description": "количестко игр. При оплате будет вычитаться, при рефанде будет добавляться"
},
"validity_period": {
"type": "number",
"description": "количство дней действительности абонемента"
},
"area_types": {
"type": "array",
"description": "типы зон бронирования"
},
"day_weeks": {
"type": "array",
"description": "дни недели"
},
"hours": {
"type": "array",
"description": "часы по которым абонемент действует"
},
"active": {
"type": "boolean"
}
}
},
{
"type": "object",
"properties": {
"id": {
"type": "number"
},
"title": {
"type": "string",
"description": "тайтл"
},
"club_id": {
"type": "number"
},
"price": {
"type": "number"
},
"games_number": {
"type": "number",
"description": "количестко игр. При оплате будет вычитаться, при рефанде будет добавляться"
},
"validity_period": {
"type": "number",
"description": "количство дней действительности абонемента"
},
"area_types": {
"type": "array",
"description": "типы зон бронирования"
},
"day_weeks": {
"type": "array",
"description": "дни недели"
},
"hours": {
"type": "array",
"description": "часы по которым абонемент действует"
},
"active": {
"type": "boolean"
}
}
}
]
}
}
}
Получить модель ¶
Получить модельGET/club/subscriptions/{id}
Example URI
- id
number
(required) Example: 1идентификатор абонемента
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"title": "somestring",
"club_id": 1,
"price": 50000,
"games_number": 10,
"validity_period": 365,
"area_types": [
{
"id": 1,
"title": "Somestring",
"value": "somestring",
"logo": "https://foo.bar/some.img"
},
{
"id": 1,
"title": "Somestring",
"value": "somestring",
"logo": "https://foo.bar/some.img"
}
],
"day_weeks": [
"1",
"2",
"3"
],
"hours": [
"8",
"20"
],
"active": true
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"title": {
"type": "string",
"description": "тайтл"
},
"club_id": {
"type": "number"
},
"price": {
"type": "number"
},
"games_number": {
"type": "number",
"description": "количестко игр. При оплате будет вычитаться, при рефанде будет добавляться"
},
"validity_period": {
"type": "number",
"description": "количство дней действительности абонемента"
},
"area_types": {
"type": "array",
"description": "типы зон бронирования"
},
"day_weeks": {
"type": "array",
"description": "дни недели"
},
"hours": {
"type": "array",
"description": "часы по которым абонемент действует"
},
"active": {
"type": "boolean"
}
},
"required": [
"id",
"title",
"club_id",
"price",
"games_number",
"validity_period",
"area_types",
"day_weeks",
"hours",
"active"
],
"additionalProperties": false
}
}
}
Обновить модель ¶
Обновить модельPATCH/club/subscriptions/{id}
Example URI
- id
number
(required) Example: 1идентификатор шаблона
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"title": "somestring",
"price": 50000,
"games_number": 10,
"validity_period": 365,
"area_types": [
"1",
"2",
"3"
],
"day_weeks": [
"1",
"2",
"3"
],
"hours": [
"8",
"20"
],
"active": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "тайтл"
},
"price": {
"type": "number"
},
"games_number": {
"type": "number",
"description": "количестко игр. При оплате будет вычитаться, при рефанде будет добавляться"
},
"validity_period": {
"type": "number",
"description": "количство дней действительности абонемента"
},
"area_types": {
"type": "array",
"description": "типы зона бронирования"
},
"day_weeks": {
"type": "array",
"description": "дни недели"
},
"hours": {
"type": "array",
"description": "часы по которым абонемент действует"
},
"active": {
"type": "boolean"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"title": "somestring",
"club_id": 1,
"price": 50000,
"games_number": 10,
"validity_period": 365,
"area_types": [
{
"id": 1,
"title": "Somestring",
"value": "somestring",
"logo": "https://foo.bar/some.img"
},
{
"id": 1,
"title": "Somestring",
"value": "somestring",
"logo": "https://foo.bar/some.img"
}
],
"day_weeks": [
"1",
"2",
"3"
],
"hours": [
"8",
"20"
],
"active": true
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"title": {
"type": "string",
"description": "тайтл"
},
"club_id": {
"type": "number"
},
"price": {
"type": "number"
},
"games_number": {
"type": "number",
"description": "количестко игр. При оплате будет вычитаться, при рефанде будет добавляться"
},
"validity_period": {
"type": "number",
"description": "количство дней действительности абонемента"
},
"area_types": {
"type": "array",
"description": "типы зон бронирования"
},
"day_weeks": {
"type": "array",
"description": "дни недели"
},
"hours": {
"type": "array",
"description": "часы по которым абонемент действует"
},
"active": {
"type": "boolean"
}
},
"required": [
"id",
"title",
"club_id",
"price",
"games_number",
"validity_period",
"area_types",
"day_weeks",
"hours",
"active"
],
"additionalProperties": false
}
}
}
Создать модель ¶
Создать модельPOST/club/subscriptions
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"title": "somestring",
"price": 50000,
"games_number": 10,
"validity_period": 365,
"area_types": [
"1",
"2",
"3"
],
"day_weeks": [
"1",
"2",
"3"
],
"hours": [
"8",
"20"
],
"active": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "тайтл"
},
"price": {
"type": "number"
},
"games_number": {
"type": "number",
"description": "количестко игр. При оплате будет вычитаться, при рефанде будет добавляться"
},
"validity_period": {
"type": "number",
"description": "количство дней действительности абонемента"
},
"area_types": {
"type": "array",
"description": "типы зона бронирования"
},
"day_weeks": {
"type": "array",
"description": "дни недели"
},
"hours": {
"type": "array",
"description": "часы по которым абонемент действует"
},
"active": {
"type": "boolean"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"title": "somestring",
"club_id": 1,
"price": 50000,
"games_number": 10,
"validity_period": 365,
"area_types": [
{
"id": 1,
"title": "Somestring",
"value": "somestring",
"logo": "https://foo.bar/some.img"
},
{
"id": 1,
"title": "Somestring",
"value": "somestring",
"logo": "https://foo.bar/some.img"
}
],
"day_weeks": [
"1",
"2",
"3"
],
"hours": [
"8",
"20"
],
"active": true
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"title": {
"type": "string",
"description": "тайтл"
},
"club_id": {
"type": "number"
},
"price": {
"type": "number"
},
"games_number": {
"type": "number",
"description": "количестко игр. При оплате будет вычитаться, при рефанде будет добавляться"
},
"validity_period": {
"type": "number",
"description": "количство дней действительности абонемента"
},
"area_types": {
"type": "array",
"description": "типы зон бронирования"
},
"day_weeks": {
"type": "array",
"description": "дни недели"
},
"hours": {
"type": "array",
"description": "часы по которым абонемент действует"
},
"active": {
"type": "boolean"
}
},
"required": [
"id",
"title",
"club_id",
"price",
"games_number",
"validity_period",
"area_types",
"day_weeks",
"hours",
"active"
],
"additionalProperties": false
}
}
}
Удалить модель ¶
Удалить модельDELETE/club/subscriptions/{id}
Example URI
- id
number
(required) Example: 1идентификатор тарифа
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
204
Headers
Content-Type: application/json
Продать абонемент игроку ¶
Продать абонемент игрокуPOST/club/subscriptions/sell
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"player_id": 1
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"player_id": {
"type": "number"
}
},
"required": [
"player_id"
]
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"title": "somestring",
"price": 50000,
"currency": "UAH",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"games_number": 10,
"validity_period": 365,
"payment": {
"id": 1,
"amount": 120,
"currency": "UAH",
"status": "CREATED",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"created_at": "2019-08-10T00:00:00",
"processed_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
},
"area_types": [
"1",
"2",
"3"
],
"day_weeks": [
"1",
"2",
"3"
],
"hours": [
"8",
"20"
],
"trainer_included": true,
"is_valid": true,
"active": true
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"title": {
"type": "string",
"description": "тайтл"
},
"price": {
"type": "number"
},
"currency": {
"type": "string",
"description": "валюта"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "пользователь, который купил абонемент"
},
"games_number": {
"type": "number",
"description": "количестко игр. При оплате будет вычитаться, при рефанде будет добавляться"
},
"validity_period": {
"type": "number",
"description": "количство дней действительности абонемента"
},
"payment": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор платежа в системе Palms"
},
"amount": {
"type": "number",
"description": "сумма платежа в копейках/центах без разделителей. 120 - 1 грн 20 коп"
},
"currency": {
"type": "string",
"description": "валюта платежа"
},
"status": {
"type": "string",
"enum": [
"CREATED",
"PROCESSING",
"DECLINED",
"APPROVED",
"EXPIRED",
"REVERSED",
"CREATED"
],
"description": "статус транзакции"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "плательщик"
},
"created_at": {
"type": "string",
"description": "дата создание платежная"
},
"processed_at": {
"type": "string",
"description": "дата совершения платежа"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления платежа"
}
}
},
"area_types": {
"type": "array",
"description": "типы зона бронирования"
},
"day_weeks": {
"type": "array",
"description": "дни недели"
},
"hours": {
"type": "array",
"description": "часы по которым абонемент действует"
},
"trainer_included": {
"type": "boolean"
},
"is_valid": {
"type": "boolean"
},
"active": {
"type": "boolean"
}
},
"required": [
"id",
"title",
"price",
"currency",
"user",
"games_number",
"validity_period",
"payment",
"area_types",
"day_weeks",
"hours",
"trainer_included",
"is_valid",
"active"
],
"additionalProperties": false
}
}
}
Абонементы игрока для клуба ¶
Получить список ¶
Получить списокGET/club/usersubscriptions{?page_size,page,player_id}
Example URI
- page_size
number
(optional) Example: 1количество записей на странице
- page
number
(optional) Example: 10номер страницы
- player_id
number
(optional) Example: 1фильтр по игроку
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"meta": {
"pagination": {
"total_number": 22,
"current_page": 1,
"total_pages": 2,
"page_size": 20
}
},
"data": [
{
"id": 1,
"title": "somestring",
"price": 50000,
"currency": "UAH",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"games_number": 10,
"validity_period": 365,
"payment": {
"id": 1,
"amount": 120,
"currency": "UAH",
"status": "CREATED",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"created_at": "2019-08-10T00:00:00",
"processed_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
},
"area_types": [
"1",
"2",
"3"
],
"day_weeks": [
"1",
"2",
"3"
],
"hours": [
"8",
"20"
],
"trainer_included": true,
"is_valid": true,
"active": true
},
{
"id": 1,
"title": "somestring",
"price": 50000,
"currency": "UAH",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"games_number": 10,
"validity_period": 365,
"payment": {
"id": 1,
"amount": 120,
"currency": "UAH",
"status": "CREATED",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"created_at": "2019-08-10T00:00:00",
"processed_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
},
"area_types": [
"1",
"2",
"3"
],
"day_weeks": [
"1",
"2",
"3"
],
"hours": [
"8",
"20"
],
"trainer_included": true,
"is_valid": true,
"active": true
}
]
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"pagination": {
"type": "object",
"properties": {
"total_number": {
"type": "number",
"description": "общее количество сущностей"
},
"current_page": {
"type": "number",
"description": "текущая страница"
},
"total_pages": {
"type": "number",
"description": "всего страниц"
},
"page_size": {
"type": "number",
"description": "записей на страницу"
}
}
}
}
},
"data": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "number"
},
"title": {
"type": "string",
"description": "тайтл"
},
"price": {
"type": "number"
},
"currency": {
"type": "string",
"description": "валюта"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "пользователь, который купил абонемент"
},
"games_number": {
"type": "number",
"description": "количестко игр. При оплате будет вычитаться, при рефанде будет добавляться"
},
"validity_period": {
"type": "number",
"description": "количство дней действительности абонемента"
},
"payment": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор платежа в системе Palms"
},
"amount": {
"type": "number",
"description": "сумма платежа в копейках/центах без разделителей. 120 - 1 грн 20 коп"
},
"currency": {
"type": "string",
"description": "валюта платежа"
},
"status": {
"type": "string",
"enum": [
"CREATED",
"PROCESSING",
"DECLINED",
"APPROVED",
"EXPIRED",
"REVERSED",
"CREATED"
],
"description": "статус транзакции"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "плательщик"
},
"created_at": {
"type": "string",
"description": "дата создание платежная"
},
"processed_at": {
"type": "string",
"description": "дата совершения платежа"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления платежа"
}
}
},
"area_types": {
"type": "array",
"description": "типы зона бронирования"
},
"day_weeks": {
"type": "array",
"description": "дни недели"
},
"hours": {
"type": "array",
"description": "часы по которым абонемент действует"
},
"trainer_included": {
"type": "boolean"
},
"is_valid": {
"type": "boolean"
},
"active": {
"type": "boolean"
}
}
},
{
"type": "object",
"properties": {
"id": {
"type": "number"
},
"title": {
"type": "string",
"description": "тайтл"
},
"price": {
"type": "number"
},
"currency": {
"type": "string",
"description": "валюта"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "пользователь, который купил абонемент"
},
"games_number": {
"type": "number",
"description": "количестко игр. При оплате будет вычитаться, при рефанде будет добавляться"
},
"validity_period": {
"type": "number",
"description": "количство дней действительности абонемента"
},
"payment": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор платежа в системе Palms"
},
"amount": {
"type": "number",
"description": "сумма платежа в копейках/центах без разделителей. 120 - 1 грн 20 коп"
},
"currency": {
"type": "string",
"description": "валюта платежа"
},
"status": {
"type": "string",
"enum": [
"CREATED",
"PROCESSING",
"DECLINED",
"APPROVED",
"EXPIRED",
"REVERSED",
"CREATED"
],
"description": "статус транзакции"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "плательщик"
},
"created_at": {
"type": "string",
"description": "дата создание платежная"
},
"processed_at": {
"type": "string",
"description": "дата совершения платежа"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления платежа"
}
}
},
"area_types": {
"type": "array",
"description": "типы зона бронирования"
},
"day_weeks": {
"type": "array",
"description": "дни недели"
},
"hours": {
"type": "array",
"description": "часы по которым абонемент действует"
},
"trainer_included": {
"type": "boolean"
},
"is_valid": {
"type": "boolean"
},
"active": {
"type": "boolean"
}
}
}
]
}
}
}
Получить модель ¶
Получить модельGET/club/usersubscriptions/{id}
Example URI
- id
number
(required) Example: 1идентификатор абонемента
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"title": "somestring",
"price": 50000,
"currency": "UAH",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"games_number": 10,
"validity_period": 365,
"payment": {
"id": 1,
"amount": 120,
"currency": "UAH",
"status": "CREATED",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"created_at": "2019-08-10T00:00:00",
"processed_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
},
"area_types": [
"1",
"2",
"3"
],
"day_weeks": [
"1",
"2",
"3"
],
"hours": [
"8",
"20"
],
"trainer_included": true,
"is_valid": true,
"active": true
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"title": {
"type": "string",
"description": "тайтл"
},
"price": {
"type": "number"
},
"currency": {
"type": "string",
"description": "валюта"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "пользователь, который купил абонемент"
},
"games_number": {
"type": "number",
"description": "количестко игр. При оплате будет вычитаться, при рефанде будет добавляться"
},
"validity_period": {
"type": "number",
"description": "количство дней действительности абонемента"
},
"payment": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор платежа в системе Palms"
},
"amount": {
"type": "number",
"description": "сумма платежа в копейках/центах без разделителей. 120 - 1 грн 20 коп"
},
"currency": {
"type": "string",
"description": "валюта платежа"
},
"status": {
"type": "string",
"enum": [
"CREATED",
"PROCESSING",
"DECLINED",
"APPROVED",
"EXPIRED",
"REVERSED",
"CREATED"
],
"description": "статус транзакции"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "плательщик"
},
"created_at": {
"type": "string",
"description": "дата создание платежная"
},
"processed_at": {
"type": "string",
"description": "дата совершения платежа"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления платежа"
}
}
},
"area_types": {
"type": "array",
"description": "типы зона бронирования"
},
"day_weeks": {
"type": "array",
"description": "дни недели"
},
"hours": {
"type": "array",
"description": "часы по которым абонемент действует"
},
"trainer_included": {
"type": "boolean"
},
"is_valid": {
"type": "boolean"
},
"active": {
"type": "boolean"
}
},
"required": [
"id",
"title",
"price",
"currency",
"user",
"games_number",
"validity_period",
"payment",
"area_types",
"day_weeks",
"hours",
"trainer_included",
"is_valid",
"active"
],
"additionalProperties": false
}
}
}
Создать модель ¶
Создать модельPOST/club/usersubscriptions
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"subscription_id": 1,
"player_id": 1,
"price": 50000,
"games_number": 10,
"validity_period": 365,
"area_types": [
"1",
"2",
"3"
],
"day_weeks": [
"1",
"2",
"3"
],
"hours": [
"8",
"20"
],
"payment_method": "CASH",
"trainer_included": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"subscription_id": {
"type": "number"
},
"player_id": {
"type": "number"
},
"price": {
"type": "number"
},
"games_number": {
"type": "number",
"description": "количестко игр. При оплате будет вычитаться, при рефанде будет добавляться"
},
"validity_period": {
"type": "number",
"description": "количство дней действительности абонемента"
},
"area_types": {
"type": "array",
"description": "типы зона бронирования"
},
"day_weeks": {
"type": "array",
"description": "дни недели"
},
"hours": {
"type": "array",
"description": "часы по которым абонемент действует"
},
"payment_method": {
"type": "string",
"description": "способ оплаты"
},
"trainer_included": {
"type": "boolean"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"title": "somestring",
"price": 50000,
"currency": "UAH",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"games_number": 10,
"validity_period": 365,
"payment": {
"id": 1,
"amount": 120,
"currency": "UAH",
"status": "CREATED",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"created_at": "2019-08-10T00:00:00",
"processed_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
},
"area_types": [
"1",
"2",
"3"
],
"day_weeks": [
"1",
"2",
"3"
],
"hours": [
"8",
"20"
],
"trainer_included": true,
"is_valid": true,
"active": true
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"title": {
"type": "string",
"description": "тайтл"
},
"price": {
"type": "number"
},
"currency": {
"type": "string",
"description": "валюта"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "пользователь, который купил абонемент"
},
"games_number": {
"type": "number",
"description": "количестко игр. При оплате будет вычитаться, при рефанде будет добавляться"
},
"validity_period": {
"type": "number",
"description": "количство дней действительности абонемента"
},
"payment": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор платежа в системе Palms"
},
"amount": {
"type": "number",
"description": "сумма платежа в копейках/центах без разделителей. 120 - 1 грн 20 коп"
},
"currency": {
"type": "string",
"description": "валюта платежа"
},
"status": {
"type": "string",
"enum": [
"CREATED",
"PROCESSING",
"DECLINED",
"APPROVED",
"EXPIRED",
"REVERSED",
"CREATED"
],
"description": "статус транзакции"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "плательщик"
},
"created_at": {
"type": "string",
"description": "дата создание платежная"
},
"processed_at": {
"type": "string",
"description": "дата совершения платежа"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления платежа"
}
}
},
"area_types": {
"type": "array",
"description": "типы зона бронирования"
},
"day_weeks": {
"type": "array",
"description": "дни недели"
},
"hours": {
"type": "array",
"description": "часы по которым абонемент действует"
},
"trainer_included": {
"type": "boolean"
},
"is_valid": {
"type": "boolean"
},
"active": {
"type": "boolean"
}
},
"required": [
"id",
"title",
"price",
"currency",
"user",
"games_number",
"validity_period",
"payment",
"area_types",
"day_weeks",
"hours",
"trainer_included",
"is_valid",
"active"
],
"additionalProperties": false
}
}
}
Обновить модель ¶
Обновить модельPATCH/club/usersubscriptions/
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"subscription_id": 1,
"player_id": 1,
"price": 50000,
"games_number": 10,
"validity_period": 365,
"area_types": [
"1",
"2",
"3"
],
"day_weeks": [
"1",
"2",
"3"
],
"hours": [
"8",
"20"
],
"payment_method": "CASH",
"trainer_included": true
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"subscription_id": {
"type": "number"
},
"player_id": {
"type": "number"
},
"price": {
"type": "number"
},
"games_number": {
"type": "number",
"description": "количестко игр. При оплате будет вычитаться, при рефанде будет добавляться"
},
"validity_period": {
"type": "number",
"description": "количство дней действительности абонемента"
},
"area_types": {
"type": "array",
"description": "типы зона бронирования"
},
"day_weeks": {
"type": "array",
"description": "дни недели"
},
"hours": {
"type": "array",
"description": "часы по которым абонемент действует"
},
"payment_method": {
"type": "string",
"description": "способ оплаты"
},
"trainer_included": {
"type": "boolean"
}
}
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"title": "somestring",
"price": 50000,
"currency": "UAH",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"games_number": 10,
"validity_period": 365,
"payment": {
"id": 1,
"amount": 120,
"currency": "UAH",
"status": "CREATED",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"created_at": "2019-08-10T00:00:00",
"processed_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
},
"area_types": [
"1",
"2",
"3"
],
"day_weeks": [
"1",
"2",
"3"
],
"hours": [
"8",
"20"
],
"trainer_included": true,
"is_valid": true,
"active": true
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"title": {
"type": "string",
"description": "тайтл"
},
"price": {
"type": "number"
},
"currency": {
"type": "string",
"description": "валюта"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "пользователь, который купил абонемент"
},
"games_number": {
"type": "number",
"description": "количестко игр. При оплате будет вычитаться, при рефанде будет добавляться"
},
"validity_period": {
"type": "number",
"description": "количство дней действительности абонемента"
},
"payment": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор платежа в системе Palms"
},
"amount": {
"type": "number",
"description": "сумма платежа в копейках/центах без разделителей. 120 - 1 грн 20 коп"
},
"currency": {
"type": "string",
"description": "валюта платежа"
},
"status": {
"type": "string",
"enum": [
"CREATED",
"PROCESSING",
"DECLINED",
"APPROVED",
"EXPIRED",
"REVERSED",
"CREATED"
],
"description": "статус транзакции"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "плательщик"
},
"created_at": {
"type": "string",
"description": "дата создание платежная"
},
"processed_at": {
"type": "string",
"description": "дата совершения платежа"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления платежа"
}
}
},
"area_types": {
"type": "array",
"description": "типы зона бронирования"
},
"day_weeks": {
"type": "array",
"description": "дни недели"
},
"hours": {
"type": "array",
"description": "часы по которым абонемент действует"
},
"trainer_included": {
"type": "boolean"
},
"is_valid": {
"type": "boolean"
},
"active": {
"type": "boolean"
}
},
"required": [
"id",
"title",
"price",
"currency",
"user",
"games_number",
"validity_period",
"payment",
"area_types",
"day_weeks",
"hours",
"trainer_included",
"is_valid",
"active"
],
"additionalProperties": false
}
}
}
Оплатить абонемент ¶
Оплатить абонементPOST/club/usersubscriptions/pay
Example URI
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
Body
{
"payment_method": "CASH"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"payment_method": {
"type": "string",
"description": "способ оплаты"
}
},
"required": [
"payment_method"
]
}
200
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"title": "somestring",
"price": 50000,
"currency": "UAH",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"games_number": 10,
"validity_period": 365,
"payment": {
"id": 1,
"amount": 120,
"currency": "UAH",
"status": "CREATED",
"user": {
"id": 1,
"name": "Иван",
"phone_number": "+380932345678",
"note": "some text",
"has_palms": true
},
"created_at": "2019-08-10T00:00:00",
"processed_at": "2019-08-10T00:00:00",
"updated_at": "2019-08-10T00:00:00"
},
"area_types": [
"1",
"2",
"3"
],
"day_weeks": [
"1",
"2",
"3"
],
"hours": [
"8",
"20"
],
"trainer_included": true,
"is_valid": true,
"active": true
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"title": {
"type": "string",
"description": "тайтл"
},
"price": {
"type": "number"
},
"currency": {
"type": "string",
"description": "валюта"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "пользователь, который купил абонемент"
},
"games_number": {
"type": "number",
"description": "количестко игр. При оплате будет вычитаться, при рефанде будет добавляться"
},
"validity_period": {
"type": "number",
"description": "количство дней действительности абонемента"
},
"payment": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "внутренний идентификатор платежа в системе Palms"
},
"amount": {
"type": "number",
"description": "сумма платежа в копейках/центах без разделителей. 120 - 1 грн 20 коп"
},
"currency": {
"type": "string",
"description": "валюта платежа"
},
"status": {
"type": "string",
"enum": [
"CREATED",
"PROCESSING",
"DECLINED",
"APPROVED",
"EXPIRED",
"REVERSED",
"CREATED"
],
"description": "статус транзакции"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "идентификатор клиента"
},
"name": {
"type": "string",
"description": "имя клиента"
},
"phone_number": {
"type": "string",
"description": "номер телефона клиента"
},
"note": {
"type": "string",
"description": "какой то комментарий о клиенте"
},
"has_palms": {
"type": "boolean",
"description": "использует/не использует Palms"
}
},
"description": "плательщик"
},
"created_at": {
"type": "string",
"description": "дата создание платежная"
},
"processed_at": {
"type": "string",
"description": "дата совершения платежа"
},
"updated_at": {
"type": "string",
"description": "последняя дата обновления платежа"
}
}
},
"area_types": {
"type": "array",
"description": "типы зона бронирования"
},
"day_weeks": {
"type": "array",
"description": "дни недели"
},
"hours": {
"type": "array",
"description": "часы по которым абонемент действует"
},
"trainer_included": {
"type": "boolean"
},
"is_valid": {
"type": "boolean"
},
"active": {
"type": "boolean"
}
},
"required": [
"id",
"title",
"price",
"currency",
"user",
"games_number",
"validity_period",
"payment",
"area_types",
"day_weeks",
"hours",
"trainer_included",
"is_valid",
"active"
],
"additionalProperties": false
}
}
}
Удалить модель ¶
Удалить модельDELETE/club/usersubscriptions/{id}
Example URI
- id
number
(required) Example: 1идентификатор абонемента юзера
Headers
Content-Type: application/json
Authorization: Bearer XXXXX
204
Headers
Content-Type: application/json