Skip to main content
PUT
Set Scx Item Custom Attribute Values

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Scopes

scxoffers.write
oauth2-authorization-code

Grants permission to write SCX offer data, such as refreshing attribute definitions.

scxoffers.write
oauth2-client-credentials

Grants permission to write SCX offer data, such as refreshing attribute definitions.

Headers

x-tenant-id
string<uuid>
required

The tenant ID for the target ERP instance.

Path Parameters

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
string<uuid>
required

ID of the item. The ID of an item.

Example:

"b45f6432-2462-4c6f-b00f-1d9d01000000"

Body

application/json

Request model for SetScxItemCustomAttributeValues command endpoint. Route parameters bind from the route, query parameters from the query string, everything else from the body.

customAttributeValues
object[]
required

The complete list of custom field entries that the item has afterwards. Required; an empty list deletes all of them.

Response

The custom fields were replaced. Returns the stored custom field entries of the item; an entry whose list entry sent a client id carries it.

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[]." 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: , clientId: ] : ", 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. - Response

customAttributeValues
object[]
required

The custom field entries that the item has after the call, read after the change was saved.