Input objects
SetScxItemCustomAttributeValuesCommandRequestInput
Replaces the custom fields that an SCX seller stored on an item. The list describes the custom field entries the item has afterwards: an entry with an "Id" updates that entry (a property that is not sent keeps its stored value), an entry without an "Id" creates a new entry and needs a "ClientId", and a stored custom field entry that no list entry names is deleted, so an empty list deletes all of them. A new entry with the name of an existing field adds a value to that field; a changed name on an existing entry renames the field. Stored entries without a name are deleted as well, although the read operation never returns them; the call does not report them. Values with an attribute code are not touched. A custom field cannot hold a file, so the input has no file property. The whole call is one unit: if any rule is violated nothing is written. The result lists all custom field entries that the item has after the call, ordered like "QueryScxItemCustomAttributeValues" without a requested sort order, read after the change was saved; an entry whose list entry sent a "ClientId" carries it, a created entry together with its new "Id". The call has no concurrency protection: it writes the list as given, so an entry that another client created in the meantime is deleted as well. A repeated call is not idempotent for created entries: a retry sends no "Id" for an entry that the lost first call created, so it deletes that entry and creates a new one with a new "Id". A client that did not receive the result therefore reads the stored custom fields ("QueryScxItemCustomAttributeValues") before it repeats the call. A change that reaches the offers of the item marks the item for upload. An invalid sales channel id is rejected as invalid (error code SALES_CHANNEL_ID_INVALID). A sales channel that does not exist, is deleted, is deactivated or is not an SCX seller, or an id whose channel part does not match the seller, is rejected as not found (error code SCX_SALES_CHANNEL_NOT_FOUND); an item that does not exist is rejected as not found (error code SCX_ITEM_NOT_FOUND). Violated rules of the entries are all reported at once. The error carries the error code that all violations share, or SCX_VALIDATION_FAILED if they differ, and the violations grouped by field: the key is "entries[<index>].<field>" with the zero-based position of the entry in the list and the field in camelCase (for example "entries[2].name"), the value is a list of texts of the form "[id: <id>, clientId: <clientId>] <error code>: <message>", where the bracket part appears only if the entry carries an id or a client id and is not a machine-readable contract. The grouping is delivered in the same form on every API surface. - Request
input
SetScxItemCustomAttributeValuesCommandRequestInputFields
salesChannelId
String!
required
Sales channel id of the SCX seller/account. Opaque, tenant-local composite identifier (not a UUID); use the id of a sales channel as returned by the sales channels query.
itemId
ID!
required
ID of the item.
customAttributeValues
required
The complete list of custom field entries that the item has afterwards. Required; an empty list deletes all of them.
Was this page helpful?