Ecommerce
Category

Create

You can add unlimited categories by category create route, category route allow only POST Method

https://ecom.coderorbit.com/api/admin/{{app_token}}/category
 
headers:{
    "Accept": "application/json"    
    "Authorization" : `Bearer ${token}`
}
 
body:{
    "parent_id": "",
    "name": "test category",
    "banner": "", // file or base64
    "icon" : "", // file or base64
    "thumbnails" : "", // file or base64
    "commission": 0,
    "commission_type": "", //fixed | parcentage ,
    "status": 1, // 0 | 1,
    "description": "",
    "extend_props": {
      "test": "theis extend props",
      "test2": "theis extend props 02",
      ".....": "....."
    }
    
}

Result

{
    "0": "Success",
    "store_data": {
        "unique_id": "Q5WpoWDoZ1zKxkF",
        "parent_id": null,
        "name": "test category",
        "slug": "test_category",
        "banner": "",
        "icon": "",
        "thumbnails": "",
        "commission": "10",
        "commission_type": "fixed",
        "status": "1",
        "description": "this is description",
        "extend_props": {
        "test": "theis extend props",
        "test2": "theis extend props 02"
        },
        "created_by": {
          "id": 1,
          "role_id": 1,
          "country_id": 18,
          "name": "Admin",
          "email": "admin@gmail.com",
          "extend_props": {
            "address": null,
            "city_id": 1,
            "thana_id": 494
          },
          "email_verified_at": null,
          "created_at": "2023-09-17T02:19:46.000000Z",
          "updated_at": "2025-01-07T20:41:12.000000Z",
          "unique_id": "8660998812",
          "otp": 874613,
          "status": 1,
          "description": null,
          "created_by": 0,
          "updated_by": 0,
          "deleted_at": null
        },
        "updated_by": {
          "id": 1,
          "role_id": 1,
          "country_id": 18,
          "name": "Admin",
          "email": "admin@gmail.com",
          "extend_props": {
            "address": null,
            "city_id": 1,
            "thana_id": 494
          },
          "email_verified_at": null,
          "created_at": "2023-09-17T02:19:46.000000Z",
          "updated_at": "2025-01-07T20:41:12.000000Z",
          "unique_id": "8660998812",
          "otp": 874613,
          "status": 1,
          "description": null,
          "created_by": 0,
          "updated_by": 0,
          "deleted_at": null
        },
        "updated_at": "2023-03-17T04:31:53.000000Z",
        "created_at": "2023-03-17T04:31:53.000000Z",
    }
}
 

List

Get all category list by GET Method with filter function customized option for you. below list of route with parameter

http://ecom.coderorbit.com/api/admin/{{app_token}}/category
 
headers:{ 
    "Accept": "application/json"    
    "Authorization" : `Bearer ${token}`
}

Result

"data" : [
    {
      "id": 1,
      "unique_id": "sLJvIENyg100Pxk",
      "parent_id": null,
      "name": "Test Category",
      "slug": "Test Category",
      "banner": "",
      "icon": "",
      "thumbnails": "",
      "commission": 10,
      "commission_type": "fixed",
      "status": 1,
      "description": "this is description",
      "extend_props": {
        "'test'": "theis extend props 02"
      },
      "created_by": {
        "id": 1,
        "role_id": 1,
        "country_id": 18,
        "name": "Admin",
        "email": "admin@gmail.com",
        "extend_props": {
          "address": null,
          "city_id": 1,
          "thana_id": 494
        },
        "email_verified_at": null,
        "created_at": "2023-09-17T02:19:46.000000Z",
        "updated_at": "2025-01-07T20:41:12.000000Z",
        "unique_id": "8660998812",
        "otp": 874613,
        "status": 1,
        "description": null,
        "created_by": 0,
        "updated_by": 0,
        "deleted_at": null
      },
      "updated_by": {
        "id": 1,
        "role_id": 1,
        "country_id": 18,
        "name": "Admin",
        "email": "admin@gmail.com",
        "extend_props": {
          "address": null,
          "city_id": 1,
          "thana_id": 494
        },
        "email_verified_at": null,
        "created_at": "2023-09-17T02:19:46.000000Z",
        "updated_at": "2025-01-07T20:41:12.000000Z",
        "unique_id": "8660998812",
        "otp": 874613,
        "status": 1,
        "description": null,
        "created_by": 0,
        "updated_by": 0,
        "deleted_at": null
      },
      "created_at": "2023-03-17T04:25:43.000000Z",
      "updated_at": "2023-03-17T04:25:43.000000Z",
      "props": []
    },
    .........
 
  ],

If you want to get by pagination to the list by GET Method Here we have this featuer for you in ths route with parameter like: limit_per_page

http://ecom.coderorbit.com/api/admin/{{app_token}}/category?limit_per_page=1
 
headers:{ 
    "Accept": "application/json"    
    "Authorization" : `Bearer ${token}`
}

Result

"data" : [
    {
      "id": 1,
      "unique_id": "sLJvIENyg100Pxk",
      "parent_id": null,
      "name": "Test Category",
      "slug": "Test Category",
      "banner": "",
      "icon": "",
      "thumbnails": "",
      "commission": 10,
      "commission_type": "fixed",
      "status": 1,
      "description": "this is description",
      "extend_props": {
        "'test'": "theis extend props 02"
      },
      "created_by": {
        "id": 1,
        "role_id": 1,
        "country_id": 18,
        "name": "Admin",
        "email": "admin@gmail.com",
        "extend_props": {
          "address": null,
          "city_id": 1,
          "thana_id": 494
        },
        "email_verified_at": null,
        "created_at": "2023-09-17T02:19:46.000000Z",
        "updated_at": "2025-01-07T20:41:12.000000Z",
        "unique_id": "8660998812",
        "otp": 874613,
        "status": 1,
        "description": null,
        "created_by": 0,
        "updated_by": 0,
        "deleted_at": null
      },
      "updated_by": {
        "id": 1,
        "role_id": 1,
        "country_id": 18,
        "name": "Admin",
        "email": "admin@gmail.com",
        "extend_props": {
          "address": null,
          "city_id": 1,
          "thana_id": 494
        },
        "email_verified_at": null,
        "created_at": "2023-09-17T02:19:46.000000Z",
        "updated_at": "2025-01-07T20:41:12.000000Z",
        "unique_id": "8660998812",
        "otp": 874613,
        "status": 1,
        "description": null,
        "created_by": 0,
        "updated_by": 0,
        "deleted_at": null
      },
      "created_at": "2023-03-17T04:25:43.000000Z",
      "updated_at": "2023-03-17T04:25:43.000000Z",
      "props": []
    },
    .........
    ,
  "first_page_url": "https://ecom.coderorbit.com/api/admin/{{app_token}}/category?page=1",
  "from": 1,
  "last_page": 1,
  "last_page_url": "https://ecom.coderorbit.com/api/admin/{{app_token}}/category?page=1",
  "links": [
    {
      "url": null,
      "label": "« Previous",
      "active": false
    },
    {
      "url": "https://ecom.coderorbit.com/api/admin/{{app_token}}/category?page=1",
      "label": "1",
      "active": true
    },
    {
      "url": null,
      "label": "Next »",
      "active": false
    }
  ],
  "next_page_url": null,
  "path": "https://ecom.coderorbit.com/api/admin/{{app_token}}/category",
  "per_page": 15,
  "prev_page_url": null,
  "to": 100,
  "total": 100
]

=== Query Parameters ===

limit_per_page = 1 // Default 15
name = ''
page = 1 // number of page for pagination
data = all

Here is example url:

==============================================================================================================
GET = https://ecom.coderorbit.com/api/admin/{{app_token}}/category
==============================================================================================================
GET = https://ecom.coderorbit.com/api/admin/{{app_token}}/category?limit_per_page=1
==============================================================================================================
GET = https://ecom.coderorbit.com/api/admin/{{app_token}}/category?name=apple
==============================================================================================================
GET = https://ecom.coderorbit.com/api/admin/{{app_token}}/category?page=1
==============================================================================================================
GET = https://ecom.coderorbit.com/api/admin/{{app_token}}/category?data=all&limit_per_page=1&name=admin&page=1
==============================================================================================================

Single Category Show

To get specific data use GET Method

https://ecom.coderorbit.com/api/admin/{{app_token}}/category/{{id}}
headers:{ 
    "Accept": "application/json"    
    "Authorization" : `Bearer ${token}`
}

Edit Category

To get specific data use GET Method

https://ecom.coderorbit.com/api/admin/{{app_token}}/category/{{id}}/edit
headers:{ 
    "Accept": "application/json"    
    "Authorization" : `Bearer ${token}`
}

Result

{
  "data": {
    "id": 1,
    "unique_id": "sLJvIENyg100Pxk",
    "parent_id": null,
    "name": "Test Category",
    "slug": "test_category",
    "banner": "",
    "icon": "",
    "thumbnails": "",
    "commission": 10,
    "commission_type": "fixed",
    "status": 1,
    "description": "this is description",
    "extend_props": {
      "'test'": "theis extend props 02"
    },
    "created_by": {
      "id": 1,
      "role_id": 1,
      "country_id": 18,
      "name": "Admin",
      "email": "admin@gmail.com",
      "extend_props": {
        "address": null,
        "city_id": 1,
        "thana_id": 494
      },
      "email_verified_at": null,
      "created_at": "2023-09-17T02:19:46.000000Z",
      "updated_at": "2025-01-07T20:41:12.000000Z",
      "unique_id": "8660998812",
      "otp": 874613,
      "status": 1,
      "description": null,
      "created_by": 0,
      "updated_by": 0,
      "deleted_at": null
    },
    "updated_by": {
      "id": 1,
      "role_id": 1,
      "country_id": 18,
      "name": "Admin",
      "email": "admin@gmail.com",
      "extend_props": {
        "address": null,
        "city_id": 1,
        "thana_id": 494
      },
      "email_verified_at": null,
      "created_at": "2023-09-17T02:19:46.000000Z",
      "updated_at": "2025-01-07T20:41:12.000000Z",
      "unique_id": "8660998812",
      "otp": 874613,
      "status": 1,
      "description": null,
      "created_by": 0,
      "updated_by": 0,
      "deleted_at": null
    },
    "created_at": "2023-03-17T04:25:43.000000Z",
    "updated_at": "2023-03-17T04:25:43.000000Z"
  }
}

Update Category

Method allow for category update PUT/PATCH/POST

https://ecom.coderorbit.com/api/admin/{{app_token}}/category/{{id}}
 
headers:{ 
    "Accept": "application/json"    
    "Authorization" : `Bearer ${token}`
}
body:{
    "parent_id": "",
    "name": "test category update",
    "banner": "", // file or base64
    "icon" : "", // file or base64
    "thumbnails" : "", // file or base64
    "commission": 0,
    "commission_type": "", //fixed | parcentage ,
    "status": 1, // 0 | 1,
    "description": "",
    "extend_props": {
      "test": "theis extend props",
      "test2": "theis extend props 02",
      ".....": "....."
    },
    
}

Result

{
  "data": {
    "id": 1,
    "unique_id": "sLJvIENyg100Pxk",
    "parent_id": null,
    "name": "test category update",
    "slug": "test_category_update",
    "banner": "",
    "icon": "",
    "thumbnails": "",
    "commission": 10,
    "commission_type": "fixed",
    "status": 1,
    "description": "this is description",
    "extend_props": {
      "'test'": "theis extend props 02"
    },
    "created_by": {
      "id": 1,
      "role_id": 1,
      "country_id": 18,
      "name": "Admin",
      "email": "admin@gmail.com",
      "extend_props": {
        "address": null,
        "city_id": 1,
        "thana_id": 494
      },
      "email_verified_at": null,
      "created_at": "2023-09-17T02:19:46.000000Z",
      "updated_at": "2025-01-07T20:41:12.000000Z",
      "unique_id": "8660998812",
      "otp": 874613,
      "status": 1,
      "description": null,
      "created_by": 0,
      "updated_by": 0,
      "deleted_at": null
    },
    "updated_by": {
      "id": 1,
      "role_id": 1,
      "country_id": 18,
      "name": "Admin",
      "email": "admin@gmail.com",
      "extend_props": {
        "address": null,
        "city_id": 1,
        "thana_id": 494
      },
      "email_verified_at": null,
      "created_at": "2023-09-17T02:19:46.000000Z",
      "updated_at": "2025-01-07T20:41:12.000000Z",
      "unique_id": "8660998812",
      "otp": 874613,
      "status": 1,
      "description": null,
      "created_by": 0,
      "updated_by": 0,
      "deleted_at": null
    },
    "created_at": "2023-03-17T04:25:43.000000Z",
    "updated_at": "2023-03-17T04:25:43.000000Z"
  }
}

DELETE

Method allow for category delete DELETE

https://ecom.coderorbit.com/api/admin/{{app_token}}/category/{{id}}
 
headers:{ 
    "Accept": "application/json"    
    "Authorization" : `Bearer ${token}`
}

Result

Success

CODER ORBIT
Bangladesh Office:
Call: 01534-645492
11/C, House-01, Lane-10
Road-11, Dhaka 1216
Email: support@coderorbit.com
Others
Domain & Hosting
Course
Debug
Portfolio
FOLLOW US
SUBSCRIBE US
Subscribe
2018 - 2025 Copyright © Coder Orbit. All rights reserved.