Skip to main content
GET
/
foods
/
search
Search foods
curl --request GET \
  --url https://api.salesive.com/api/v1/foods/search \
  --header 'Authorization: Bearer <token>'
{
  "status": 200,
  "success": true,
  "message": "Search foods",
  "data": {
    "foods": [
      {
        "_id": "66a2a1c4e1b3a40012cd1001",
        "name": "Margherita Pizza",
        "price": 12.5,
        "images": [
          "https://cdn.salesive.com/f/margherita.jpg"
        ],
        "category": {
          "_id": "66a2a0aae1b3a40012cd0001",
          "name": "Pizzas",
          "slug": "pizzas"
        },
        "available": true,
        "listed": true
      }
    ]
  }
}
Full-text searches the store’s foods by name, description and category, returning up to 30 matches with category populated. The query parameter is required; omitting it returns 400. Requires the READ_INVENTORY scope.

Authorizations

Authorization
string
header
required

Installed-app access token (prefix app_), issued by the OAuth install flow. The store is bound to the token server-side — never send a shop id.

Query Parameters

query
string
required

Full-text search term matched against food name, description and category. Required.

Response

Search foods — success.

status
integer
required
Example:

200

success
boolean
required
Example:

true

message
string
required
Example:

"Search foods"

data
object
required
Example:
{
"foods": [
{
"_id": "66a2a1c4e1b3a40012cd1001",
"name": "Margherita Pizza",
"price": 12.5,
"images": ["https://cdn.salesive.com/f/margherita.jpg"],
"category": {
"_id": "66a2a0aae1b3a40012cd0001",
"name": "Pizzas",
"slug": "pizzas"
},
"available": true,
"listed": true
}
]
}