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.
const url = 'https://api.eu1.luigisbox.ai/catalog/v1/example/types/example/attribute-metadata';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"items":[]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.eu1.luigisbox.ai/catalog/v1/example/types/example/attribute-metadata \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "items": [] }'Merge metadata into one or more of an object type’s attributes, and read back what they now hold.
Every level merges: an attribute, a value or a key the request leaves out is unchanged,
and null clears the one it names, so "metadata": null, "values": null removes all of an
attribute’s metadata. An attribute the request sets a key on must be one the object type
has — a registered @ slot, or a name the catalog’s last ingest inferred on that type — so
metadata can only be set once an ingest has delivered the object type. An object type the
catalog does not have is refused with catalog_type_unknown.
Each item names the version its change is based on, or null for an attribute that carries
no metadata yet. Every item applies or none does: if any version is no longer
current, nothing changes and the 412 names each stale item by its index.
The response carries every attribute the request named that holds metadata afterwards, as
list_catalog_attribute_metadata returns it; one the request emptied is omitted.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The object type, such as product.
The object type, such as product.
Request Bodyrequired
Section titled “Request Bodyrequired”Changes to the metadata of one or more attributes of an object type.
Every item applies or none does, so the attributes never end up in a mix of old and new state. One attribute appears at most once.
object
The attributes to change, each naming the version it is based on. At most 100 attributes and 500 value entries across them per request.
Changes to one attribute: its own metadata and its values’ metadata, each merged separately.
object
The catalog attribute to change.
Changes to the attribute’s own metadata. null clears the whole map; omit it to leave the map unchanged.
Changes to one metadata map: a key set to a value is set, null clears it, and a key left
out is unchanged.
Any key takes a string, integer or number; the keys below are format-checked.
object
Changes to the metadata of the attribute’s raw values, keyed by the value exactly as the catalog holds it. A null entry removes that value’s metadata; null for the whole map removes every value’s metadata. Values left out are unchanged.
object
Changes to one raw value’s metadata.
object
Changes to the value’s metadata. null clears the whole map, removing the value; omit it to leave the value unchanged.
Changes to one metadata map: a key set to a value is set, null clears it, and a key left
out is unchanged.
Any key takes a string, integer or number; the keys below are format-checked.
object
Responses
Section titled “Responses”Successful Response
Attribute metadata for several attributes, as a write left them.
object
Every attribute the request named that carries metadata afterwards, in the order the request named them. An attribute left with no metadata is omitted.
An attribute’s own metadata and every one of its values’ metadata.
object
The catalog attribute.
How many of the attribute’s raw values carry metadata.
Every one of the attribute’s raw values that carries metadata, keyed by the value exactly as the catalog holds it, in the shape a write sends it; empty when none does.
Changes on every change to the attribute’s metadata, at either level. Send it back in an item’s version to change the attribute.
Example
{ "items": [ { "attribute_name": "material", "metadata": { "label": "Material" }, "value_count": 1, "values": { "Stainless steel": { "metadata": { "color": "#C0C0C0", "label": "Steel" } } }, "version": 41 } ]}Missing or invalid credentials
Canonical error body — every non-2xx response uses this shape.
object
Machine-readable error context; empty object when there is nothing to add.
object
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.
Every field-level problem found in the request, when validation is what failed. Absent when the rejection is not about a specific value.
One field-level reason a request was rejected.
object
Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].
What is wrong with the value at loc.
Stable machine code for the problem, e.g. missing or string_too_short.
Human-readable, actionable error message.
Example generated
{ "exception_details": { "error_code": "example", "validation_errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ] }, "reason": "example", "request_id": "example"}Authenticated but not permitted
Canonical error body — every non-2xx response uses this shape.
object
Machine-readable error context; empty object when there is nothing to add.
object
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.
Every field-level problem found in the request, when validation is what failed. Absent when the rejection is not about a specific value.
One field-level reason a request was rejected.
object
Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].
What is wrong with the value at loc.
Stable machine code for the problem, e.g. missing or string_too_short.
Human-readable, actionable error message.
Example generated
{ "exception_details": { "error_code": "example", "validation_errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ] }, "reason": "example", "request_id": "example"}Resource not found
Canonical error body — every non-2xx response uses this shape.
object
Machine-readable error context; empty object when there is nothing to add.
object
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.
Every field-level problem found in the request, when validation is what failed. Absent when the rejection is not about a specific value.
One field-level reason a request was rejected.
object
Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].
What is wrong with the value at loc.
Stable machine code for the problem, e.g. missing or string_too_short.
Human-readable, actionable error message.
Example generated
{ "exception_details": { "error_code": "example", "validation_errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ] }, "reason": "example", "request_id": "example"}Version not current
The canonical error body of a batch write’s 412, with exception_details typed.
object
Why the write was refused, and the current version of every stale item.
object
At least one item named a version its resource no longer has.
Every item whose version is not current. Read those resources again, reapply the changes and resend the whole request.
One item of a batch write naming a version that is no longer its resource’s current one.
Human-readable, actionable error message.
Example
{ "exception_details": { "error_code": "entity_version_stale" }}Request validation failed
The canonical error body of an attribute metadata write that failed validation, its codes typed.
object
The problems found, or why a request with none was refused.
object
entity_change_empty when the request names no field to change and has no field-level problems. Absent when validation_errors says what failed.
Every problem found, each naming where in the body it sits. Absent when error_code says why the request was refused.
One reason an attribute metadata write was rejected, with its attribute metadata codes published.
object
Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].
What is wrong with the value at loc.
Stable machine code for the problem: one of the attribute metadata codes listed here, or a generic one such as missing or string_too_long.
Stable machine codes for a rejected attribute metadata write.
Human-readable, actionable error message.
Example
{ "exception_details": { "error_code": "entity_change_empty", "validation_errors": [ { "type": "catalog_types_unavailable" } ] }}Service temporarily unavailable
Canonical error body — every non-2xx response uses this shape.
object
Machine-readable error context; empty object when there is nothing to add.
object
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.
Every field-level problem found in the request, when validation is what failed. Absent when the rejection is not about a specific value.
One field-level reason a request was rejected.
object
Path to the offending value from the request root, e.g. ["body", "filters", 0, "operator"].
What is wrong with the value at loc.
Stable machine code for the problem, e.g. missing or string_too_short.
Human-readable, actionable error message.
Example generated
{ "exception_details": { "error_code": "example", "validation_errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ] }, "reason": "example", "request_id": "example"}Was this page helpful?
Thanks.