Ecommerce
Brand

Create

You can add unlimited brands by brand create route, brand route allow only POST Method

https://ecom.coderorbit.com/public/api/admin/{{app_token}}/brand
 
headers:{ 
    "Accept": "application/json"    
    "Authorization" : `Bearer ${token}`
}
 
body:{
    "parent_id": "",
    "name": "test brand",
    "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",
      ".....": "....."
    }
    
}

### OUTPUT

{
  "0": "Success",
  "store_data": {
    "unique_id": "Q5WpoWDoZ1zKxkF",
    "parent_id": null,
    "name": "test brand",
    "slug": "test_brand",
    "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": 1,
    "updated_by": 1,
    "updated_at": "2023-03-17T04:31:53.000000Z",
    "created_at": "2023-03-17T04:31:53.000000Z",
    "id": 5
  }
}

List

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

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

### OUTPUT

"data" : [
    {
      "id": 1,
      "unique_id": "sLJvIENyg100Pxk",
      "parent_id": null,
      "name": "Test brand",
      "slug": "Test_brand",
      "banner": "",
      "icon": "",
      "thumbnails": "",
      "commission": 10,
      "commission_type": "fixed",
      "status": 1,
      "description": "this is description",
      "extend_props": {
        "'test'": "theis extend props 02"
      },
      "created_by": 1,
      "updated_by": 1,
      "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

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

### OUTPUT

{
  "current_page": 1,
  "data": [
    {
      "id": 1,
      "unique_id": "sLJvIENyg100Pxk",
      "parent_id": null,
      "name": "Test brand",
      "slug": "Test_brand",
      "banner": "",
      "icon": "",
      "thumbnails": "",
      "commission": 10,
      "commission_type": "fixed",
      "status": 1,
      "description": "this is description",
      "extend_props": {
        "'test'": "theis extend props 02"
      },
      "created_by": 1,
      "updated_by": 1,
      "created_at": "2023-03-17T04:25:43.000000Z",
      "updated_at": "2023-03-17T04:25:43.000000Z",
      "props": []
    },
    .........
 
  ],
  "first_page_url": "",
  "from": 1,
  "last_page": 1,
  "last_page_url": "",
  "links": [
    {
      "url": null,
      "label": "« Previous",
      "active": false
    },
    {
      "url": "",
      "label": "1",
      "active": true
    },
    {
      "url": null,
      "label": "Next »",
      "active": false
    }
  ],
  "next_page_url": null,
  "path": "",
  "per_page": 15,
  "prev_page_url": null,
  "to": 6,
  "total": 6
}
 

=== 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/public/api/admin/{{app_token}}/brand
==============================================================================================================
GET = https://ecom.coderorbit.com/public/api/admin/{{app_token}}/brand?limit_per_page=1
==============================================================================================================
GET = https://ecom.coderorbit.com/public/api/admin/{{app_token}}/brand?name=apple
==============================================================================================================
GET = https://ecom.coderorbit.com/public/api/admin/{{app_token}}/brand?page=1
==============================================================================================================
GET = https://ecom.coderorbit.com/public/api/admin/{{app_token}}/brand?data=all&limit_per_page=1&name=admin&page=1
==============================================================================================================

Single Show

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

Edit

https://ecom.coderorbit.com/public/api/admin/{{app_token}}/category/{{id}}/edit
headers:{ 
    "Accept": "application/json"    
    "Authorization" : `Bearer ${token}`
}
{
  "data": {
    "id": 1,
    "unique_id": "sLJvIENyg100Pxk",
    "parent_id": null,
    "name": "Test brand",
    "slug": "Test_brand",
    "banner": "",
    "icon": "",
    "thumbnails": "",
    "commission": 10,
    "commission_type": "fixed",
    "status": 1,
    "description": "this is description",
    "extend_props": {
      "'test'": "theis extend props 02"
    },
    "created_by": 1,
    "updated_by": 1,
    "created_at": "2023-03-17T04:25:43.000000Z",
    "updated_at": "2023-03-17T04:25:43.000000Z"
  }
}

Update

Method allow for update PUT/PATCH/POST

https://ecom.coderorbit.com/public/api/admin/{{app_token}}/brand/{{id}}
 
headers:{ 
    "Accept": "application/json"    
    "Authorization" : `Bearer ${token}`
}
 
body:{
    parent_id,
    name,
    banner, // file
    icon, // file
    thumbnails, // file
    commission,
    commission_type,
    status,
    description,
    extend_props['test'],
    extend_props['test2'],
    .....
}

### OUTPUT

body:{
    "parent_id": "",
    "name": "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",
      ".....": "....."
    },
    
}

DELETE

Method allow for delete DELETE

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

### OUTPUT

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 - 2024 Copyright © Coder Orbit. All rights reserved.