Kits
Create a kit
Registers a named grouping of items that go out together.
kits:writeResult
generated from the schema
Tags go by NAME and one that does not exist is created, unlike POST /api, which asks for an identifier. Returns the created kit.
Arguments
Kit name.
Limits: min length 1
Kit description.
URL of the main image.
Collection it belongs to.
Idempotency key chosen by the client (a UUID is recommended). Repeating the same key with the same arguments within 24 h returns the stored response without executing again; with different arguments it responds 422. It is the safe way to retry after a network failure.
Limits: min length 1, max length 255
Optimistic locking: the meta.etag you got from the detail read of this resource (or "*"). If the resource changed since, the call fails with 412 precondition_failed before writing anything; read it again and retry. Omit it to write unconditionally.
Limits: min length 1
Result
On success the result carries structuredContent with data and meta. These are the attributes of data.
Show the attributes of data
Unique identifier of the kit.
Kit name.
Kit description; null if it has none.
URL of the main image; null if it has none.
Collection it belongs to; null if it is in none.
Full path of the collection; null if it is in none.
Items that make up the kit, in display order.
Show child attributesHide child attributes
Identifier of the item; read it in /api.
Item name, as recorded when it was added to the kit.
Variant of the item, if one was chosen; null otherwise.
Name of that variant; null if none.
How many units of the item the kit includes.
Display order inside the kit (0-based); null if not set.
Creation date in ISO 8601 UTC.
Last modification date in ISO 8601 UTC.
An error is a result with isError: true and the problem in content[0].; there is no structuredContent. See Errors.
The same operation by REST
This tool runs POST /api/v1/kits.
Related pages
Link to this section: Related pagesKits
Create a kit
Registers a named grouping of items that go out together.
Guides
Safe writes
An assistant that can write can also write the wrong thing. Decide which tools need a person, retry without duplicating, and know what a write sets in motion.
Guides
Errors
A tool error is a result with
isError: trueand the problem in the first text block. Branch on itscode.
Was this page helpful?