Skip to main content
GET
/
api
/
search
/
inventory-items
Search inventory items
curl --request GET \
  --url https://app.solya.app/api/search/inventory-items \
  --header 'Authorization: Bearer <token>'
[
  {
    "code": "CODE-001",
    "id": "item-uuid-1",
    "name": "Air Max 90 / Black / 40",
    "productId": "product-uuid-airmax90",
    "score": 2,
    "sizeId": "size-uuid-40",
    "sku": "AM90-BLK-40",
    "variantId": "variant-uuid-black"
  },
  {
    "code": "CODE-002",
    "id": "item-uuid-2",
    "name": "Air Max 90 / Black / 41",
    "productId": "product-uuid-airmax90",
    "score": 1.5,
    "sizeId": "size-uuid-41",
    "sku": "AM90-BLK-41",
    "variantId": "variant-uuid-black"
  }
]

Authorizations

Authorization
string
header
required

User session token issued by NextAuth. For human users accessing Solya via the web application.

Query Parameters

q
string

Canonical text-filter param (preferred). Partial text to filter results by name (case-insensitive prefix/substring match). Use q instead of the deprecated search alias — q matches the param name advertised in MCP tool examples and used on /api/products.

Deprecated: use q instead. Backwards-compatible alias — when both q and search are supplied, q takes precedence.

limit
number
default:10

Maximum number of results to return (1–100)

Required range: 1 <= x <= 100
ids
string

Comma-separated list of IDs to resolve by exact match

variantId
string

Filter results to inventory items of this variant UUID (narrows to a single colour — returns all sizes for that variant)

productId
string

Filter results to inventory items whose parent product matches this UUID (sourced via JOIN to silver.product_variants)

Response

Successful response

data
object[]
required
success
enum<boolean>
required
Available options:
true