
# Product Category

### Category properties

| Attribute             | Type         | Description
| --------------------- | ------------ | --------------------------------------------------------------
| id                    | integer      | Primary key. `Unique ID` of the category (`AUTO_INCREMENT`).
| title                 | varchar(100) | Title or name of the category.
| description           | text         | Description of the category.
| parent_id             | integer      | Parent category ID (`used for subcategory`).
| created_at            | datetime     | Date and time when the category was created.
| updated_at            | datetime     | Date and time when the category was last updated.

## Get all category

```shell
curl -X GET https://vedaay-api.mulika.in/category
-H "Content-Type: application/json" \
-H  Authorization: Bearer eyJ0eXAiOiJKNiJ9.B7Y3J9FWtgjby4P8-LX_Vkeob6CE
```
> Responce:

```json
'{
    "status": "success",
    "code": 200,
    "message": "Category retrieved successfully",
    "pagination": {
        "current_page": 1,
        "per_page": 12,
        "total_records": 10,
        "total_pages": 1
    },
    "data": [
        {
            "id": "2",
            "title": "Mobile Phones test",
            "parent_id": "0",
            "description": "Smartphones & Mobiles",
            "created_at": "2025-12-26 23:32:56",
            "updated_at": "2026-03-10 12:15:35"
        },
        {
            "id": "3",
            "title": "Laptops",
            "parent_id": "0",
            "description": "All laptops",
            "created_at": "2025-12-29 18:20:00",
            "updated_at": "2025-12-29 18:39:35"
        },
        {
            "id": "4",
            "title": "Course",
            "parent_id": "0",
            "description": "All Course",
            "created_at": "2025-12-29 18:26:45",
            "updated_at": "2025-12-29 18:26:45"
        },
        {
            "id": "5",
            "title": "TEST",
            "parent_id": "0",
            "description": "All Test",
            "created_at": "2025-12-29 18:27:38",
            "updated_at": "2025-12-30 11:04:15"
        },
        {
            "id": "8",
            "title": "IT",
            "parent_id": "0",
            "description": "AI & DBMS",
            "created_at": "2025-12-30 10:29:19",
            "updated_at": "2025-12-30 10:29:19"
        },
        {
            "id": "14",
            "title": "Abcus test",
            "parent_id": "0",
            "description": "courses & lessons",
            "created_at": "2026-03-10 12:16:18",
            "updated_at": "2026-03-10 12:16:18"
        },
        {
            "id": "16",
            "title": "Abcus test",
            "parent_id": "0",
            "description": "courses & lessons",
            "created_at": "2026-03-10 12:16:36",
            "updated_at": "2026-03-10 12:16:36"
        },
        {
            "id": "17",
            "title": "Abcus test",
            "parent_id": "5",
            "description": "courses & lessons",
            "created_at": "2026-03-10 13:06:48",
            "updated_at": "2026-03-10 13:06:48"
        },
        {
            "id": "18",
            "title": "Abcus test",
            "parent_id": "0",
            "description": "courses & lessons",
            "created_at": "2026-03-10 13:06:54",
            "updated_at": "2026-03-10 13:06:54"
        },
        {
            "id": "19",
            "title": "Abcus test",
            "parent_id": "156",
            "description": "courses & lessons",
            "created_at": "2026-03-10 13:07:09",
            "updated_at": "2026-03-10 13:07:09"
        }
    ]
}'
```
<span style="background: #000; color: white; padding: 10px 10px; border-radius: 4px;  width: 100%;display: block;">
<span  style="background: #27cf3d; color: white; padding: 8px 24px; border-radius: 2px; font-weight: bold; ">GET</span> /category
</span> 

1. GET /category?search=new test
2. GET /category?order=asc
  
## Get single category

```shell
curl -X GET https://vedaay-api.mulika.in/category/2
-H "Content-Type: application/json" \
-H  Authorization: Bearer eyJ0eXAiOiJKNiJ9.B7Y3J9FWtgjby4P8-LX_Vkeob6CE
```
> Responce:

```json
 '{
    "status": "success",
    "code": 200,
    "message": "Category retrieved successfully",
    "data": {
        "id": "2",
        "title": "Mobile Phones test",
        "description": "Smartphones & Mobiles",
        "parent_id": "3",
        "created_at": "2025-12-26 23:32:56",
        "updated_at": "2026-03-10 12:15:35"
    }
}'
```
<span style="background: #000; color: white; padding: 10px 10px; border-radius: 4px;  width: 100%;display: block;">
<span  style="background: #674ed7; color: white; padding: 8px 24px; border-radius: 2px; font-weight: bold; ">GET</span> /category/{id}
</span>

### Parameters

| Parameter     | Type    | Description 
| ------------- | ------- | ----------------------
| id  | integer | `ID` of the category 
 
## Create category

```shell
curl -X POST https://vedaay-api.mulika.in/category \
-H "Content-Type: application/json" \
-H  Authorization: Bearer eyJ0eXAiOiJKNiJ9.B7Y3J9FWtgjby4P8-LX_Vkeob6CE
-d '{
    "title": "Abcus test",
    "description": "courses & lessons",
    "parent_id": "2"
}'
 ```
> Responce:

```json
   {
    "status": "success",
    "code": 200,
    "message": "Category created successfully",
    "data": {
        "id": "20",
        "title": "Abcus test",
        "parent_id": "2",
        "description": "courses & lessons",
        "created_at": "2026-03-10 13:08:28",
        "updated_at": "2026-03-10 13:08:28"
    }
}
```
<span style="background: #000; color: white; padding: 10px 10px; border-radius: 4px;  width: 100%;display: block;">
<span  style="background: #d7be4e; color: white; padding: 8px 24px; border-radius: 2px; font-weight: bold; ">POST</span> /category
</span>  
 
## Update category

```shell
curl -X PUT https://vedaay-api.mulika.in/category/20
-H "Content-Type: application/json" \
-H  Authorization: Bearer eyJ0eXAiOiJKNiJ9.B7Y3J9FWtgjby4P8-LX_Vkeob6CE
-d '{
    "title": "Abcus courses",
    "description": "courses & lessons",
    "parent_id": "8"
}
```
> Responce:

```json
   {
        "status": "Success",
        "code": 200,
        "message": "Category updated successfully",
        "data": {
            "id": "20",
            "title": "Abcus courses",
            "parent_id": "8",
            "description": "courses & lessons",
            "created_at": "2026-03-10 13:08:28",
            "updated_at": "2026-03-10 13:13:02"
        }
    }
```

<span style="background: #000; color: white; padding: 10px 10px; border-radius: 4px;  width: 100%;display: block;">
<span  style="background: #4e92d7; color: white; padding: 8px 24px; border-radius: 2px; font-weight: bold; ">PUT</span> /category/{id}
</span>   

### Parameter

| Parameter           | Type    | Description                                                     
| ------------------- | ------- | --------------------------------------------------------------- 
| id        | integer | `ID` of the category                                               


 
## Delete category

<span style="background: #000; color: white; padding: 10px 10px; border-radius: 4px;  width: 100%;display: block;">
<span  style="background: #c91c05; color: white; padding: 8px 24px; border-radius: 2px; font-weight: bold; ">DELETE</span> /category/{id}
</span> 
 

```shell
curl -X DELETE https://vedaay-api.mulika.in/category/20
-H "Content-Type: application/json" \
-H  Authorization: Bearer eyJ0eXAiOiJKNiJ9.B7Y3J9FWtgjby4P8-LX_Vkeob6CE
```
> Responce:

```json
{
    "status": "Success",
    "code": 200,
    "message": "Category deleted successfully",
    "data": [
        "20"
    ]
}
```
 


# Course Category

### Course Category properties

| Attribute             | Type         | Description
| --------------------- | ------------ | --------------------------------------------------------------
| course_category_id    | integer      | Primary key. `Unique ID` of the Course category (`AUTO_INCREMENT`).
| category_name         | varchar(100) | Title or name of the Course category.
| category_description  | text         | Description of the Course category.
| parent_id             | integer      | Parent Course category ID (`used for subcategory`). 
| created_by            | integer      | user id of the user who has created a this Course Category
| created_at            | datetime     | Date and time when the Course category was created.
| updated_at            | datetime     | Date and time when the Course category was last updated.

## Get all Course Category

```shell
curl -X GET https://vedaay-api.mulika.in/course_category
-H "Content-Type: application/json" \
-H  Authorization: Bearer eyJ0eXAiOiJKNiJ9.B7Y3J9FWtgjby4P8-LX_Vkeob6CE
```
> Responce:

```json
'{
    "status": "success",
    "code": 200,
    "message": "8 Course categories retrieved successfully",
    "pagination": {
        "current_page": 1,
        "per_page": 12,
        "total_records": 8,
        "total_pages": 1
    },
    "data": [
        {
            "course_category_id": "1",
            "category_name": "distfren1",
            "category_description": null,
            "parent_id": null,
            "created_by": "302",
            "created_at": "2026-07-01 11:38:58",
            "updated_at": "2026-07-01 11:38:58"
        },
        {
            "course_category_id": "2",
            "category_name": "categorynam",
            "category_description": "categoryon",
            "parent_id": "123",
            "created_by": "302",
            "created_at": "2026-07-01 11:40:26",
            "updated_at": "2026-07-01 11:40:26"
        },
        {
            "course_category_id": "3",
            "category_name": "new",
            "category_description": "categoryon",
            "parent_id": "123",
            "created_by": "302",
            "created_at": "2026-07-01 11:50:00",
            "updated_at": "2026-07-01 11:50:00"
        },
        {
            "course_category_id": "5",
            "category_name": "mertnbv",
            "category_description": "lkjh",
            "parent_id": "561",
            "created_by": "302",
            "created_at": "2026-07-01 11:54:18",
            "updated_at": "2026-07-01 12:47:09"
        },
        {
            "course_category_id": "6",
            "category_name": "qwer",
            "category_description": "asdf",
            "parent_id": "456",
            "created_by": "302",
            "created_at": "2026-07-01 12:13:53",
            "updated_at": "2026-07-01 12:14:57"
        },
        {
            "course_category_id": "7",
            "category_name": "poiu",
            "category_description": "zxcv",
            "parent_id": "623",
            "created_by": "302",
            "created_at": "2026-07-01 12:42:47",
            "updated_at": "2026-07-01 12:42:47"
        },
        {
            "course_category_id": "8",
            "category_name": "poiu",
            "category_description": "zxcv",
            "parent_id": "623",
            "created_by": "302",
            "created_at": "2026-07-01 12:46:57",
            "updated_at": "2026-07-01 12:46:57"
        },
        {
            "course_category_id": "9",
            "category_name": "qpoiu",
            "category_description": "zxcv",
            "parent_id": "623",
            "created_by": "302",
            "created_at": "2026-07-01 12:47:29",
            "updated_at": "2026-07-01 12:47:29"
        }
    ]
}'
```
<span style="background: #000; color: white; padding: 10px 10px; border-radius: 4px;  width: 100%;display: block;">
<span  style="background: #27cf3d; color: white; padding: 8px 24px; border-radius: 2px; font-weight: bold; ">GET</span> /course_category
</span> 
 

## Get single Course Category

```shell
curl -X GET https://vedaay-api.mulika.in/course_category/9
-H "Content-Type: application/json" \
-H  Authorization: Bearer eyJ0eXAiOiJKNiJ9.B7Y3J9FWtgjby4P8-LX_Vkeob6CE
```
> Responce:

```json
 '{
    "status": "success",
    "code": 200,
    "message": "Course category retrieved successfully",
    "data": {
        "course_category_id": "9",
        "category_name": "qpoiu",
        "category_description": "zxcv",
        "parent_id": "623",
        "created_by": "302",
        "created_at": "2026-07-01 12:47:29",
        "updated_at": "2026-07-01 12:47:29"
    }
}'
```
<span style="background: #000; color: white; padding: 10px 10px; border-radius: 4px;  width: 100%;display: block;">
<span  style="background: #674ed7; color: white; padding: 8px 24px; border-radius: 2px; font-weight: bold; ">GET</span> /course_category/{id}
</span>

### Parameters

| Parameter           | Type    | Description 
| ------------------- | ------- | ----------------------
| course_category_id  | integer | `ID` of the course category 
 
## Create Course Category

```shell
curl -X POST https://vedaay-api.mulika.in/course_category \
-H "Content-Type: application/json" \
-H  Authorization: Bearer eyJ0eXAiOiJKNiJ9.B7Y3J9FWtgjby4P8-LX_Vkeob6CE
-d '{ 
        "category_name": "abcd",
        "category_description": "pqrs",
        "parent_id": 654
    }'
 ```
> Responce:

```json
   '{
    "status": "success",
    "message": "course category  added successfully.",
    "code": 200,
    "data": {
        "course_category_id": 10,
        "category_name": "abcd",
        "category_description": "pqrs",
        "parent_id": 654,
        "created_by": "302"
    }
}'
```
<span style="background: #000; color: white; padding: 10px 10px; border-radius: 4px;  width: 100%;display: block;">
<span  style="background: #d7be4e; color: white; padding: 8px 24px; border-radius: 2px; font-weight: bold; ">POST</span> /course_category
</span>  
 
## Update Course Category

```shell
curl -X PUT https://vedaay-api.mulika.in/course_category/5
-H "Content-Type: application/json" \
-H  Authorization: Bearer eyJ0eXAiOiJKNiJ9.B7Y3J9FWtgjby4P8-LX_Vkeob6CE
-d '{ 
        "category_name": "jcbx",
        "category_description": "sqrqzq",
        "parent_id": 951
    }'
```
> Responce:

```json
   '{
    "status": "success",
    "message": "course category updated successfully.",
    "code": 200,
    "data": {
        "course_category_id": "5",
        "category_name": "jcbx",
        "category_description": "sqrqzq",
        "parent_id": "951",
        "created_by": "302",
        "created_at": "2026-07-01 11:54:18",
        "updated_at": "2026-07-01 14:42:48"
    }
}'
```

<span style="background: #000; color: white; padding: 10px 10px; border-radius: 4px;  width: 100%;display: block;">
<span  style="background: #4e92d7; color: white; padding: 8px 24px; border-radius: 2px; font-weight: bold; ">PUT</span> /course_category/{id}
</span>   

### Parameter

| Parameter           | Type    | Description                                                     
| ------------------- | ------- | ------------------------------ 
| course_category_id  | integer | `ID` of the  course category                                               


 
## Delete Course Category

<span style="background: #000; color: white; padding: 10px 10px; border-radius: 4px;  width: 100%;display: block;">
<span  style="background: #c91c05; color: white; padding: 8px 24px; border-radius: 2px; font-weight: bold; ">DELETE</span> /course_category/{id}
</span> 
 

```shell
curl -X DELETE https://vedaay-api.mulika.in/category/3
-H "Content-Type: application/json" \
-H  Authorization: Bearer eyJ0eXAiOiJKNiJ9.B7Y3J9FWtgjby4P8-LX_Vkeob6CE
```
> Responce:

```json
'{
    "status": "success",
    "code": 200,
    "message": "Course category deleted successfully",
    "data": {
        "id": "3"
    }
}'
```