MENU navbar-image
bash javascript

Introduction

This documentation aims to provide all the information you need to work with our API.

Base URL

http://localhost

Authenticating requests

This API is not authenticated.

Endpoints

Logg in

Метод проверяет, существует ли пользователь с такой почтой, если нет то создает нового. По итогу, отправляет сообщение с кодом на указанный адрес.

Если в ответе пришел status = false, то письмо по каким-либо причинам не отправлено.

Example request:
curl --request POST \
    "http://localhost/api/auth/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"test@example.ru\"
}"
const url = new URL(
    "http://localhost/api/auth/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "test@example.ru"
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "status": true,
    "message": "Код выслан на электронную почту"
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "email": [
            "Некорректный адрес электронной почты "
        ]
    }
}
 

Example response (500):


{
    "status": false,
    "message": "Отправка не удалась"
}
 

Request      

POST api/auth/login

Body Parameters

email  string  

Электронная почта

Check code

Метод сравнивает адрес электронной почты и введенный пользователем четырехзначный код с тем, что был отправлен ему по email, в случае успеха отправляет jwt токен и статус 200, иначе статус 401 с ошибкой "Unauthorized"

Example request:
curl --request POST \
    "http://localhost/api/auth/check-code" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"test@example.ru\",
    \"code\": 1234
}"
const url = new URL(
    "http://localhost/api/auth/check-code"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "test@example.ru",
    "code": 1234
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "access_token": "token",
    "token_type": "bearer",
    "expires_in": "3600"
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "email": [
            "Некорректный адрес электронной почты "
        ]
    }
}
 

Request      

POST api/auth/check-code

Body Parameters

email  string  

Электронная почта

code  integer  

Код с почты

Refresh token

Метод обновляет токен текущего пользователя.

Example request:
curl --request POST \
    "http://localhost/api/auth/refresh" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/auth/refresh"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "access_token": "token",
    "token_type": "bearer",
    "expires_in": "3600"
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Request      

POST api/auth/refresh

Logg out

Метод выводит авторизованного пользователя из системы

Example request:
curl --request GET \
    --get "http://localhost/api/auth/logout" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/auth/logout"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "message": "Successfully logged out"
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Request      

GET api/auth/logout

Redirects to Yandex OAuth page

Example request:
curl --request GET \
    --get "http://localhost/api/oauth/yandex/redirect" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/oauth/yandex/redirect"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Connection refused [tcp://127.0.0.1:6379]",
    "exception": "Predis\\Connection\\ConnectionException",
    "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/AbstractConnection.php",
    "line": 155,
    "trace": [
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/StreamConnection.php",
            "line": 128,
            "function": "onConnectionError",
            "class": "Predis\\Connection\\AbstractConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/StreamConnection.php",
            "line": 178,
            "function": "createStreamSocket",
            "class": "Predis\\Connection\\StreamConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/StreamConnection.php",
            "line": 100,
            "function": "tcpStreamInitializer",
            "class": "Predis\\Connection\\StreamConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/AbstractConnection.php",
            "line": 81,
            "function": "createResource",
            "class": "Predis\\Connection\\StreamConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/StreamConnection.php",
            "line": 258,
            "function": "connect",
            "class": "Predis\\Connection\\AbstractConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/AbstractConnection.php",
            "line": 180,
            "function": "connect",
            "class": "Predis\\Connection\\StreamConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/StreamConnection.php",
            "line": 288,
            "function": "getResource",
            "class": "Predis\\Connection\\AbstractConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/StreamConnection.php",
            "line": 394,
            "function": "write",
            "class": "Predis\\Connection\\StreamConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/AbstractConnection.php",
            "line": 110,
            "function": "writeRequest",
            "class": "Predis\\Connection\\StreamConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Client.php",
            "line": 331,
            "function": "executeCommand",
            "class": "Predis\\Connection\\AbstractConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Client.php",
            "line": 314,
            "function": "executeCommand",
            "class": "Predis\\Client",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php",
            "line": 116,
            "function": "__call",
            "class": "Predis\\Client",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php",
            "line": 220,
            "function": "command",
            "class": "Illuminate\\Redis\\Connections\\Connection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php",
            "line": 62,
            "function": "__call",
            "class": "Illuminate\\Redis\\Connections\\Connection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Cache/Repository.php",
            "line": 97,
            "function": "get",
            "class": "Illuminate\\Cache\\RedisStore",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Cache/RateLimiter.php",
            "line": 135,
            "function": "get",
            "class": "Illuminate\\Cache\\Repository",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Cache/RateLimiter.php",
            "line": 92,
            "function": "attempts",
            "class": "Illuminate\\Cache\\RateLimiter",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
            "line": 120,
            "function": "tooManyAttempts",
            "class": "Illuminate\\Cache\\RateLimiter",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
            "line": 103,
            "function": "handleRequest",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
            "line": 55,
            "function": "handleRequestUsingNamedLimiter",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 103,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 697,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 672,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 636,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 625,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 166,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 128,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php",
            "line": 40,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php",
            "line": 86,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/fruitcake/laravel-cors/src/HandleCors.php",
            "line": 52,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Fruitcake\\Cors\\HandleCors",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/fideloper/proxy/src/TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Fideloper\\Proxy\\TrustProxies",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 103,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 141,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 110,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 287,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 275,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 86,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 44,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 34,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 225,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 182,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 116,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 118,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 75,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 51,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Commands/GenerateDocumentation.php",
            "line": 39,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Container/Util.php",
            "line": 40,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 37,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Container/Container.php",
            "line": 651,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Console/Command.php",
            "line": 136,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/symfony/console/Command/Command.php",
            "line": 299,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Console/Command.php",
            "line": 121,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/symfony/console/Application.php",
            "line": 978,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/symfony/console/Application.php",
            "line": 295,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/symfony/console/Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Console/Application.php",
            "line": 92,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php",
            "line": 129,
            "function": "run",
            "class": "Illuminate\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/artisan",
            "line": 37,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

GET api/oauth/yandex/redirect

Handle response from and redirect to page with id in query params for oauth

Example request:
curl --request GET \
    --get "http://localhost/api/oauth/yandex/callback" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/oauth/yandex/callback"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Connection refused [tcp://127.0.0.1:6379]",
    "exception": "Predis\\Connection\\ConnectionException",
    "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/AbstractConnection.php",
    "line": 155,
    "trace": [
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/StreamConnection.php",
            "line": 128,
            "function": "onConnectionError",
            "class": "Predis\\Connection\\AbstractConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/StreamConnection.php",
            "line": 178,
            "function": "createStreamSocket",
            "class": "Predis\\Connection\\StreamConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/StreamConnection.php",
            "line": 100,
            "function": "tcpStreamInitializer",
            "class": "Predis\\Connection\\StreamConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/AbstractConnection.php",
            "line": 81,
            "function": "createResource",
            "class": "Predis\\Connection\\StreamConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/StreamConnection.php",
            "line": 258,
            "function": "connect",
            "class": "Predis\\Connection\\AbstractConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/AbstractConnection.php",
            "line": 180,
            "function": "connect",
            "class": "Predis\\Connection\\StreamConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/StreamConnection.php",
            "line": 288,
            "function": "getResource",
            "class": "Predis\\Connection\\AbstractConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/StreamConnection.php",
            "line": 394,
            "function": "write",
            "class": "Predis\\Connection\\StreamConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/AbstractConnection.php",
            "line": 110,
            "function": "writeRequest",
            "class": "Predis\\Connection\\StreamConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Client.php",
            "line": 331,
            "function": "executeCommand",
            "class": "Predis\\Connection\\AbstractConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Client.php",
            "line": 314,
            "function": "executeCommand",
            "class": "Predis\\Client",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php",
            "line": 116,
            "function": "__call",
            "class": "Predis\\Client",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php",
            "line": 220,
            "function": "command",
            "class": "Illuminate\\Redis\\Connections\\Connection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php",
            "line": 62,
            "function": "__call",
            "class": "Illuminate\\Redis\\Connections\\Connection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Cache/Repository.php",
            "line": 97,
            "function": "get",
            "class": "Illuminate\\Cache\\RedisStore",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Cache/RateLimiter.php",
            "line": 135,
            "function": "get",
            "class": "Illuminate\\Cache\\Repository",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Cache/RateLimiter.php",
            "line": 92,
            "function": "attempts",
            "class": "Illuminate\\Cache\\RateLimiter",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
            "line": 120,
            "function": "tooManyAttempts",
            "class": "Illuminate\\Cache\\RateLimiter",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
            "line": 103,
            "function": "handleRequest",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
            "line": 55,
            "function": "handleRequestUsingNamedLimiter",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 103,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 697,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 672,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 636,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 625,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 166,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 128,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php",
            "line": 40,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php",
            "line": 86,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/fruitcake/laravel-cors/src/HandleCors.php",
            "line": 52,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Fruitcake\\Cors\\HandleCors",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/fideloper/proxy/src/TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Fideloper\\Proxy\\TrustProxies",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 103,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 141,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 110,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 287,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 275,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 86,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 44,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 34,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 225,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 182,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 116,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 118,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 75,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 51,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Commands/GenerateDocumentation.php",
            "line": 39,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Container/Util.php",
            "line": 40,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 37,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Container/Container.php",
            "line": 651,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Console/Command.php",
            "line": 136,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/symfony/console/Command/Command.php",
            "line": 299,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Console/Command.php",
            "line": 121,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/symfony/console/Application.php",
            "line": 978,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/symfony/console/Application.php",
            "line": 295,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/symfony/console/Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Console/Application.php",
            "line": 92,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php",
            "line": 129,
            "function": "run",
            "class": "Illuminate\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/artisan",
            "line": 37,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

GET api/oauth/yandex/callback

Redirects to Google OAuth page

Example request:
curl --request GET \
    --get "http://localhost/api/oauth/google/redirect" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/oauth/google/redirect"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Connection refused [tcp://127.0.0.1:6379]",
    "exception": "Predis\\Connection\\ConnectionException",
    "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/AbstractConnection.php",
    "line": 155,
    "trace": [
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/StreamConnection.php",
            "line": 128,
            "function": "onConnectionError",
            "class": "Predis\\Connection\\AbstractConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/StreamConnection.php",
            "line": 178,
            "function": "createStreamSocket",
            "class": "Predis\\Connection\\StreamConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/StreamConnection.php",
            "line": 100,
            "function": "tcpStreamInitializer",
            "class": "Predis\\Connection\\StreamConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/AbstractConnection.php",
            "line": 81,
            "function": "createResource",
            "class": "Predis\\Connection\\StreamConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/StreamConnection.php",
            "line": 258,
            "function": "connect",
            "class": "Predis\\Connection\\AbstractConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/AbstractConnection.php",
            "line": 180,
            "function": "connect",
            "class": "Predis\\Connection\\StreamConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/StreamConnection.php",
            "line": 288,
            "function": "getResource",
            "class": "Predis\\Connection\\AbstractConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/StreamConnection.php",
            "line": 394,
            "function": "write",
            "class": "Predis\\Connection\\StreamConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/AbstractConnection.php",
            "line": 110,
            "function": "writeRequest",
            "class": "Predis\\Connection\\StreamConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Client.php",
            "line": 331,
            "function": "executeCommand",
            "class": "Predis\\Connection\\AbstractConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Client.php",
            "line": 314,
            "function": "executeCommand",
            "class": "Predis\\Client",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php",
            "line": 116,
            "function": "__call",
            "class": "Predis\\Client",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php",
            "line": 220,
            "function": "command",
            "class": "Illuminate\\Redis\\Connections\\Connection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php",
            "line": 62,
            "function": "__call",
            "class": "Illuminate\\Redis\\Connections\\Connection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Cache/Repository.php",
            "line": 97,
            "function": "get",
            "class": "Illuminate\\Cache\\RedisStore",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Cache/RateLimiter.php",
            "line": 135,
            "function": "get",
            "class": "Illuminate\\Cache\\Repository",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Cache/RateLimiter.php",
            "line": 92,
            "function": "attempts",
            "class": "Illuminate\\Cache\\RateLimiter",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
            "line": 120,
            "function": "tooManyAttempts",
            "class": "Illuminate\\Cache\\RateLimiter",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
            "line": 103,
            "function": "handleRequest",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
            "line": 55,
            "function": "handleRequestUsingNamedLimiter",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 103,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 697,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 672,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 636,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 625,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 166,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 128,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php",
            "line": 40,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php",
            "line": 86,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/fruitcake/laravel-cors/src/HandleCors.php",
            "line": 52,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Fruitcake\\Cors\\HandleCors",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/fideloper/proxy/src/TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Fideloper\\Proxy\\TrustProxies",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 103,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 141,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 110,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 287,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 275,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 86,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 44,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 34,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 225,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 182,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 116,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 118,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 75,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 51,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Commands/GenerateDocumentation.php",
            "line": 39,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Container/Util.php",
            "line": 40,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 37,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Container/Container.php",
            "line": 651,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Console/Command.php",
            "line": 136,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/symfony/console/Command/Command.php",
            "line": 299,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Console/Command.php",
            "line": 121,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/symfony/console/Application.php",
            "line": 978,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/symfony/console/Application.php",
            "line": 295,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/symfony/console/Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Console/Application.php",
            "line": 92,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php",
            "line": 129,
            "function": "run",
            "class": "Illuminate\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/artisan",
            "line": 37,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

GET api/oauth/google/redirect

Handle response from and redirect to page with id in query params for oauth

Example request:
curl --request GET \
    --get "http://localhost/api/oauth/google/callback" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/oauth/google/callback"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Connection refused [tcp://127.0.0.1:6379]",
    "exception": "Predis\\Connection\\ConnectionException",
    "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/AbstractConnection.php",
    "line": 155,
    "trace": [
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/StreamConnection.php",
            "line": 128,
            "function": "onConnectionError",
            "class": "Predis\\Connection\\AbstractConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/StreamConnection.php",
            "line": 178,
            "function": "createStreamSocket",
            "class": "Predis\\Connection\\StreamConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/StreamConnection.php",
            "line": 100,
            "function": "tcpStreamInitializer",
            "class": "Predis\\Connection\\StreamConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/AbstractConnection.php",
            "line": 81,
            "function": "createResource",
            "class": "Predis\\Connection\\StreamConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/StreamConnection.php",
            "line": 258,
            "function": "connect",
            "class": "Predis\\Connection\\AbstractConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/AbstractConnection.php",
            "line": 180,
            "function": "connect",
            "class": "Predis\\Connection\\StreamConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/StreamConnection.php",
            "line": 288,
            "function": "getResource",
            "class": "Predis\\Connection\\AbstractConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/StreamConnection.php",
            "line": 394,
            "function": "write",
            "class": "Predis\\Connection\\StreamConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Connection/AbstractConnection.php",
            "line": 110,
            "function": "writeRequest",
            "class": "Predis\\Connection\\StreamConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Client.php",
            "line": 331,
            "function": "executeCommand",
            "class": "Predis\\Connection\\AbstractConnection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/predis/predis/src/Client.php",
            "line": 314,
            "function": "executeCommand",
            "class": "Predis\\Client",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php",
            "line": 116,
            "function": "__call",
            "class": "Predis\\Client",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Redis/Connections/Connection.php",
            "line": 220,
            "function": "command",
            "class": "Illuminate\\Redis\\Connections\\Connection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Cache/RedisStore.php",
            "line": 62,
            "function": "__call",
            "class": "Illuminate\\Redis\\Connections\\Connection",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Cache/Repository.php",
            "line": 97,
            "function": "get",
            "class": "Illuminate\\Cache\\RedisStore",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Cache/RateLimiter.php",
            "line": 135,
            "function": "get",
            "class": "Illuminate\\Cache\\Repository",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Cache/RateLimiter.php",
            "line": 92,
            "function": "attempts",
            "class": "Illuminate\\Cache\\RateLimiter",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
            "line": 120,
            "function": "tooManyAttempts",
            "class": "Illuminate\\Cache\\RateLimiter",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
            "line": 103,
            "function": "handleRequest",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
            "line": 55,
            "function": "handleRequestUsingNamedLimiter",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 103,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 697,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 672,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 636,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
            "line": 625,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 166,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 128,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php",
            "line": 40,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php",
            "line": 86,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/fruitcake/laravel-cors/src/HandleCors.php",
            "line": 52,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Fruitcake\\Cors\\HandleCors",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/fideloper/proxy/src/TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 167,
            "function": "handle",
            "class": "Fideloper\\Proxy\\TrustProxies",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 103,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 141,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 110,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 287,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 275,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 86,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 44,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Strategies/Responses/ResponseCalls.php",
            "line": 34,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 225,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 182,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Extracting/Extractor.php",
            "line": 116,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 118,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 75,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/GroupedEndpoints/GroupedEndpointsFromApp.php",
            "line": 51,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/knuckleswtf/scribe/src/Commands/GenerateDocumentation.php",
            "line": 39,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Container/Util.php",
            "line": 40,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php",
            "line": 37,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Container/Container.php",
            "line": 651,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Console/Command.php",
            "line": 136,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/symfony/console/Command/Command.php",
            "line": 299,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Console/Command.php",
            "line": 121,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/symfony/console/Application.php",
            "line": 978,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/symfony/console/Application.php",
            "line": 295,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/symfony/console/Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Console/Application.php",
            "line": 92,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php",
            "line": 129,
            "function": "run",
            "class": "Illuminate\\Console\\Application",
            "type": "->"
        },
        {
            "file": "/builds/nutnet/kamon-backend/artisan",
            "line": 37,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

GET api/oauth/google/callback

Login in by uuid from OAuth service

Example request:
curl --request POST \
    "http://localhost/api/oauth/check/callback" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 15
}"
const url = new URL(
    "http://localhost/api/oauth/check/callback"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 15
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "access_token": "token",
    "token_type": "bearer",
    "expires_in": "3600"
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Request      

POST api/oauth/check/callback

Body Parameters

id  integer  

UUID пользователя

Banners

Метод возвращает список баннеров и анонсов.

Example request:
curl --request GET \
    --get "http://localhost/api/banners" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/banners"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "banners": [
        {
            "description": null,
            "file_mobile": "http://kamon.storage.yandexcloud.net/local/banners/slide_2022_10_24_14_47_39.webp",
            "file_desktop": "http://kamon.storage.yandexcloud.net/local/banners/slide_2022_10_24_14_22_52.webp",
            "url": null,
            "file_desktop_type": "image",
            "file_mobile_type": "video"
        }
    ],
    "slides": [
        {
            "description": "Тестовое описание",
            "file_mobile": null,
            "file_desktop": "http://kamon.storage.yandexcloud.net/local/banners/slide_2022_10_25_07_55_18.webp",
            "url": "/test/",
            "file_desktop_type": null,
            "file_mobile_type": null
        }
    ]
}
 

Request      

GET api/banners

Response

Response Fields

banners  array  

Основной баннер (может быть пустым массивом [])

slides  array  

Анонс (может быть пустым массивом [])

description    

Описание (может быть null)

file_mobile    

Ссылка на фото или видео для мобильного устройства (может быть null)

file_desktop    

Ссылка на фото или видео для ПК (может быть null)

url    

Ссылка (может быть null)

file_desktop_type    

Тип image/video (может быть null)

file_mobile_type    

Тип image/video (может быть null)

POST api/merchant/webhook

Example request:
curl --request POST \
    "http://localhost/api/merchant/webhook" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/merchant/webhook"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/merchant/webhook

Teachers

Метод возвращает список всех учителей.

Example request:
curl --request GET \
    --get "http://localhost/api/teachers?style_id=15&level=13&liked=" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/teachers"
);

const params = {
    "style_id": "15",
    "level": "13",
    "liked": "",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 7,
            "phone": "79222137758",
            "first_name": "Алиса",
            "last_name": "Мишин",
            "type": 0,
            "type_formatted": "Учитель",
            "birthday": "01.01.2022",
            "gender": 0,
            "gender_formatted": "Не определен",
            "subscription": [],
            "video_views": {
                "training_duration": 0,
                "lessons_completed": 0
            }
        }
    ]
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Request      

GET api/teachers

Query Parameters

style_id  integer optional  

id стилей через запятую.

level  integer optional  

коды уровней через запятую.

liked  boolean optional  

только среди избранных уроков (0/1)

Styles

Метод возвращает список всех стилей.

Example request:
curl --request GET \
    --get "http://localhost/api/styles?teacher_id=16&level=14&liked=1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/styles"
);

const params = {
    "teacher_id": "16",
    "level": "14",
    "liked": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "name": "Electro Dance"
        },
        {
            "id": 2,
            "name": "Hip-Hop"
        },
        {
            "id": 3,
            "name": "sapiente"
        },
        {
            "id": 4,
            "name": "fugit"
        }
    ]
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Request      

GET api/styles

Query Parameters

teacher_id  integer optional  

id учителей через запятую.

level  integer optional  

коды уровней через запятую.

liked  boolean optional  

только среди избранных уроков (0/1)

Levels

Метод возвращает список всех уровней.

Example request:
curl --request GET \
    --get "http://localhost/api/levels?style_id=18&teacher_id=3&liked=" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/levels"
);

const params = {
    "style_id": "18",
    "teacher_id": "3",
    "liked": "",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "name": "Любители"
        },
        {
            "id": 2,
            "name": "Опытные"
        },
        {
            "id": 0,
            "name": "Начинающие"
        }
    ]
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Request      

GET api/levels

Query Parameters

style_id  integer optional  

id стилей через запятую.

teacher_id  integer optional  

id учителей через запятую.

liked  boolean optional  

только среди избранных уроков (0/1)

Tariffs

Метод возвращает список всех активных тарифов.

Example request:
curl --request GET \
    --get "http://localhost/api/tariffs" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/tariffs"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 2,
            "price": "1350.00",
            "is_disposable": false,
            "is_highlighted": true,
            "description": "Очень красивое описание для тарифа",
            "price_month": 450,
            "saving_percent": 10,
            "duration": 3,
            "duration_formatted": "3 месяца",
            "is_popular": false
        }
    ]
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Request      

GET api/tariffs

Response

Response Fields

price  string  

Цена тарифа. Всегда decimal

is_disposable  boolean  

Одноразовый ли тариф

is_highlighted  boolean  

Нужно ли выделить тариф

description  string  

Краткое описание тарифа

price_month  integer  

Расчетная цена за месяц. Если длительность меньше или равна 1 месяцу - NULL

saving_percent  integer  

Экономия в процентах относительно 1-месячной подписки

duration  integer  

Срок действия. Измеряется в месяцах

is_popular  boolean  

Популярен ли сейчас тариф у пользователей

Get user info

Получение данных пользователя

Example request:
curl --request GET \
    --get "http://localhost/api/user" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/user"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "birthday": "01.01.2222",
    "email": "test@test.ru",
    "first_name": null,
    "gender": 0,
    "gender_formatted": "Не определен",
    "has_card": false,
    "id": 1,
    "is_subscribed": false,
    "is_trial": false,
    "is_disposable_used": false,
    "last_name": null,
    "phone": null,
    "subscription": {
        "started_at": "2222-11-11T11:11:11.000000Z",
        "ended_at": "2222-11-11T11:11:11.000000Z",
        "is_renewable": false,
        "next": {
            "started_at": "2222-11-11T11:11:11.000000Z",
            "ended_at": null,
            "is_renewable": false,
            "tariff": {
                "id": 1,
                "price": "1",
                "description": "description",
                "comment": "comment",
                "duration": 1,
                "duration_formatted": "1 мес",
                "is_popular": true,
                "is_disposable": false
            }
        },
        "tariff": {
            "id": 1,
            "price": "1",
            "description": "description",
            "comment": "comment",
            "duration": 1,
            "duration_formatted": "1 мес",
            "is_popular": true,
            "is_disposable": false
        }
    },
    "type": 1,
    "type_formatted": "ТЕСТ",
    "video_views": {
        "training_duration": 0,
        "lessons_completed": 0,
        "compilations_viewed": 0,
        "goals_achieved": 0
    },
    "can_buy_subscription": false
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Request      

GET api/user

Update user info

Обновление данных пользователя

Example request:
curl --request POST \
    "http://localhost/api/user" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"first_name\": \"kki\",
    \"last_name\": \"dii\",
    \"phone\": \"05310417909\",
    \"birthday\": \"2018-11-23\",
    \"gender\": \"2\"
}"
const url = new URL(
    "http://localhost/api/user"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "first_name": "kki",
    "last_name": "dii",
    "phone": "05310417909",
    "birthday": "2018-11-23",
    "gender": "2"
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "birthday": "01.01.2222",
    "email": "test@test.ru",
    "first_name": null,
    "gender": 0,
    "gender_formatted": "Не определен",
    "has_card": false,
    "id": 1,
    "is_subscribed": false,
    "is_trial": false,
    "is_disposable_used": false,
    "last_name": null,
    "phone": null,
    "subscription": {
        "started_at": "2222-11-11T11:11:11.000000Z",
        "ended_at": "2222-11-11T11:11:11.000000Z",
        "is_renewable": false,
        "next": {
            "started_at": "2222-11-11T11:11:11.000000Z",
            "ended_at": null,
            "is_renewable": false,
            "tariff": {
                "id": 1,
                "price": "1",
                "description": "description",
                "comment": "comment",
                "duration": 1,
                "duration_formatted": "1 мес",
                "is_popular": true,
                "is_disposable": false
            }
        },
        "tariff": {
            "id": 1,
            "price": "1",
            "description": "description",
            "comment": "comment",
            "duration": 1,
            "duration_formatted": "1 мес",
            "is_popular": true,
            "is_disposable": false
        }
    },
    "type": 1,
    "type_formatted": "ТЕСТ",
    "video_views": {
        "training_duration": 0,
        "lessons_completed": 0,
        "compilations_viewed": 0,
        "goals_achieved": 0
    },
    "can_buy_subscription": false
}
 

Example response (400):


{
    "status": false,
    "errors": {
        "first_name": [
            "Это обязательное поле"
        ],
        "last_name": [
            "Это обязательное поле"
        ],
        "phone": [
            "Это обязательное поле"
        ],
        "birthday": [
            "Это обязательное поле"
        ],
        "gender": [
            "Это обязательное поле"
        ]
    }
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Request      

POST api/user

Body Parameters

first_name  string  

Must contain only letters. Количество символов в поле value не может превышать 255. Количество символов в поле value должно быть не меньше 3.

last_name  string  

Количество символов в поле value не может превышать 255. Количество символов в поле value должно быть не меньше 3.

phone  string optional  

Длина значения цифрового поля value должна быть между 7 и 20.

birthday  string  

Значение поля value не является датой. Значение поля value должно быть датой до today.

gender  string  

Must be one of 0, 1, or 2.

Response

Response Fields

video_views.training_duration    

Общее время тренировок в секундах

video_views.lessons_completed    

Кол-во полностью просмотренных уроков

gender  integer  

Тип гендера. Мужской (1), женский (2), не определен (0, может приходить, если ранее пользователь не заполнял информацию о себе)

type  integer  

Тип пользователя. Учитель (0), ученик (1)

Get user card info

Получение данных о привязанной карте пользователя

Example request:
curl --request GET \
    --get "http://localhost/api/user/card" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/user/card"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "number": "430000******0777",
    "date": "1122"
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Request      

GET api/user/card

Response

Response Fields

number  string  

номер привязанной карты. Может приходить null, если карта не привязана

date  string  

срок действия привязанной карты. Может приходить null, если карта не привязана

Request user email update

Запрос на обновление email. На указнный email приходит код c подтверждением. После этого метода должен вызваться email/confirm для подтверждения смены номера

Example request:
curl --request POST \
    "http://localhost/api/user/email" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"hermann.ofelia@example.net\"
}"
const url = new URL(
    "http://localhost/api/user/email"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "hermann.ofelia@example.net"
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "status": true
}
 

Example response (400):


{
    "status": true
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Request      

POST api/user/email

Body Parameters

email  string  

Значение поля value должно быть действительным электронным адресом.

Confirm update user email

Подтверждение смены email

Example request:
curl --request POST \
    "http://localhost/api/user/email/confirm" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"necessitatibus\",
    \"code\": 11
}"
const url = new URL(
    "http://localhost/api/user/email/confirm"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "necessitatibus",
    "code": 11
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "access_token": "token",
    "token_type": "bearer",
    "expires_in": "3600"
}
 

Example response (400):


{
    "status": true
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Request      

POST api/user/email/confirm

Body Parameters

email  string optional  

Email адрес, который подтверждается

code  integer optional  

Код из письма

Clear personal info and cancel subscription

Удаление персональных данных текущего пользователя и отмена подписки

Example request:
curl --request DELETE \
    "http://localhost/api/user/delete" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/user/delete"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "status": true
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Request      

DELETE api/user/delete

Change Card User

Метод возвращает настройки для виджета оплаты (с настройками для смены карты)

Example request:
curl --request POST \
    "http://localhost/api/tariffs/change" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/tariffs/change"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "merchant": "cloudpayments",
        "config": {
            "publicId": "pk_7b7e8bad356db0ca67faa51e1d5b0",
            "amount": 506,
            "currency": "RUB",
            "accountId": "6",
            "description": "Подписка на 1 месяц",
            "invoiceId": "37",
            "email": "dfgdfgdfgdgf@mail.ru",
            "data": {
                "cloudpayments": {
                    "CustomerReceipt": {
                        "Items": [
                            {
                                "Label": "Подписка на 1 месяц",
                                "Price": 506,
                                "Quantity": 1,
                                "Amount": 506,
                                "Vat": null
                            }
                        ],
                        "TaxationSystem": "1",
                        "Amounts": {
                            "Electronic": 506
                        },
                        "Email": "dfgdfgdfgdgf@mail.ru"
                    }
                }
            }
        }
    }
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Request      

POST api/tariffs/change

Response

Response Fields

merchant  string  

Идентификатор текущего мерчанта

data  object  

Настройки для платежного виджета

Tariff Payment

Метод возвращает настройки для виджета оплаты (с настройками для оплаты выбранной подписки)

Example request:
curl --request POST \
    "http://localhost/api/tariffs/10/buy" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/tariffs/10/buy"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "merchant": "cloudpayments",
        "config": {
            "publicId": "pk_7b7e8bad356db0ca67faa51e1d5b0",
            "amount": 506,
            "currency": "RUB",
            "accountId": "6",
            "description": "Подписка на 1 месяц",
            "invoiceId": "37",
            "email": "dfgdfgdfgdgf@mail.ru",
            "data": {
                "cloudpayments": {
                    "CustomerReceipt": {
                        "Items": [
                            {
                                "Label": "Подписка на 1 месяц",
                                "Price": 506,
                                "Quantity": 1,
                                "Amount": 506,
                                "Vat": null
                            }
                        ],
                        "TaxationSystem": "1",
                        "Amounts": {
                            "Electronic": 506
                        },
                        "Email": "dfgdfgdfgdgf@mail.ru"
                    }
                }
            }
        }
    }
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (401):


{
    "message": "Не найдено"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Request      

POST api/tariffs/{tariff}/buy

URL Parameters

tariff  integer  

Response

Response Fields

merchant  string  

Идентификатор текущего мерчанта

data  object  

Настройки для платежного виджета

Cancel subscription

Метод приостанавливает продление подписки

Example request:
curl --request POST \
    "http://localhost/api/subscriptions/cancel" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/subscriptions/cancel"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "started_at": "2024-03-28T06:45:59.000000Z",
        "ended_at": "2024-04-28T06:45:59.000000Z",
        "is_renewable": false,
        "tariff": {
            "id": 1,
            "price": "506.00",
            "is_disposable": false,
            "description": null,
            "comment": null,
            "duration": 1,
            "duration_formatted": "1 месяц",
            "is_popular": true
        },
        "next": null
    }
}
 

Request      

POST api/subscriptions/cancel

Categories

Метод возвращает список всех категорий.

Example request:
curl --request GET \
    --get "http://localhost/api/categories" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/categories"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "name": "mollitia"
        },
        {
            "id": 2,
            "name": "at"
        },
        {
            "id": 3,
            "name": "voluptatum"
        },
        {
            "id": 4,
            "name": "quaerat"
        }
    ]
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Request      

GET api/categories

Get lessons

Метод возвращает список всех уроков с пагинацией в 15 элементов.

Example request:
curl --request GET \
    --get "http://localhost/api/lessons?category_id=9&teacher_id=11&style_id=9&level=2&only_free=1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/lessons"
);

const params = {
    "category_id": "9",
    "teacher_id": "11",
    "style_id": "9",
    "level": "2",
    "only_free": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 22,
            "name": "Слизова Лиза 20",
            "style": "Hip-hop",
            "level": 0,
            "description": "1",
            "progress": 0,
            "video_id": 51,
            "duration": 822,
            "preview_video": "https://storage.yandexcloud.net/kamon/local/lesson_12/previews/preview.mp4",
            "preview_photo": "https://storage.yandexcloud.net/kamon/local/lesson_12/previews/preview.png",
            "category": {
                "id": 1,
                "name": "Восточный танец"
            },
            "teacher": {
                "id": 2,
                "name": "Юлия Наговицына"
            },
            "course": {
                "id": 1,
                "name": "Начало"
            },
            "created_at": "21.12.2021 13:57:32",
            "updated_at": "21.12.2021 13:57:32"
        }
    ],
    "links": {
        "first": null,
        "last": null,
        "prev": null,
        "next": "http://kamon.test/api/lessons?category_id=1&cursor=eyJpZCI6MjIsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0"
    },
    "meta": {
        "path": "http://kamon.test/api/lessons",
        "per_page": 1
    }
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Request      

GET api/lessons

Query Parameters

category_id  integer optional  

id категории. При передаче параметра уроки отфильтруются по категории

teacher_id  integer optional  

id учителей через запятую. При передаче параметра уроки отфильтруются по учителям

style_id  integer optional  

id стилей через запятую. При передаче параметра уроки отфильтруются по стилям

level  integer optional  

коды уровней через запятую. При передаче параметра уроки отфильтруются по уровням

only_free  boolean optional  

все(0) или только бесплатные(1)

Response

Response Fields

level  string  

Начинающие (0), Любители (1), Опытные (2)

payment_type    

1 - бесплатный урок, 2 - платный урок, 3 - мастер класс

id  integer  

Номер урока

video_id  integer  

может быть null, если урок платный и у пользователя нет платной подписки

progress  integer  

Прогресс просмотра урока. Измеряется в процентах

duration  integer  

Длительность урока. Изменяется в секундах

has_access  boolean  

Доступен ли урок

name  string  

Название урока

style  string  

Объект с id и названием стилем танцев, например: Hip-hop

description  string  

Описание урока

preview_video  string  

Содержит ссылку на превью видео

preview_photo  string  

Содержит ссылку на превью изображения

category  object  

Объект c id и названием категории урока, например: Восточный танец

teacher  object  

Объект с id и именем учителя, например: Иван Иванов

course  object  

Объект с id и названием курса, например: Начало

likes  integer  

Кол-во лайков на уроке

is_liked  boolean  

Урок понравился пользователю

Get lessons view history

История просмотров

Example request:
curl --request GET \
    --get "http://localhost/api/lessons/history?per_page=12&page=4&include_stat=1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/lessons/history"
);

const params = {
    "per_page": "12",
    "page": "4",
    "include_stat": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "stat": {
        "lessons_completed": 1,
        "training_duration": 120,
        "compilations_viewed": 0,
        "goals_achieved": 0
    },
    "data": [
        {
            "id": 3,
            "name": "Dara Gallegos",
            "style": {
                "id": 1,
                "name": "Rahim Weber"
            },
            "level": 1,
            "description": "Deserunt provident",
            "payment_type": 1,
            "progress": 33,
            "video_id": 3,
            "duration": 30,
            "preview_video": "https://storage.yandexcloud.net/kamon/local/lesson_3/previews/preview.mp4",
            "preview_photo": "https://storage.yandexcloud.net/kamon/local/lesson_3/previews/preview.webp",
            "has_access": true,
            "category": {
                "id": 1,
                "name": "Flynn Emerson"
            },
            "teacher": {
                "id": 2,
                "name": "Abra Miller"
            },
            "course": {
                "id": 1,
                "name": "Nigel Brennan"
            },
            "created_at": "04.12.2023 09:45:12",
            "updated_at": "04.12.2023 09:45:12",
            "likes": 0,
            "is_liked": false
        },
        {
            "id": 5,
            "name": "Lyle Kline",
            "style": {
                "id": 1,
                "name": "Rahim Weber"
            },
            "level": 1,
            "description": "Hic eum explicabo A",
            "payment_type": 1,
            "progress": 66,
            "video_id": 5,
            "duration": 30,
            "preview_video": "https://storage.yandexcloud.net/kamon/local/lesson_5/previews/preview.mp4",
            "preview_photo": "https://storage.yandexcloud.net/kamon/local/lesson_5/previews/preview.webp",
            "has_access": true,
            "category": {
                "id": 1,
                "name": "Flynn Emerson"
            },
            "teacher": {
                "id": 2,
                "name": "Abra Miller"
            },
            "course": {
                "id": 1,
                "name": "Nigel Brennan"
            },
            "created_at": "04.12.2023 09:46:51",
            "updated_at": "04.12.2023 09:46:51",
            "likes": 0,
            "is_liked": false
        },
        {
            "id": 1,
            "name": "Patricia Vazquez",
            "style": {
                "id": 1,
                "name": "Rahim Weber"
            },
            "level": 0,
            "description": "Nostrum laborum Qui",
            "payment_type": 1,
            "progress": 100,
            "video_id": 1,
            "duration": 30,
            "preview_video": "https://storage.yandexcloud.net/kamon/local/lesson_1/previews/preview.mp4",
            "preview_photo": "https://storage.yandexcloud.net/kamon/local/lesson_1/previews/preview.webp",
            "has_access": true,
            "category": {
                "id": 1,
                "name": "Flynn Emerson"
            },
            "teacher": {
                "id": 2,
                "name": "Abra Miller"
            },
            "course": {
                "id": 1,
                "name": "Nigel Brennan"
            },
            "created_at": "04.12.2023 07:32:08",
            "updated_at": "04.12.2023 07:32:08",
            "likes": 1,
            "is_liked": true
        }
    ],
    "links": {
        "first": "http://api.kamon.test/lessons/history?include_stat=1&page=1",
        "last": "http://api.kamon.test/lessons/history?include_stat=1&page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Назад",
                "active": false
            },
            {
                "url": "http://api.kamon.test/lessons/history?include_stat=1&page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Вперёд »",
                "active": false
            }
        ],
        "path": "http://api.kamon.test/lessons/history",
        "per_page": 6,
        "to": 3,
        "total": 3
    }
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Example response (404):


{
    "message": "Не найдено"
}
 

Request      

GET api/lessons/history

Query Parameters

per_page  integer optional  

Кол-во элементов на страницу

page  integer optional  

Номер страницы

include_stat  boolean optional  

Включить в ответ статистику

Get liked lessons

Получить видео, которые лайкнул пользователь

Example request:
curl --request GET \
    --get "http://localhost/api/lessons/liked?per_page=7&page=11&include_stat=1&category_id=16&teacher_id=3&style_id=16&level=14&only_free=" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/lessons/liked"
);

const params = {
    "per_page": "7",
    "page": "11",
    "include_stat": "1",
    "category_id": "16",
    "teacher_id": "3",
    "style_id": "16",
    "level": "14",
    "only_free": "",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "stat": {
        "lessons_completed": 2,
        "training_duration": 120,
        "lessons_viewed": 0,
        "likes_total": 1
    },
    "data": [
        {
            "id": 1,
            "name": "Patricia Vazquez",
            "style": {
                "id": 1,
                "name": "Rahim Weber"
            },
            "level": 0,
            "description": "Nostrum laborum Qui",
            "payment_type": 1,
            "progress": 100,
            "video_id": 1,
            "duration": 30,
            "preview_video": "https://storage.yandexcloud.net/kamon/local/lesson_1/previews/preview.mp4",
            "preview_photo": "https://storage.yandexcloud.net/kamon/local/lesson_1/previews/preview.webp",
            "has_access": true,
            "category": {
                "id": 1,
                "name": "Flynn Emerson"
            },
            "teacher": {
                "id": 2,
                "name": "Abra Miller"
            },
            "course": {
                "id": 1,
                "name": "Nigel Brennan"
            },
            "created_at": "04.12.2023 07:32:08",
            "updated_at": "04.12.2023 07:32:08",
            "likes": 1,
            "is_liked": true
        }
    ],
    "links": {
        "first": "http://api.kamon.test/lessons/liked?include_stat=1&page=1",
        "last": "http://api.kamon.test/lessons/liked?include_stat=1&page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Назад",
                "active": false
            },
            {
                "url": "http://api.kamon.test/lessons/liked?include_stat=1&page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Вперёд »",
                "active": false
            }
        ],
        "path": "http://api.kamon.test/lessons/liked",
        "per_page": 6,
        "to": 1,
        "total": 1
    }
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Example response (404):


{
    "message": "Не найдено"
}
 

Request      

GET api/lessons/liked

Query Parameters

per_page  integer optional  

Кол-во элементов на страницу

page  integer optional  

Номер страницы

include_stat  boolean optional  

Включить в ответ статистику

category_id  integer optional  

id категории. При передаче параметра уроки отфильтруются по категории

teacher_id  integer optional  

id учителей через запятую. При передаче параметра уроки отфильтруются по учителям

style_id  integer optional  

id стилей через запятую. При передаче параметра уроки отфильтруются по стилям

level  integer optional  

коды уровней через запятую. При передаче параметра уроки отфильтруются по уровням

only_free  boolean optional  

все(0) или только бесплатные(1)

Get lesson

Метод возвращает урок по id. Метод может возвращать 403, если урок платный и у пользователя нет платной подписки

Example request:
curl --request GET \
    --get "http://localhost/api/lessons/95271" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/lessons/95271"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "name": "раз-два, хип-хоп",
            "style": "хип-хоп",
            "level": 0,
            "description": "этот курс предназначен для новичков в танцах, или для тех кто желает сменить свой стиль",
            "duration": 577314238,
            "progress": 100,
            "payment_type": 2,
            "video_id": 1,
            "preview_video": "https://storage.yandexcloud.net/kamon/development/lesson_57/previews/preview.mp4",
            "preview_photo": "https://storage.yandexcloud.net/kamon/development/lesson_57/previews/preview.pmg",
            "category": {
                "id": 1,
                "name": "хип-хоп"
            },
            "teacher": {
                "id": 1,
                "name": "Андрей Гришковец"
            },
            "course": {
                "id": 1,
                "name": "Хип-хоп за час"
            },
            "created_at": "12.12.2012 12:20:52",
            "updated_at": "12.12.2012 12:20:52"
        }
    ]
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Example response (404):


{
    "message": "Не найдено"
}
 

Request      

GET api/lessons/{id}

URL Parameters

id  integer  

The ID of the lesson.

Response

Response Fields

progress  integer  

измеряется в процентах.

duration  integer  

Длительность урока. Изменяется в секундах

Get next lesson

Метод возвращает данные о следующем уроке относительно текущего

Example request:
curl --request GET \
    --get "http://localhost/api/lessons/631/next" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/lessons/631/next"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 1,
            "name": "раз-два, хип-хоп",
            "style": "хип-хоп",
            "level": 0,
            "description": "этот курс предназначен для новичков в танцах, или для тех кто желает сменить свой стиль",
            "duration": 577314238,
            "progress": 100,
            "payment_type": 2,
            "video_id": 1,
            "preview_video": "https://storage.yandexcloud.net/kamon/development/lesson_57/previews/preview.mp4",
            "preview_photo": "https://storage.yandexcloud.net/kamon/development/lesson_57/previews/preview.pmg",
            "category": {
                "id": 1,
                "name": "хип-хоп"
            },
            "teacher": {
                "id": 1,
                "name": "Андрей Гришковец"
            },
            "course": {
                "id": 1,
                "name": "Хип-хоп за час"
            },
            "created_at": "12.12.2012 12:20:52",
            "updated_at": "12.12.2012 12:20:52"
        }
    ]
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Example response (404):


{
    "message": "Не найдено"
}
 

Request      

GET api/lessons/{id}/next

URL Parameters

id  integer  

The ID of the lesson.

Add like

Метод сохраняет лайк урока

Example request:
curl --request POST \
    "http://localhost/api/lessons/823/like" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/lessons/823/like"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "success": true
        }
    ]
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Example response (404):


{
    "message": "Не найдено"
}
 

Request      

POST api/lessons/{id}/like

URL Parameters

id  integer  

The ID of the lesson.

Remove like

Метод удаляет лайк урока

Example request:
curl --request POST \
    "http://localhost/api/lessons/9/unlike" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/lessons/9/unlike"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "success": true
        }
    ]
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Example response (404):


{
    "message": "Не найдено"
}
 

Request      

POST api/lessons/{id}/unlike

URL Parameters

id  integer  

The ID of the lesson.

Save lesson video timing

Метод сохраняет прогресс просмотра видео. Метод должен вызываться с определенным интервалом для сохранения статистики

Example request:
curl --request POST \
    "http://localhost/api/lessons/50/video-view" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": 18,
    \"value\": 13
}"
const url = new URL(
    "http://localhost/api/lessons/50/video-view"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": 18,
    "value": 13
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "success": true
        }
    ]
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Example response (404):


{
    "message": "Не найдено"
}
 

Request      

POST api/lessons/{id}/video-view

URL Parameters

id  integer  

The ID of the lesson.

Body Parameters

type  integer optional  

Секунды (0), минуты (1)

value  integer optional  

Минимум 0, максимум 60

Video of lesson

Метод возвращает, вместе с общими данными, прямые ссылки на видео файл и превью. Поле "duration" измеряется в секундах, а поле "size" в байтах.

Метод может возвращать 403, если урок платный и у пользователя нет платной подписки

Example request:
curl --request GET \
    --get "http://localhost/api/lessons/video/386" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/lessons/video/386"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 115,
        "hlsUrl": "https://storage.yandexcloud.net/kamon/development/lesson_53/60af87b9dfe0c36558ad34a11ffe6de9.m3u8",
        "duration": 24,
        "size": 1387670,
        "stage": 0,
        "preview_video": "https://storage.yandexcloud.net/kamon/development/lesson_53/previews/preview.mp4",
        "preview_photo": "https://storage.yandexcloud.net/kamon/development/lesson_53/previews/preview.png",
        "lesson_id": 53,
        "sections": [
            {
                "name": "Приветствие",
                "time": 5
            },
            {
                "name": "Начинаем учить базовые движения",
                "time": 600
            },
            {
                "name": "Закрепляем",
                "time": 1800
            }
        ]
    }
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Example response (404):


{
    "message": "Видео не найдено"
}
 

Request      

GET api/lessons/video/{id}

URL Parameters

id  integer  

The ID of the video.

Updating video progress

Метод обновляет значение прогресса видео, для залогиненного пользователя

Example request:
curl --request POST \
    "http://localhost/api/lessons/video/68/progress" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"progress\": 96
}"
const url = new URL(
    "http://localhost/api/lessons/video/68/progress"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "progress": 96
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Request      

POST api/lessons/video/{id}/progress

URL Parameters

id  integer  

The ID of the video.

Body Parameters

progress  integer optional  

Значение поля value должно быть не меньше 0. Значение поля value не может быть больше 100.

Get list master classes

Метод, который возвращает список мастер-классов первым параметром, и наличие купленных у человека вторым.

Делает выдачу с учетом get-параметра "onlyPurchased". Если он есть, то нам выдает список только купленных мастер-классов и уроков, что перестали быть мастер-классом, иначе он отдает простой список со всеми мастер-классами.

Example request:
curl --request GET \
    --get "http://localhost/api/master_class?onlyPurchased=tempora" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/master_class"
);

const params = {
    "onlyPurchased": "tempora",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 17,
            "name": "Hip-Hop Kids вместе с Кристиной Степановой г. Ижевск",
            "style": {
                "id": 2,
                "name": "Hip-Hop Kids"
            },
            "level": 0,
            "price": null,
            "payment_type": 3,
            "progress": 0,
            "video_id": 122,
            "duration": 1185,
            "preview_video": "https://storage.yandexcloud.net/kamon/local/lesson_17/previews/preview.mp4",
            "preview_photo": "https://storage.yandexcloud.net/kamon/local/lesson_17/previews/preview.webp",
            "teacher": {
                "id": 3,
                "name": "Кристина Степанова"
            },
            "created_at": "07.10.2021 05:37:52",
            "updated_at": "16.08.2022 09:32:29"
        }
    ],
    "links": {
        "first": "http://api.kamon.test/master_class?page=1",
        "last": "http://api.kamon.test/master_class?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Назад",
                "active": false
            },
            {
                "url": "http://api.kamon.test/master_class?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Вперёд »",
                "active": false
            }
        ],
        "path": "http://api.kamon.test/master_class",
        "per_page": 6,
        "to": 1,
        "total": 1
    },
    "have_purchased": true
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Request      

GET api/master_class

Query Parameters

onlyPurchased  string optional  

Вывод только купленных мастер-классов, если есть любое значение

Response

Response Fields

id  integer  

Номер урока

name  string  

Название урока

style  object  

Объект с id и названием стилем танцев, например: Hip-hop

level  integer  

Начинающие (0), Любители (1), Опытные (2)

price    

Стоимость мастер-класса

payment_type  integer  

1 - бесплатный урок, 2 - платный урок, 3 - мастер класс

video_id  integer  

может быть null, если урок не доступен пользователю

progress  integer  

Прогресс просмотра урока. Измеряется в процентах

duration  integer  

Длительность урока. Изменяется в секундах

teacher  object  

Объект с id и именем учителя, например: Иван Иванов

has_access    

Указывает на то, куплен ли у нас урок

have_purchased  boolean  

Есть ли у человека купленные мастер-классы

preview_video  string  

Содержит ссылку на превью видео

preview_photo  string  

Содержит ссылку на превью изображения

links  object  

Ссылки пагинации

meta  object  

Данные о пагинации

Get price for master class

Метод возвращает либо ошибку, говоря о том, что мастер-класс уже куплен, либо возвращает данные мастер-класса: название, цену и id

Example request:
curl --request GET \
    --get "http://localhost/api/master_class/7/price" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/master_class/7/price"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 15,
        "name": "Hip-Hop Choreo от Кати Кононовой г.Ижевск",
        "price": 999.99
    }
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Example response (404):


{
    "message": "Не найдено"
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "id": [
            "Мастер класс не найден"
        ]
    }
}
 

Request      

GET api/master_class/{id}/price

URL Parameters

id  integer  

id Мастер класса

Get payment URL master-class

Метод возвращает либо ошибку, говоря о том, что мастер-класс уже куплен, либо возвращает ссылку на оплату мастер-класса.

Example request:
curl --request POST \
    "http://localhost/api/master_class/4/buy" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": \"reprehenderit\",
    \"price\": 1
}"
const url = new URL(
    "http://localhost/api/master_class/4/buy"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": "reprehenderit",
    "price": 1
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "merchant": "cloudpayments",
        "config": {
            "publicId": "pk_7b7e8bad356db0ca67faa51e1d5b0",
            "amount": 506,
            "currency": "RUB",
            "accountId": "6",
            "description": "Подписка на 1 месяц",
            "invoiceId": "37",
            "email": "dfgdfgdfgdgf@mail.ru",
            "data": {
                "cloudpayments": {
                    "CustomerReceipt": {
                        "Items": [
                            {
                                "Label": "Подписка на 1 месяц",
                                "Price": 506,
                                "Quantity": 1,
                                "Amount": 506,
                                "Vat": null
                            }
                        ],
                        "TaxationSystem": "1",
                        "Amounts": {
                            "Electronic": 506
                        },
                        "Email": "dfgdfgdfgdgf@mail.ru"
                    }
                }
            }
        }
    }
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Example response (404):


{
    "message": "Не найдено"
}
 

Example response (422):


{
    "message": "The given data was invalid.",
    "errors": {
        "id": [
            "Мастер класс не найден"
        ]
    }
}
 

Request      

POST api/master_class/{lesson}/buy

URL Parameters

lesson  integer  

id Мастер класса

Body Parameters

id  string  

price  number  

Значение поля value должно быть не меньше 1.

Response

Response Fields

payment_url    

Ссылка для оплаты, по которой нужно перенаправить пользователя. Может приходить null, если произошла ошибка

success    

Успешно ли завершилось действие. Может приходить false

Voucher activation

Активировать сертификат

Example request:
curl --request POST \
    "http://localhost/api/vouchers/nulla/activate" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/vouchers/nulla/activate"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "started_at": "2024-03-28T06:45:59.000000Z",
        "ended_at": "2024-04-28T06:45:59.000000Z",
        "is_renewable": false,
        "tariff": {
            "id": 1,
            "price": "506.00",
            "is_disposable": false,
            "description": null,
            "comment": null,
            "duration": 1,
            "duration_formatted": "1 месяц",
            "is_popular": true
        },
        "next": null
    }
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Example response (404):


{
    "message": "Не найдено"
}
 

Request      

POST api/vouchers/{id}/activate

URL Parameters

id  string  

Номер сертификата

Response

Response Fields

data  object  

Данные активированной по сертификату подписки

Compilations List

Список подборок с уроками

Example request:
curl --request GET \
    --get "http://localhost/api/compilations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/compilations"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 8,
            "title": "Проверочная подборка 1",
            "lessons": [
                {
                    "id": 6,
                    "name": "Rama Shaw",
                    "style": {
                        "id": 1,
                        "name": "Rahim Weber"
                    },
                    "level": 0,
                    "description": "Autem non numquam qu",
                    "payment_type": 1,
                    "progress": 0,
                    "video_id": 6,
                    "duration": 30,
                    "preview_video": "https://storage.yandexcloud.net/kamon/local/lesson_6/previews/preview.mp4",
                    "preview_photo": "https://storage.yandexcloud.net/kamon/local/lesson_6/previews/preview.webp",
                    "has_access": true,
                    "category": {
                        "id": 1,
                        "name": "Flynn Emerson"
                    },
                    "teacher": {
                        "id": 2,
                        "name": "Abra Miller"
                    },
                    "course": {
                        "id": 1,
                        "name": "Nigel Brennan"
                    },
                    "created_at": "04.12.2023 09:47:40",
                    "updated_at": "04.12.2023 09:47:40",
                    "likes": 0,
                    "is_liked": false
                },
                {
                    "id": 5,
                    "name": "Lyle Kline",
                    "style": {
                        "id": 1,
                        "name": "Rahim Weber"
                    },
                    "level": 1,
                    "description": "Hic eum explicabo A",
                    "payment_type": 1,
                    "progress": 66,
                    "video_id": 5,
                    "duration": 30,
                    "preview_video": "https://storage.yandexcloud.net/kamon/local/lesson_5/previews/preview.mp4",
                    "preview_photo": "https://storage.yandexcloud.net/kamon/local/lesson_5/previews/preview.webp",
                    "has_access": true,
                    "category": {
                        "id": 1,
                        "name": "Flynn Emerson"
                    },
                    "teacher": {
                        "id": 2,
                        "name": "Abra Miller"
                    },
                    "course": {
                        "id": 1,
                        "name": "Nigel Brennan"
                    },
                    "created_at": "04.12.2023 09:46:51",
                    "updated_at": "04.12.2023 09:46:51",
                    "likes": 0,
                    "is_liked": false
                }
            ]
        },
        {
            "id": 7,
            "title": "Проверочная подборка 2",
            "lessons": [
                {
                    "id": 3,
                    "name": "Dara Gallegos",
                    "style": {
                        "id": 1,
                        "name": "Rahim Weber"
                    },
                    "level": 1,
                    "description": "Deserunt provident",
                    "payment_type": 1,
                    "progress": 0,
                    "video_id": 3,
                    "duration": 30,
                    "preview_video": "https://storage.yandexcloud.net/kamon/local/lesson_3/previews/preview.mp4",
                    "preview_photo": "https://storage.yandexcloud.net/kamon/local/lesson_3/previews/preview.webp",
                    "has_access": true,
                    "category": {
                        "id": 1,
                        "name": "Flynn Emerson"
                    },
                    "teacher": {
                        "id": 2,
                        "name": "Abra Miller"
                    },
                    "course": {
                        "id": 1,
                        "name": "Nigel Brennan"
                    },
                    "created_at": "04.12.2023 09:45:12",
                    "updated_at": "04.12.2023 09:45:12",
                    "likes": 0,
                    "is_liked": false
                },
                {
                    "id": 1,
                    "name": "Patricia Vazquez",
                    "style": {
                        "id": 1,
                        "name": "Rahim Weber"
                    },
                    "level": 0,
                    "description": "Nostrum laborum Qui",
                    "payment_type": 1,
                    "progress": 0,
                    "video_id": 1,
                    "duration": 30,
                    "preview_video": "https://storage.yandexcloud.net/kamon/local/lesson_1/previews/preview.mp4",
                    "preview_photo": "https://storage.yandexcloud.net/kamon/local/lesson_1/previews/preview.webp",
                    "has_access": true,
                    "category": {
                        "id": 1,
                        "name": "Flynn Emerson"
                    },
                    "teacher": {
                        "id": 2,
                        "name": "Abra Miller"
                    },
                    "course": {
                        "id": 1,
                        "name": "Nigel Brennan"
                    },
                    "created_at": "04.12.2023 07:32:08",
                    "updated_at": "04.12.2023 07:32:08",
                    "likes": 1,
                    "is_liked": true
                }
            ]
        }
    ]
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Request      

GET api/compilations

Response

Response Fields

id  integer  

ID подборки

title  string  

Название подборки

lessons  array  

array Отсортированный список уроков в подборке, см. Get Lessons

Boosters List

Список бустеров

Example request:
curl --request GET \
    --get "http://localhost/api/boosters" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/boosters"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "id": 19,
            "preview_image": "http://kamon.test/storage/test.jpg",
            "preview_video": "http://kamon.test/storage/test2.mp4",
            "title": "asdfsd",
            "begin_date": "02.04.2024",
            "end_date": "28.04.2024",
            "short_description": "Короткое описание 1",
            "min_price": 100,
            "pay_status": true,
            "type": "all",
            "duration": 2
        },
        {
            "id": 20,
            "preview_image": "http://kamon.test/storage/test.jpg",
            "preview_video": "http://kamon.test/storage/test2.mp4",
            "title": "asfdasd 22",
            "begin_date": "01.04.2024",
            "end_date": "05.05.2024",
            "short_description": "Короткое описание 2",
            "min_price": 777,
            "pay_status": false,
            "type": "all",
            "duration": 2
        }
    ]
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Request      

GET api/boosters

Booster detail page

Детальная страница бустера

Example request:
curl --request GET \
    --get "http://localhost/api/boosters/20" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/boosters/20"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "id": 19,
        "preview_image": "http://kamon.test/storage/test.png",
        "preview_video": "http://kamon.test/storage/test.png",
        "title": "asdfsd",
        "begin_date": "02.04.2024",
        "end_date": "28.04.2024",
        "short_description": "Короткое описание 1",
        "min_price": 100,
        "pay_status": false,
        "tariff_id": 0,
        "description_first_column": "test",
        "description_second_column": "test",
        "description_third_column": "test",
        "author_name": "test",
        "author_preview": "http://kamon.test/storage/",
        "description_author": "test",
        "description_author_connection": "test",
        "description_author_technics": "test",
        "type": "all",
        "duration": 2,
        "lessons": [
            {
                "id": 89,
                "name": "Саша Кузьменко",
                "style": {
                    "id": 8,
                    "name": "Hip-Hop"
                },
                "level": 2,
                "description": "Описание",
                "payment_type": 2,
                "progress": 0,
                "video_id": 134,
                "duration": 5,
                "preview_video": "https://test.ru/preview.mp4",
                "preview_photo": "https://test.ru/previews/preview.webp",
                "has_access": false,
                "category": {
                    "id": 8,
                    "name": "Школа Хип-Хопа"
                },
                "teacher": {
                    "id": 237,
                    "name": "Тест Тестовый"
                },
                "course": {
                    "id": 1,
                    "name": "Начало"
                },
                "is_completed": false,
                "created_at": "16.05.2023 09:06:48",
                "updated_at": "25.04.2024 08:04:02",
                "is_booster": true,
                "likes": 0,
                "is_liked": false
            }
        ],
        "tariffs": [
            {
                "id": 66,
                "price": "2312.00",
                "title": "asfasf",
                "description": "asfs",
                "is_active": 0
            },
            {
                "id": 67,
                "price": "100.00",
                "title": "czxczxczxcxzczx",
                "description": "czvzvxv",
                "is_active": 0
            }
        ]
    }
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Request      

GET api/boosters/{id}

URL Parameters

id  integer  

The ID of the booster.

Boosters pay

Оплата бустера определенного тарифа

Example request:
curl --request POST \
    "http://localhost/api/boosters/3/buy/molestiae" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/boosters/3/buy/molestiae"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "merchant": "cloudpayments",
        "config": {
            "publicId": "pk_7b7e8bad356db0ca67faa51e1d5b0",
            "amount": 506,
            "currency": "RUB",
            "accountId": "6",
            "description": "Бустер тест",
            "invoiceId": "37",
            "email": "dfgdfgdfgdgf@mail.ru",
            "data": {
                "cloudpayments": {
                    "CustomerReceipt": {
                        "Items": [
                            {
                                "Label": "Бустер тест",
                                "Price": 506,
                                "Quantity": 1,
                                "Amount": 506,
                                "Vat": null
                            }
                        ],
                        "TaxationSystem": "1",
                        "Amounts": {
                            "Electronic": 506
                        },
                        "Email": "dfgdfgdfgdgf@mail.ru"
                    }
                }
            }
        }
    }
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Request      

POST api/boosters/{id}/buy/{tariff_id}

URL Parameters

id  integer  

The ID of the booster.

tariff_id  string  

The ID of the tariff.

Boosters create feedback

Создание фидбека о бустере.

Example request:
curl --request POST \
    "http://localhost/api/boosters/feedback/252" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"points\": 3,
    \"interesting\": \"zgqdxxynufyykelacmozojdbocksrjgeixxhfmcbhxwuztoicokyuyzxjnxrdvecntkibdcwyrjzfgvehyvrqwxzjhjjyqbyhumcowhiioizmsepsjmdgrvtdmrhmrklsfvindxooeajkqkpemmiuiuvqvvxmsvytnjfqasfevwvukwcbme\",
    \"disappointing\": \"vmbmovdffofcaomatiuoeruvwgchqaohfqyqtijdypymornajvkjvuhmufduyhnkreqzxiiwcnxcygjybctayvzmbqonwlfzhdngtmlojbccyxcvmwsnlzxwmgvksjgbflgnyoviseauiaczxtkuklaiomcimfgizhuprcymwgysqawiktyytndvbjgygvwwvbkkbfvmrkiuxedfyouceqqdkomqsoapcchkcerrpmnemqfeausebnzvvzdb\",
    \"attention\": \"xzobecocapzulrywkrhoxcnfpdwnxvzmsdibizodcgtynkyywdsbhouaimuvgiieqgwrtubvpstlzmqjztessluxelryhodvwrtdferxmkmstmwuduummvycimyzktutbnyowjoyffgkmspvjfmvjiryzetfknrctnwahzvnpeyyibprasyokuzuhotjfwwiglromhelboljxnanyrdcuqvixn\"
}"
const url = new URL(
    "http://localhost/api/boosters/feedback/252"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "points": 3,
    "interesting": "zgqdxxynufyykelacmozojdbocksrjgeixxhfmcbhxwuztoicokyuyzxjnxrdvecntkibdcwyrjzfgvehyvrqwxzjhjjyqbyhumcowhiioizmsepsjmdgrvtdmrhmrklsfvindxooeajkqkpemmiuiuvqvvxmsvytnjfqasfevwvukwcbme",
    "disappointing": "vmbmovdffofcaomatiuoeruvwgchqaohfqyqtijdypymornajvkjvuhmufduyhnkreqzxiiwcnxcygjybctayvzmbqonwlfzhdngtmlojbccyxcvmwsnlzxwmgvksjgbflgnyoviseauiaczxtkuklaiomcimfgizhuprcymwgysqawiktyytndvbjgygvwwvbkkbfvmrkiuxedfyouceqqdkomqsoapcchkcerrpmnemqfeausebnzvvzdb",
    "attention": "xzobecocapzulrywkrhoxcnfpdwnxvzmsdibizodcgtynkyywdsbhouaimuvgiieqgwrtubvpstlzmqjztessluxelryhodvwrtdferxmkmstmwuduummvycimyzktutbnyowjoyffgkmspvjfmvjiryzetfknrctnwahzvnpeyyibprasyokuzuhotjfwwiglromhelboljxnanyrdcuqvixn"
}

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "booster_name": "Booster name",
        "teacher_name": "Teacher name",
        "user_email": "test@example.ru",
        "lesson_name": "explicabo",
        "points": "5",
        "interesting": "tfvkautlcvclwrgeqbukcfscxjawypxrwyfitbczrataiis",
        "disappointing": "gzfdpajggxudpsytpikojfsfkqfdhzxceizabkedzdtjfbxpnryzxqttnuwuzezjhqkzxzys",
        "attention": "rbaakotcblmwvxqbybdgvhwbgdhjqyxmdbkegtekmvxayczbhmahnfmwkpyjyexzqayygvehdfmvtvixogvsloldktljliiworyjvdxqljuglibljaoxokqwzitcxqgankwjvplqmwidcjmdefyunutpmegkunmpsywjcogrclsabohuvceqslzbwibcoqtdcgqdrtzdyrxysmntsyxjfrcsqc",
        "created_at": "2024-05-23T08:34:38.000000Z",
        "id": 10
    }
}
 

Example response (401):


{
    "message": "Неверный токен"
}
 

Example response (403):


{
    "message": "Срок действия токена истек"
}
 

Example response (404):


{
    "message": "Не найдено"
}
 

Request      

POST api/boosters/feedback/{lesson_id}

URL Parameters

lesson_id  string  

The ID of the lesson.

Body Parameters

points  integer  

Значение поля value должно быть между 1 и 5.

interesting  string  

Количество символов в поле value не может превышать 255.

disappointing  string  

Количество символов в поле value не может превышать 255.

attention  string  

Количество символов в поле value не может превышать 255.