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.

    List authorable trigger fields

    View source
    POST
    /platform/v1/campaigns/trigger-schema
    curl --request POST \
    --url 'https://api.eu1.luigisbox.ai/platform/v1/campaigns/trigger-schema?page=1&size=20' \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{ "catalog_ids": [ "example" ], "catalog_tags": [ "example" ], "channel_ids": [ "example" ], "channel_tags": [ "example" ], "intents": [ "search" ], "organization_id": "example", "surface_ids": [ "example" ], "surface_tags": [ "example" ] }'

    Project the trigger fields authorable for a targeting set without persisting anything. Resolves the same effective scope a write would (422 on an invalid targeting set, problems in exception_details.targeting_problems), then returns, per unprefixed trigger field, the operators a write accepts for it across that whole scope. A field numeric in one scoped catalog but string (or absent) in another is reported with the string operator set, since that is what a write accepts for it. Each item carries its source (catalog attribute vs the request). The three request-owned fields (request:query, request:type, request:anchor_id) are always included; add the trigger. prefix to a name to build a leaf. Items are sorted by name; query narrows to a case-insensitive substring on the name, and the result is paginated. Authorized against the organization_id in the body: credentials granted on that organization are enough, while a grant on one of its catalogs is not.

    query
    Any of:
    string
    >= 1 characters <= 256 characters
    page
    Page

    1-based page number.

    integer
    default: 1 >= 1

    1-based page number.

    size
    Size

    Number of items per page.

    integer
    default: 20 >= 1 <= 100

    Number of items per page.

    Media type application/json
    TargetingValidationRequest

    A campaign’s targeting on its own — no name, no match, no rules, no persistence.

    Ids are canonicalized, deduped and format-checked exactly as they are on a real write, and every targeting violation is reported uniformly as a problems entry.

    object
    catalog_ids
    Catalog Ids

    Catalogs this campaign narrows to, by id. catalog_tags narrows the same axis by contributing its members, so the scope is the union of the two. An axis nothing narrows is an axis the campaign does not restrict, so empty means every one of them rather than none. A catalog outside the organization is rejected with catalog_not_in_organization.

    Array<string>
    catalog_tags
    Catalog Tags

    Catalog tags whose members join catalog_ids on the catalog axis. Resolved at read time, so editing a tag reflows into every campaign referencing it. A tag that does not exist in the organization is rejected with tag_not_found, and one carrying another dimension with tag_dimension_mismatch.

    Array<string>
    channel_ids
    Channel Ids

    Channels this campaign narrows to, by id, jointly with channel_tags. An axis nothing narrows is an axis the campaign does not restrict, so empty means every one of them rather than none. Narrowing by channel requires a catalog scope (catalog_scope_required), the channel must be in the organization (channel_not_in_organization) and owned by a scoped catalog (channel_outside_catalog_scope).

    Array<string>
    channel_tags
    Channel Tags

    Channel tags whose members join channel_ids on the channel axis, under the same resolution and the same tag_not_found / tag_dimension_mismatch rejections.

    Array<string>
    intents
    Intents

    Surface Intents this campaign targets — the kind of discovery it applies to. Empty means every Intent, not none. Narrowing by Intent is mutually exclusive with narrowing by surface_ids / surface_tags: an Intent targets whole families of surfaces, so combining the two is rejected with intents_conflict. A targeted Intent no scoped catalog hosts a surface for is rejected with catalog_without_targeted_intent — it could never trigger.

    Array<string>
    Allowed values: search recommender collection
    organization_id
    required
    Organization Id
    string
    surface_ids
    Surface Ids

    Surfaces this campaign narrows to, by id, jointly with surface_tags. An axis nothing narrows is an axis the campaign does not restrict, so empty means every one of them rather than none. Mutually exclusive with intents (intents_conflict), requires a catalog scope (catalog_scope_required), and each surface must sit under a scoped catalog (surface_not_in_catalog_scope).

    Array<string>
    surface_tags
    Surface Tags

    Surface tags whose members join surface_ids on the surface axis, under the same resolution and rejections. A member whose own catalog is outside the catalog scope is tolerated rather than rejected, which keeps a surface tag reusable across catalogs.

    Array<string>

    Successful Response

    Media type application/json
    Page[TriggerField]
    object
    items
    required
    Items

    The items on this page.

    Array<object>
    TriggerField

    One trigger field authorable across a campaign’s scope.

    name is the unprefixed field name (add trigger. to build a match leaf). source is where the value comes from (catalog attribute vs the request), and operators is the set a write accepts for the field anywhere in the scope. values lists what the scope carries today and value_domain says whether that list is a suggestion or there is none.

    object
    name
    required
    Name

    Unprefixed trigger field name. Add the trigger. prefix to build a match leaf — brand here is authored as trigger.brand.

    string
    operators
    required
    Operators

    Every operator a write accepts for this field anywhere in the scope. Range and comparison operators are offered on a numeric field; a keyword field offers membership operators only.

    Array<string>
    Allowed values: eq neq gt gte lt lte in not_in matches starts_with ends_with range exists
    source
    required
    TriggerFieldSource

    Where the value comes from when a campaign is matched: a catalog attribute of the matched anchor/collection document, or the request itself. Derived from the name — the reserved request: prefix cannot be occupied by catalog data.

    string
    Allowed values: catalog request
    value_domain
    required
    TriggerValueDomain

    suggested: values lists what the scope carries today, and a value outside it is still accepted. open: free input, with values empty.

    string
    Allowed values: suggested open
    values
    required
    Values

    What the scope carries today, sorted; other values are accepted. Populated only for request:type, with the object types the scope’s catalogs hold; every other field, including a catalog attribute, reports [] — for a catalog attribute the values are catalog data, not schema: read them from GET /catalog/v1/{catalog_id}/types/{object_type}/attribute-values?attribute_name=.... An empty list never means the field accepts nothing.

    Array<string>
    page
    required
    Page

    1-based page number.

    integer
    size
    required
    Size

    Number of items per page.

    integer
    total
    required
    Total

    Total number of items across all pages.

    integer
    Example
    {
    "items": [
    {
    "operators": [
    "eq"
    ],
    "source": "catalog",
    "value_domain": "suggested"
    }
    ]
    }

    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. A targeting rejection lists every problem at once in exception_details.targeting_problems.

    Media type application/json
    Any of:
    TargetingProblemsError

    The canonical error body of a rejected targeting set, with problems typed.

    reason and request_id are the canonical fields; exception_details carries the typed problems list.

    object
    exception_details
    required
    TargetingProblems

    The exception_details of a rejected targeting set: every problem found at once.

    object
    targeting_problems
    required
    Targeting Problems

    Every targeting violation found in one pass; never truncated. Named for what it carries, so it sits beside filter_problems on the same 422 without a client having to work out which of the two it was given. A 422 carries one list or the other, never both: the first check to refuse ends the request.

    Array<object>
    TargetingProblem

    One targeting violation: a stable machine code plus the offending values.

    object
    code
    required
    TargetingProblemCode

    Stable machine code of the violated rule.

    string
    Allowed values: catalog_scope_required intents_conflict catalog_not_in_organization channel_not_in_organization tag_not_found tag_dimension_mismatch surface_not_in_catalog_scope catalog_without_targeted_surface channel_outside_catalog_scope catalog_without_targeted_intent targeting_reaches_nothing tag_is_last_narrowing
    dimension
    required
    Dimension

    The targeting axis the violation is about.

    string
    Allowed values: catalog channel surface intent
    message
    required
    Message

    Human-readable explanation of the violation.

    string
    values
    required
    Values

    The offending values on that axis.

    Array<string>
    reason
    required
    Reason

    Human-readable, actionable error message.

    string
    request_id
    Any of:
    string
    Example
    {
    "exception_details": {
    "targeting_problems": [
    {
    "code": "catalog_scope_required",
    "dimension": "catalog"
    }
    ]
    }
    }

    Temporarily unable to serve the request; retry it unchanged after the Retry-After delay.

    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"
    }