Voting

A rate limiter takes care of this endpoint, find out more about all the security mechanisms we use here.

get
Get all songs

https://api.atomicradio.eu/voting
This endpoint returns all the songs you can vote for.
Request
Response
Request
Response
200: OK
{
"items": [
{
"id": 1,
"unique_id": "9700f10db23f65122f75ba5c11c7dfa6",
"artist": "ROBBY EAST & ROLIPSO",
"title": "BREAKAWAY",
"type": "#NEWCOMER",
"votes": 0,
"voted": false,
"preview_url": "",
"artworks":{
"100": "https://cdn.atomicradio.eu/artworks/9700f10db23f65122f75ba5c11c7dfa6/0100.jpg",
"250": "https://cdn.atomicradio.eu/artworks/9700f10db23f65122f75ba5c11c7dfa6/0250.jpg",
"500": "https://cdn.atomicradio.eu/artworks/9700f10db23f65122f75ba5c11c7dfa6/0500.jpg",
"1000": "https://cdn.atomicradio.eu/artworks/9700f10db23f65122f75ba5c11c7dfa6/1000.jpg"
}
},
// Next 29 songs
],
"created_at": 1621614601100,
"closing_at": 1622217600000,
"ending_at": 1622219400000,
"closed": false
}
500: Internal Server Error
{
"code": 500,
"message": "A problem with our API has occurred. Try again later."
}
503: Service Unavailable
{
"code": 503,
"message": "Voting is currently disabled. Try again later."
}

post
Vote for a song

https://api.atomicradio.eu/voting?id={id}
This endpoint allows you to vote for a song.
Request
Response
Request
Query Parameters
id
optional
number
Song item id
Response
200: OK
{
"code": 201,
"message": "Thank you for your vote for ROBBY EAST & ROLIPSO - BREAKAWAY."
}
400: Bad Request
{
"code": 400,
"message": "No id specified in the query."
}
403: Forbidden
{
"code": 403,
"message": "Voting has been closed. Try again later."
}
404: Not Found
{
"code": 404,
"message": "There are currently no songs in the voting. Try again later."
}
// or
{
"code": 404,
"message": "The song with the given id was not found."
}
500: Internal Server Error
{
"code": 500,
"message": "You have already voted for this song."
}
503: Service Unavailable
{
"code": 503,
"message": "Voting is currently disabled. Try again later."
}