Number of APIs: 3
GET {{baseUrl}}/products
Service urls: You can combine filter parameters, you only need to use the long version of API urls.
http://yourdomain.com/api/rest/products
OR
http://yourdomain.com/index.php?route=feed/rest_api/productsSearch products with opencart rest api
Example urls:
http://yourdomain.com/index.php?route=feed/restapi/products&simple=1&customfields=id,name&search=ipod
http://yourdomain.com/index.php?route=feed/restapi/products&sort=price&order=asc
http://yourdomain.com/index.php?route=feed/rest_api/products&sort=price&order=desc
POST {{baseUrl}}/products/custom_search/limit/:limit/page/:page
Search products, build your custom query.
3.
Get list of products by page and limit
GET
{{baseUrl}}/products/limit/:limit/page/:page
Service urls: ENDPOINTS
Service urls:
http://yourdomain.com/api/rest/products/custom_search/limit/{limit}/page/{page}
OR
http://yourdomain.com/index.php?route=feed/rest_api/search&limit={limit}&page={page}Supported fields
Field category quantity stockstatus manufacturer model upc name datestart dateend productid price filtertext Comparison Operators
Operator Description Example = Checks if the valuesof two operands are equal or not, if yes then condition becomes true. (a = b) is not true. != Checks if the values of two operands are equal ornot, if values are not equal then condition becomes true. (a != b) is true. <> Checks if the values of two operands are equal or not, if valuesare not equal then condition becomes true. (a <> b) is true. > Checks if the value of left operand is greater than the value of rightoperand, if yes then condition becomes true. (a > b) is not true. < Checks if the value of left operand is less than the value of rightoperand, if yes then condition becomes true. (a < b) is true. >= Checks if the value of left operand is greater than or equal to the valueof right operand, if yes then condition becomes true. (a >= b) is not true. <= Checks if the value of left operand is less than or equaltothe value of right operand, if yes then condition becomes true. (a <= b) is true. !< Checks if the value of left operand is not lessthanthe value of right operand, if yes then condition becomes true. (a !< b) is false. !> Checks if the value of left operand is notgreaterthan the value of right operand, if yes then condition becomes true. (a !> b) is true. IN The IN operator is used to compare a value to alist of literal values that have been specified. LIKE The LIKE operator is used to compare a value to similar values using wildcard operators. Logical Operators
Operator Description AND The AND operator allows the existence of multiple conditionsinan SQL statement's WHERE clause. OR The OR operator is used to combine multiple conditions in an SQL statement's WHERE clause. Supported sort fields
Field name model quantity price rating sortorder dateadded Supported order types
Type DESC ASC Example usage
{
sort
:quantity
,
order
:asc
,
filters
:[
{
field
:price
,
operand
:>=
,
value
:10
},
{
field
:manufacturer
,
operand
:in
,
"logicaloperand:
and,
value
:[
field
1,
2,
3
]
},
{
:
name,
operand
:
like,
value
:
apple"
}
]
}
http://yourdomain.com/api/rest/products/limit/{limit}/page/{page}
OR
htt