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.

    Create a channel

    View source
    POST
    /platform/v1/channels
    curl --request POST \
    --url https://api.eu1.luigisbox.ai/platform/v1/channels \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{ "attribute_aliases": { "additionalProperty": "example" }, "catalog_id": "example", "name": "example", "visibility_filter": { "$and": [ { "brand": { "in": [ "nike", "adidas" ] } }, { "lbx:price": { "gte": 50, "lte": 200 } }, { "$or": [ { "condition": { "eq": "new" } }, { "warranty_months": { "gte": 12 } } ] }, { "$not": { "material": { "eq": "leather" } } }, { "image": { "exists": true } } ] } }'

    A create is not scoped by the identifiers in its body: unlike the listing, it requires a grant spanning every organization.

    Media type application/json
    ChannelCreate
    object
    attribute_aliases
    Attribute Aliases

    Channel-facing name (key) bound to a catalog field (value), e.g. {"product_name": "title"}. A request naming product_name resolves to catalog title and the response comes back keyed product_name, while the catalog field stays addressable under its own name. A key is checked against the catalog’s fields only as it is written: should the catalog later gain a field of that name, that field takes the name back and the alias stops taking effect. See Attribute aliases for the full contract.

    object
    key
    additional properties
    string
    catalog_id
    required
    Catalog Id
    string
    name
    required
    Name
    string
    >= 1 characters <= 256 characters
    visibility_filter
    Any of:
    One of:
    FilterGroup

    A filter tree in group syntax: a boolean operator over leaves and nested groups.

    not holds exactly one child. An empty and constrains nothing and an empty or matches nothing; each endpoint says whether it accepts either.

    object
    conditions
    Conditions

    Leaf conditions and nested groups.

    Array
    One of:
    FilterCondition

    One leaf of a group-syntax tree: a field compared against a value.

    object
    field
    required
    Field

    Object field the condition reads.

    string
    on_missing
    Any of:
    DynamicFilterMissingPolicy

    What a condition reading its value from the request’s anchors does when none carries the attribute.

    fail_closed (the default) makes the whole filter tree match nothing. ignore drops the condition instead, leaving the rest of the tree in force.

    string
    Allowed values: fail_closed ignore
    operator
    required
    FilterOperator

    Comparison operator.

    string
    Allowed values: eq neq gt gte lt lte in not_in matches starts_with ends_with range exists
    source
    FilterSource

    Provenance of the condition; stamped by the system, never read from a client.

    string
    default: request
    Allowed values: request collection surface autofilter business_rule visibility
    value
    Value

    Literal to compare against, or a trigger reference {trigger_ref: ...}; a scalar for eq/neq and the comparisons, a non-empty list for in/not_in, absent for exists.

    value_from
    Any of:
    FilterValueFrom

    Where a dynamic condition reads its value: an attribute of the request’s anchors.

    object
    anchor_attribute
    required
    Anchor Attribute

    Anchor attribute whose value the condition compares against.

    string
    operator
    required
    BooleanOperator

    Boolean combinator applied to conditions.

    string
    Allowed values: and or not

    Successful Response

    Media type application/json
    Channel
    object
    attribute_aliases
    required
    Attribute Aliases

    Channel-facing name (key) bound to a catalog field (value), e.g. {"product_name": "title"}. A request naming product_name resolves to catalog title and the response comes back keyed product_name, while the catalog field stays addressable under its own name. A key is checked against the catalog’s fields only as it is written: should the catalog later gain a field of that name, that field takes the name back and the alias stops taking effect. See Attribute aliases for the full contract.

    object
    key
    additional properties
    string
    catalog_id
    required
    Catalog Id
    string
    created_at
    required
    Created At
    string format: date-time
    id
    required
    Id
    string
    name
    required
    Name
    string
    updated_at
    required
    Updated At
    string format: date-time
    visibility_filter
    required
    Any of:
    FilterGroup

    A filter tree in group syntax: a boolean operator over leaves and nested groups.

    not holds exactly one child. An empty and constrains nothing and an empty or matches nothing; each endpoint says whether it accepts either.

    object
    conditions
    Conditions

    Leaf conditions and nested groups.

    Array
    One of:
    FilterCondition

    One leaf of a group-syntax tree: a field compared against a value.

    object
    field
    required
    Field

    Object field the condition reads.

    string
    on_missing
    Any of:
    DynamicFilterMissingPolicy

    What a condition reading its value from the request’s anchors does when none carries the attribute.

    fail_closed (the default) makes the whole filter tree match nothing. ignore drops the condition instead, leaving the rest of the tree in force.

    string
    Allowed values: fail_closed ignore
    operator
    required
    FilterOperator

    Comparison operator.

    string
    Allowed values: eq neq gt gte lt lte in not_in matches starts_with ends_with range exists
    source
    FilterSource

    Provenance of the condition; stamped by the system, never read from a client.

    string
    default: request
    Allowed values: request collection surface autofilter business_rule visibility
    value
    Value

    Literal to compare against, or a trigger reference {trigger_ref: ...}; a scalar for eq/neq and the comparisons, a non-empty list for in/not_in, absent for exists.

    value_from
    Any of:
    FilterValueFrom

    Where a dynamic condition reads its value: an attribute of the request’s anchors.

    object
    anchor_attribute
    required
    Anchor Attribute

    Anchor attribute whose value the condition compares against.

    string
    operator
    required
    BooleanOperator

    Boolean combinator applied to conditions.

    string
    Allowed values: and or not
    Example
    {
    "visibility_filter": {
    "$and": [
    {
    "brand": {
    "in": [
    "nike",
    "adidas"
    ]
    }
    },
    {
    "lbx:price": {
    "gte": 50,
    "lte": 200
    }
    },
    {
    "$or": [
    {
    "condition": {
    "eq": "new"
    }
    },
    {
    "warranty_months": {
    "gte": 12
    }
    }
    ]
    },
    {
    "$not": {
    "material": {
    "eq": "leather"
    }
    }
    },
    {
    "image": {
    "exists": true
    }
    }
    ]
    }
    }

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

    State conflict

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

    The catalog’s field types could not be read, so visibility_filter and attribute_aliases could not be checked against the catalog’s fields. Retryable: Retry-After carries the number of seconds to wait.

    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"
    }
    Retry-After
    integer

    Seconds to wait before retrying the write.