Welcome to the documentation for our API! This API provides endpoints for managing courses, chapters, lessons, user subscriptions, and user information retrieval.
All endpoints require authentication using Token Bearer. Users need to authenticate themselves to access the API.
The base URL for all API endpoints is: https://ravab.ir/api
GET
/courses/all
Retrieves all available courses.
Headers
Name | Value |
---|---|
Content-Type | application/json |
Authorization | Bearer <token> |
Response
{% tabs %} {% tab title="200" %}
{
[
{
"id": 0,
"title": "",
"content": "",
"img_url": "",
"price": 0,
"created_at": null,
"updated_at": null,
"is_premium": 1
}
]
}
{% endtab %} {% endtabs %}
POST
/courses/find
Finds a course by its ID.
Headers
Name | Value |
---|---|
Content-Type | application/json |
Authorization | Bearer <token> |
Body
Name | Type | Description |
---|---|---|
id |
number | Course ID |
Response
{% tabs %} {% tab title="200" %}
{
"id": 0,
"title": "",
"content": "",
"img_url": "",
"price": 0,
"created_at": null,
"updated_at": null,
"is_premium": 1
}
{% endtab %} {% endtabs %}
POST
/courses/chapters
Retrieves chapters of a specific course.
Headers
Name | Value |
---|---|
Content-Type | application/json |
Authorization | Bearer <token> |
Body
Name | Type | Description |
---|---|---|
id |
number | Course ID |
Response
{% tabs %} {% tab title="200" %}
[
{
"id": 0,
"title": "",
"course_id": 0,
"created_at": null,
"updated_at": null
}
]
{% endtab %}
{% tab title="403" %}
{
"error": true,
"message": "Access Denied."
}
{% endtab %} {% endtabs %}
POST
/courses/lessons
Retrieves lessons of a specific chapter.
Headers
Name | Value |
---|---|
Content-Type | application/json |
Authorization | Bearer <token> |
Body
Name | Type | Description |
---|---|---|
id |
number | Chapter ID |
Response
{% tabs %} {% tab title="200" %}
[
{
"id": 0,
"title": "",
"content": "",
"chapter_id": 0,
"created_at": null,
"updated_at": null
}
]
{% endtab %}
{% tab title="403" %}
{
"error": true,
"message": "Access Denied."
}
{% endtab %} {% endtabs %}
GET
/subscription/status
Retrieves the subscription status of the authenticated user.
Headers
Name | Value |
---|---|
Content-Type | application/json |
Authorization | Bearer <token> |
Response
{% tabs %} {% tab title="200" %}
{
"id": 0,
"expire": "2024-12-15",
"user_id": 1,
"created_at": null,
"updated_at": null
}
{% endtab %}
{% tab title="201" %}
{
"error": true,
"message": "No Subscription Registered."
}
{% endtab %} {% endtabs %}
POST
/user/get
Retrieves information about the authenticated user.
Headers
Name | Value |
---|---|
Content-Type | application/json |
Authorization | Bearer <token> |
Response
{% tabs %} {% tab title="200" %}
{
"id": 0,
"name": "",
"email": "",
"email_verified_at": null,
"current_team_id": null,
"profile_photo_path": null,
"created_at": null,
"updated_at": null,
"two_factor_confirmed_at": null,
"profile_photo_url": ""
}
{% endtab %} {% endtabs %}