Ecommerce
Vendor

Create

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

https://ecom.coderorbit.com/public/api/admin/{{app_token}}/vendor
 
headers:{ 
    "Accept": "application/json"    
    "Authorization" : `Bearer ${token}`
}
 
body:{
  "name": "Test Vendor",
  "banner": "",
  "icon": "",
  "status": 1,
  "description": "Vendor description",
  "extend_props": {
    "shop_name": "Vendor Shop",
    "shop_address": "shop Address",
    "shop_contact": "contact",
    .....
  }
    
}

### OUTPUT

{
  "0": "Success",
  "store_data": {
    "id": 2,
    "unique_id": "0SzOZGI7dqhj7tv",
    "name": "Test Vendor",
    "slug": "Test_Vendor_0SzOZGI7dqhj7tv",
    "icon": null,
    "thumbnails": null,
    "banner": null,
    "description": "Vendor description",
    "status": 1,
    "extend_props": {
      "shop_name": "Vendor Shop",
      "shop_address": "shop Address",
      "shop_contact": "contact"
    },
    "created_by": 14,
    "updated_by": 14,
    "created_at": "2023-07-02T07:43:17.000000Z",
    "updated_at": "2023-07-02T07:43:17.000000Z"
  }
}

List

Get all vendor 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}}/vendor
headers:{ 
    "Accept": "application/json"    
    "Authorization" : `Bearer ${token}`
}

### OUTPUT

{
  "current_page": 1,
  "data": [
    {
      "id": 1,
      "unique_id": "0SzOZGI7dqhj7tv",
      "name": "Test Vendor",
      "slug": "Test_Vendor_0SzOZGI7dqhj7tv",
      "icon": null,
      "thumbnails": null,
      "banner": "",
      "description": null,
      "status": null,
      "extend_props": null,
      "created_by": 1,
      "updated_by": 1,
      "created_at": "2023-05-08T20:37:30.000000Z",
      "updated_at": "2023-05-08T20:42:07.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": 2,
  "total": 2
}

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}}/vendor?limit_per_page=1
 
headers:{ 
    "Accept": "application/json"    
    "Authorization" : `Bearer ${token}`
}

### Result

{
  "current_page": 1,
  "data": [
    {
      "id": 1,
      "unique_id": "0SzOZGI7dqhj7tv",
      "name": "Test Vendor",
      "slug": "Test_Vendor_0SzOZGI7dqhj7tv",
      "icon": null,
      "thumbnails": null,
      "banner": "",
      "description": null,
      "status": null,
      "extend_props": null,
      "created_by": 1,
      "updated_by": 1,
      "created_at": "2023-05-08T20:37:30.000000Z",
      "updated_at": "2023-05-08T20:42:07.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}}/vendor
==============================================================================================================
GET = https://ecom.coderorbit.com/public/api/admin/{{app_token}}/vendor?limit_per_page=1
==============================================================================================================
GET = https://ecom.coderorbit.com/public/api/admin/{{app_token}}/vendor?name=apple
==============================================================================================================
GET = https://ecom.coderorbit.com/public/api/admin/{{app_token}}/vendor?page=1
==============================================================================================================
GET = https://ecom.coderorbit.com/public/api/admin/{{app_token}}/vendor?data=all&limit_per_page=1&name=admin&page=1
==============================================================================================================

Single Show

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

Edit

https://ecom.coderorbit.com/public/api/admin/{{app_token}}/vendor/{{id}}/edit
headers:{ 
    "Accept": "application/json"    
    "Authorization" : `Bearer ${token}`
}
{
  "data": {
      "id": 2,
      "unique_id": "0SzOZGI7dqhj7tv",
      "name": "Test Vendor",
      "slug": "Test_Vendor_0SzOZGI7dqhj7tv",
      "icon": null,
      "thumbnails": null,
      "banner": null,
      "description": "Vendor description",
      "status": 1,
      "extend_props": {
        "shop_name": "shop 1",
        "shop_address": "shop address",
        "shop_contact": ""
      },
      "created_by": 14,
      "updated_by": 14,
      "created_at": "2023-07-02T07:43:17.000000Z",
      "updated_at": "2023-07-02T07:43:17.000000Z",
      "props": [
        {
          "id": 1,
          "vendor_id": 2,
          "field_name": "shop 1",
          "value": "shop address 1",
          "created_at": null,
          "updated_at": null
        },
        {
            ....
        }
      ]
    }
}

Update

Method allow for update PUT/PATCH/POST

https://ecom.coderorbit.com/public/api/admin/{{app_token}}/vendor/{{id}}
 
headers:{ 
    "Accept": "application/json"    
    "Authorization" : `Bearer ${token}`
}
 
body:{
 
  "name": "test vendor",
  "banner": "",
  "icon": "",
  "status": 1,
  "description": "Vendor description",
  "extend_props": {
    "shop_name": "shop name update",
    "shop_address": "update address",
    "shop_contact": "01 xx xxxx",
    .....
  }
    
}

### OUTPUT

{
  "0": "Success",
  "store_data": {
    "id": 2,
    "unique_id": "0SzOZGI7dqhj7tv",
    "name": "test vendor",
    "slug": "test_vendor_0SzOZGI7dqhj7tv",
    "icon": null,
    "thumbnails": null,
    "banner": null,
    "description": "Vendor description",
    "status": 1,
    "extend_props": {
        "shop_name": "shop name update",
        "shop_address": "update address",
        "shop_contact": "01 xx xxxx",
    },
    "created_by": 14,
    "updated_by": 14,
    "created_at": "2023-07-02T07:43:17.000000Z",
    "updated_at": "2023-07-02T07:43:17.000000Z"
  }
}

DELETE

Method allow for delete DELETE

https://ecom.coderorbit.com/public/api/admin/{{app_token}}/vendor/{{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.