mutation UpdateScxItemSalesChannelData($request: UpdateScxItemSalesChannelDataCommandRequestInput!) {
UpdateScxItemSalesChannelData(request: $request) {
salesChannelId
itemId
channelCategoryId
minimumStockLevel
maximumStockLevel
}
}{
"request": {
"salesChannelId": "string",
"itemId": "id"
}
}{
"data": {
"UpdateScxItemSalesChannelData": {
"salesChannelId": "id",
"itemId": "id",
"channelCategoryId": "id",
"minimumStockLevel": "value",
"maximumStockLevel": "value"
}
}
}UpdateScxItemSalesChannelData
Changes the base data of an item for an SCX seller (sales channel): the channel category and the minimum and maximum stock level. Only the properties that are sent change; a property that is omitted keeps its value, and null is a value of its own: null for the channel category removes the category from the item, null for a stock level stores 0, which means no stock level as in the Wawi, so the item reads back 0 and not null. At least one property must be sent. The response is the base data of the item as it is now. Changing the channel category moves the attribute values of the item to the new category. Before the category changes, the attribute definitions of the new category are refreshed from the marketplace when they are outdated, as the refresh commands do; a failed refresh is not reported, the change goes ahead with the definitions already stored. If the definitions of the new category were never refreshed and the refresh fails, the change fails with the error SCX_CHANNEL_CATEGORY_DEFINITIONS_MISSING. The refresh removes the attribute definitions that the marketplace no longer lists for the category. Values stored for removed category attributes may be removed as well, for all sellers of the channel: the stored values of those attributes are deleted for every item of every seller of the channel that is assigned to the category, and this is not undone if the request is rejected afterwards. Problems found in the sent category and stock levels are reported together; a missing category definition is reported on its own. Minimum and maximum stock level are not compared with each other. The error codes are: SALES_CHANNEL_ID_INVALID (SalesChannelId is not a valid sales channel id), SCX_PATCH_REQUEST_EMPTY (no property was sent), SCX_CHANNEL_CATEGORY_NOT_IN_CHANNEL (the category does not belong to the marketplace channel of the seller), SCX_CHANNEL_CATEGORY_NOT_ASSIGNABLE (the category cannot be assigned, because it is not listable or is deprecated), SCX_CHANNEL_CATEGORY_DEFINITIONS_MISSING (the attribute definitions of the new category were never refreshed and the refresh failed), SCX_STOCK_LEVEL_INVALID (a stock level is negative or, rounded to 13 decimal places, exceeds 999999999999.9999999999999), SCX_SALES_CHANNEL_NOT_FOUND (no SCX seller exists for the sales channel id, or the seller is deleted or deactivated) and SCX_ITEM_NOT_FOUND (the item does not exist).
If a request with this mutation’s Idempotency-Key was already completed, the response’s extensions contains an idempotency.{responseName} entry with wasReplayed: true.
UpdateScxItemSalesChannelData(request: UpdateScxItemSalesChannelDataCommandRequestInput!): ScxItemSalesChannelData!Arguments
Returns
Id of the sales channel (the seller account) the base data belongs to. Opaque, tenant-local composite identifier (not a UUID).
ID of the item.
ID of the channel category the item is assigned to on this sales channel, or null if the item has no category on this sales channel.
Minimum stock level of the item on this sales channel, or null when no base data has been stored for the item yet; a stored value, including 0, is returned as stored.
Maximum stock level of the item on this sales channel, or null when no base data has been stored for the item yet; a stored value, including 0, is returned as stored.
mutation UpdateScxItemSalesChannelData($request: UpdateScxItemSalesChannelDataCommandRequestInput!) {
UpdateScxItemSalesChannelData(request: $request) {
salesChannelId
itemId
channelCategoryId
minimumStockLevel
maximumStockLevel
}
}{
"request": {
"salesChannelId": "string",
"itemId": "id"
}
}{
"data": {
"UpdateScxItemSalesChannelData": {
"salesChannelId": "id",
"itemId": "id",
"channelCategoryId": "id",
"minimumStockLevel": "value",
"maximumStockLevel": "value"
}
}
}Was this page helpful?