rateItem

Sonos uses rateItem to rate an item on your service. See Add ratings for details.

If the rating logic is static, you might establish a pre-defined behavior on the Sonos app for each rating. In this case, you can omit the shouldSkip and messageStringId values from the result. However, your service may find the “dynamic” shouldSkip and messageStringId values useful when you need to enforce business rules about when a user can skip a track or not.

Sonos makes this request on your secure (HTTPS) endpoint.

Request parameters

NameTypeDescription
idstring(128)The unique ID of the item to rate.
ratingintThe rating value for the item.

Response

NameTypeDescription
shouldSkipboolean(Optional) true if the song should be skipped. false if it should not be skipped.

This can be omitted if the Sonos app already knows what to do when sending this rating. For example, you might never want to skip the song after sending a “positive” rating.
messageStringIdstring(128)(Optional) An ID specifying a message that the Sonos app should show to the user.

For example, you can use this to offer a reason why Sonos skipped the song. The Sonos app can ignore this message if it has a default string for this rating.