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.

    Recommender statistics breakdown

    View source
    POST
    /analytics/v1/channels/recommenders/stats/breakdown
    curl --request POST \
    --url 'https://api.eu1.luigisbox.ai/analytics/v1/channels/recommenders/stats/breakdown?channel_ids=example&interaction_mode=direct_conversions' \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{ "consent_granted": true, "context_criteria": [ { "attribute": "example", "operator": "in", "values": [ "example" ] } ], "date_from": "2026-04-15T12:00:00Z", "date_to": "2026-04-15T12:00:00Z", "device": [ "example" ], "external_ab_test_variant": [ "example" ], "internal_ab_test_id": [ "example" ], "internal_ab_test_variant": [ "example" ], "is_personalized": true, "landing_page": [ "example" ], "session_rank": { "exclude": false, "max": 1, "min": 1 }, "url_params": [ { "attribute": "example", "operator": "in", "values": [ "example" ] } ] }'

    Aggregate breakdown statistics for recommenders across the requested channels.

    channel_ids
    required
    Channel Ids

    One or more channel ids to aggregate over. Provide as repeated query parameters (?channel_ids=A&channel_ids=B).

    Array<string>

    One or more channel ids to aggregate over. Provide as repeated query parameters (?channel_ids=A&channel_ids=B).

    interaction_mode
    InteractionMode

    Which directly attributed outcome an interaction-level metric counts.

    string
    default: direct_conversions
    Allowed values: direct_conversions direct_transactions
    Media type application/json
    SegmentationFilter
    object
    consent_granted
    Any of:
    boolean
    context_criteria
    Context Criteria
    Array
    Any of:
    AttributeCriteria
    object
    attribute
    required
    Attribute
    string
    >= 1 characters
    operator
    required
    ComparisonOperator
    string
    Allowed values: in not_in exists not_exists lt lte gt gte eq neq
    values
    Any of:
    Array
    date_from
    required
    Date From
    string format: date-time
    date_to
    Any of:
    string format: date-time
    device
    Device
    Array<string>
    external_ab_test_variant
    External Ab Test Variant
    Array<string>
    internal_ab_test_id
    Internal Ab Test Id
    Array<string>
    internal_ab_test_variant
    Internal Ab Test Variant
    Array<string>
    is_personalized
    Any of:
    boolean
    landing_page
    Landing Page
    Array<string>
    session_rank
    Any of:
    RangeFilter

    Represents an inclusive range with optional exclusion.

    object
    exclude
    Exclude
    boolean
    max
    Any of:
    integer
    min
    Any of:
    integer
    url_params
    Url Params
    Array
    Any of:
    AttributeCriteria
    object
    attribute
    required
    Attribute
    string
    >= 1 characters
    operator
    required
    ComparisonOperator
    string
    Allowed values: in not_in exists not_exists lt lte gt gte eq neq
    values
    Any of:
    Array

    Successful Response

    Media type application/json
    RecommenderStatsResponse

    Recommender metrics broken down globally, per model, and per widget and model.

    object
    global_stats
    required
    RecommenderGlobalBreakdownStats

    Global stats breakdown of recommender metrics

    object
    clicks_level
    required
    RecommenderBreakdownClicksLevel

    Recommender metrics at the clicks level

    object
    clicks
    required
    Clicks
    integer
    sessions
    required
    Sessions
    integer
    users
    required
    Users
    integer
    interaction_mode
    required
    Any of:
    InteractionMode

    Which directly attributed outcome an interaction-level metric counts.

    string
    Allowed values: direct_conversions direct_transactions
    interactions_level
    required
    RecommenderBreakdownInteractionsLevel

    Recommender metrics at the interactions level

    object
    interactions
    required
    Interactions
    integer
    sessions
    required
    Sessions
    integer
    users
    required
    Users
    integer
    list_level
    required
    RecommenderBreakdownListLevel

    Recommender metrics at the list level

    object
    recommendations
    required
    Recommendations
    integer
    sessions
    required
    Sessions
    integer
    users
    required
    Users
    integer
    model_stats
    required
    Model Stats
    Array<object>
    RecommenderModelBreakdownStats

    Breakdown of recommender metrics in scope of a specific model

    object
    clicks_level
    required
    RecommenderBreakdownClicksLevel

    Recommender metrics at the clicks level

    object
    clicks
    required
    Clicks
    integer
    sessions
    required
    Sessions
    integer
    users
    required
    Users
    integer
    interaction_mode
    required
    Any of:
    InteractionMode

    Which directly attributed outcome an interaction-level metric counts.

    string
    Allowed values: direct_conversions direct_transactions
    interactions_level
    required
    RecommenderBreakdownInteractionsLevel

    Recommender metrics at the interactions level

    object
    interactions
    required
    Interactions
    integer
    sessions
    required
    Sessions
    integer
    users
    required
    Users
    integer
    list_level
    required
    RecommenderBreakdownListLevel

    Recommender metrics at the list level

    object
    recommendations
    required
    Recommendations
    integer
    sessions
    required
    Sessions
    integer
    users
    required
    Users
    integer
    model
    required
    Model
    string
    widget_model_stats
    required
    Widget Model Stats
    Array<object>
    RecommenderWidgetModelBreakdownStats

    Breakdown of recommender metrics in scope of a combination of a specific widget and model

    object
    clicks_level
    required
    RecommenderBreakdownClicksLevel

    Recommender metrics at the clicks level

    object
    clicks
    required
    Clicks
    integer
    sessions
    required
    Sessions
    integer
    users
    required
    Users
    integer
    interaction_mode
    required
    Any of:
    InteractionMode

    Which directly attributed outcome an interaction-level metric counts.

    string
    Allowed values: direct_conversions direct_transactions
    interactions_level
    required
    RecommenderBreakdownInteractionsLevel

    Recommender metrics at the interactions level

    object
    interactions
    required
    Interactions
    integer
    sessions
    required
    Sessions
    integer
    users
    required
    Users
    integer
    list_level
    required
    RecommenderBreakdownListLevel

    Recommender metrics at the list level

    object
    recommendations
    required
    Recommendations
    integer
    sessions
    required
    Sessions
    integer
    users
    required
    Users
    integer
    model
    required
    Model
    string
    widget_id
    required
    Widget Id
    string
    Example
    {
    "global_stats": {
    "interaction_mode": "direct_conversions"
    },
    "model_stats": [
    {
    "interaction_mode": "direct_conversions"
    }
    ],
    "widget_model_stats": [
    {
    "interaction_mode": "direct_conversions"
    }
    ]
    }

    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
    error_code
    Error Code

    Stable machine code naming why a well-formed request was refused: snake_case, prefixed by its domain — e.g. filter_unknown_field or cursor_mismatch. Safe to branch on; reason is not. Absent when the status code says all there is to say.

    string
    validation_errors
    Validation Errors

    Every field-level problem found in the request, when validation is what failed. Absent when the rejection is not about a specific value.

    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": {
    "error_code": "example",
    "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
    error_code
    Error Code

    Stable machine code naming why a well-formed request was refused: snake_case, prefixed by its domain — e.g. filter_unknown_field or cursor_mismatch. Safe to branch on; reason is not. Absent when the status code says all there is to say.

    string
    validation_errors
    Validation Errors

    Every field-level problem found in the request, when validation is what failed. Absent when the rejection is not about a specific value.

    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": {
    "error_code": "example",
    "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
    error_code
    Error Code

    Stable machine code naming why a well-formed request was refused: snake_case, prefixed by its domain — e.g. filter_unknown_field or cursor_mismatch. Safe to branch on; reason is not. Absent when the status code says all there is to say.

    string
    validation_errors
    Validation Errors

    Every field-level problem found in the request, when validation is what failed. Absent when the rejection is not about a specific value.

    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": {
    "error_code": "example",
    "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
    error_code
    Error Code

    Stable machine code naming why a well-formed request was refused: snake_case, prefixed by its domain — e.g. filter_unknown_field or cursor_mismatch. Safe to branch on; reason is not. Absent when the status code says all there is to say.

    string
    validation_errors
    Validation Errors

    Every field-level problem found in the request, when validation is what failed. Absent when the rejection is not about a specific value.

    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": {
    "error_code": "example",
    "validation_errors": [
    {
    "loc": [
    "example"
    ],
    "msg": "example",
    "type": "example"
    }
    ]
    },
    "reason": "example",
    "request_id": "example"
    }

    Service temporarily unavailable

    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
    error_code
    Error Code

    Stable machine code naming why a well-formed request was refused: snake_case, prefixed by its domain — e.g. filter_unknown_field or cursor_mismatch. Safe to branch on; reason is not. Absent when the status code says all there is to say.

    string
    validation_errors
    Validation Errors

    Every field-level problem found in the request, when validation is what failed. Absent when the rejection is not about a specific value.

    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": {
    "error_code": "example",
    "validation_errors": [
    {
    "loc": [
    "example"
    ],
    "msg": "example",
    "type": "example"
    }
    ]
    },
    "reason": "example",
    "request_id": "example"
    }

    Upstream timed out

    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
    error_code
    Error Code

    Stable machine code naming why a well-formed request was refused: snake_case, prefixed by its domain — e.g. filter_unknown_field or cursor_mismatch. Safe to branch on; reason is not. Absent when the status code says all there is to say.

    string
    validation_errors
    Validation Errors

    Every field-level problem found in the request, when validation is what failed. Absent when the rejection is not about a specific value.

    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": {
    "error_code": "example",
    "validation_errors": [
    {
    "loc": [
    "example"
    ],
    "msg": "example",
    "type": "example"
    }
    ]
    },
    "reason": "example",
    "request_id": "example"
    }