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 fields on existing catalog objects

    View source
    PATCH
    /index/v1/{catalog_id}/index/
    curl --request PATCH \
    --url https://api.eu1.luigisbox.ai/index/v1/example/index/ \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{ "objects": [ { "@group_id": "example", "@group_primary": true, "@id": "example", "@title": "example", "@type": "example" } ] }'

    Update individual fields on existing objects.

    Answers 202 when every object is accepted and 207 when some are rejected, listing them in rejected_objects. When every object is rejected, answers 422, or 503 when only internal failures rejected them.

    catalog_id
    required
    Catalog Id
    string
    Media type application/json
    PartialUpdateRequest

    Request body for partial field update.

    object
    objects
    required
    Objects

    Objects with the fields to change.

    Array<object>
    PartialContentObject

    A partial catalog object where omitted fields stay unchanged.

    object
    @group_id
    Any of:
    string
    >= 1 characters
    @group_primary
    @Group Primary

    Whether this product is the preferred product in its variant group.

    boolean
    @id
    required
    @Id

    Typed identifier of the object, <type>/<value>.

    string
    @title
    @Title

    New display title of the object. Cannot be cleared: null or a blank string is rejected.

    string
    /\S/
    @type
    required
    @Type

    Object type; must match the type prefix of @id.

    string
    key
    additional properties
    any
    Example generated
    {
    "objects": [
    {
    "@group_id": "example",
    "@group_primary": true,
    "@id": "example",
    "@title": "example",
    "@type": "example"
    }
    ]
    }

    Every object of the batch was accepted; rejected_objects is empty.

    Media type application/json
    BatchOutcome

    Outcome of a write batch of which at least one object was accepted, or that was empty.

    The status code tells the two apart: 202 when every object was accepted, 207 when rejected_objects lists the ones that were not.

    object
    accepted_count
    required
    Accepted Count

    Objects accepted for asynchronous processing.

    integer
    rejected_count
    required
    Rejected Count

    Objects rejected; none of them will be applied.

    integer
    rejected_objects
    required
    Rejected Objects

    Every rejected object with the reason it was rejected; empty when every object was accepted.

    Array<object>
    RejectedObject

    An object of a write batch that was rejected, and why.

    object
    @id
    required
    @Id

    @id of the rejected object, as sent.

    string
    @type
    required
    @Type

    @type of the rejected object, as sent.

    string
    code
    required
    ObjectRejectionCode

    Why the object was rejected, as a stable identifier. Clients switch on this; message is for humans and may be reworded. When an object has several problems, the code names the first one found and message describes the problems found, up to ten, and counts the rest. internal_error means the object itself may be fine and sending it again later may succeed. The set of codes is closed; a new one is announced as a contract change.

    string
    Allowed values: title_missing id_invalid id_type_mismatch field_type_conflict reserved_field_read_only reserved_field_unknown namespace_forbidden namespace_unknown array_mixed_types value_invalid variant_group_invalid category_reference_invalid mapping_failed object_invalid internal_error
    index
    required
    Index

    Zero-based position of the rejected object in the request’s objects array, which tells apart two objects of the batch that share an @id.

    integer
    message
    required
    Message

    Why the object was rejected, for humans. May be reworded at any time.

    string
    Example
    {
    "rejected_objects": [
    {
    "code": "title_missing"
    }
    ]
    }

    Some objects of the batch were accepted for asynchronous processing and some were not. Still a success status, so a client that only checks for 2xx sees it as one: read rejected_objects for the objects that were not accepted.

    Media type application/json
    BatchOutcome

    Outcome of a write batch of which at least one object was accepted, or that was empty.

    The status code tells the two apart: 202 when every object was accepted, 207 when rejected_objects lists the ones that were not.

    object
    accepted_count
    required
    Accepted Count

    Objects accepted for asynchronous processing.

    integer
    rejected_count
    required
    Rejected Count

    Objects rejected; none of them will be applied.

    integer
    rejected_objects
    required
    Rejected Objects

    Every rejected object with the reason it was rejected; empty when every object was accepted.

    Array<object>
    RejectedObject

    An object of a write batch that was rejected, and why.

    object
    @id
    required
    @Id

    @id of the rejected object, as sent.

    string
    @type
    required
    @Type

    @type of the rejected object, as sent.

    string
    code
    required
    ObjectRejectionCode

    Why the object was rejected, as a stable identifier. Clients switch on this; message is for humans and may be reworded. When an object has several problems, the code names the first one found and message describes the problems found, up to ten, and counts the rest. internal_error means the object itself may be fine and sending it again later may succeed. The set of codes is closed; a new one is announced as a contract change.

    string
    Allowed values: title_missing id_invalid id_type_mismatch field_type_conflict reserved_field_read_only reserved_field_unknown namespace_forbidden namespace_unknown array_mixed_types value_invalid variant_group_invalid category_reference_invalid mapping_failed object_invalid internal_error
    index
    required
    Index

    Zero-based position of the rejected object in the request’s objects array, which tells apart two objects of the batch that share an @id.

    integer
    message
    required
    Message

    Why the object was rejected, for humans. May be reworded at any time.

    string
    Example
    {
    "rejected_objects": [
    {
    "code": "title_missing"
    }
    ]
    }

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

    Nothing was applied. Either the body failed validation, which exception_details.validation_errors describes, or it was well-formed and every object in it was rejected, which exception_details.rejected_objects lists with a code for each.

    Media type application/json
    BatchValidationError

    The error body of a rejected write batch.

    Its exception_details carry exactly one of validation_errors, when the body is malformed, and rejected_objects, when the body is well-formed but every object in it was rejected.

    object
    exception_details
    BatchValidationDetails

    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
    rejected_count
    Rejected Count

    Objects rejected. Present, with rejected_objects, only when the body was well-formed and every object in it was rejected; absent when validation_errors is present.

    integer
    rejected_objects
    Rejected Objects

    Every rejected object with its code and reason. Present only when the body was well-formed and every object in it was rejected; absent when validation_errors is present. Exactly one of the two is present.

    Array<object>
    RejectedObject

    An object of a write batch that was rejected, and why.

    object
    @id
    required
    @Id

    @id of the rejected object, as sent.

    string
    @type
    required
    @Type

    @type of the rejected object, as sent.

    string
    code
    required
    ObjectRejectionCode

    Why the object was rejected, as a stable identifier. Clients switch on this; message is for humans and may be reworded. When an object has several problems, the code names the first one found and message describes the problems found, up to ten, and counts the rest. internal_error means the object itself may be fine and sending it again later may succeed. The set of codes is closed; a new one is announced as a contract change.

    string
    Allowed values: title_missing id_invalid id_type_mismatch field_type_conflict reserved_field_read_only reserved_field_unknown namespace_forbidden namespace_unknown array_mixed_types value_invalid variant_group_invalid category_reference_invalid mapping_failed object_invalid internal_error
    index
    required
    Index

    Zero-based position of the rejected object in the request’s objects array, which tells apart two objects of the batch that share an @id.

    integer
    message
    required
    Message

    Why the object was rejected, for humans. May be reworded at any time.

    string
    validation_errors
    Validation Errors

    Every field-level problem found in the request. Present only when the body failed validation; absent when rejected_objects is present. Exactly one of the two is present.

    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
    {
    "exception_details": {
    "rejected_objects": [
    {
    "code": "title_missing"
    }
    ]
    }
    }

    Catalog ingestion is unavailable, or an internal failure prevented processing every object of the batch. Part of the batch may still have been applied; sending it again unchanged is safe. Send it again after Retry-After.

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

    Seconds to wait before sending the request again.