Getting Started

Welcome to the documentation for our API! This API provides endpoints for managing courses, chapters, lessons, user subscriptions, and user information retrieval.

Authentication

All endpoints require authentication using Token Bearer. Users need to authenticate themselves to access the API.

Base URL

The base URL for all API endpoints is: https://ravab.ir/api

Course Endpoints

Get All Courses

GET /courses/all

Retrieves all available courses.

Headers

NameValue

Content-Type

application/json

Authorization

Bearer <token>

Response

{
    [
        {
          "id": 0,
          "title": "",
          "content": "",
          "img_url": "",
          "price": 0,
          "created_at": null,
          "updated_at": null,
          "is_premium": 1
        }
    ]
}

Find Course by ID

POST /courses/find

Finds a course by its ID.

Headers

NameValue

Content-Type

application/json

Authorization

Bearer <token>

Body

NameTypeDescription

id

number

Course ID

Response

{
    "id": 0,
    "title": "",
    "content": "",
    "img_url": "",
    "price": 0,
    "created_at": null,
    "updated_at": null,
    "is_premium": 1
}

Get Chapters of a Course

POST /courses/chapters

Retrieves chapters of a specific course.

Headers

NameValue

Content-Type

application/json

Authorization

Bearer <token>

Body

NameTypeDescription

id

number

Course ID

Response

[
    {
        "id": 0,
        "title": "",
        "course_id": 0,
        "created_at": null,
        "updated_at": null
    }
]

Get Lessons of a Chapter

POST /courses/lessons

Retrieves lessons of a specific chapter.

Headers

NameValue

Content-Type

application/json

Authorization

Bearer <token>

Body

NameTypeDescription

id

number

Chapter ID

Response

[
    {
        "id": 0,
        "title": "",
        "content": "",
        "chapter_id": 0,
        "created_at": null,
        "updated_at": null
    }
]

Subscription Endpoints

Get User Subscription Status

GET /subscription/status

Retrieves the subscription status of the authenticated user.

Headers

NameValue

Content-Type

application/json

Authorization

Bearer <token>

Response

{
    "id": 0,
    "expire": "2024-12-15",
    "user_id": 1,
    "created_at": null,
    "updated_at": null
}

User Endpoints

Get User Information

POST /user/get

Retrieves information about the authenticated user.

Headers

NameValue

Content-Type

application/json

Authorization

Bearer <token>

Response

{
    "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": ""
}

Last updated