Skip to content

    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.

    Recommend catalog items

    View source
    Deprecated
    GET
    /discovery/v1/recommender
    curl --request GET \
    --url 'https://api.eu1.luigisbox.ai/discovery/v1/recommender?channel_id=example&surface_id=example&user_id=&personalize=false&filters=&size=10&mode=&debug=false&type=example' \
    --header 'Authorization: Bearer <token>' \
    --header 'referer: ' \
    --header 'user-agent: ' \
    --header 'x-lbx-visitor-id: example'

    Single-surface recommendation.

    Rate limited: a 429 carries Retry-After.

    channel_id
    required
    Channel Id

    Channel identifier (serving destination).

    string
    >= 1 characters

    Channel identifier (serving destination).

    surface_id
    required
    Surface Id

    Surface identifier, lbs_. The service segment must match the endpoint: lbs_search* on /search, lbs_collection_* on /collections, lbs_recommender_* on /recommender.

    string
    >= 1 characters

    Surface identifier, lbs_. The service segment must match the endpoint: lbs_search* on /search, lbs_collection_* on /collections, lbs_recommender_* on /recommender.

    user_id
    User Id

    Logged-in user identifier. Optional; omitted/blank values are treated as anonymous.

    string
    ""

    Logged-in user identifier. Optional; omitted/blank values are treated as anonymous.

    personalize
    Personalize

    Whether to apply personalization.

    boolean

    Whether to apply personalization.

    filters
    Filters

    Filter expression, for example ‘brand = nike AND lbx:price < 100’.

    string
    "" <= 4096 characters

    Filter expression, for example ‘brand = nike AND lbx:price < 100’.

    return_fields
    Return Fields

    Field projection list. Each entry is either '' (alone, all fields) or a field path, optionally ending in '' to take a whole subtree (e.g. ‘attributes.title’ or ‘attributes.’). '' cannot be combined with other names.

    Array<string>
    <= 100 items

    Field projection list. Each entry is either '' (alone, all fields) or a field path, optionally ending in '' to take a whole subtree (e.g. ‘attributes.title’ or ‘attributes.’). '' cannot be combined with other names.

    size
    Size

    Number of recommended items to return. Must be between 1 and 100.

    integer
    default: 10 >= 1 <= 100

    Number of recommended items to return. Must be between 1 and 100.

    mode
    Mode

    Special mode flag; ‘mock’ returns a canned response.

    string
    ""

    Special mode flag; ‘mock’ returns a canned response.

    debug
    Debug

    Request ranking diagnostics. Honoured only on the first page for callers holding discovery:debug; silently ignored otherwise.

    boolean

    Request ranking diagnostics. Honoured only on the first page for callers holding discovery:debug; silently ignored otherwise.

    type
    required
    Type

    Object type to retrieve (e.g. ‘product’, ‘category’, ‘article’).

    string
    >= 1 characters

    Object type to retrieve (e.g. ‘product’, ‘category’, ‘article’).

    anchor_ids
    Anchor Ids

    Item IDs used as the basis for the recommendation.

    Array<string>
    <= 50 items

    Item IDs used as the basis for the recommendation.

    dedup_options
    Dedup Options

    Deduplication options.

    Array<string>
    <= 20 items

    Deduplication options.

    x-lbx-visitor-id
    required
    X-Lbx-Visitor-Id

    Stable per-browser visitor identifier, generated client-side and persisted (e.g. a UUID in localStorage or a first-party cookie). Send it whether or not personalization is on: it is what links a request to a visitor’s history and to the analytics events reporting it. Keep it stable across page loads, sessions and token refreshes; never generate it server-side, or every visitor collapses into one.

    string
    >= 1 characters

    Stable per-browser visitor identifier, generated client-side and persisted (e.g. a UUID in localStorage or a first-party cookie). Send it whether or not personalization is on: it is what links a request to a visitor’s history and to the analytics events reporting it. Keep it stable across page loads, sessions and token refreshes; never generate it server-side, or every visitor collapses into one.

    user-agent
    User-Agent

    Originating client’s User-Agent. Optional; used to derive the platform (ios, android, web) the result set is attributed to. A backend caller should forward the end user’s value rather than its own.

    string
    ""

    Originating client’s User-Agent. Optional; used to derive the platform (ios, android, web) the result set is attributed to. A backend caller should forward the end user’s value rather than its own.

    referer
    Referer

    Originating page URL. Optional; lets the result set be attributed to the page it was served on.

    string
    ""

    Originating page URL. Optional; lets the result set be attributed to the page it was served on.

    Successful Response

    Media type application/json
    RecommenderResponse

    Response of the recommender endpoint.

    object
    debug
    Any of:
    object
    key
    additional properties
    any
    hits
    required
    Hits

    Ranked list of recommended result hits — only objects this channel can serve.

    Array<object>
    HitObject

    Single result item returned by discover endpoints.

    Flat structure — all catalog fields are top-level keys. @id and @type are always present; every other key is a catalog field.

    object
    @id
    required
    @Id

    Unique identity of the hit.

    string
    @type
    required
    @Type

    Type of the hit (e.g. ‘product’).

    string
    key
    additional properties
    any
    total
    required
    Total

    Number of matching results, counting only the objects this channel can serve.

    integer
    Example generated
    {
    "debug": {},
    "hits": [
    {
    "@id": "example",
    "@type": "example"
    }
    ],
    "total": 1
    }

    Malformed request

    Media type application/json
    ErrorResponse

    Canonical error body — every non-2xx response uses this shape.

    object
    exception_details
    ExceptionDetails

    Machine-readable error context; empty object when there is nothing to add.

    object
    validation_errors
    Any of:
    Array<object>
    ValidationProblem

    One field-level reason a request was rejected.

    object
    loc
    required
    Loc

    Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].

    Array
    msg
    required
    Msg

    What is wrong with the value at loc.

    string
    type
    required
    Type

    Stable machine code for the problem, e.g. missing or string_too_short.

    string
    key
    additional properties
    any
    reason
    required
    Reason

    Human-readable, actionable error message.

    string
    request_id
    Any of:
    string
    Example generated
    {
    "exception_details": {
    "validation_errors": [
    {
    "loc": [
    "example"
    ],
    "msg": "example",
    "type": "example"
    }
    ]
    },
    "reason": "example",
    "request_id": "example"
    }

    Missing or invalid credentials

    Media type application/json
    ErrorResponse

    Canonical error body — every non-2xx response uses this shape.

    object
    exception_details
    ExceptionDetails

    Machine-readable error context; empty object when there is nothing to add.

    object
    validation_errors
    Any of:
    Array<object>
    ValidationProblem

    One field-level reason a request was rejected.

    object
    loc
    required
    Loc

    Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].

    Array
    msg
    required
    Msg

    What is wrong with the value at loc.

    string
    type
    required
    Type

    Stable machine code for the problem, e.g. missing or string_too_short.

    string
    key
    additional properties
    any
    reason
    required
    Reason

    Human-readable, actionable error message.

    string
    request_id
    Any of:
    string
    Example generated
    {
    "exception_details": {
    "validation_errors": [
    {
    "loc": [
    "example"
    ],
    "msg": "example",
    "type": "example"
    }
    ]
    },
    "reason": "example",
    "request_id": "example"
    }

    Authenticated but not permitted

    Media type application/json
    ErrorResponse

    Canonical error body — every non-2xx response uses this shape.

    object
    exception_details
    ExceptionDetails

    Machine-readable error context; empty object when there is nothing to add.

    object
    validation_errors
    Any of:
    Array<object>
    ValidationProblem

    One field-level reason a request was rejected.

    object
    loc
    required
    Loc

    Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].

    Array
    msg
    required
    Msg

    What is wrong with the value at loc.

    string
    type
    required
    Type

    Stable machine code for the problem, e.g. missing or string_too_short.

    string
    key
    additional properties
    any
    reason
    required
    Reason

    Human-readable, actionable error message.

    string
    request_id
    Any of:
    string
    Example generated
    {
    "exception_details": {
    "validation_errors": [
    {
    "loc": [
    "example"
    ],
    "msg": "example",
    "type": "example"
    }
    ]
    },
    "reason": "example",
    "request_id": "example"
    }

    Resource not found

    Media type application/json
    ErrorResponse

    Canonical error body — every non-2xx response uses this shape.

    object
    exception_details
    ExceptionDetails

    Machine-readable error context; empty object when there is nothing to add.

    object
    validation_errors
    Any of:
    Array<object>
    ValidationProblem

    One field-level reason a request was rejected.

    object
    loc
    required
    Loc

    Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].

    Array
    msg
    required
    Msg

    What is wrong with the value at loc.

    string
    type
    required
    Type

    Stable machine code for the problem, e.g. missing or string_too_short.

    string
    key
    additional properties
    any
    reason
    required
    Reason

    Human-readable, actionable error message.

    string
    request_id
    Any of:
    string
    Example generated
    {
    "exception_details": {
    "validation_errors": [
    {
    "loc": [
    "example"
    ],
    "msg": "example",
    "type": "example"
    }
    ]
    },
    "reason": "example",
    "request_id": "example"
    }

    Request validation failed

    Media type application/json
    ErrorResponse

    Canonical error body — every non-2xx response uses this shape.

    object
    exception_details
    ExceptionDetails

    Machine-readable error context; empty object when there is nothing to add.

    object
    validation_errors
    Any of:
    Array<object>
    ValidationProblem

    One field-level reason a request was rejected.

    object
    loc
    required
    Loc

    Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].

    Array
    msg
    required
    Msg

    What is wrong with the value at loc.

    string
    type
    required
    Type

    Stable machine code for the problem, e.g. missing or string_too_short.

    string
    key
    additional properties
    any
    reason
    required
    Reason

    Human-readable, actionable error message.

    string
    request_id
    Any of:
    string
    Example generated
    {
    "exception_details": {
    "validation_errors": [
    {
    "loc": [
    "example"
    ],
    "msg": "example",
    "type": "example"
    }
    ]
    },
    "reason": "example",
    "request_id": "example"
    }

    Rate limit exceeded

    Media type application/json
    ErrorResponse

    Canonical error body — every non-2xx response uses this shape.

    object
    exception_details
    ExceptionDetails

    Machine-readable error context; empty object when there is nothing to add.

    object
    validation_errors
    Any of:
    Array<object>
    ValidationProblem

    One field-level reason a request was rejected.

    object
    loc
    required
    Loc

    Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].

    Array
    msg
    required
    Msg

    What is wrong with the value at loc.

    string
    type
    required
    Type

    Stable machine code for the problem, e.g. missing or string_too_short.

    string
    key
    additional properties
    any
    reason
    required
    Reason

    Human-readable, actionable error message.

    string
    request_id
    Any of:
    string
    Example generated
    {
    "exception_details": {
    "validation_errors": [
    {
    "loc": [
    "example"
    ],
    "msg": "example",
    "type": "example"
    }
    ]
    },
    "reason": "example",
    "request_id": "example"
    }

    Upstream service failed

    Media type application/json
    ErrorResponse

    Canonical error body — every non-2xx response uses this shape.

    object
    exception_details
    ExceptionDetails

    Machine-readable error context; empty object when there is nothing to add.

    object
    validation_errors
    Any of:
    Array<object>
    ValidationProblem

    One field-level reason a request was rejected.

    object
    loc
    required
    Loc

    Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].

    Array
    msg
    required
    Msg

    What is wrong with the value at loc.

    string
    type
    required
    Type

    Stable machine code for the problem, e.g. missing or string_too_short.

    string
    key
    additional properties
    any
    reason
    required
    Reason

    Human-readable, actionable error message.

    string
    request_id
    Any of:
    string
    Example generated
    {
    "exception_details": {
    "validation_errors": [
    {
    "loc": [
    "example"
    ],
    "msg": "example",
    "type": "example"
    }
    ]
    },
    "reason": "example",
    "request_id": "example"
    }