Items
Update the alternatives of an item
Declares which other items serve when this one is not available.
items:writeitems:write- 120/min
- Server annotation: Destructive
- Server annotation: Idempotent
- Requires human confirmation
Result
generated from the schema
Requires human confirmation
Put this tool on your client's “ask before running” list. The annotations are hints that the server declares, not guarantees: do not decide the approval from destructiveHint alone.
Same mode contract as accessories: merge is deltas, replace deletes what is absent. Returns the full item, with alternativeIds as they now stand, the same projection as its GET.
Arguments
Item identifier.
Limits: min length 1
merge (default): operations are deltas and whatever you do not name is kept. replace: the list sent is the final list and everything absent IS DELETED.
Available options: merge, replace
Operations to apply. At least one.
Limits: min 1 items
Show child attributesHide child attributes
Existing alternative. Required to update or delete.
What to do. If omitted: with alternativeId it updates, without it it creates.
Available options: create, update, delete
Alternative data.
Show child attributesHide child attributes
Item that serves as the alternative.
Limits: min length 1
When or why this alternative is valid.
Limits: max length 1000
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 item.
Item name.
SKU reference of the item; null if not recorded.
Item description; null if not recorded.
Additional information for the order (preparation/delivery notes); null if not recorded.
EAN/barcode; null if not recorded.
Item type: fixed (simple item) or variant (item with variants).
Available options: fixed, variant
Stock calculation method: bulk (in bulk, by quantity) or serialized (by serialized items).
Available options: bulk, serialized
Identifier of the collection it belongs to; null if it is in none.
Name of the collection it belongs to; null if it is in none.
URLs of the item images.
Sale price as a decimal string "1234.50" (ROUND_HALF_UP); null if it has none.
Limits: pattern ^-?\d+\.\d{2}$
Deposit amount as a decimal string "1234.50" (ROUND_HALF_UP); null if it has none.
Limits: pattern ^-?\d+\.\d{2}$
Minimum stock configured for alerts; null if not configured.
Number of serialized items registered for the item.
Rental pricing configuration; null if not configured.
Show child attributesHide child attributes
Pricing mode: periodPrice (price per period), fixedPrice (fixed price) or pricingStructure (pricing structure); null if the item has none configured.
Available options: periodPrice, fixedPrice, pricingStructure
Base rental price as a decimal string "1234.50" (ROUND_HALF_UP); null if not applicable.
Limits: pattern ^-?\d+\.\d{2}$
Period unit of the price: hour, day, week or month; null if the item has none configured.
Available options: hour, day, week, month
Whether the item allows insurance.
Whether the item allows discounts.
Buffer time reserved before the rental; null if not applicable.
Unit of the buffer before: hour or day; null if not applicable.
Available options: hour, day
Buffer time reserved after the rental; null if not applicable.
Unit of the buffer after: hour or day; null if not applicable.
Available options: hour, day
Physical properties (weight and dimensions); null if not recorded.
Show child attributesHide child attributes
Item weight in kilograms; null if not recorded.
Item width in centimeters; null if not recorded.
Item height in centimeters; null if not recorded.
Item length in centimeters; null if not recorded.
Item volume in cubic meters (m³); null if not recorded.
Current draw in amperes; null if not recorded.
Power in watts; null if not recorded.
Item variants (empty if the item is of type fixed).
Show child attributesHide child attributes
Unique identifier of the variant.
Variant name.
Rental price of the variant as a decimal string "1234.50" (ROUND_HALF_UP).
Limits: pattern ^-?\d+\.\d{2}$
Sale price of the variant as a decimal string "1234.50" (ROUND_HALF_UP); null if it has none.
Limits: pattern ^-?\d+\.\d{2}$
EAN/barcode of the variant; null if not recorded.
Custom field values by custom field identifier; the definitions are in /api.
Creation date in ISO 8601 with offset.
Last update date in ISO 8601 with offset.
Replacement value of the item as a decimal string "1234.50" (ROUND_HALF_UP); null if not recorded.
Limits: pattern ^-?\d+\.\d{2}$
Identifiers of the items configured as accessories of this one.
Identifiers of the items configured as alternatives of this one.
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 PUT /api/v1/items/{itemId}/alternatives.
Related pages
Link to this section: Related pagesItems
Update the alternatives of an item
Declares which other items serve when this one is not available.
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?