At the minimum, your cloud queue response to the player should be an HTTP 204 No Content success status response code or an error code. See Error handling for a list of error response codes. The response should not contain any data in the payload body.


Response (v2.1)

As of Cloud Queue v2.1, your server may return a JSON context object in the payload body. Return an HTTP 200 OK success status response code if you return data. If you return 200 with unexpected JSON, Sonos disables periodic reporting for the remainder of the track.

For example, you may want to update report options without waiting for the player to notice a context version change. This improves latency.

If you want to return a response body, you must return the full context object, similar to what your server would send in response to GET /context. This is due to a strict parser which requires the full object. However, Sonos ignores everything except for the periodicIntervalMillis value.

{
  catalogItemId: {
    type: 'default',
    id: 'root' 
  },
  version: '72416b71498e4984b17e631de49fa35d',
  skipEnforcement: {
    configuration: {},
    version: 1,
    remaining: 6,
    lastSkip: 1590084593496,
    skipsAllowed: true,
    maxSkips: 5,
    restoreSkipsAfterSec: 20
  },
  reportPolicyVersion: 0,
  reports: {
    periodicIntervalMillis: 20000
  },
  policies: {
    version: 17,
    policies: {
      canSkip: true,
      limitedSkips: false,
      canSkipBack: true,
      canSeek: true,
      canRepeat: true,
      canRepeatOne: true,
      canCrossfade: true,
      canShuffle: true,
      pauseAtEndOfQueue: true,
      showNNextTracks: 3,
      showNPreviousTracks: 0,
      notifyUserIntent: false,
      pauseTtlSec: 0,
      playTtlSec: 0,
      pauseOnDuck: null,
      canResume: false
    }
  },
  policyVersion: 17,
  skipEnforcementVersion: 1,
  container: {
    version: 1,
    type: 'station',
    name: 'Bruce Springsteen Radio',
    imageUrl: 'http://images.example.com/station_art.jpg',
    id: { serviceId: '255', objectId: 'sta12345', accountId: 'user981' },
    service: { id: '255', name: 'ACME MUSIC' },
    tags: []
  },
  containerVersion: 1,
  success: 'success'
}