Visibility Fields
Visibility Fields
These fields control whether products and other documents appear in search results, category listings, and other views.
Overview
| Field | Type | Effect | Applied When |
|---|---|---|---|
active | boolean | Hidden if false | Always |
hidden | boolean | Hidden if true | Always |
hideOnLists | boolean | Hidden from lists if true | Category/list requests |
searchable | boolean | Hidden from search if false | Search requests only |
onstock | boolean | Hidden if false | When USE_STOCK enabled |
Field Details
active
The primary visibility flag. Products with active: false are completely invisible in all contexts.
{
"id": "product-123",
"active": true
}Use case: Disable products that are discontinued or not yet ready for sale.
hidden
Manual override to hide a product from all results, regardless of other settings.
{
"id": "product-123",
"hidden": true
}Use case: Temporarily hide a product without deactivating it (e.g., during a price update).
hideOnLists
Hides products from category pages and listing views, but they remain findable via search.
{
"id": "product-123",
"hideOnLists": true
}Use case: Products that should only be found through direct search (e.g., spare parts, accessories).
searchable
Controls visibility in search results only. Products with searchable: false won't appear in search but will appear in category listings.
{
"id": "product-123",
"searchable": false
}Use case: Products that should be browsable but not searchable (e.g., gift cards in certain categories).
onstock
Stock availability filter. Only applied when the USE_STOCK constraint is enabled in the API request.
{
"id": "product-123",
"onstock": true
}Use case: Hide out-of-stock products from results.
Visibility Logic Flow
Is active = true?
└── No → HIDDEN
└── Yes → Is hidden = true?
└── Yes → HIDDEN
└── No → Is this a list/category request?
└── Yes → Is hideOnLists = true?
└── Yes → HIDDEN
└── No → VISIBLE
└── No (Search) → Is searchable = false?
└── Yes → HIDDEN
└── No → VISIBLE
Stock Visibility
The onstock filter is only applied when:
USE_STOCKconstraint is enabled in the API requestEVERYTHINGconstraint is NOT enabled
When USE_STOCK is active, products with onstock: false are filtered out.
Constraint Override
When EVERYTHING constraint is enabled in the API request, all visibility filters are bypassed. This is useful for admin views or debugging.
Group-Specific Overrides
All visibility fields support group-specific overrides:
{
"id": "product-123",
"active": true,
"groups": {
"wholesale": {
"active": false
},
"retail": {
"active": true
}
}
}When a GROUP constraint is set, Makaira checks for group-specific values first.
See B2B / Customer Groups for more details.
Updated about 14 hours ago
