Product List
Get all Product list by GET Method with filter function customized option for you. below list of route with parameter
Here is the endpoint only show the product without relationship data if you want to get relative data please check this below.
https://ecom.coderorbit.com/public/api/products
headers:{
"Accept": "application/json",
"App-Master-Key": `${app_token}`
}
### Result
{
"current_page": 1,
"data": [
{
"id": 3,
"unique_id": "bd8C45f3BSm8XAa",
"category": ["1","2","3","4"],
"brand_id": 1,
"vendor_id": 2,
"country_id": 1,
"district_id": 1,
"police_station_id": 1,
"name": "",
"slug": "",
"sequence": 0,
"icon": null,
"thumbnails": null,
"banner": null,
"description": "",
"status": 1,
"attributes": null,
"regular_price": 50,
"current_price": 40,
"dicount": 10,
"dicount_type": "fixed",
"stock": 20,
"unit": "pcs",
"minimum_order": null,
"start_offer": "",
"end_offer": "",
"extend_props": {
"test": "",
"test2": ""
},
"created_by": 1,
"updated_by": 1,
"created_at": "",
"updated_at": "",
"deleted_at": null,
"additional": {
"black": {
"color_icon": null,
"color_thumbnails": null,
"color_galleries": null,
"size": {
"s": {
"product_id": 5,
"color": "black",
"size": "s",
"regular_price": 200,
"current_price": 150,
"discount": 25,
"dicount_type": 0,
"stock": 0
},
"m": {
...
}
}
}
},
"props": [
{
"id": 1,
"product_id": 3,
"field_name": "",
"value": "",
"created_at": null,
"updated_at": null
},
{
...
}
]
},
{
...
}
],
"first_page_url": "",
"from": 1,
"last_page": 4,
"last_page_url": "",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "",
"label": "1",
"active": true
},
{
"url": "",
"label": "2",
"active": false
},
{
"url": "",
"label": "3",
"active": false
},
{
"url": "",
"label": "4",
"active": false
},
{
"url": "",
"label": "Next »",
"active": false
}
],
"next_page_url": "",
"path": "",
"per_page": 15,
"prev_page_url": null,
"to": 15,
"total": 46
}
Product list with relative data
categories,,additional_media,additional,brand,vendor,country,district,police_station,referrals,feedbacks,bundles Get all Product list by GET Method with filter function customized option for you. below list of route with parameter
Here is the endpoint only show the product with relationship data if you want to get relative data please use this line. feedbacks, createdBy, updatedBy, bundles, additional_media, additional, brand, categories, vendor, country, district, police_station relative data will be comma separator $relative = "feedbacks,createdBy,updatedBy,bundles,additional_media,additional,brand,categories,vendor,country,district,police_station";
==================================================================================================
GET = https://ecom.coderorbit.com/public/api/products
==================================================================================================
GET = https://ecom.coderorbit.com/public/api/products?limit_per_page=1
==================================================================================================
GET = https://ecom.coderorbit.com/public/api/products?name=apple
==================================================================================================
GET = https://ecom.coderorbit.com/public/api/products?page=1
==================================================================================================
GET = https://ecom.coderorbit.com/public/api/products?data=all&limit_per_page=1&name=admin&page=1
==================================================================================================
headers:{
"Accept": "application/json",
"App-Master-Key": `${app_token}`
}
# Query Parameters
limit_per_page = 1 # Default 15
name = admin
page = 1 # number of page for pagination
data = all
body:{
# relative data will be comma separator use between list anyone or all as your need
"relative": "categories,createdBy,updatedBy,additional_media,additional,brand,vendor,country,district,police_station,referrals,feedbacks,bundles"
}
### Result
{
"id": 3,
"unique_id": "bd8C45f3BSm8XAa",
"category": ["1","2","3","4"],
"brand_id": 1,
"vendor_id": 1,
"country_id": 1,
"district_id": 1,
"police_station_id": 1,
"name": "this first add product from vs code",
"slug": "this_first_add_product_from_vs_code_bd8C45f3BSm8XAa",
"sequence": 0,
"icon": null,
"thumbnails": null,
"banner": null,
"description": "this first add product from vs code description",
"status": 1,
"regular_price": 50,
"current_price": 40,
"dicount": 10,
"dicount_type": "fixed",
"stock": 20,
"unit": "pcs",
"minimum_order": null,
"start_offer": "2023-02-19 12:55:51",
"end_offer": "2023-11-19 12:55:51",
"extend_props": {
"test": "test one",
"test2": "check"
},
"created_by": 1,
"updated_by": 1,
"created_at": "2023-05-10T21:19:54.000000Z",
"updated_at": "2023-05-10T21:19:54.000000Z",
"deleted_at": null,
"props": [
{
....
}
],
"feedbacks": [
{
....
}
],
"brand": {
....
},
"categories": [
{
....
}
],
"vendor": {
....
},
"country": {
....
},
"district": {
....
},
"police_station": {
....
},
"createdBy": {
....
},
"updatedBy": {
....
},
"bundles": {
....
},
"additional_media": {
....
},
"additional": {
....
}
}
Filter Option
Get all Product list by POST Method with filter function customized option for you. below list of route with parameter relative data will be comma separator use between list any one or all as your need
https://ecom.coderorbit.com/public/api/products
headers:{
"Accept": "application/json",
"App-Master-Key": {{app_token}}
}
body:{
# relative data will be comma separator use between list anyone or all as your need
"relative": "categories,createdBy,updatedBy,additional_media,additional,brand,vendor,country,district,police_station,referrals,feedbacks,bundles"
"regular_price": '50',
"current_price": '50',
"country_id":"",
"extendProps":{
"name": "value",
"name_one": "value_one",
},
"police_station_id":"",
"district_id":"",
"vendor_id":"",
"brand_id":"",
"name":"",
"status":"",
"dicount_type ":"",// Fixed|Parcentage
"stock":"",
"unit":"",
"minimum_order":"",
"start_offer":"", // only Date
"end_offer":"", // Only Date
"range_start_from_offer":"", // Only Date
"range_start_to_offer":"", // Only Date
"range_end_from_offer":"", // Only Date
"range_end_to_offer":"", // Only Date
"category":"", // array
"regular_price_range":"", // 0,100
"current_price_range":"", // 0,100
# or query function
"or_regular_price":'50',
"or_current_price":'50'
"or_country_id":"",
"or_extendProps":{
"name": "value",
"name_one": "value_one",
},
"or_police_station_id":"",
"or_district_id":"",
"or_vendor_id":"",
"or_brand_id":"",
"or_name":"",
"or_status":"",
"or_dicount_type":"", // Fixed|Parcentage
"or_stock":"",
"or_unit":"",
"or_minimum_order":"",
"or_start_offer":"", // only Date
"or_end_offer":"", // Only Date
"or_range_start_from_offer":"", // Only Date
"or_range_start_to_offer":"", // Only Date
"or_range_end_from_offer":"", // Only Date
"or_range_end_to_offer":"", // Only Date
"or_category":"", // array
"or_regular_price_range":"", // 0,100
"or_current_price_range":"", // 0,100
}
### Result
{
"id": 3,
"unique_id": "bd8C45f3BSm8XAa",
"category": ["1","2","3","4"],
"brand_id": 1,
"vendor_id": 1,
"country_id": 1,
"district_id": 1,
"police_station_id": 1,
"name": "this first add product from vs code",
"slug": "this_first_add_product_from_vs_code_bd8C45f3BSm8XAa",
"sequence": 0,
"icon": null,
"thumbnails": null,
"banner": null,
"description": "this first add product from vs code description",
"status": 1,
"regular_price": 50,
"current_price": 40,
"dicount": 10,
"dicount_type": "fixed",
"stock": 20,
"unit": "pcs",
"minimum_order": null,
"start_offer": "2023-02-19 12:55:51",
"end_offer": "2023-11-19 12:55:51",
"extend_props": {
"test": "test one",
"test2": "check"
},
"created_by": 1,
"updated_by": 1,
"created_at": "2023-05-10T21:19:54.000000Z",
"updated_at": "2023-05-10T21:19:54.000000Z",
"deleted_at": null,
"props": [
{
....
}
]
}
Product details
Get all product details GET Method with filter function customized option for you. below list of route with parameter
Here is the endpoint only show the product with relationship data if you want to get relative data please use this line. feedbacks, brand, categories, vendor, country, district, police_station relative data will be comma separator $relative = "feedbacks,brand,categories,vendor,country,district,police_station";
https://ecom.coderorbit.com/public/api/product/{productId}
headers:{
"Accept": "application/json",
"App-Master-Key": {{app_token}}
}
body: {
# relative data will be comma separator use between list anyone or all as your need
"relative": "categories,createdBy,updatedBy,additional_media,additional,brand,vendor,country,district,police_station,referrals,feedbacks,bundles"
}
### Result
{
"id": 3,
"unique_id": "bd8C45f3BSm8XAa",
"category": ["1","2","3","4"],
"brand_id": 1,
"vendor_id": 2,
"country_id": 1,
"district_id": 1,
"police_station_id": 1,
"name": "test2",
"slug": "",
"sequence": 0,
"icon": null,
"thumbnails": null,
"banner": null,
"description": "",
"status": 1,
"regular_price": 50,
"current_price": 40,
"dicount": 10,
"dicount_type": "fixed",
"stock": 20,
"unit": "pcs",
"minimum_order": null,
"start_offer": "",
"end_offer": "",
"extend_props": {
"test": "test one",
"test2": "check"
},
"created_by": 1,
"updated_by": 1,
"created_at": "",
"updated_at": "",
"deleted_at": null,
"props": [
{
"id": 1,
"product_id": 3,
"field_name": "test",
"value": "test one",
"created_at": null,
"updated_at": null
},
{
...
}
]
}
// or
{
"id": 3,
"unique_id": "bd8C45f3BSm8XAa",
"category": ["1","2","3","4"],
"brand_id": 1,
"vendor_id": 1,
"country_id": 1,
"district_id": 1,
"police_station_id": 1,
"name": "",
"slug": "",
"sequence": 0,
"icon": null,
"thumbnails": null,
"banner": null,
"description": "",
"status": 1,
"regular_price": 50,
"current_price": 40,
"dicount": 10,
"dicount_type": "fixed",
"stock": 20,
"unit": "pcs",
"minimum_order": null,
"start_offer": "",
"end_offer": "",
"extend_props": {
"test": "test one",
"test2": "check"
},
"created_by": 1,
"updated_by": 1,
"created_at": "",
"updated_at": "",
"deleted_at": null,
"props": [
{
....
}
],
"feedbacks": [
{
....
}
],
"brand": {
....
},
"categories": [
{
....
}
],
"vendor": {
....
},
"country": {
....
},
"district": {
....
},
"police_station": {
....
},
"createdBy": {
....
},
"updatedBy": {
....
},
"bundles": {
....
},
"additional_media": {
....
},
"additional": {
....
}
}