Expected behavior:
Return a full episode object as documented for every episode.
Current behavior:
Returns a additional "restriction" key for podcasts containing music. This might had some internal usage to exclude this episode before the feature was public. Podcasts without music don´t contain this key.
Example:
"restriction": { "reason": "product" }
Possible solution:
Document key as optional or exclude it from the publicly exposed API.
Reproduce:
Episode with "restriction"-key: https://developer.spotify.com/console/get-episode/?id=2syAQo6ud2AjKXWctWsTXR
Episode without "restriction"-key: https://developer.spotify.com/console/get-episode/?id=4LN3xZqmFAkWoJdkZppfa4
Hey @tudi, thanks for coming to the Developer board to share this information!
Good question! I've taken a look and the restrictions element might be passed back when a track/album is unavailable (for the given market). Here is some information about this object from the "Get a Track"-endpoint documentation:
restrictions | a restrictions object | Part of the response when Track Relinking is applied, the original track is not available in the given market, and Spotify did not have any tracks to relink it with. The track response will still contain metadata for the original track, and a restrictions object containing the reason why the track is not available: "restrictions" : {"reason" : "market"} |
Let me know if this answers your question!
Have a good one,
Hubo
Hey there you, Yeah, you! 😁 Welcome - we're glad you joined the Spotify Community! While you here, let's have a fun game…