Pre-launch API. The concepts described here are settled, but the API shape is not: request and response fields, parameters and defaults can still change. Build against it, and talk to your Luigi's Box contact before you put an integration into production.
const url = 'https://api.eu1.luigisbox.ai/discovery/v1/facets?channel_id=example&guid=example&facet_fields=example&debug=false';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.eu1.luigisbox.ai/discovery/v1/facets?channel_id=example&guid=example&facet_fields=example&debug=false' \ --header 'Authorization: Bearer <token>'Compute facets for a previously executed search or listing.
Rate limited: a 429 carries Retry-After.
Facets are computed over the result set identified by guid: per-field
values for a keyword field, min/max bounds for a numeric one.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Channel identifier (serving destination).
Channel identifier (serving destination).
GUID from a prior /search or /listing response to facet on.
GUID from a prior /search or /listing response to facet on.
Comma-separated facet fields. Each entry is a plain field name or ‘name^count’ where count limits the number of returned keyword facet values (positive integer). Use ’^’ for namespaced fields, e.g. ‘lbx:price^30’. The ‘name:count’ form is also accepted.
Comma-separated facet fields. Each entry is a plain field name or ‘name^count’ where count limits the number of returned keyword facet values (positive integer). Use ’^’ for namespaced fields, e.g. ‘lbx:price^30’. The ‘name:count’ form is also accepted.
Open branches to expand in hierarchical facets. Each value is ’
Open branches to expand in hierarchical facets. Each value is ’
Requested child-level expansion for hierarchical facets. Each value is ’
Requested child-level expansion for hierarchical facets. Each value is ’
Request ranking diagnostics. Honoured only on the first page for callers holding discovery:debug; silently ignored otherwise.
Request ranking diagnostics. Honoured only on the first page for callers holding discovery:debug; silently ignored otherwise.
Responses
Section titled “ Responses ”Successful Response
Response of the facets endpoint.
object
Per-field facet aggregation results. Values, bounds and counts cover only the objects this channel can serve.
object
Terms facet — distinct values for a categorical field.
object
The faceted field name.
Range facet — min/max bounds for a numeric field.
object
The faceted field name.
Maximum value in the result set.
Minimum value in the result set.
Hierarchy facet — a tree of nodes for a hierarchical field.
object
The faceted field name.
A single node of a hierarchy facet tree.
object
Whether the node has expandable descendants.
Display title of the node’s own identity.
Fully expanded node path (segments joined by ’ > ’).
GUID identifying this result set.
Example
{ "facets": { "additionalProperty": { "type": "terms" } }}Malformed request
Canonical error body — every non-2xx response uses this shape.
object
Machine-readable error context; empty object when there is nothing to add.
object
One field-level reason a request was rejected.
object
Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].
What is wrong with the value at loc.
Stable machine code for the problem, e.g. missing or string_too_short.
Human-readable, actionable error message.
Example generated
{ "exception_details": { "validation_errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ] }, "reason": "example", "request_id": "example"}Missing or invalid credentials
Canonical error body — every non-2xx response uses this shape.
object
Machine-readable error context; empty object when there is nothing to add.
object
One field-level reason a request was rejected.
object
Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].
What is wrong with the value at loc.
Stable machine code for the problem, e.g. missing or string_too_short.
Human-readable, actionable error message.
Example generated
{ "exception_details": { "validation_errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ] }, "reason": "example", "request_id": "example"}Authenticated but not permitted
Canonical error body — every non-2xx response uses this shape.
object
Machine-readable error context; empty object when there is nothing to add.
object
One field-level reason a request was rejected.
object
Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].
What is wrong with the value at loc.
Stable machine code for the problem, e.g. missing or string_too_short.
Human-readable, actionable error message.
Example generated
{ "exception_details": { "validation_errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ] }, "reason": "example", "request_id": "example"}Resource not found
Canonical error body — every non-2xx response uses this shape.
object
Machine-readable error context; empty object when there is nothing to add.
object
One field-level reason a request was rejected.
object
Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].
What is wrong with the value at loc.
Stable machine code for the problem, e.g. missing or string_too_short.
Human-readable, actionable error message.
Example generated
{ "exception_details": { "validation_errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ] }, "reason": "example", "request_id": "example"}Request validation failed
Canonical error body — every non-2xx response uses this shape.
object
Machine-readable error context; empty object when there is nothing to add.
object
One field-level reason a request was rejected.
object
Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].
What is wrong with the value at loc.
Stable machine code for the problem, e.g. missing or string_too_short.
Human-readable, actionable error message.
Example generated
{ "exception_details": { "validation_errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ] }, "reason": "example", "request_id": "example"}Rate limit exceeded
Canonical error body — every non-2xx response uses this shape.
object
Machine-readable error context; empty object when there is nothing to add.
object
One field-level reason a request was rejected.
object
Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].
What is wrong with the value at loc.
Stable machine code for the problem, e.g. missing or string_too_short.
Human-readable, actionable error message.
Example generated
{ "exception_details": { "validation_errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ] }, "reason": "example", "request_id": "example"}Upstream service failed
Canonical error body — every non-2xx response uses this shape.
object
Machine-readable error context; empty object when there is nothing to add.
object
One field-level reason a request was rejected.
object
Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].
What is wrong with the value at loc.
Stable machine code for the problem, e.g. missing or string_too_short.
Human-readable, actionable error message.
Example generated
{ "exception_details": { "validation_errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ] }, "reason": "example", "request_id": "example"}Was this page helpful?
Thanks.