{"swaggerDoc":{"openapi":"3.1.0","info":{"title":"FitRadio Partner Suite","description":"The FitRadio suite of APIs is responsible for delivering audio mixes of music, as well discovery of said mixes through a series of categories set in what we call “lists.” Each list can consist of a series of mixes organized by genre, tempo, exercise, artist or given a user's set preferences with the Fit Radio ecosystem. Today, this same set of webservices power the Fit Radio mobile applications and can be tailored to your use case to organize available mixes for your application as well. This includes (but is not limited to) excluding explicit content, organizing separate categories, and displaying custom images. The purpose of this document is to provide explanation of means of authentication, describe sample interaction with the Fit Radio suite of APIs, as well as sample requests and responses corresponding to this flow. See below for added explanation of fields returned in successful responses.","termsOfService":"https://www.fitradio.com/tos","contact":{"email":"
[email protected]"},"version":"1.0"},"servers":[{"url":"https://p.fitradio.com"}],"tags":[{"name":"authentication","description":"Means to generate JWT tokens to sign requests"},{"name":"catalog","description":"A catalog of music pages grouped by type"},{"name":"page","description":"A set of pages that belong to the catalog type"},{"name":"list","description":"A set of lists of mixes that belong to a page type"},{"name":"mix","description":"A curated list of tracks that contains the asset"},{"name":"royalty","description":"Routes to track consumption of royalty bearing plays"}],"paths":{"/partners/session":{"post":{"tags":["authentication"],"summary":"Start a session","description":"Creates a JWT token for use in the Authorization header","requestBody":{"description":"Parameters provided by FitRadio team","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionStart"}}},"required":true},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}}},"security":[{}]}},"/partners/catalog":{"get":{"tags":["catalog"],"summary":"Lists pages inside of selected catalog","description":"Use with pages endpoint","responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Catalog"}}}}}},"security":[{"BearerAuth":[],"ClientId":[]}]}},"/partners/list/{list_id}":{"get":{"tags":["list"],"summary":"Finds mixes associated with list_id","description":"Find list_id from pages route","parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ListFull"}}}}}},"security":[{"BearerAuth":[],"ClientId":[]}]}},"/partners/page/{page_id}":{"get":{"tags":["page"],"summary":"A set of lists inside a page","description":"Find page_ids from catalog routes","parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page"}}}}},"security":[{"BearerAuth":[],"ClientId":[]}]}},"/partners/mix/{mix_id}":{"get":{"tags":["mix"],"summary":"returns track listing and assets for a mix","description":"","parameters":[{"name":"mix_id","in":"path","description":"find mix_ids from lists route","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Mix"}}}}},"security":[{"BearerAuth":[],"ClientId":[]}]}},"/partners/royalty-tracking":{"post":{"tags":["royalty"],"summary":"record a track play","description":"information obtained from mix's track list","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Log"}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogAccept"}}}},"405":{"description":"Invalid input"}}}}},"components":{"schemas":{"LogAccept":{"type":"object","properties":{"error":{"type":"string","example":"false"},"message":{"type":"string","example":"success"}}},"Log":{"type":"object","properties":{"cachedplay":{"type":"string"},"country":{"type":"string"},"device":{"type":"string"},"endreason":{"type":"integer","format":"int64"},"isrc":{"type":"string"},"jumpforward":{"type":"string"},"os":{"type":"string"},"playedat":{"type":"integer","format":"int64"},"playlength":{"type":"integer","format":"int64"},"sourcedetail":{"type":"string"},"sourcestream":{"type":"string"},"trackid":{"type":"integer","format":"int64"},"userid":{"type":"integer","format":"int64"},"vendor":{"type":"integer","format":"int64"}}},"Catalog":{"type":"object","properties":{"page_id":{"type":"integer","format":"int64","example":10},"title":{"type":"string","example":"Fitness Classes"},"type":{"type":"string"},"ranking":{"type":"integer","format":"int64","example":10},"list_count":{"type":"integer","format":"int64","example":10}}},"CatalogList":{"type":"object","properties":{"tags":{"type":"array","xml":{"wrapped":true},"items":{"$ref":"#/components/schemas/Catalog"}}}},"Page":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":10},"title":{"type":"string","example":"Fitness Classes"},"lists":{"type":"array","xml":{"wrapped":true},"items":{"$ref":"#/components/schemas/List"}}}},"List":{"type":"object","properties":{"list_id":{"type":"integer","format":"int64","example":10},"ranking":{"type":"integer","format":"int64","example":10},"title":{"type":"string","example":"Most Popular"},"description":{"type":"string"},"mix_count":{"type":"integer","format":"int64","example":10},"image":{"type":"string"}}},"MixLight":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":10},"list_id":{"type":"integer","format":"int64","example":10},"bpm":{"type":"integer","format":"int64","example":10},"max_bpm":{"type":"integer","format":"int64","example":10},"title":{"type":"string","example":"Most Popular"},"description":{"type":"string"},"explicit":{"type":"integer","format":"int64","example":1}}},"ListFull":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":10},"title":{"type":"string","example":"Most Popular"},"description":{"type":"string"},"image":{"type":"object","properties":{"thumbnail":{"type":"string"},"large":{"type":"string"},"player":{"type":"string"}}},"mixes":{"type":"array","xml":{"wrapped":true},"items":{"$ref":"#/components/schemas/MixLight"}}}},"Track":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":10},"time":{"type":"string","example":"Most Popular"},"isrc":{"type":"string","example":"Most Popular"},"artist":{"type":"string","example":"Most Popular"},"title":{"type":"string","example":"Most Popular"}}},"Mix":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":10},"min_bpm":{"type":"integer","format":"int64","example":10},"max_bpm":{"type":"integer","format":"int64","example":10},"title":{"type":"string","example":"Gold Guns Girls"},"description":{"type":"string"},"length":{"type":"string"},"url":{"type":"string"},"image_large":{"type":"string"},"image_thumbnail":{"type":"string"},"dj":{"type":"string"},"tracks":{"type":"array","xml":{"wrapped":true},"items":{"$ref":"#/components/schemas/Track"}}}},"SessionStart":{"type":"object","properties":{"client_id":{"type":"string","example":"false"},"client_signature":{"type":"string","example":"success"},"email":{"type":"string","example":"success"}}},"SessionResponse":{"type":"object","properties":{"session":{"type":"object","properties":{"token":{"type":"object","properties":{"token":{"type":"string"},"error":{"type":"string"}}}}}}}},"requestBodies":{"Log":{"description":"A royalty log with mix/track information at a given time during playback","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Log"}}}}},"securitySchemes":{"ClientId":{"type":"apiKey","name":"X-Client-Id","in":"header"},"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"Your signed JWT token obtained from session create"}}}}}