Logo
maya API Documentation

Search products

POST {{baseUrl}}/products/custom_search/limit/:limit/page/:page

Search products, build your custom query.
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

OperatorDescriptionExample
= 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.
INThe IN operator is used to compare a value to alist of literal values that have been specified.
LIKEThe LIKE operator is used to compare a value to similar values using wildcard operators.

Logical Operators

OperatorDescription
ANDThe AND operator allows the existence of multiple conditionsinan SQL statement's WHERE clause.
ORThe 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
DESCASC

Example usage


{
sort:quantity,
order:asc,
filters:[
{
field:price,
operand:>=,
value:10
},
{
field:manufacturer,
operand:in,
"logicaloperand:and,
value:[
1,
2,
3
]
},
{
field:name,
operand:like,
value:apple"
}
]
}

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
Content-Type
string
Accept
string




Curl
curl -X POST 'https://api.opencart-api.com/api/rest/products/custom_search/limit/:limit/page/:page' -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{"fields":[{"field":"non officia ut pariatur","value":"nisi ex ipsum","operand":"velit eiusmod aliqua","logical_operand":"ut"},{"field":"dolore dolor laboris proident","value":"dolore","operand":"nulla adipisicing fugiat","logical_operand":"labore est tempor ullamco"}],"debug":"Excepteur consequat sit","order":"dolor mollit voluptate","sort":"aute ex"}'

ENDPOINTS