createItem

This API has been deprecated. See Add favorites for details on how to implement favorites.

If your integration uses createItem, it will continue to work.

Sonos uses createItem to customize content. It enables the user to store favorites, create custom radio programs, and store playlists. The request takes the favorite parameter, which is analogous to a bookmark in a web browser. The favorite parameter includes the ID of the item to add to the user’s favorites collection.

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

Request parameters

NameTypeDescription
favoritestring(255)The ID of the item to be added to the favorites collection.

Response

Include the response in a createItemResponse element.

NameTypeDescription
createItemResultstring(255)You must provide this response, but we do not require a value.

Sample request

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <createItem xmlns="http://www.sonos.com/Services/1.1">
      <favorite>track0004</favorite>
    </createItem>
  </soap:Body>
</soap:Envelope>

Sample response

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <createItemResponse xmlns="http://www.sonos.com/Services/1.1">
      <createItemResult>
      </createItemResult>
    </createItemResponse>
  </soap:Body>
</soap:Envelope>