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.

    Update a tag

    View source
    PATCH
    /platform/v1/tags/{tag_id}
    curl --request PATCH \
    --url https://api.eu1.luigisbox.ai/platform/v1/tags/example \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{ "add_members": [ { "catalog_id": "example", "surface_id": "example" } ], "name": "example", "remove_members": [ { "catalog_id": "example", "surface_id": "example" } ] }'
    tag_id
    required
    Tag Id
    string
    Media type application/json
    TagUpdate

    Partial update. name replaces; membership is edited as a delta.

    dimension is immutable (changing it would orphan members across tables), so it is not accepted — extra="forbid" rejects it (and any stray field) with 422.

    Membership is named as what changes rather than as the resulting set, so two callers editing different members cannot erase each other: each element is applied idempotently, and the write needs neither a prior read nor a concurrency token. The resulting set is (stored - remove_members) | add_members; the two lists must be disjoint, so no ordering between them has to be defined. Because dimension is absent, the repository checks the result against the tag’s stored dimension.

    object
    add_members
    Any of:
    Array<object>
    SurfaceMemberRef

    A surface member of a surface-dimension tag: a surface id paired with its catalog.

    object
    catalog_id
    required
    Catalog Id
    string
    surface_id
    required
    Surface Id
    string
    name
    Name

    Tag name as namespace:value, lowercased on write (intent:SEARCH is stored as intent:search). The intent, language and recommender namespaces are platform-managed: writing one requires platform:reserved-tags:write and deleting one requires platform:reserved-tags:delete.

    string
    <= 256 characters /^[a-z][a-z0-9_-]{0,63}:[^\s:]{1,191}$/
    remove_members
    Any of:
    Array<object>
    SurfaceMemberRef

    A surface member of a surface-dimension tag: a surface id paired with its catalog.

    object
    catalog_id
    required
    Catalog Id
    string
    surface_id
    required
    Surface Id
    string
    Example generated
    {
    "add_members": [
    {
    "catalog_id": "example",
    "surface_id": "example"
    }
    ],
    "name": "example",
    "remove_members": [
    {
    "catalog_id": "example",
    "surface_id": "example"
    }
    ]
    }

    Successful Response

    Media type application/json
    Tag

    Tag response: identity + the members for its dimension.

    object
    created_at
    required
    Created At
    string format: date-time
    created_by
    required
    Any of:
    string
    dimension
    required
    TagDimension

    Which kind of entity a Tag groups: catalogs, channels, or surfaces. A tag’s members are all of one dimension.

    string
    Allowed values: catalog channel surface
    id
    required
    Id
    string
    members
    required
    Any of:
    Array<object>
    SurfaceMemberRef

    A surface member of a surface-dimension tag: a surface id paired with its catalog.

    object
    catalog_id
    required
    Catalog Id
    string
    surface_id
    required
    Surface Id
    string
    name
    required
    Name

    Tag name as namespace:value, lowercased on write (intent:SEARCH is stored as intent:search). The intent, language and recommender namespaces are platform-managed: writing one requires platform:reserved-tags:write and deleting one requires platform:reserved-tags:delete.

    string
    <= 256 characters /^[a-z][a-z0-9_-]{0,63}:[^\s:]{1,191}$/
    organization_id
    required
    Organization Id
    string
    updated_at
    required
    Updated At
    string format: date-time
    updated_by
    required
    Any of:
    string
    Example
    {
    "dimension": "catalog"
    }

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

    The caller lacks the permission for this tag, or the tag name uses a reserved namespace and the caller lacks the matching reserved-tags permission.

    Media type application/json
    Any of:
    ReservedTagError

    The canonical error body of a tag write refused for using a reserved namespace.

    Typed rather than a bare ErrorResponse because the two lists are what the caller needs in order to act: which name was refused, and which namespaces to avoid.

    object
    exception_details
    required
    ReservedTagDetails

    The exception_details of a tag write refused for using a reserved namespace.

    object
    namespaces
    required
    Namespaces

    Every reserved namespace, so a caller can rename without a second refusal.

    Array<string>
    reserved_names
    required
    Reserved Names

    The names in the request that use a reserved namespace.

    Array<string>
    reason
    required
    Reason

    Human-readable, actionable error message.

    string
    request_id
    Any of:
    string
    Example
    {
    "exception_details": {
    "namespaces": [
    "intent",
    "language",
    "recommender"
    ],
    "reserved_names": [
    "intent:search"
    ]
    }
    }

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

    State conflict: a referencing campaign’s targeting would become invalid, or wider than it was authored to be, or the name is already taken.

    Media type application/json
    Any of:
    TargetingConflictError

    The canonical error body of a write blocked by another campaign’s targeting.

    object
    exception_details
    required
    TargetingConflictDetails

    The exception_details of a write blocked by another campaign’s targeting.

    Names the campaign that would end up invalid, since the rejected write is not it.

    object
    campaign_id
    required
    Campaign Id

    The campaign whose targeting the write would invalidate.

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

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