Add tracks to playlist

Add an array of tracks to the playlist at {playlistId}. All metadata (e.g. track title, artist, etc) for tracks needs to be provided in the API call. The "source" property is optional, and defaults to 7digital. This relates to the audioUrl and image response and can be used to indicate a different source for the physical file, it can be any string you want as long as the application you use to add the track can understand it.The "audioUrl" property is optional and allows you to specify a different source for the physical file e.g. source="local" and audioUrl="file://a.specific.file.location.mp3" could mean that the consuming application understands how to handle a file stored at the given audioUrl.It is advisable that you only use these extra parameters if you need to use them. It's also advisable if you are accessing public playlists that some tracks may not be playable by your application, so we would advise including an option to hide, grey out non source=7digital tracks.OAuth

Example request

POST https://api.7digital.com/1.2/playlists/51ed5cfec9021614f462bb7b/tracks?country=GB&oauth_consumer_key=YOUR_KEY_HERE&oauth_token=...

The body of the request should be structured as follows:

[{
        "trackId": "5495893",
        "trackTitle": "No You Girls",
        "trackVersion": "Trentmoller Remix",
        "artistAppearsAs": "Franz Ferdinand",
        "releaseId": "496338",
        "releaseTitle": "No You Girls Remixes Part 2",
        "releaseArtistAppearsAs": "Franz Ferdinand",
        "releaseVersion": "Digital Download"
}]

Example response

{{
  "playlist": {
    "id": "51ed5cfec9021614f462bb7b",
    "name": "My Chillout Mix",
    "status": "published",
    "visibility": "Public",
    "image": "http://artwork-cdn.7static.com/static/img/sleeveart/00/004/963/0000496338_$size$.jpg",
    "description": "Laid back listening",
    "tracks" : [{
      "playlistItemId" : "52cd88c2c902161660aeab80",
      "trackId" : "5495893",
      "trackTitle" : "No You Girls",
      "trackVersion" : "Trentmoller Remix",
      "artistAppearsAs" : "Franz Ferdinand",
      "releaseId" : "496338",
      "eleaseTitle" : "No You Girls Remixes Part 2",
      "releaseArtistAppearsAs" : "Franz Ferdinand",
      "releaseVersion" : "Digital Download",
      "source" : "7digital",
      "audioUrl" : "http://stream.svc.7digital.net/stream/catalogue?trackId=5495893",
      "user" : "id:4874383",
      "image" : "http://artwork-cdn.7static.com/static/img/sleeveart/00/004/963/0000496338_$size$.jpg"
    },
    {
      "playlistItemId" : "52cd88c2c902161660aeab81",
      "trackId" : "3121833",
      "trackTitle" : "Kids",
      "trackVersion" : "",
      "artistAppearsAs" : "MGMT",
      "releaseId" : "280218",
      "releaseTitle" : "Oracula Spectacular",
      "releaseArtistAppearsAs" : "MGMT",
      "releaseVersion" : "",
      "source" : "7digital",
      "audioUrl" : "http://stream.svc.7digital.net/stream/catalogue?trackId=3121833",
      "user" : "id:4874383",
      "image" : "http://artwork-cdn.7static.com/static/img/sleeveart/00/002/802/0000280218_$size$.jpg"
    }],
    "annotations": { },
    "lastUpdated": "2013-10-02T12:16:04.615Z"
  }
}
 
}
Path Params
string
required

The identifier for the playlist you want to add tracks to

Query Params
string
required

The ISO 2-character code of the country to which your oauth_consumer_key has access.

string

If you are using this endpoint for a user specific playlist, then provide the unique identifier of the user. For information on creating users click here.

Language
LoadingLoading…