7digital API Documentation

Contents

Introduction

The 7digital API gives developers and partners access to 7digital services and licensed catalogue of over 11m tracks allowing creation of new music applications ranging from simple music discovery websites to fully integrated download stores or full-length streaming services.

Most of the 7digital API is open to everyone and free for non-commercial use (with usage limits in place). Commercial/business use of the API requires a contract with 7digital.

API methods marked with PREMIUM icon also require a formal contract. If you’d like access to any of these methods please email us at api@7digital.com outlining the proposed usage and we'll get back to you.

API users will be given a unique API key (register here) that is used to access the API methods and can also be used to track any commissions due from sales that derive from API usage.

API basics

Request format

Access to the services provided by 7digital is provided through a REST style interface.

The production API is located at the following address:

http://api.7digital.com/1.2/
A typical API request will look as follows:
http://api.7digital.com/1.2/artist/details?artistId=1&country=gb&oauth_consumer_key=YOUR_KEY_HERE

The supported HTTP method(s) are marked along each API method, e.g. or .

HTTP POST requests to the 7digital API require all their parameters (incl. country, page, etc parameters) to be supplied within the POST body in the application/x-www-form-urlencoded content type format, e.g.

POST http://api.7digital.com/1.2/user/signup
 
emailaddress=test%2540test.com&password=123&country=gb&oauth_consumer_key=YOUR_KEY_HERE

API access

Access to the 7digital API is controlled by a consumer key which needs to passed in parameter oauth_consumer_key with every request. API keys are issued upon request. To obtain one, please apply at developer.7digital.net.

API methods marked with the OAuth icon require requests to be signed using OAuth authentication protocol. For more details please see the OAuth Authentication section.

Response format

Standard responses

Standard responses will be returned in XML format.

A successful response will have the following format:

<response status="ok" version="1.2">
  <response_content />
</response>

Error responses

A response status of error means an error has occurred whilst processing a request. A failed request will instead of the results content contain an error message element:

<response status="error" version="1.2">
  <error code="1001">
    <errorMessage>Missing artist ID</errorMessage>
  </error>
</response>

Error codes can be split into following categories:

1XXX - Invalid or missing input parameters

1001 - Required parameter missing
1002 - Invalid parameter value
1003 - Parameter value out of allowable range
1006 - Invalid enumeration value
1007 - Query string parameters are not permitted when performing HTTP Post. Please use Post body or header.

2XXX - Invalid resource reference

2001 - Resource cannot be found
2002 - Resource is not available in current context
2003 - Resource already exists

3XXX - User card errors

3001 - The user's card has expired
3002 - The user has no card details saved
3003 - Payment for this purchase has failed

7XXX - 7digital API application error

7001 - Unable to perform action
7002 - Application configuration error
7003 - Operation timed out

9xxx - Internal server error

9001 - Unexpected internal server error

Should you receive an error with error code 7000 and above please contact us with the details of the request that caused it and as much additional details as possible that might help us to reproduce it. Our API team will investigate the cause and respond to you promptly.

Authentication failure responses

Should your API request fail authentication a response with HTTP Status Code 401 will be returned along with plain text message describing the reason of the authentication failure.

Please ensure you're using a valid api key and accessing the correct API endpoint.

Non-standard responses

Requests to some special methods will return a client redirect (e.g. basket/checkout) or serve a media file (e.g. track/streampreview) instead of an XML response.

Caching API responses

For applications with high-volume usage or with frequent requests for the same data you are expected to store API responses in a local cache instead of making repeated requests.

The easiest way to enable caching in your application is by setting-up a proxy server between the application and 7digital API and make all API calls through this proxy. Alternatively you can implement caching directly in your code.

For convenience we provide HTTP cache control headers with each API response, which will provide you with information whether to cache a response from a particular API method and for how long (parameter max-age returns time in seconds). These are generally recommended values adjusted for each API method but you are free to use your own caching strategy should it suit your application better.

The following HTTP Cache control headers will be returned for methods that are recommended to be cached:

Cache-Control:	private, max-age=432000
Last-Modified:	Tue, 13 Apr 2010 15:03:49 GMT

For methods that are not recommended to be cached you will receive the below HTTP header:

Cache-Control:	no-cache, no-store

Usage Limits

Access to the 7digital API is rate limited. The limit currently applies to number of API requests made using a single api key per day (i.e. it is not split across end users or IP addresses). To find out what usage limits are in place for the free Public API please visit developer.7digital.net.

Responses from all rate limited API methods will include the following HTTP headers:

X-RateLimit-Limit: 4000
X-RateLimit-Current: 100
X-RateLimit-Reset: 123465
Limit is the maximum number of requests allowed for your API key in given period, Current is the number of request already made in this period and Reset is number of seconds left until the end of the current period when the usage counters are reset.

gzip compression

You can minimize the size of all XML responses by using gzip compression. To get a compressed response you will need to provide the following header with your request:

Accept-Encoding: gzip
The max-age is recommended time in seconds to store the provided response in cache.

Countries & currencies

7digital download stores are available in several countries across the world. In order to be able to provide users with the maximum possible amount of content available in their country and display prices in their local currency whenever possible, all API methods accept a special parameter country. This parameter expects a 2 letter ISO country code (eg. GB, US, DE). If a country code is not supplied, all operations will be actioned on the default store - currently the UK one.

Commercial customers who have a dedicated shop with custom content set up should instead of country code use parameter shopId set to the id assigned to them. Please contact our business department to enquire about this option.

Lists & paging

All API methods that return a list of items in the response accept the following paging parameters:

nametypeusedescription
page
intoptionalPage number of the result set. If not supplied, defaults to 1
pageSize
intoptionalNumber of items to be returned per page. If not supplied, defaults to 10. Maximum page size is 500

Paging information will also be included in the response as per the format below:

<page>1</page>
<itemsPerPage>10</itemsPerPage>
<totalItems>21</totalItems>

Image sizes of cover art and artist pictures

The size of images returned by any API response can be adjusted by adding imageSize parameter to the request

nametypeusedescription
imageSize
intoptionalthe requested width of the image in pixels

For release cover art images the following sizes are supported:


* Cover art at this size is not available for some releases (less than 0.1% of the catalogue)

Example

http://api.7digital.com/1.2/artist/releases?artistId=1&imageSize=350&oauth_consumer_key=YOUR_KEY_HERE

Artist pictures are available in these sizes::


Please note: The image size is defined by the width of the picture. The height of the picture may vary.

Example

http://api.7digital.com/1.2/artist/details?artistId=1&imageSize=200&oauth_consumer_key=YOUR_KEY_HERE

Standard response objects

Most of the API responses will consist of one or a list of standard objects as described below. The level of available detail in the response may vary depending on the method. In the examples below, all possible fields are included.

Artist

Example response:
<artist id="14">
  <name>The Charlatans</name>
  <sortName>Charlatans, The</sortName>
  <appearsAs>The Charlatans</appearsAs>
  <image>http://cdn.7static.com/static/img/artistimages/00/000/000/0000000014_50.jpg</image>
  <url>http://www.7digital.com/artists/the-charlatans/?partner=123</url>
  <popularity>0.53</popularity>
</artist>
Description of response fields:
nametypedescription
artist@id
integerunique identifier of artist in 7digital catalogue
name
stringname of the artist (e.g. "The Pogues")
appearsAs
stringname of the artist as it appears on the track or release (this field is only available when artist object is returned attached to a track or release, e.g. "The Pogues feat. Kirsty MacColl")
sortName
stringname of the artist as used for sorting (e.g. "Pogues, The")
image
URLurl of a picture of the artist
url
URLlink to shop where artist's releases & tracks can be purchased
popularity
decimala figure between 0 and 1 representing the artists popularity, currently only available on the artist/search and artist/bytag/top endpoints

Release

Albums, singles and videos are all considered and referred to as releases.

Example response:
    <release id="155408">
  <title>Dreams</title>
  <version>UK</version>
  <type>Album</type>
  <barcode>00602517512078</barcode>
  <year>2007</year>
  <explicitContent>false</explicitContent>
  <artist id="29755">
    <name>The Whitest Boy Alive</name>
    <appearsAs>The Whitest Boy Alive</appearsAs>
    <url>http://www.7digital.com/artists/the-whitest-boy-alive/?partner=123</url>
  </artist>
  <image>http://cdn.7static.com/static/img/sleeveart/00/001/554/0000155408_50.jpg</image>
  <url>http://www.7digital.com/artists/the-whitest-boy-alive/dreams-(1)/?partner=123</url>
  <releaseDate>2007-10-22T00:00:00+01:00</releaseDate>
  <addedDate>2007-10-11T12:18:29+01:00</addedDate>
  <price>
    <currency code="GBP">£</currency>
    <value>5</value>
    <formattedPrice>£5.00</formattedPrice>
    <rrp>1.79</rrp>
    <formattedRrp>£7.79</formattedRrp>
    <isOnSale>true</isOnSale>
  </price>
  <formats availableDrmFree="True">
    <format id="17">
      <fileFormat>MP3</fileFormat>
      <bitRate>320</bitRate>
      <drmFree>True</drmFree>
    </format>
    <format id="1">
      <fileFormat>WMA</fileFormat>
      <bitRate>192</bitRate>
      <drmFree>False</drmFree>
    </format>
  </formats>
  <label id="40">
    <name>Universal-Island Records Ltd.</name>
  </label>
  <licensor id="1">
    <name>Universal</name> 
  </licensor>
  <popularity>0.38</popularity> 
  <duration>2473</duration>
  <trackCount>10</trackCount>
</release>
Description of response fields:
nametypedescription
release@id
integerunique identifier of the release in 7digital catalogue
title
stringtitle of the release
version
stringversion title of the release
type
enumerationtype of the release, one of: album/single/video
barcode
stringbarcode of the product (typically UPC)
year
integeryear of the original release (as supplied to 7digital by the issuing label, where data is not available, year of the digital release)
explicitContent
booleanparental advisory - explicit content tag, as supplied to 7digital by the issuing label
artist
artist objectprimary artist of the release (subset of fields of the full artist details as described above)
image
URLurl of the release cover picture
url
URLlink to 7digital page where this release can be purchased
releaseDate
datetimedate and time the release is available to download from
addedDate
datetimedate and time the release has been added to 7digital catalogue
price
price objectpricing information
formats
list of format objectslist of formats the tracks appearing on this release are available in
label
label objectcontains 7digital id and name of the issuing label
licensor
licensor objectid and name of the licensor who controls the rights to the release, currently only available on the release/search endpoint
popularity
decimala figure between 0 and 1 representing the release popularity, currently only avaialble on the release/search and release/bytag/* endpoints
duration
integertotal length in seconds of all tracks appearing on release
trackCount
integernumber of tracks appearing on release

Track

Each release contains 1 or more tracks. As the same track can appear on multiple releases to uniquely identify a track from a particular release you need to use both trackId and releaseId.

Example response:
<track id="1628015">
  <title>Burning</title>
  <version />
  <artist id="29755">
    <name>The Whitest Boy Alive</name>
    <appearsAs>The Whitest Boy Alive</appearsAs>
    <url>http://www.7digital.com/artists/the-whitest-boy-alive/</url>
  </artist>
  <trackNumber>1</trackNumber>
  <duration>189</duration>
  <explicitContent>false</explicitContent>
  <isrc>DED620600065</isrc>
  <release id="155408">
    <title>Dreams</title>
    <version>UK</version>
    <type>Album</type>
    <artist id="29755">
      <name>The Whitest Boy Alive</name>
      <appearsAs>The Whitest Boy Alive</appearsAs>
      <url>http://www.7digital.com/artists/the-whitest-boy-alive/?partner=123</url>
    </artist>
    <url>http://www.7digital.com/artists/the-whitest-boy-alive/dreams-1/?partner=123</url>
    <image>http://cdn.7static.com/static/img/sleeveart/00/001/554/0000155408_50.jpg</image>
  </release>
  <url>http://www.7digital.com/artists/the-whitest-boy-alive/dreams-1/01-Burning/?partner=123</url>
  <price>
    <currency code="GBP">£</currency>
    <value>0.79</value>
    <formattedPrice>£0.79</formattedPrice>
    <rrp>0.79</rrp>
    <formattedRrp>£0.79</formattedRrp>
    <onSale>false</onSale>
  </price>
  <discNumber>1</discNumber>
</track>
      
Description of response fields:
nametypedescription
track@id
integerunique identifier of the track in 7digital catalogue
title
stringtitle of the track
version
stringversion of the track (e.g. "Radio Edit")
artist
artist objectthe primary artist of the track
order
integerposition the track appears on the release
duration
integerthe length of the track in seconds
explicitContent
booleanparental advisory - explicit content tag, as supplied to 7digital by the issuing label
isrc
stringISRC code
release
release objectrelease the track appears on
url
URLlink to 7digital page where this release can be purchased
price
price objectpricing information
discNumber
integerdisc number track appears on

Price

Both releases and tracks have prices. In some cases, the value is not specified and the formatted price shows "N/A". In this case, either the release is not purchasable (tracks have to be bought individually) or, conversely, if a track price doesn't have a value, the track is not available separately (the whole release has to be purchased).

Example response:
<price>
  <currency code="GBP">£</currency>
  <value>1.79</value>
  <formattedPrice>£1.79</formattedPrice>
  <rrp>1.99</rrp>
  <formattedRrp>£1.99</formattedRrp>
  <onSale>true</onSale>
</price>
Description of response fields:
nametypedescription
currency
stringcurrency symbol
currency@code
stringcode of the currency (ISO 4217)
value
decimalnumerical value of the price
formattedPrice
stringprice pre-formatted to currency's local format for easier displaying
rrp
decimalnumerical value of recommended retail price
formattedRrp
stringpre-formatted RRP
onSale
booleanspecifies whether the item is currently on sale

Format

Format describes in what file format a track(s) is(are) available for download.

Example response:
<format id="17">
  <fileFormat>MP3</fileFormat>
  <bitRate>320</bitRate>
  <drmFree>True</drmFree>
</format>
Description of response fields:
nametypedescription
format@id
integer7digital unique identifier of the format
fileFormat
stringtype of the media file format
bitRate
integerbitrate of the media file in kbit/s
drmFree
booleanspecifies whether the format includes DRM protection

Label and Licensor

All releases in 7digital's catalogue are associated with a label and licensor. Label is essentially a brand under which the release is issued, whereas licensor controls the recording rights for a release.

Although the label is typically more interesting to end consumers, 7digital only holds a contractual and commercial relationship with the licensor who determines when and how 7digital and its partners can sell the release.

Example response:
<label id="32">

  <name>Capitol Records</name> 
</label>

<licensor id="13">
  <name>EMI</name> 
</licensor>
Description of response fields:
nametypedescription
label id
integer7digital unique identifier of the label
label name
stringname of the issuing label
licensor id
integer7digital unique identifier of the licensor
licensor name
stringname of the licensor

API Status

GETstatus

This method returns the current server time.

Method specific parameters:

None.

Example request:
http://api.7digital.com/1.2/status?oauth_consumer_key=YOUR_KEY_HERE
Example response:
<response status="ok" version="1.2">
  <serviceStatus>
    <serverTime>2012-02-08T15:46:06Z</serverTime>
  </serviceStatus>
</response>

Catalogue API

Artist methods

GETartist/browse

This method returns a list of artists from the 7digital catalogue whose names match the start letter(s) supplied.

Method specific parameters:
nametypeusedescription
letter
stringrequiredThe first letter(s) of the artist name to browse.
Example request:
http://api.7digital.com/1.2/artist/browse?letter=p&oauth_consumer_key=YOUR_KEY_HERE&country=GB
Example response:
<response status="ok" version="1.2">
  <artists>
    <page>1</page>
    <pageSize>10</pageSize>
    <totalItems>3256</totalItems>
    <artist id="144641">
      <name>P J Harvey</name>
      <url>http://www.7digital.com/artists/p-j-harvey/?partner=123</url>
      <sortName>P J Harvey</sortName>
      <image>http://cdn.7static.com/static/img/artistimages/00/001/446/0000144641_50.jpg</image>
    </artist>
    <artist id="17168">
      <name>P J Proby</name>
       ...
    </artist>
     ...
  </artists>
</response>

GETartist/chart

This method returns a chart of the most purchased artists for given period. To retrieve the most recent charts as published on 7digital.com period and toDate parameter should be omitted (the default values will be used).

Method specific parameters:
nametypeusedescription
period
enumeration - one of: week/month/yearoptionalThe time period for which the chart is generated. Default value is a week.
toDate
date - format is YYYYMMDDoptionalThe last day the chart should include data for. If not provided, by default the most recent chart for requested period will be returned.
Example request:
http://api.7digital.com/1.2/artist/chart?period=week&toDate=20090601&oauth_consumer_key=YOUR_KEY_HERE&country=GB
Example response:
<response status="ok" version="1.2">
  <chart>
    <type>artist</type>
    <fromDate>2009-03-24T00:00:00Z</fromDate>
    <toDate>2009-03-30T00:00:00+01:00</toDate>
    <page>1</page>
    <pageSize>10</pageSize>
    <totalItems>20</totalItems>
    <chartItem>
      <position>1</position>
      <change>Up</change>
      <artist id="162872">
        <name>The Last Shadow Puppets</name>
        <url>http://www.7digital.com/artists/the-last-shadow-puppets/?partner=123</url>
      </artist>
    </chartItem>
    <chartItem>
      <position>2</position>
      <change>Down</change>
      ...
    </chartItem>
  </chart>
</response>

GETartist/details

This method returns all available artist details.

Method specific parameters:
nametypeusedescription
artistId
integerrequiredunique identifier of the artist
Example request:
http://api.7digital.com/1.2/artist/details?artistid=1&country=GB&oauth_consumer_key=YOUR_KEY_HERE
Example response:
<response status="ok" version="1.2">
  <artist id="1">
    <name>Keane</name> 
    <sortName>Keane</sortName> 
    <url>http://www.7digital.com/artists/keane/</url> 
    <image>http://cdn.7static.com/static/img/artistimages/00/000/000/0000000001_150.jpg</image> 
  </artist>
</response>

GETartist/releases

This method returns a list of releases by given artist. Releases can be filtered by type.

Method specific parameters:
nametypeusedescription
artistId
integerrequiredThe unique identifier of the artist.
type
enumeration - one of: album/single/videooptionalReleases can be of type album, single or video. If specified, results are filtered by release type.
streamable
booleanoptionalIf provided search results will contain only releases that can/cannot be streamed
licensorId
integeroptionalIf provided search results will contain only releases from this licensor. A minus sign prefix excludes releases from that licensor (e.g. -5)
country
stringoptional 2 letter ISO country code of the country whose releases you would like to search
page
intoptionalPage number of the result set. If not supplied, defaults to 1
pageSize
intoptionalNumber of items to be returned per page. If not supplied, defaults to 10. Maximum page size is 500
imageSize
intoptional The requested width of the image in pixels
Example request:
http://api.7digital.com/1.2/artist/releases?artistid=1&oauth_consumer_key=YOUR_KEY_HERE&country=GB&pagesize=2
Example response:
<response status="ok" version="1.2" xsi:noNamespaceSchemaLocation="http://api.7digital.com/1.2/static/7digitalAPI.xsd">
  <releases>
    <page>1</page>
    <pageSize>1</pageSize>
    <totalItems>65</totalItems>
    <release id="2164036">
      <title>Sovereign Light Café</title>
      <version/>
      <type>Single</type>
      <barcode>8712944436549</barcode>
      <year>2013</year>
      <explicitContent>false</explicitContent>
      <artist id="1">
        <name>Keane</name>
        <appearsAs>Keane</appearsAs>
        <url>http://www.7digital.com/artist/keane/?partner=1401</url>
      </artist>
      <url>http://www.7digital.com/artist/keane/release/sovereign-light-cafe-1/?partner=1401</url>
      <image>http://cdn.7static.com/static/img/sleeveart/00/021/640/0002164036_50.jpg</image>
      <releaseDate>2013-01-07T00:00:00+00:00</releaseDate>
      <price>
        <currency code="GBP">£</currency>
        <value>0.99</value>
        <formattedPrice>£0.99</formattedPrice>
        <rrp>0.00</rrp>
        <formattedRrp>£0.00</formattedRrp>
        <onSale>true</onSale>
      </price>
      <formats availableDrmFree="true">
        <format id="17">
          <fileFormat>MP3</fileFormat>
          <bitRate>320</bitRate>
          <drmFree>true</drmFree>
        </format>
        <format id="33">
          <fileFormat>MP4</fileFormat>
          <bitRate>320</bitRate>
          <drmFree>true</drmFree>
        </format>
      </formats>
      <label id="63779">
        <name>Wall Recordings</name>
      </label>
      <popularity>0.3</popularity>
      <streamingReleaseDate>3001-01-01T00:00:00+00:00</streamingReleaseDate>
      <duration>376</duration>
      <trackCount>1</trackCount>
    </release>
    ...
  </releases>
</response>
Method specific errors:
codemessagedescription
1001
Required parameter artistId is missing
You must supply a value for the artistId parameter
1003
Requested page out of range
You specified a page number which does not exist

GETartist/search

This method returns a list of artists from the 7digital catalogue that match the search query.

Method specific parameters:
nametypeusedescription
q
stringrequiredThe search query string.
sort
stringoptional Orders the returned results. Supplied as a string in the format: "{sortColumn} {sortOrder}", for example: "popularity desc" will show most popular artists first regardless of search match score. Currently you can sort by name, popularity and score. If no sort is supplied, the default is "score desc". If no order is supplied the default is ascending.
streamable
booleanoptionalIf provided search results will contain only artists that can/cannot be streamed
licensorId
integeroptionalIf provided search results will contain only artists from this licensor. A minus sign prefix excludes artists from that licensor (e.g. -5)
country
stringoptional 2 letter ISO country code of the country whose artists you would like to search
page
intoptionalPage number of the result set. If not supplied, defaults to 1
pageSize
intoptionalNumber of items to be returned per page. If not supplied, defaults to 10. Maximum page size is 500
imageSize
intoptional The requested width of the image in pixels
Example request:
http://api.7digital.com/1.2/artist/search?q=pink&sort=score%20desc&oauth_consumer_key=YOUR_KEY_HERE&country=GB&pagesize=2
Example response:
<response status="ok" version="1.2" xsi:noNamespaceSchemaLocation="http://api.7digital.com/1.2/static/7digitalAPI.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <searchResults>
    <page>1</page>
    <pageSize>2</pageSize>
    <totalItems>215</totalItems>
    <searchResult>
      <type>artist</type>
      <score>2.9396615</score>
      <artist id="447">
        <name>Pink Floyd</name>
        <sortName>Pink Floyd</sortName>
        <url>http://www.7digital.com/artist/pink-floyd/?partner=1401</url>
        <image>http://cdn.7static.com/static/img/artistimages/00/000/004/0000000447_150.jpg</image>
        <popularity>0.72</popularity>
      </artist>
    </searchResult>
    <searchResult>
      <type>artist</type>
      <score>2.9106588</score>
      <artist id="226">
        <name>Pink</name>
        <sortName>Pink</sortName>
        <url>http://www.7digital.com/artist/pink/?partner=1401</url>
        <image>http://cdn.7static.com/static/img/artistimages/00/000/002/0000000226_150.jpg</image>
        <popularity>0.76</popularity>
      </artist>
    </searchResult>
  </searchResults>
</response>
        
Method specific errors:
codemessagedescription
1001
Required parameter q is missing
You must supply a value for the q parameter
1003
Requested page out of range
You specified a page number which does not exist

GETartist/toptracks

This method returns a list of the most popular tracks by artist.

Method specific parameters:
nametypeusedescription
artistId
integerrequiredThe unique identifier of the artist.
streamable
booleanoptionalIf provided search results will contain only artists that can/cannot be streamed
licensorId
integeroptionalIf provided search results will contain only artists from this licensor. A minus sign prefix excludes artists from that licensor (e.g. -5)
country
stringoptional 2 letter ISO country code of the country whose artists you would like to search
page
intoptionalPage number of the result set. If not supplied, defaults to 1
pageSize
intoptionalNumber of items to be returned per page. If not supplied, defaults to 10. Maximum page size is 500
imageSize
intoptional The requested width of the image in pixels
Example request:
http://api.7digital.com/1.2/artist/toptracks?artistid=1&oauth_consumer_key=YOUR_KEY_HERE&country=GB&pagesize=2
Example response:
<response status="ok" version="1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://api.7digital.com/1.2/static/7digitalAPI.xsd">
  <tracks>
    <page>1</page>
    <pageSize>10</pageSize>
    <totalItems>6</totalItems>
    <track id="18409650">
      <title>Silenced By The Night</title>
      <version></version>
      <artist id="1">
        <name>Keane</name>
        <appearsAs>Keane</appearsAs>
        <url>http://www.7digital.com/artists/keane/?partner=712</url>
      </artist>
      <trackNumber>2</trackNumber>
      <duration>196</duration>
      <explicitContent>false</explicitContent>
      <isrc>GBUM71201137</isrc>
      <type>audio</type>
      <release id="1685647">
        <title>Strangeland</title>
        <version></version>
        <type>Album</type>
        <barcode>00602527947952</barcode>
        <artist id="1">
          <name>Keane</name>
          <appearsAs>Keane</appearsAs>
          <url>http://www.7digital.com/artists/keane/?partner=712</url>
        </artist>
        <url>http://www.7digital.com/artists/keane/strangeland/?partner=712</url>
        <image>http://cdn.7static.com/static/img/sleeveart/00/016/856/0001685647_50.jpg</image>
      </release>
      <url>http://www.7digital.com/artists/keane/strangeland/02-Silenced-By-The-Night/?partner=712</url>
      <streamingReleaseDate>2012-05-07T00:00:00+01:00</streamingReleaseDate>
    </track>
    <track id="18409658">
      <title>Sovereign Light Café</title>
      <version></version>
      <artist id="1">
        <name>Keane</name>
        <appearsAs>Keane</appearsAs>
        <url>http://www.7digital.com/artists/keane/?partner=712</url>
      </artist>
      <trackNumber>5</trackNumber>
      <duration>219</duration>
      <explicitContent>false</explicitContent>
      <isrc>GBUM71201050</isrc>
      <type>audio</type>
      <release id="1685647">
        <title>Strangeland</title>
        <version></version>
        <type>Album</type>
        <barcode>00602527947952</barcode>
        <artist id="1">
          <name>Keane</name>
          <appearsAs>Keane</appearsAs>
          <url>http://www.7digital.com/artists/keane/?partner=712</url>
        </artist>
        <url>http://www.7digital.com/artists/keane/strangeland/?partner=712</url>
        <image>http://cdn.7static.com/static/img/sleeveart/00/016/856/0001685647_50.jpg</image>
      </release>
      <url>http://www.7digital.com/artists/keane/strangeland/05-Sovereign-Light-Caf%c3%a9/?partner=712</url>
      <streamingReleaseDate>2012-05-07T00:00:00+01:00</streamingReleaseDate>
    </track>
    <track id="18409645">
      <title>You Are Young</title>
      <version></version>
      <artist id="1">
        <name>Keane</name>
        <appearsAs>Keane</appearsAs>
        <url>http://www.7digital.com/artists/keane/?partner=712</url>
      </artist>
      <trackNumber>1</trackNumber>
      <duration>215</duration>
      <explicitContent>false</explicitContent>
      <isrc>GBUM71201143</isrc>
      <type>audio</type>
      <release id="1685647">
        <title>Strangeland</title>
        <version></version>
        <type>Album</type>
        <barcode>00602527947952</barcode>
        <artist id="1">
          <name>Keane</name>
          <appearsAs>Keane</appearsAs>
          <url>http://www.7digital.com/artists/keane/?partner=712</url>
        </artist>
        <url>http://www.7digital.com/artists/keane/strangeland/?partner=712</url>
        <image>http://cdn.7static.com/static/img/sleeveart/00/016/856/0001685647_50.jpg</image>
      </release>
      <url>http://www.7digital.com/artists/keane/strangeland/01-You-Are-Young/?partner=712</url>
      <streamingReleaseDate>2012-05-07T00:00:00+01:00</streamingReleaseDate>
    </track>
    <track id="6944484">
      <title>Somewhere Only We Know</title>
      <version></version>
      <artist id="1">
        <name>Keane</name>
        <appearsAs>Keane</appearsAs>
        <url>http://www.7digital.com/artists/keane/?partner=712</url>
      </artist>
      <trackNumber>1</trackNumber>
      <duration>238</duration>
      <explicitContent>false</explicitContent>
      <isrc>GBAAN0300664</isrc>
      <type>audio</type>
      <release id="625642">
        <title>Hopes and Fears</title>
        <version>Deluxe Edition</version>
        <type>Album</type>
        <barcode>00600753225530</barcode>
        <artist id="1">
          <name>Keane</name>
          <appearsAs>Keane</appearsAs>
          <url>http://www.7digital.com/artists/keane/?partner=712</url>
        </artist>
        <url>http://www.7digital.com/artists/keane/hopes-and-fears-3-1/?partner=712</url>
        <image>http://cdn.7static.com/static/img/sleeveart/00/006/256/0000625642_50.jpg</image>
      </release>
      <url>http://www.7digital.com/artists/keane/hopes-and-fears-3-1/01-Somewhere-Only-We-Know/?partner=712</url>
      <streamingReleaseDate>2009-11-09T00:00:00Z</streamingReleaseDate>
    </track>
    <track id="18409653">
      <title>Disconnected</title>
      <version></version>
      <artist id="1">
        <name>Keane</name>
        <appearsAs>Keane</appearsAs>
        <url>http://www.7digital.com/artists/keane/?partner=712</url>
      </artist>
      <trackNumber>3</trackNumber>
      <duration>238</duration>
      <explicitContent>false</explicitContent>
      <isrc>GBUM71201128</isrc>
      <type>audio</type>
      <release id="1685647">
        <title>Strangeland</title>
        <version></version>
        <type>Album</type>
        <barcode>00602527947952</barcode>
        <artist id="1">
          <name>Keane</name>
          <appearsAs>Keane</appearsAs>
          <url>http://www.7digital.com/artists/keane/?partner=712</url>
        </artist>
        <url>http://www.7digital.com/artists/keane/strangeland/?partner=712</url>
        <image>http://cdn.7static.com/static/img/sleeveart/00/016/856/0001685647_50.jpg</image>
      </release>
      <url>http://www.7digital.com/artists/keane/strangeland/03-Disconnected/?partner=712</url>
      <streamingReleaseDate>2012-05-07T00:00:00+01:00</streamingReleaseDate>
    </track>
    <track id="19614320">
      <title>Difficult Child</title>
      <version></version>
      <artist id="1">
        <name>Keane</name>
        <appearsAs>Keane</appearsAs>
        <url>http://www.7digital.com/artists/keane/?partner=712</url>
      </artist>
      <trackNumber>2</trackNumber>
      <duration>224</duration>
      <explicitContent>false</explicitContent>
      <isrc>GBUM71204128</isrc>
      <type>audio</type>
      <release id="1807787">
        <title>Sovereign Light Café</title>
        <version></version>
        <type>Single</type>
        <barcode>00602537119684</barcode>
        <artist id="1">
          <name>Keane</name>
          <appearsAs>Keane</appearsAs>
          <url>http://www.7digital.com/artists/keane/?partner=712</url>
        </artist>
        <url>http://www.7digital.com/artists/keane/sovereign-light-cafe/?partner=712</url>
        <image>http://cdn.7static.com/static/img/sleeveart/00/018/077/0001807787_50.jpg</image>
      </release>
      <url>http://www.7digital.com/artists/keane/sovereign-light-cafe/02-Difficult-Child/?partner=712</url>
      <streamingReleaseDate>2012-07-22T00:00:00+01:00</streamingReleaseDate>
    </track>
  </tracks>
</response>
        
Method specific errors:
codemessagedescription
1001
Required parameter artistId is missing
You must supply a value for the artistId parameter
1003
Requested page out of range
You specified a page number which does not exist

GETartist/similar

This method returns a list of artists similar to given artist.

Method specific parameters:
nametypeusedescription
artistId
integerrequiredThe unique identifier of the artist.
pagesize
integeroptionalsets the number of releases that will be returned per page, the default is 10
page
integeroptionalsets the page to be returned in paged list of the customers releases and tracks, by default this is the first page. page=1
country
ISO 2-character country codeoptionalThe code of the country the end user resides in. The country will default to GB if not provided.
Example request:
http://api.7digital.com/1.2/artist/similar?artistid=1&oauth_consumer_key=YOUR_KEY_HERE&country=GB
Example response:
<?xml version="1.0" encoding="utf-8" ?>
<response status="ok" version="1.2">
  <artists>
    <page>1</page>
    <pageSize>10</pageSize>
    <totalItems>28</totalItems>
    <artist id="14">
      <name>The Charlatans</name>
      <sortName>Charlatans, The</sortName>
      <url>http://www.7digital.com/artists/the-charlatans/?partner=1401</url>
      <image>http://cdn.7static.com/static/img/artistimages/00/000/000/0000000014_150.jpg</image>
    </artist>
    <artist id="20">
      <name>Coldplay</name>
      <sortName>Coldplay</sortName>
      <url>http://www.7digital.com/artists/coldplay/?partner=1401</url>
      <image>http://cdn.7static.com/static/img/artistimages/00/000/000/0000000020_150.jpg</image>
    </artist>
    ...
  </artists>
</response>

Release methods

GETrelease/bydate

This method returns release(s) by a specified date range.

Method specific parameters:
nametypeusedescription
fromDate
date - format is YYYYMMDDoptionalThe first day for which to include data. The default date is today's date.
toDate
date - format is YYYYMMDDoptionalThe last day for which to include data. The default date is today's date.
Example request:
http://api.7digital.com/1.2/release/bydate?fromDate=20090610&toDate=20090603&oauth_consumer_key=YOUR_KEY_HERE
Example response:
<response status="ok" version="1.2" xsi:noNamespaceSchemaLocation="http://api.7digital.com/1.2/static/7digitalAPI.xsd">
  <releases>
    <page>1</page>
    <pageSize>1</pageSize>
    <totalItems>2682</totalItems>
    <release id="471797">
      <title>THE E.N.D. (THE ENERGY NEVER DIES)</title>
      <version>International Version</version>
      <type>Album</type>
      <barcode>00602527108384</barcode>
      <year>2009</year>
      <explicitContent>false</explicitContent>
      <artist id="263">
        <name>Black Eyed Peas</name>
        <appearsAs>Black Eyed Peas</appearsAs>
        <url>http://www.7digital.com/artist/black-eyed-peas/?partner=1401</url>
      </artist>
      <url>http://www.7digital.com/artist/black-eyed-peas/release/the-e-n-d-the-energy-never-dies/?partner=1401</url>
      <image>http://cdn.7static.com/static/img/sleeveart/00/004/717/0000471797_50.jpg</image>
      <releaseDate>2009-06-07T00:00:00+01:00</releaseDate>
      <addedDate>2009-06-03T01:16:13+01:00</addedDate>
      <price>
        <currency code="GBP">£</currency>
        <value>7.99</value>
        <formattedPrice>£7.99</formattedPrice>
        <rrp>7.99</rrp>
        <formattedRrp>£7.99</formattedRrp>
        <onSale>false</onSale>
      </price>
      <formats availableDrmFree="true">
        <format id="17">
          <fileFormat>MP3</fileFormat>
          <bitRate>320</bitRate>
          <drmFree>true</drmFree>
        </format>
      </formats>
      <label id="152703">
        <name>Universal Music International Ltda.</name>
      </label>
      <licensor id="1">
        <name>Universal</name>
      </licensor>
      <popularity>0.59</popularity>
      <streamingReleaseDate>2009-06-07T00:00:00+01:00</streamingReleaseDate>
      <duration>4160</duration>
      <trackCount>16</trackCount>
    </release>
    ...
  </releases>
</response>
        

GETrelease/chart

This method returns a chart of the most purchased releases for given period. Only albums are included in this chart. To retrieve the most recent charts as published on 7digital.com period and toDate parameter should be omitted (the default values will be used).

Method specific parameters:
nametypeusedescription
period
enumeration - one of: week/month/yearoptionalThe time period for which the chart is generated. The default value is a week.
toDate
date - format YYYYDDMMoptionalThe last day the chart should include data for. If not provided, by default the most recent chart for requested period will be returned.
streamable
booleanoptionalIf provided search results will contain only releases that can/cannot be streamed
licensorId
integeroptionalIf provided search results will contain only releases from this licensor. A minus sign prefix excludes releases from that licensor (e.g. -5)
country
stringoptional 2 letter ISO country code of the country whose releases you would like to view
page
intoptionalPage number of the result set. If not supplied, defaults to 1
pageSize
intoptionalNumber of items to be returned per page. If not supplied, defaults to 10. Maximum page size is 500
imageSize
intoptional The requested width of the image in pixels
Example request:
http://api.7digital.com/1.2/release/chart?period=month&todate=20120801&oauth_consumer_key=YOUR_KEY_HERE&country=GB&pagesize=2 
Example response:
<response status="ok" version="1.2" xsi:noNamespaceSchemaLocation="http://api.7digital.com/1.2/static/7digitalAPI.xsd">
  <chart>
    <page>1</page>
    <pageSize>2</pageSize>
    <totalItems>92</totalItems>
    <type>album</type>
    <fromDate>2012-08-01T00:00:00+01:00</fromDate>
    <toDate>2012-08-01T00:00:00+01:00</toDate>
    <chartItem>
      <position>1</position>
      <change>New</change>
      <release id="1815792">
        <title>Now That's What I Call Music! 82</title>
        <version/>
        <type>Album</type>
        <barcode>5099970571950</barcode>
        <year>2012</year>
        <explicitContent>false</explicitContent>
        <artist id="209">
          <name>Various Artists</name>
          <appearsAs>Various Artists</appearsAs>
          <url>http://www.7digital.com/artist/various-artists/?partner=1401</url>
        </artist>
        <url>http://www.7digital.com/artist/various-artists/release/now-thats-what-i-call-music-82/?partner=1401</url>
        <image>http://cdn.7static.com/static/img/sleeveart/00/018/157/0001815792_50.jpg</image>
        <releaseDate>2012-07-23T00:00:00+01:00</releaseDate>
        <price>
          <currency code="GBP">£</currency>
          <value>10.99</value>
          <formattedPrice>£10.99</formattedPrice>
          <rrp>10.99</rrp>
          <formattedRrp>£10.99</formattedRrp>
          <onSale>false</onSale>
        </price>
        <formats availableDrmFree="true">
          <format id="17">
            <fileFormat>MP3</fileFormat>
            <bitRate>320</bitRate>
            <drmFree>true</drmFree>
          </format>
        </formats>
        <streamingReleaseDate>3001-01-01T00:00:00+00:00</streamingReleaseDate>
        <duration>9442</duration>
        <trackCount>44</trackCount>
      </release>
    </chartItem>
    ...
  </chart>
</response>
Method specific errors:
codemessagedescription
1003
Requested page out of range
You specified a page number which does not exist

GETrelease/details

This method returns all available details for a given release.

Method specific parameters:
nametypeusedescription
releaseId
integerrequiredThe unique identifier of the release.
Example request:
http://api.7digital.com/1.2/release/details?releaseid=155408&oauth_consumer_key=YOUR_KEY_HERE
Example response:
<response status="ok" version="1.2" >
  <release id="155408">
    <title>Dreams</title>
    <version>UK</version>
    <type>Album</type>
    <barcode>00602517512078</barcode>
    <year>2007</year>
    <explicitContent>false</explicitContent>
    <artist id="29755">
      <name>The Whitest Boy Alive</name>
      <appearsAs>The Whitest Boy Alive</appearsAs>
      <url>http://www.7digital.com/artists/the-whitest-boy-alive/</url>
    </artist>
    <url>http://www.7digital.com/artists/the-whitest-boy-alive/dreams-1/</url>
    <image>http://cdn.7static.com/static/img/sleeveart/00/001/554/0000155408_50.jpg</image>
    <releaseDate>2007-10-22T00:00:00+01:00</releaseDate>
    <addedDate>2007-10-11T12:18:29+01:00</addedDate>
    <price>
      <currency code="GBP">&#163;</currency>
      <value>7.99</value>
      <formattedPrice>&#163;7.99</formattedPrice>
      <rrp>7.99</rrp>
      <formattedRrp>&#163;7.99</formattedRrp>
      <onSale>false</onSale>
    </price>
    <formats availableDrmFree="true">
      <format id="17">
        <fileFormat>MP3</fileFormat>
        <bitRate>320</bitRate>
        <drmFree>true</drmFree>
      </format>
    </formats>
    <label id="40">
      <name>Universal-Island Records Ltd.</name>
    </label>
  </release>
</response>

GETrelease/recommend

This method returns list of recommended releases for given release or artist.

Method specific parameters:
nametypeusedescription
releaseId / artistId
integerrequiredThe unique identifier of the recommended release or artist. Only ONE identifier can be specified in a request.
Example request:
http://api.7digital.com/1.2/release/recommend?releaseid=155408&oauth_consumer_key=YOUR_KEY_HERE&country=GB
Example response:
<response status="ok" version="1.2" xsi:noNamespaceSchemaLocation="http://api.7digital.com/1.2/static/7digitalAPI.xsd" >
  <recommendations>
    <page>1</page>
    <pageSize>10</pageSize>
    <totalItems>10</totalItems>
    <recommendedItem>
      <release id="34281">
        <title>Sudden Rush</title>
        <version></version>
        <type>Single</type>
        <barcode>0724355187055</barcode>
      ...
      </release>
    </recommendedItem>
  </recommendations>
</response>
    

GETrelease/search

This method searches the 7digital catalogue for releases matching the search query. Results can be filtered by release type.

Method specific parameters:
nametypeusedescription
q
stringrequiredThe search query string.
type
enumeration - one of: album/single/videooptionalIf specified results are filtered by given release type (multiple types separated by commas can be passed).
streamable
booleanoptionalIf provided search results will contain only releases that can/cannot be streamed
licensorId
integeroptionalIf provided search results will contain only releases from this licensor. A minus sign prefix excludes releases from that licensor (e.g. -5)
country
stringoptional 2 letter ISO country code of the country whose releases you would like to search
page
intoptionalPage number of the result set. If not supplied, defaults to 1
pageSize
intoptionalNumber of items to be returned per page. If not supplied, defaults to 10. Maximum page size is 500
imageSize
intoptional The requested width of the image in pixels
Example request:
http://api.7digital.com/1.2/release/search?q=no%20surprises&oauth_consumer_key=YOUR_KEY_HERE&country=GB&pagesize=2
Example response:
<response status="ok" version="1.2" xsi:noNamespaceSchemaLocation="http://api.7digital.com/1.2/static/7digitalAPI.xsd">
  <searchResults>
    <page>1</page>
    <pageSize>2</pageSize>
    <totalItems>19732</totalItems>
    <searchResult>
      <type>release</type>
      <score>7.300968</score>
      <release id="1046">
        <title>No Surprises</title>
        <version/>
        <type>Single</type>
        <barcode>0724388514453</barcode>
        <year>2003</year>
        <explicitContent>false</explicitContent>
        <artist id="304">
          <name>Radiohead</name>
          <appearsAs>Radiohead</appearsAs>
          <url>http://www.7digital.com/artist/radiohead/?partner=1401</url>
        </artist>
        <url>http://www.7digital.com/artist/radiohead/release/no-surprises/?partner=1401</url>
        <image>http://cdn.7static.com/static/img/sleeveart/00/000/010/0000001046_50.jpg</image>
        <releaseDate>2003-03-01T00:00:00+00:00</releaseDate>
        <addedDate>2004-10-02T18:12:57+01:00</addedDate>
        <price>
          <currency code="GBP">£</currency>
          <value>1.99</value>
          <formattedPrice>£1.99</formattedPrice>
          <rrp>1.99</rrp>
          <formattedRrp>£1.99</formattedRrp>
          <onSale>false</onSale>
        </price>
        <formats availableDrmFree="true">
          <format id="17">
            <fileFormat>MP3</fileFormat>
            <bitRate>320</bitRate>
            <drmFree>true</drmFree>
          </format>
        </formats>
        <label id="77">
          <name>EMI UK</name>
        </label>
        <licensor id="13">
          <name>EMI</name>
        </licensor>
        <popularity>0.46</popularity>
        <streamingReleaseDate>2003-03-01T00:00:00+00:00</streamingReleaseDate>
        <duration>644</duration>
        <trackCount>3</trackCount>
      </release>
    </searchResult>
    ...
  </searchResults>
</response>
Method specific errors:
codemessagedescription
1001
Required parameter q is missing
You must supply a value for the q parameter
1003
Requested page out of range
You specified a page number which does not exist

GETrelease/tracks

This method will return a list of all tracks constituting the release.

Method specific parameters:
nametypeusedescription
releaseId
integerrequiredThe unique ID of the release.
streamable
booleanoptionalIf provided search results will contain only tracks that can/cannot be streamed
licensorId
integeroptionalIf provided search results will contain only tracks from this licensor. A minus sign prefix excludes tracks from that licensor (e.g. -5)
country
stringoptional 2 letter ISO country code of the country whose tracks you would like to search
page
intoptionalPage number of the result set. If not supplied, defaults to 1
pageSize
intoptionalNumber of items to be returned per page. If not supplied, defaults to 10. Maximum page size is 500
imageSize
intoptional The requested width of the image in pixels
Example request:
http://api.7digital.com/1.2/release/tracks?releaseid=155408&oauth_consumer_key=YOUR_KEY_HERE&country=GB&pagesize=2
Example response:
<response status="ok" version="1.2" xsi:noNamespaceSchemaLocation="http://api.7digital.com/1.2/static/7digitalAPI.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <tracks>
    <page>1</page>
    <pageSize>10</pageSize>
    <totalItems>10</totalItems>
    <track id="1628015">
      <title>Burning</title>
      <version />
      <artist id="29755">
        <name>The Whitest Boy Alive</name>
        <appearsAs>The Whitest Boy Alive</appearsAs>
        <url>http://www.7digital.com/artist/the-whitest-boy-alive/?partner=712</url>
      </artist>
      <trackNumber>1</trackNumber>
      <duration>189</duration>
      <explicitContent>false</explicitContent>
      <isrc>DED620600065</isrc>
      <type>audio</type>
      <release id="155408">
        <artist id="29755">
          <name>The Whitest Boy Alive</name>
          <appearsAs>The Whitest Boy Alive</appearsAs>
          <url>http://www.7digital.com/artist/the-whitest-boy-alive/?partner=712</url>
        </artist>
        <version>UK</version>
        <title>Dreams</title>
        <type>Album</type>
        <barcode>00602517512078</barcode>
        <url>http://www.7digital.com/artist/the-whitest-boy-alive/release/dreams-1/?partner=712</url>
        <image>http://cdn.7static.com/static/img/sleeveart/00/001/554/0000155408_50.jpg</image>
      </release>
      <url>http://www.7digital.com/artist/the-whitest-boy-alive/release/dreams-1/?partner=712&amp;h=01</url>
      <price>
        <currency code="GBP">£</currency>
        <value>0.99</value>
        <formattedPrice>£0.99</formattedPrice>
        <rrp>0.99</rrp>
        <formattedRrp>£0.99</formattedRrp>
        <onSale>false</onSale>
      </price>
      <streamingReleaseDate>2007-10-22T00:00:00</streamingReleaseDate>
    </track>
    <track id="1628016">
      <title>Golden Cage</title>
      <version />
      <artist id="29755">
        <name>The Whitest Boy Alive</name>
        <appearsAs>The Whitest Boy Alive</appearsAs>
        <url>http://www.7digital.com/artist/the-whitest-boy-alive/?partner=712</url>
      </artist>
      <trackNumber>2</trackNumber>
      <duration>241</duration>
      <explicitContent>false</explicitContent>
      <isrc>DED620600073</isrc>
      <type>audio</type>
      <release id="155408">
        <artist id="29755">
          <name>The Whitest Boy Alive</name>
          <appearsAs>The Whitest Boy Alive</appearsAs>
          <url>http://www.7digital.com/artist/the-whitest-boy-alive/?partner=712</url>
        </artist>
        <version>UK</version>
        <title>Dreams</title>
        <type>Album</type>
        <barcode>00602517512078</barcode>
        <url>http://www.7digital.com/artist/the-whitest-boy-alive/release/dreams-1/?partner=712</url>
        <image>http://cdn.7static.com/static/img/sleeveart/00/001/554/0000155408_50.jpg</image>
      </release>
      <url>http://www.7digital.com/artist/the-whitest-boy-alive/release/dreams-1/?partner=712&amp;h=02</url>
      <price>
        <currency code="GBP">£</currency>
        <value>0.99</value>
        <formattedPrice>£0.99</formattedPrice>
        <rrp>0.99</rrp>
        <formattedRrp>£0.99</formattedRrp>
        <onSale>false</onSale>
      </price>
      <streamingReleaseDate>2007-10-22T00:00:00</streamingReleaseDate>
    </track>
    <track id="1628017">
      <title>Fireworks</title>
      <version />
      <artist id="29755">
        <name>The Whitest Boy Alive</name>
        <appearsAs>The Whitest Boy Alive</appearsAs>
        <url>http://www.7digital.com/artist/the-whitest-boy-alive/?partner=712</url>
      </artist>
      <trackNumber>3</trackNumber>
      <duration>184</duration>
      <explicitContent>false</explicitContent>
      <isrc>DED620600068</isrc>
      <type>audio</type>
      <release id="155408">
        <artist id="29755">
          <name>The Whitest Boy Alive</name>
          <appearsAs>The Whitest Boy Alive</appearsAs>
          <url>http://www.7digital.com/artist/the-whitest-boy-alive/?partner=712</url>
        </artist>
        <version>UK</version>
        <title>Dreams</title>
        <type>Album</type>
        <barcode>00602517512078</barcode>
        <url>http://www.7digital.com/artist/the-whitest-boy-alive/release/dreams-1/?partner=712</url>
        <image>http://cdn.7static.com/static/img/sleeveart/00/001/554/0000155408_50.jpg</image>
      </release>
      <url>http://www.7digital.com/artist/the-whitest-boy-alive/release/dreams-1/?partner=712&amp;h=03</url>
      <price>
        <currency code="GBP">£</currency>
        <value>0.99</value>
        <formattedPrice>£0.99</formattedPrice>
        <rrp>0.99</rrp>
        <formattedRrp>£0.99</formattedRrp>
        <onSale>false</onSale>
      </price>
      <streamingReleaseDate>2007-10-22T00:00:00</streamingReleaseDate>
    </track>
    <track id="1628018">
      <title>Done With You</title>
      <version />
      <artist id="29755">
        <name>The Whitest Boy Alive</name>
        <appearsAs>The Whitest Boy Alive</appearsAs>
        <url>http://www.7digital.com/artist/the-whitest-boy-alive/?partner=712</url>
      </artist>
      <trackNumber>4</trackNumber>
      <duration>321</duration>
      <explicitContent>false</explicitContent>
      <isrc>DED620600069</isrc>
      <type>audio</type>
      <release id="155408">
        <artist id="29755">
          <name>The Whitest Boy Alive</name>
          <appearsAs>The Whitest Boy Alive</appearsAs>
          <url>http://www.7digital.com/artist/the-whitest-boy-alive/?partner=712</url>
        </artist>
        <version>UK</version>
        <title>Dreams</title>
        <type>Album</type>
        <barcode>00602517512078</barcode>
        <url>http://www.7digital.com/artist/the-whitest-boy-alive/release/dreams-1/?partner=712</url>
        <image>http://cdn.7static.com/static/img/sleeveart/00/001/554/0000155408_50.jpg</image>
      </release>
      <url>http://www.7digital.com/artist/the-whitest-boy-alive/release/dreams-1/?partner=712&amp;h=04</url>
      <price>
        <currency code="GBP">£</currency>
        <value>0.99</value>
        <formattedPrice>£0.99</formattedPrice>
        <rrp>0.99</rrp>
        <formattedRrp>£0.99</formattedRrp>
        <onSale>false</onSale>
      </price>
      <streamingReleaseDate>2007-10-22T00:00:00</streamingReleaseDate>
    </track>
    <track id="1628020">
      <title>Don't Give Up</title>
      <version />
      <artist id="29755">
        <name>The Whitest Boy Alive</name>
        <appearsAs>The Whitest Boy Alive</appearsAs>
        <url>http://www.7digital.com/artist/the-whitest-boy-alive/?partner=712</url>
      </artist>
      <trackNumber>5</trackNumber>
      <duration>348</duration>
      <explicitContent>false</explicitContent>
      <isrc>DED620600070</isrc>
      <type>audio</type>
      <release id="155408">
        <artist id="29755">
          <name>The Whitest Boy Alive</name>
          <appearsAs>The Whitest Boy Alive</appearsAs>
          <url>http://www.7digital.com/artist/the-whitest-boy-alive/?partner=712</url>
        </artist>
        <version>UK</version>
        <title>Dreams</title>
        <type>Album</type>
        <barcode>00602517512078</barcode>
        <url>http://www.7digital.com/artist/the-whitest-boy-alive/release/dreams-1/?partner=712</url>
        <image>http://cdn.7static.com/static/img/sleeveart/00/001/554/0000155408_50.jpg</image>
      </release>
      <url>http://www.7digital.com/artist/the-whitest-boy-alive/release/dreams-1/?partner=712&amp;h=05</url>
      <price>
        <currency code="GBP">£</currency>
        <value>0.99</value>
        <formattedPrice>£0.99</formattedPrice>
        <rrp>0.99</rrp>
        <formattedRrp>£0.99</formattedRrp>
        <onSale>false</onSale>
      </price>
      <streamingReleaseDate>2007-10-22T00:00:00</streamingReleaseDate>
    </track>
    <track id="1628021">
      <title>Above You</title>
      <version />
      <artist id="29755">
        <name>The Whitest Boy Alive</name>
        <appearsAs>The Whitest Boy Alive</appearsAs>
        <url>http://www.7digital.com/artist/the-whitest-boy-alive/?partner=712</url>
      </artist>
      <trackNumber>6</trackNumber>
      <duration>195</duration>
      <explicitContent>false</explicitContent>
      <isrc>DED620600066</isrc>
      <type>audio</type>
      <release id="155408">
        <artist id="29755">
          <name>The Whitest Boy Alive</name>
          <appearsAs>The Whitest Boy Alive</appearsAs>
          <url>http://www.7digital.com/artist/the-whitest-boy-alive/?partner=712</url>
        </artist>
        <version>UK</version>
        <title>Dreams</title>
        <type>Album</type>
        <barcode>00602517512078</barcode>
        <url>http://www.7digital.com/artist/the-whitest-boy-alive/release/dreams-1/?partner=712</url>
        <image>http://cdn.7static.com/static/img/sleeveart/00/001/554/0000155408_100.jpg</image>
      </release>
      <url>http://www.7digital.com/artist/the-whitest-boy-alive/release/dreams-1/?partner=712&amp;h=06</url>
      <price>
        <currency code="GBP">£</currency>
        <value>0.99</value>
        <formattedPrice>£0.99</formattedPrice>
        <rrp>0.99</rrp>
        <formattedRrp>£0.99</formattedRrp>
        <onSale>false</onSale>
      </price>
      <streamingReleaseDate>2007-10-22T00:00:00</streamingReleaseDate>
    </track>
    <track id="1628022">
      <title>Inflation</title>
      <version />
      <artist id="29755">
        <name>The Whitest Boy Alive</name>
        <appearsAs>The Whitest Boy Alive</appearsAs>
        <url>http://www.7digital.com/artist/the-whitest-boy-alive/?partner=712</url>
      </artist>
      <trackNumber>7</trackNumber>
      <duration>226</duration>
      <explicitContent>false</explicitContent>
      <isrc>DED620600067</isrc>
      <type>audio</type>
      <release id="155408">
        <artist id="29755">
          <name>The Whitest Boy Alive</name>
          <appearsAs>The Whitest Boy Alive</appearsAs>
          <url>http://www.7digital.com/artist/the-whitest-boy-alive/?partner=712</url>
        </artist>
        <version>UK</version>
        <title>Dreams</title>
        <type>Album</type>
        <barcode>00602517512078</barcode>
        <url>http://www.7digital.com/artist/the-whitest-boy-alive/release/dreams-1/?partner=712</url>
        <image>http://cdn.7static.com/static/img/sleeveart/00/001/554/0000155408_100.jpg</image>
      </release>
      <url>http://www.7digital.com/artist/the-whitest-boy-alive/release/dreams-1/?partner=712&amp;h=07</url>
      <price>
        <currency code="GBP">£</currency>
        <value>0.99</value>
        <formattedPrice>£0.99</formattedPrice>
        <rrp>0.99</rrp>
        <formattedRrp>£0.99</formattedRrp>
        <onSale>false</onSale>
      </price>
      <streamingReleaseDate>2007-10-22T00:00:00</streamingReleaseDate>
    </track>
    <track id="1628023">
      <title>Figures</title>
      <version />
      <artist id="29755">
        <name>The Whitest Boy Alive</name>
        <appearsAs>The Whitest Boy Alive</appearsAs>
        <url>http://www.7digital.com/artist/the-whitest-boy-alive/?partner=712</url>
      </artist>
      <trackNumber>8</trackNumber>
      <duration>234</duration>
      <explicitContent>false</explicitContent>
      <isrc>DED620600071</isrc>
      <type>audio</type>
      <release id="155408">
        <artist id="29755">
          <name>The Whitest Boy Alive</name>
          <appearsAs>The Whitest Boy Alive</appearsAs>
          <url>http://www.7digital.com/artist/the-whitest-boy-alive/?partner=712</url>
        </artist>
        <version>UK</version>
        <title>Dreams</title>
        <type>Album</type>
        <barcode>00602517512078</barcode>
        <url>http://www.7digital.com/artist/the-whitest-boy-alive/release/dreams-1/?partner=712</url>
        <image>http://cdn.7static.com/static/img/sleeveart/00/001/554/0000155408_100.jpg</image>
      </release>
      <url>http://www.7digital.com/artist/the-whitest-boy-alive/release/dreams-1/?partner=712&amp;h=08</url>
      <price>
        <currency code="GBP">£</currency>
        <value>0.99</value>
        <formattedPrice>£0.99</formattedPrice>
        <rrp>0.99</rrp>
        <formattedRrp>£0.99</formattedRrp>
        <onSale>false</onSale>
      </price>
      <streamingReleaseDate>2007-10-22T00:00:00</streamingReleaseDate>
    </track>
    <track id="1628024">
      <title>Borders</title>
      <version />
      <artist id="29755">
        <name>The Whitest Boy Alive</name>
        <appearsAs>The Whitest Boy Alive</appearsAs>
        <url>http://www.7digital.com/artist/the-whitest-boy-alive/?partner=712</url>
      </artist>
      <trackNumber>9</trackNumber>
      <duration>324</duration>
      <explicitContent>false</explicitContent>
      <isrc>DED620600072</isrc>
      <type>audio</type>
      <release id="155408">
        <artist id="29755">
          <name>The Whitest Boy Alive</name>
          <appearsAs>The Whitest Boy Alive</appearsAs>
          <url>http://www.7digital.com/artist/the-whitest-boy-alive/?partner=712</url>
        </artist>
        <version>UK</version>
        <title>Dreams</title>
        <type>Album</type>
        <barcode>00602517512078</barcode>
        <url>http://www.7digital.com/artist/the-whitest-boy-alive/release/dreams-1/?partner=712</url>
        <image>http://cdn.7static.com/static/img/sleeveart/00/001/554/0000155408_100.jpg</image>
      </release>
      <url>http://www.7digital.com/artist/the-whitest-boy-alive/release/dreams-1/?partner=712&amp;h=09</url>
      <price>
        <currency code="GBP">£</currency>
        <value>0.99</value>
        <formattedPrice>£0.99</formattedPrice>
        <rrp>0.99</rrp>
        <formattedRrp>£0.99</formattedRrp>
        <onSale>false</onSale>
      </price>
      <streamingReleaseDate>2007-10-22T00:00:00</streamingReleaseDate>
    </track>
    <track id="1628025">
      <title>All Ears</title>
      <version />
      <artist id="29755">
        <name>The Whitest Boy Alive</name>
        <appearsAs>The Whitest Boy Alive</appearsAs>
        <url>http://www.7digital.com/artist/the-whitest-boy-alive/?partner=712</url>
      </artist>
      <trackNumber>10</trackNumber>
      <duration>199</duration>
      <explicitContent>false</explicitContent>
      <isrc>DED620600074</isrc>
      <type>audio</type>
      <release id="155408">
        <artist id="29755">
          <name>The Whitest Boy Alive</name>
          <appearsAs>The Whitest Boy Alive</appearsAs>
          <url>http://www.7digital.com/artist/the-whitest-boy-alive/?partner=712</url>
        </artist>
        <version>UK</version>
        <title>Dreams</title>
        <type>Album</type>
        <barcode>00602517512078</barcode>
        <url>http://www.7digital.com/artist/the-whitest-boy-alive/release/dreams-1/?partner=712</url>
        <image>http://cdn.7static.com/static/img/sleeveart/00/001/554/0000155408_100.jpg</image>
      </release>
      <url>http://www.7digital.com/artist/the-whitest-boy-alive/release/dreams-1/?partner=712&amp;h=10</url>
      <price>
        <currency code="GBP">£</currency>
        <value>0.99</value>
        <formattedPrice>£0.99</formattedPrice>
        <rrp>0.99</rrp>
        <formattedRrp>£0.99</formattedRrp>
        <onSale>false</onSale>
      </price>
      <streamingReleaseDate>2007-10-22T00:00:00</streamingReleaseDate>
    </track>
  </tracks>
</response>
        

Track methods

GETtrack/chart

This method returns a chart of the most purchased tracks for given period. To retrieve the most recent charts as published on 7digital.com period and toDate parameter should be omitted (the default values will be used).

Method specific parameters:
nametypeusedescription
period
enumeration - one of: week/month/yearoptionalThe time period for which the chart is generated. Default value is a week.
toDate
date - format is YYYYMMDDoptionalThe last day the chart should include data for. If not provided, by default the most recent chart for requested period will be returned.
streamable
booleanoptionalIf provided search results will contain only tracks that can/cannot be streamed
licensorId
integeroptionalIf provided search results will contain only tracks from this licensor. A minus sign prefix excludes tracks from that licensor (e.g. -5)
country
stringoptional2 letter ISO country code of the country whose tracks you would like to search
page
intoptionalPage number of the result set. If not supplied, defaults to 1
pageSize
intoptionalNumber of items to be returned per page. If not supplied, defaults to 10. Maximum page size is 500
imageSize
intoptionalThe requested width of the image in pixels
Example request:
http://api.7digital.com/1.2/track/chart?period=week&toDate=20120301&oauth_consumer_key=YOUR_KEY_HERE&country=GB&pagesize=2
Example response:
<response status="ok" version="1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://api.7digital.com/1.2/static/7digitalAPI.xsd">
  <chart>
    <page>1</page>
    <pageSize>2</pageSize>
    <totalItems>20</totalItems>
    <type>track</type>
    <fromDate>2012-02-24T00:00:00Z</fromDate>
    <toDate>2012-03-01T00:00:00Z</toDate>
    <chartItem>
      <position>1</position>
      <change>New</change>
      <track id="17308950">
        <title>Next to Me</title>
        <version></version>
        <artist id="1053056">
          <name>Emeli Sande</name>
          <appearsAs>Emeli Sandé</appearsAs>
          <url>http://www.7digital.com/artists/emeli-sande-(1)?partner=712</url>
        </artist>
        <trackNumber>10</trackNumber>
        <duration>195</duration>
        <explicitContent>false</explicitContent>
        <release id="1572399">
          <title>Our Version of Events</title>
          <version></version>
          <type>Album</type>
          <barcode>5099967896752</barcode>
          <artist id="1053056">
            <name>Emeli Sande</name>
            <appearsAs>Emeli Sandé</appearsAs>
            <url>http://www.7digital.com/artists/emeli-sande-(1)/?partner=712</url>
          </artist>
          <url>http://www.7digital.com/artists/emeli-sande-(1)/our-version-of-events/?partner=712</url>
          <image>http://cdn.7static.com/static/img/sleeveart/00/015/723/0001572399_50.jpg</image>
          <releaseDate>2012-02-13T00:00:00Z</releaseDate>
        </release>
        <url>http://www.7digital.com/artists/emeli-sande-(1)/our-version-of-events/10-Next-to-Me?partner=712&amp;partner=712</url>
      </track>
    </chartItem>
    <chartItem>
      <position>2</position>
      <change>New</change>
      <track id="17111839">
        <title>Hot Right Now</title>
        <version>Radio Edit</version>
        <artist id="1202566">
          <name>DJ Fresh Feat. Rita Ora</name>
          <appearsAs>DJ Fresh Feat. Rita Ora</appearsAs>
          <url>http://www.7digital.com/artists/dj-fresh-feat-rita-ora?partner=712</url>
        </artist>
        <trackNumber>1</trackNumber>
        <duration>182</duration>
        <explicitContent>false</explicitContent>
        <release id="1552413">
          <title>Hot Right Now</title>
          <version></version>
          <type>Single</type>
          <barcode>5051823057240</barcode>
          <artist id="1202566">
            <name>DJ Fresh Feat. Rita Ora</name>
            <appearsAs>DJ Fresh Feat. Rita Ora</appearsAs>
            <url>http://www.7digital.com/artists/dj-fresh-feat-rita-ora/?partner=712</url>
          </artist>
          <url>http://www.7digital.com/artists/dj-fresh-feat-rita-ora/hot-right-now/?partner=712</url>
          <image>http://cdn.7static.com/static/img/sleeveart/00/015/524/0001552413_50.jpg</image>
          <releaseDate>2012-02-12T00:00:00Z</releaseDate>
        </release>
        <url>http://www.7digital.com/artists/dj-fresh-feat-rita-ora/hot-right-now/01-Hot-Right-Now?partner=712&amp;partner=712</url>
      </track>
    </chartItem>
  </chart>
</response>
Method specific errors:
codemessagedescription
1003
Requested page out of range
You specified a page number which does not exist

GETtrack/details

This method returns various track details such as title and duration.

Method specific parameters:
nametypeusedescription
trackId
integerrequiredThe unique identifier of the track.
Example request:
http://api.7digital.com/1.2/track/details?trackid=12345&oauth_consumer_key=YOUR_KEY_HERE&country=GB
Example response:
<response status="ok" version="1.2">
    <track id="12345">
        <title>I Love You</title>
        <version />
        <artist id="437">
            <name>The Dandy Warhols</name>
            <appearsAs>The Dandy Warhols</appearsAs>
            <url>http://www.7digital.com/artists/the-dandy-warhols/?partner=123</url>
        </artist>
        <trackNumber>5</trackNumber>
        <duration>252</duration>
        <explicitContent>false</explicitContent>
        <isrc>USCA29600191</isrc>
        <type>audio</type>
  <release id="1302">
            <title>...The Dandy Warhols Come Down</title>
            <version />
            <type>Album</type>
                ...
            </release>
    </track>
</response>
        

GETtrack/preview

This method returns a link or redirects to a streamed preview clip of the track. The available length of the preview clip may vary between 30 to 60 seconds depending on content provider.

Unless explicitly approved by 7digital and/or content providers any use of preview clips must be associated with a buy link to 7digital store or a buy option within your own app if you're Premium API consumer with integrated purchasing. Links must point directly to a page where the track/release can be purchased, generic links (e.g. to home page) are not acceptable. You must also ensure that the preview clips are not easily downloadable by end users (e.g. users should not be able to right click on a preview clip link in browser and choose "Save as.." to download the audio file).

In addition to that if preview clips are not used solely for promoting purchase of given track (especially if the audio is integral part of the app, e.g. in a game) a "synch license" is likely to be required by the content owner. Please contact us with your specific requirements for further info.

Method specific parameters:
nametypeusedescription
trackId
integerrequiredThe unique identifier of the track to be streamed.
redirect
true/falseoptionalIf set to true, a client redirect to the track download is returned - otherwise an XML response is returned. Default is true.
Example request:
http://api.7digital.com/1.2/track/preview?trackid=123
Example response:
<response status="ok" version="1.2">
  <url>http://previews.7digital.com/clips/34/123.clip.mp3</url>
</response>

GETtrack/search

This method will search for a track that matches the supplied search query. The following fields will be searched on: track title, artist name, release title and track ISRC.

Method specific parameters:
nametypeusedescription
q
stringrequiredThe search query string.
streamable
booleanoptionalIf provided search results will contain only tracks that can/cannot be streamed
licensorId
integeroptionalIf provided search results will contain only tracks from this licensor. A minus sign prefix excludes tracks from that licensor (e.g. -5)
country
stringoptional2 letter ISO country code of the country whose tracks you would like to search
page
intoptionalPage number of the result set. If not supplied, defaults to 1
pageSize
intoptionalNumber of items to be returned per page. If not supplied, defaults to 10. Maximum page size is 500
imageSize
intoptionalThe requested width of the image in pixels
Example request:
http://api.7digital.com/1.2/track/search?q=Happy&oauth_consumer_key=YOUR_KEY_HERE&country=GB&pagesize=2
Example response:
<response status="ok" version="1.2" xsi:noNamespaceSchemaLocation="http://api.7digital.com/1.2/static/7digitalAPI.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <searchResults>
    <page>1</page>
    <pageSize>2</pageSize>
    <totalItems>77122</totalItems>
    <searchResult>
      <type>track</type>
      <score>6.6025906</score>
      <track id="10353559">
        <title>Happy Birthday To You</title>
        <version />
        <artist id="571009">
          <name>Happy Birthday</name>
          <appearsAs>Happy Birthday</appearsAs>
          <url>http://www.7digital.com/artist/happy-birthday/?partner=1401</url>
        </artist>
        <trackNumber>1</trackNumber>
        <duration>35</duration>
        <explicitContent>false</explicitContent>
        <isrc>DEHB20700052</isrc>
        <type>audio</type>
        <release id="940630">
          <title>Happy Birthday!</title>
          <version />
          <type>Single</type>
          <artist id="571009">
            <name>Happy Birthday</name>
            <appearsAs>Happy Birthday</appearsAs>
            <url>http://www.7digital.com/artist/happy-birthday/?partner=1401</url>
          </artist>
          <url>http://www.7digital.com/artist/happy-birthday/release/happy-birthday-2/?partner=1401</url>
          <image>http://cdn.7static.com/static/img/sleeveart/00/009/406/0000940630_50.jpg</image>
          <releaseDate>2010-09-03T00:00:00+01:00</releaseDate>
          <formats availableDrmFree="true">
            <format id="17">
              <fileFormat>MP3</fileFormat>
              <bitRate>320</bitRate>
              <drmFree>true</drmFree>
            </format>
            <format id="33">
              <fileFormat>MP4</fileFormat>
              <bitRate>320</bitRate>
              <drmFree>true</drmFree>
            </format>
            <format id="26">
              <fileFormat>MP3</fileFormat>
              <bitRate>128</bitRate>
              <drmFree>true</drmFree>
            </format>
          </formats>
          <popularity>0</popularity>
        </release>
        <url>http://www.7digital.com/artist/happy-birthday/release/happy-birthday-2/?partner=1401&amp;h=01</url>
        <price>
          <currency code="GBP">£</currency>
          <value>0.99</value>
          <formattedPrice>£0.99</formattedPrice>
          <onSale>false</onSale>
        </price>
        <streamingReleaseDate>2010-09-03T00:00:00+01:00</streamingReleaseDate>
      </track>
    </searchResult>
    <searchResult>
      <type>track</type>
      <score>5.727363</score>
      <track id="18776375">
        <title>Step On</title>
        <version />
        <artist id="4135">
          <name>Happy Mondays</name>
          <appearsAs>Happy Mondays</appearsAs>
          <url>http://www.7digital.com/artist/various-artists/?partner=1401</url>
        </artist>
        <trackNumber>6</trackNumber>
        <duration>317</duration>
        <explicitContent>false</explicitContent>
        <isrc>GBAAP9000008</isrc>
        <type>audio</type>
        <release id="1724099">
          <title>Made In Britain</title>
          <version />
          <type>Album</type>
          <artist id="4135">
            <name>Happy Mondays</name>
            <appearsAs>Happy Mondays</appearsAs>
            <url>http://www.7digital.com/artist/various-artists/?partner=1401</url>
          </artist>
          <url>http://www.7digital.com/artist/various-artists/release/made-in-britain/?partner=1401</url>
          <image>http://cdn.7static.com/static/img/sleeveart/00/017/240/0001724099_50.jpg</image>
          <releaseDate>2012-05-28T00:00:00+01:00</releaseDate>
          <formats availableDrmFree="true">
            <format id="17">
              <fileFormat>MP3</fileFormat>
              <bitRate>320</bitRate>
              <drmFree>true</drmFree>
            </format>
            <format id="55">
              <fileFormat>M4A</fileFormat>
              <bitRate>64</bitRate>
              <drmFree>true</drmFree>
            </format>
          </formats>
          <popularity>0</popularity>
        </release>
        <url>http://www.7digital.com/artist/various-artists/release/made-in-britain/?partner=1401&amp;h=06</url>
        <price>
          <currency code="GBP">£</currency>
          <value>0.99</value>
          <formattedPrice>£0.99</formattedPrice>
          <onSale>false</onSale>
        </price>
        <streamingReleaseDate xsi:nil="true" />
      </track>
    </searchResult>
  </searchResults>
</response>
        
Method specific errors:
codemessagedescription
1001
Required parameter q is missing
You must supply a value for the q parameter
1003
Requested page out of range
You specified a page number which does not exist

Tag methods

GETtag

This method returns a list of all available tags.

Method specific parameters:

None.

Example request:
http://api.7digital.com/1.2/tag?oauth_consumer_key=YOUR_KEY_HERE
Example response:
<response status="ok" version="1.2" xsi:noNamespaceSchemaLocation="http://api.7digital.com/1.2/static/7digitalAPI.xsd">
  <tags>
    <page>1</page>
    <pageSize>10</pageSize>
    <totalItems>629</totalItems>
    <tag id="pop">
      <text>pop</text>
      <url>http://www.7digital.com/tags/pop?partner=123</url>
      <count>90847</count>
    </tag>
    <tag id="rock">
      <text>rock</text>
      <url>http://www.7digital.com/tags/rock?partner=123</url>
      <count>52454</count>
    </tag>        
    ...
   </tags>
</response>

GETartist/tags

This method returns all tags associated with the given artist.

Method specific parameters:
nametypeusedescription
artistId
integerrequiredThe unique identifier of the artist.
Example request:
http://api.7digital.com/1.2/artist/tags?artistid=1&oauth_consumer_key=YOUR_KEY_HERE&country=GB
Example response:
<response status="ok" version="1.2">
    <tags>
        <tag id="rock">
            <text>rock</text>
            <url>http://www.7digital.com/tags/rock?partner=123</url>
        </tag>
        <tag id="united-kingdom">
            <text>united kingdom</text>
            <url>http://www.7digital.com/tags/united-kingdom?partner=123</url>
        </tag>
            ...
        </tags>
</response>

GETartist/bytag/top

This method returns a list of most popular artists tagged by a given tag or list of tags. If multiple tags are supplied only artists matching all of them will be returned.

Method specific parameters:
nametypeusedescription
tags
stringrequiredA single or comma separated list of tags.
streamable
booleanoptionalIf provided search results will contain only artists that can/cannot be streamed
licensorId
integeroptionalIf provided search results will contain only artists from this licensor. A minus sign prefix excludes artists from that licensor (e.g. -5)
country
stringoptional 2 letter ISO country code of the country whose artists you would like to search
page
intoptionalPage number of the result set. If not supplied, defaults to 1
pageSize
intoptionalNumber of items to be returned per page. If not supplied, defaults to 10. Maximum page size is 500
imageSize
intoptional The requested width of the image in pixels
Example request:
http://api.7digital.com/1.2/artist/bytag/top?tags=rock,pop,2000s&oauth_consumer_key=YOUR_KEY_HERE&country=GB&pagesize=2
Example response:
<response status="ok" version="1.2" xsi:noNamespaceSchemaLocation="http://api.7digital.com/1.2/static/7digitalAPI.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <taggedResults>
    <page>1</page>
    <pageSize>2</pageSize>
    <totalItems>437</totalItems>
    <type>artist</type>
    <taggedItem>
      <artist id="48796">
        <name>System of a Down</name>
        <sortName>System of a Down</sortName>
        <url>http://www.7digital.com/artist/system-of-a-down/?partner=712</url>
        <image>http://cdn.7static.com/static/img/artistimages/00/000/487/0000048796_150.jpg</image>
        <popularity>0.68</popularity>
      </artist>
    </taggedItem>
    <taggedItem>
      <artist id="8145">
        <name>Three Days Grace</name>
        <sortName>Three Days Grace</sortName>
        <url>http://www.7digital.com/artist/three-days-grace/?partner=712</url>
        <image>http://cdn.7static.com/static/img/artistimages/00/000/081/0000008145_150.jpg</image>
        <popularity>0.6</popularity>
      </artist>
    </taggedItem>
  </taggedResults>
</response>
        
Method specific errors:
codemessagedescription
2001
None of the provided tag(s) exist.
The tags you supplied do not exist
1003
Requested page out of range
You specified a page number which does not exist

GETrelease/tags

This method returns all tags associated with the given release.

Method specific parameters:
nametypeusedescription
releaseId
integerrequiredThe unique identifier of the release.
Example request:
http://api.7digital.com/1.2/release/tags?releaseid=155408&oauth_consumer_key=YOUR_KEY_HERE&country=GB
Example response:
<response status="ok" version="1.2" xsi:noNamespaceSchemaLocation="http://api.7digital.com/1.2/static/7digitalAPI.xsd">
  <tags>
  <page>1</page>
  <pageSize>10</pageSize>
  <totalItems>5</totalItems>
  <tag id="rock">
    <text>rock</text>
    <url>http://www.7digital.com/tags/rock</url>
  </tag>
  <tag id="pop">
    <text>pop</text>
    <url>http://www.7digital.com/tags/pop</url>
  </tag>
  <tag id="electronic">
    <text>electronic</text>
    <url>http://www.7digital.com/tags/electronic</url>
  </tag>
  <tag id="indie-rock">
    <text>indie rock</text>
    <url>http://www.7digital.com/tags/indie-rock</url>
  </tag>
  <tag id="2000s">
    <text>2000s</text>
    <url>http://www.7digital.com/tags/2000s</url>
  </tag>
  </tags>
</response>
        

GETrelease/bytag/new

This method returns a list of new releases tagged by a given tag or list of tags. If multiple tags are supplied only releases matching all of them will be returned. The most recent releases are returned first.

Method specific parameters:
nametypeusedescription
tags
stringrequiredtag or comma separated list of tags
streamable
booleanoptionalIf provided search results will contain only releases that can/cannot be streamed
licensorId
integeroptionalIf provided search results will contain only releases from this licensor. A minus sign prefix excludes releases from that licensor (e.g. -5)
country
stringoptional 2 letter ISO country code of the country whose releases you would like to search
page
intoptionalPage number of the result set. If not supplied, defaults to 1
pageSize
intoptionalNumber of items to be returned per page. If not supplied, defaults to 10. Maximum page size is 500
imageSize
intoptional The requested width of the image in pixels
Example request:
http://api.7digital.com/1.2/release/bytag/new?tags=rock&page=2&pageSize=2&oauth_consumer_key=YOUR_KEY_HERE
Example response:
<response status="ok" version="1.2" xsi:noNamespaceSchemaLocation="http://api.7digital.com/1.2/static/7digitalAPI.xsd">
   <taggedResults>
     <page>2</page>
     <pageSize>2</pageSize>
     <totalItems>143673</totalItems>
     <type>release</type>
     <taggedItem>
       <release id="2205934">
         <title>Return of the gaucho</title>
         <version/>
         <type>Album</type>
         <barcode>5700907236803</barcode>
         <year>2013</year>
         <explicitContent>false</explicitContent>
         <artist id="1534502">
           <name>Powderhog</name>
           <appearsAs>Powderhog</appearsAs>
           <url>http://www.7digital.com/artist/powderhog/?partner=1401</url>
         </artist>
         <url>http://www.7digital.com/artist/powderhog/release/return-of-the-gaucho/?partner=1401</url>
         <image>http://cdn.7static.com/static/img/sleeveart/00/022/059/0002205934_50.jpg</image>
         <releaseDate>2013-04-18T00:00:00+01:00</releaseDate>
         <addedDate>2013-03-28T11:31:07+00:00</addedDate>
         <price>
           <currency code="GBP">£</currency>
           <value>7.99</value>
           <formattedPrice>£7.99</formattedPrice>
           <rrp>7.99</rrp>
           <formattedRrp>£7.99</formattedRrp>
           <onSale>false</onSale>
         </price>
         <popularity>0.3</popularity>
         <streamingReleaseDate>2013-04-18T00:00:00+01:00</streamingReleaseDate>
         <duration>2724</duration>
         <trackCount>12</trackCount>
       </release>
     </taggedItem>
     ...
   </taggedResults>
 </response>
Method specific errors:
codemessagedescription
2001
None of the provided tag(s) exist.
The tags you supplied do not exist
1003
Requested page out of range
You specified a page number which does not exist

GETrelease/bytag/top

This method returns a list of most popular releases tagged by a given tag or list of tags. If multiple tags are supplied only releases matching all of them will be returned.

Method specific parameters:
nametypeusedescription
tags
stringrequiredA single or comma separated list of tags.
Example request:
http://api.7digital.com/1.2/release/bytag/top?tags=rock&page=1&pageSize=2&oauth_consumer_key=YOUR_KEY_HERE
Example response:
<response status="ok" version="1.2" xsi:noNamespaceSchemaLocation="http://api.7digital.com/1.2/static/7digitalAPI.xsd">
  <taggedResults>
    <page>1</page>
    <pageSize>2</pageSize>
    <totalItems>143850</totalItems>
    <type>release</type>
    <taggedItem>
      <release id="1402123">
        <title>The Dark Side Of The Moon (2011 - Remaster)</title>
        <version/>
        <type>Album</type>
        <barcode>5099902984056</barcode>
        <year>2011</year>
        <explicitContent>false</explicitContent>
        <artist id="447">
          <name>Pink Floyd</name>
          <appearsAs>Pink Floyd</appearsAs>
          <url>http://www.7digital.com/artist/pink-floyd/?partner=1401</url>
        </artist>
        <url>http://www.7digital.com/artist/pink-floyd/release/the-dark-side-of-the-moon-2011-remaster/?partner=1401</url>
        <image>http://cdn.7static.com/static/img/sleeveart/00/014/021/0001402123_50.jpg</image>
        <releaseDate>2011-09-26T00:00:00+01:00</releaseDate>
        <addedDate>2011-09-16T17:39:15+01:00</addedDate>
        <price>
          <currency code="GBP">£</currency>
          <value>7.99</value>
          <formattedPrice>£7.99</formattedPrice>
          <rrp>7.99</rrp>
          <formattedRrp>£7.99</formattedRrp>
          <onSale>false</onSale>
        </price>
        <popularity>0.7</popularity>
        <streamingReleaseDate>2011-09-26T00:00:00+01:00</streamingReleaseDate>
        <duration>2572</duration>
        <trackCount>10</trackCount>
      </release>
    </taggedItem>
    ...
  </taggedResults>
</response>
Method specific errors:
codemessagedescription
2001
None of the provided tag(s) exist.
The tags you supplied do not exist

Editorial API

The Editorial API gives you access to content curated by the 7digital Editorial Team.

Format of Editorial API responses

list

An editorial list containing multiple catalogue items. Some lists (e.g. seasonal promotions) may be empty at certain times in which case the list should not be displayed to user.

Example response:
<list id="833">
  <key>featured_albums</key>
  <listItems>
    <listItem id="123456">
      <type>release</type>
      <release id="1136112">
        <title>Collapse Into Now</title>
        <artist id="590">
        <name>R.E.M.</name>
          <appearsAs>R.E.M.</appearsAs>
          <url>http://www.7digital.com/artists/r-e-m</url>
        </artist>
        <url>http://www.7digital.com/artists/r-e-m/collapse-into-now?partner=123</url>
        <image>http://cdn.7static.com/static/img/sleeveart/00/011/361/0001136112_50.jpg</image>
        <explicitContent>false</explicitContent>
      </release>
    </listItem>
    <listItem id="123457">
      ...
    </listItem>
    <listItem id="123458">
      ...
    </listItem>
    ...
  </listItems>
</list>
Description of response fields:
nametypedescription
id
integerInternal ID of the list. The "same" list can have different IDs in different countries, we recommend you always refer to lists using their keys (see below)
key
stringkey used to refer to the same type of list (e.g. "Featured Albums") across different countries.
listItems
ListItems listlist of ListItem objects

listItem

individual item appearing in list

Example response:
<listItem id="1136112">
  <type>release</type>
  <release id="1136112">
    <title>Collapse Into Now</title>
    <artist id="590">
      <name>R.E.M.</name>
      <appearsAs>R.E.M.</appearsAs>
      <url>http://www.7digital.com/artists/r-e-m</url>
    </artist>
    <url>http://www.7digital.com/artists/r-e-m/collapse-into-now?partner=123</url>
    <image>http://cdn.7static.com/static/img/sleeveart/00/011/361/0001136112_50.jpg</image>
    <explicitContent>false</explicitContent>
  </release>
</listItem>
Description of response fields:
nametypedescription
id
integerinternal ID identifying individual list item
type
artist, release or trackdefines type of an item
artist/release/track
Artist, Release or Track objectdepending on type, the list item will contain information on artist, release or track in standard 7digital API format.

Editorial API methods

GETeditorial/list

Returns a curated list of artists, releases or tracks. Available editorial lists are described in the table below.
Please note that some lists might be empty for certain countries and/or at certain times in which case the list should not be displayed to users and we recommend to replace the empty list with the next editorial list in prominence order.

The following lists are currently published by our team:

Title Key Num of items Update frequency Prominence Description Comment
New releases new_releases 6-24 weekly Highest A long list (14+ products) of hand-picked albums considered to be the week's musical highlights/priority new releases. The 2-4 bigger packshots will be the albums of the week selected by our team.
On promotion promo_selection 0-48 seasonal Highest A list of reduced albums, selected in cooperation with the label or third party, offering attractive prices and a seasonal catalogue, designed to appeal to new customers. Not always available and not available in all countries
Pre-orders preorders 1-6 weekly-fortnightly High A list of hand-picked pre-orders, which are often major upcoming priorities. In some instances, these are not available on other platforms yet, offering competitive differentiation.
Popular releases popular_releases 0-24 weekly-fortnightly Lower A list of the bestselling and popular releases of the past few months.
Classic albums classic_albums 0-24 weekly-fortnightly Lower A list of all-time classic albums.
7digital staff recommends staff_recommendations 6-12 weekly-fortnightly Lower The 7digital staff is made up of true music lovers. This lists is what makes their heart beat. Often more obscure catalogue, less popular, off the beaten track.

Method specific parameters:
nametypeusedescription
key
stringrequiredunique key referencing the list to be returned as provided by 7digital. See list of available editorial list and their keys.
country
ISO 2-character country codeoptional For a localized list of content please provide a country code. The country will default to GB (UK) if it is not provided.
Example request:
http://api.7digital.com/1.2/editorial/list?key=featured_albums&country=GB&oauth_consumer_key=YOUR_KEY_HERE
Example response:
<response status="ok" version="1.2">
  <list id="833">
    <key>featured_albums</key>
    <listItems>
      <listItem id="1136112">
        <type>release</type>
        <release id="1136112">
          <title>Collapse Into Now</title>
          <artist id="590">
            <name>R.E.M.</name>
            <appearsAs>R.E.M.</appearsAs>
            <url>http://www.7digital.com/artists/r-e-m</url>
          </artist>
          <url>http://www.7digital.com/artists/r-e-m/collapse-into-now?partner=123</url>
          <image>http://cdn.7static.com/static/img/sleeveart/00/011/361/0001136112_50.jpg</image>
          <explicitContent>false</explicitContent>
        </release>
      </listItem>
      <listItem id="1165337">
        <type>release</type>
        <release id="1165337">
          <title>Queens Of The Stone Age</title>
          <artist id="5845">
            <name>Queens Of The Stone Age</name>
            <appearsAs>Queens Of The Stone Age</appearsAs>
            <url>http://www.7digital.com/artists/queens-of-the-stone-age?partner=123</url>
          </artist>
          <url>http://www.7digital.com/artists/queens-of-the-stone-age/queens-of-the-stone-age-1?partner=123</url>
          <image>http://cdn.7static.com/static/img/sleeveart/00/011/653/0001165337_50.jpg</image>
          <explicitContent>false</explicitContent>
        </release>
      </listItem>
    </listItems>
  </list>
</response>

        
Method specific errors:
codemessagedescription
1001
Required parameter missing
Not all mandatory parameters have been provided.
2001
The list was not found
List with given key has not been found.

Basket API

The basket API allows creation of 7digital hosted baskets which can be populated with items (tracks and releases) from the 7digital catalogue.

Please note: At the moment the baskets can only be checked out by using the Purchasing API method user/purchase/basket.

Format of basket responses

All methods dealing with baskets will upon successful execution return a basket object that can contain several basketItem objects. Structure of these response objects is described below.

basket

Example response:
<basket id="00000000-0000-0000-0000-000000000000">
  <itemCount>1</itemCount>
  <price>
    <currency code="EUR">€</currency>
    <value>0.99</value>
    <formattedPrice>0,99€</formattedPrice>
  </price>
  <amountDue>
    <currency code="EUR">€</currency>
    <amount>0.99</amount>
    <formattedAmount>0,99€</formattedAmount>
  </amountDue>
  <basketItems>
    <basketItem id="15284882">
      ...
    </basketItem>
    <basketItem id="15284883">
      ...
    </basketItem>
  </basketItems>
</basket>
Description of response fields:
nametypedescription
basket id
GUIDunique identifier of a basket
itemCount
intnumber of items in basket
price
PriceSum of catalogue prices of all items in the basket without any applicable discounts applied. This price does not need to be displayed to the end user.
amountDue
AmountDueTotal amount to be paid at basket checkout. This price takes into account any applicable discounts and should always be used to display basket total to the end user.
basketItems
BasketItems listlist of basketItem objects

basketItem

Example response:
<basketItem id="15284882">
  <type>track</type>
  <itemName>Test</itemName>
  <artistName>Ghetto</artistName>
  <trackId>2458384</trackId>
  <releaseId>224820</releaseId>
  <price>
    <currency code="EUR">€</currency>
    <value>0.99</value>
    <formattedPrice>0,99€</formattedPrice>
  </price>
  <amountDue>
  <amount>0.99</amount>
    <formattedAmount>0,99€</formattedAmount>
  </amountDue>
  <discount>
    <type>Voucher</type>
  </discount>
</basketItem>
Description of response fields:
nametypedescription
basketItem id
intunique identifier of the basketItem
type
track, releasetracks or whole releases can be added to basket
itemName
stringtitle of the item (track) in the basket
artistName
stringname of the artist for the item in the basket
trackId
intID of the track
releaseId
intID of the release the track come from
price
PriceThe catalogue price of the item in the basket. This price does not reflect any discounts applied to the basket item and does not need to be displayed to the end user.
amountDue
AmountDueThe amount the user will be charged for this item at basket checkout. This price takes into account any applicable discounts and should always be used to display basket item prices to the end user.
discount
stringthis element will be present only if a discount has been applied to the basket item. At the moment the only available discount type is "Voucher"

Basket API methods

GETbasket

This method retrieves an existing basket and its contents.

Method specific parameters:
nametypeusedescription
basketId
GUIDrequired The unique identifier of the basket as acquired by basket/create method
country
ISO 2-character country codeoptionalThe code of the country the end user resides in. The country will default to GB if not provided.
Example request:
http://api.7digital.com/1.2/basket?basketId=00000000-0000-0000-0000-000000000000&country=DE&oauth_consumer_key=YOUR_KEY_HERE
Example response:
<response status="ok" version="1.2">
  <basket id="00000000-0000-0000-0000-000000000000">
    <itemCount>1</itemCount>
    <price>
      <currency code="EUR">€</currency>
      <value>0.99</value>
      <formattedPrice>0,99€</formattedPrice>
    </price>
    <amountDue>
      <currency code="EUR">€</currency>
      <amount>0.99</amount>
      <formattedAmount>0,99€</formattedAmount>
    </amountDue>
    <basketItems>
      <basketItem id="15284882">
        <type>track</type>
        <itemName>Test</itemName>
        <artistName>Ghetto</artistName>
        <trackId>2458384</trackId>
        <releaseId>224820</releaseId>
        <price>
          <value>0.99</value>
          <formattedPrice>0,99€</formattedPrice>
        </price>
        <amountDue>
          <amount>0.99</amount>
          <formattedAmount>0,99€</formattedAmount>
        </amountDue>
      </basketItem>
    </basketItems>
  </basket>
</response>
Method specific errors:
codemessagedescription
1001 
Missing parameter "parameter name"
Not all mandatory parameters have been provided.
1002
Value of parameter "parameter name" is not valid
Value for parameter in error message is not valid.
2001
Basket with basketId not found.
Basket with given ID does not exist.
2002
Basket with basketId is unavailable in this country / shop.
The basket has been created in different country and can only be accessed in the country where it was created.

GETbasket/create

This method creates an empty basket and returns the new basket with it's basketId.

Method specific parameters:
nametypeusedescription
country
ISO 2-character country codeoptionalThe code of the country the end user resides in. The country will default to GB if not provided.
Example request:
http://api.7digital.com/1.2/basket/create?country=DE&oauth_consumer_key=YOUR_KEY_HERE
Example response:
<response status="ok" version="1.2">
  <basket id="00000000-0000-0000-0000-000000000000">
    <itemCount>0</itemCount>
    <price>
      <currency code="GBP">&#163;</currency>
      <value>0</value>
      <formattedPrice>&#163;0.00</formattedPrice>
    </price>
    <amountDue>
      <currency code="GBP">&#163;</currency>
      <amount>0</amount>
      <formattedAmount>&#163;0.00</formattedAmount>
    </amountDue>
    <basketItems/>
  </basket>
</response>

GETbasket/addItem

This method adds a track or release to a basket.

Method specific parameters:
nametypeusedescription
basketId
GUIDrequired identifier of the basket as acquired by basket/create method
releaseId
intrequiredidentifier of the release to add to the basket
trackId
intoptionalidentifier of the track being added to the basket. You must also specify the releaseId that the track belongs to.
country
ISO 2-character country codeoptionalThe code of the country the end user resides in. The country will default to GB if not provided.
affiliatePartner
intoptionalOverrides affiliate tracking id when adding an item to the basket.
Example request:
http://api.7digital.com/1.2/basket/additem?basketid=00000000-0000-0000-0000-000000000000&releaseid=160553&trackid=1693930&country=GB&oauth_consumer_key=YOUR_KEY_HERE
Example response:
<response status="ok" version="1.2">
  <basket id="00000000-0000-0000-0000-000000000000">
    <itemCount>1</itemCount>
    <price>
      <currency code="EUR">€</currency>
      <value>0.99</value>
      <formattedPrice>0,99€</formattedPrice>
    </price>
    <amountDue>
      <currency code="EUR">€</currency>
      <amount>0.99</amount>
      <formattedAmount>0,99€</formattedAmount>
    </amountDue>
    <basketItems>
      <basketItem id="15284882">
        <type>track</type>
        <itemName>Test</itemName>
        <artistName>Ghetto</artistName>
        <trackId>2458384</trackId>
        <releaseId>224820</releaseId>
        <price>
          <value>0.99</value>
          <formattedPrice>0,99€</formattedPrice>
        </price>
        <amountDue>
          <amount>0.99</amount>
          <formattedAmount>0,99€</formattedAmount>
        </amountDue>
      </basketItem>
    </basketItems>
  </basket>
</response>

GETbasket/removeItem

This method removes an item from a basket.

Method specific parameters:
nametypeusedescription
basketId
GUIDrequired The unique identifier of the basket as acquired by basket/create method
itemId
intrequiredbasketItem ID of the item to be removed
country
ISO 2-character country codeoptionalThe code of the country the end user resides in. The country will default to GB if not provided.
Example request:
http://api.7digital.com/1.2/basket/removeitem?basketid=00000000-0000-0000-0000-000000000000&itemid=15965085&country=DE&oauth_consumer_key=YOUR_KEY_HERE
Example response:
<response status="ok" version="1.2">
  <basket id="00000000-0000-0000-0000-000000000000">
    <itemCount>0</itemCount>
    <price>
      <currency code="EUR">€</currency>
      <value>0.00</value>
      <formattedPrice>0,00€</formattedPrice>
    </price>
    <amountDue>
      <currency code="EUR">€</currency>
      <amount>0.00</amount>
      <formattedAmount>0,00€</formattedAmount>
    </amountDue>
    <basketItems/>
  </basket>
</response>
Method specific errors:
codemessagedescription
1001 
Missing parameter "parameter name"
Not all mandatory parameters have been provided.
1002
Value of parameter "parameter name" is not valid
Value for parameter in error message is not valid.
2001
Basket with basketId not found.
Basket with given ID does not exist.
2001
Basket item with id not found.
Basket does not contain an item with given ID.
2002
Basket with basketId is unavailable in this country / shop.
The basket has been created in different country and can only be accessed in the country where it was created.

POSTbasket/applyVoucherHTTPSOAuthPremium

This method applies a voucher to a basket. If a valid voucher code has been applied the response will return an updated basket with the applied discount reflected in the amountDue element of the basket item the voucher has been applied to. The amountDue element of the basket total will be updated accordingly as well. The price element will remain unchanged and will reflect the original catalogue price of the item and basket.

To finalize purchase the basket needs to be checked-out using user/purchase/basket method.

If the voucher code cannot be redeemed against any items in the basket an error response will be returned.

Method specific parameters:
nametypeusedescription
basketId
GUIDrequired The unique identifier of the basket as acquired by basket/create method
voucherCode
stringrequiredVoucher code that will be redeemed against items in the basket.
country
ISO 2-character country codeoptionalThe code of the country the end user resides in. The country will default to GB if not provided.
Example request:
https://api.7digital.com/1.2/basket/applyvoucher?basketid=00000000-0000-0000-0000-000000000000&vouchercode=ABC123&oauth_consumer_key=YOUR_KEY_HERE
Example response:
<response status="ok" version="1.2">
  <basket id="00000000-0000-0000-0000-000000000000">
    <itemCount>1</itemCount>
    <price>
      <currency code="EUR">€</currency>
      <value>0.99</value>
      <formattedPrice>0,99€</formattedPrice>
    </price>
    <amountDue>
      <currency code="EUR">€</currency>
      <amount>0</amount>
      <formattedAmount>0,00€</formattedAmount>
    </amountDue>
    <basketItems>
      <basketItem id="15284882">
        <type>track</type>
        <itemName>Test</itemName>
        <artistName>Ghetto</artistName>
        <trackId>2458384</trackId>
        <releaseId>224820</releaseId>
        <price>
          <value>0.99</value>
          <formattedPrice>0,99€</formattedPrice>
        </price>
        <amountDue>
          <amount>0</amount>
          <formattedAmount>0,00€</formattedAmount>
        </amountDue>
        <discount>
          <type>Voucher</type>
        </discount>
      </basketItem>
    </basketItems>
  </basket>
</response>
Method specific errors:
codemessagedescription
1001 
Missing parameter "parameter name"
Not all mandatory parameters have been provided.
1002
Value of parameter "parameter name" is not valid
Value for parameter in error message is not valid.
2001
Basket with basketId not found.
Basket with given ID does not exist.
2002
Basket with basketId is unavailable in this country / shop.
The basket has been created in different country and can only be accessed in the country where it was created.
3012
Voucher not applied
Voucher was not applied for any of the following reasons:
- the voucher code is not valid
- the voucher has expired
- it cannot be redeemed against any items in the basket
- it has been fully redeemed already

OAuth Authentication

7digital API uses OAuth protocol to control access to some premium and user related API methods.

Several OAuth libraries for various programming languages are available, some of them can be found at here: http://oauth.net/code/.

2-legged OAuth

2-legged OAuth authentication is used to control access to methods that do not involve 7digital users.

In addition to method specific parameters each OAuth signed API requests will need to include additional OAuth protocol parameters and the full URL has to be signed using your consumer secret.

nametypeusedescription
oauth_consumer_key
stringrequiredyour API access key you have been assigned by 7digital
oauth_nonce
stringrequireda random string uniquely generated for each request
oauth_timestamp
integerrequiredtimestamp of the request (number of seconds since Jan 1 1970 0:00:00 GMT)
oauth_signature_method
stringrequiredsignature method used to sign the request (currently only HMAC-SHA1 supported)
oauth_signature
stringrequired generated from the API request URL and all the parameter name/value pairs of the request (inc. other OAuth params) using oauth_consumer_secret you have been assigned. Full process is described in OAuth Core 1.0 document
oauth_version
stringoptionalversion of OAuth protocol in use. If present, value must be 1.0

If you're not using an existing OAuth library (you really should be) and you're trying to implement OAuth signature generation yourself note that in 2-legged OAuth the signature key used to generate the oauth_signature is comprised of your consumer secret and empty token secret (since no user token is involved). The format of the key is: "<consumer secret>&" (the ampersand needs to be present). The full specification can be found in the OAuth Consumer Request 1.0 Draft 1 memo.

A fully signed 2-legged OAuth request will look like this:

http://api.7digital.com/1.2/method?oauth_consumer_key=YOUR_KEY_HERE&oauth_nonce=4279849&oauth_signature_method=HMAC-SHA1
  &oauth_timestamp=1249989128&methodparameter=somevalue&oauth_signature=Fop%Fdgw35qDr83VQME97rBEnxs8%3D

3-legged OAuth

Summary

Three legged OAuth is a mechanism that allows you (the 7digital API consumer) to access standard 7digital user accounts and act on behalf of the users. Instead of using usernames and passwords 7digital assigns you a token for the user (explicitly authorized for you by the user), which then allows you to make user related requests without the need for the user to authenticate each request/session.

A good starting place for learning how 3-legged OAuth works is the Beginner's Guide To OAuth published by Hueniverse. It has a useful introduction to the workflow process of 3-legged OAuth: www.hueniverse.com/hueniverse/2007/10/beginners-gui-1.html.

In terms of the 7digital API, there are two sides to 3-legged authentication:

  1. authenticating the user and the API consumer with 7digital
  2. using the generated user access token to sign user resource requests to 7digital

Authenticating a user

All requests made to authenticate a user must be OAuth signed by the consumer. The steps for authenticating a user are:

1. The API consumer requests a ‘request token’ from the 7digital API using oauth/requesttoken

2. The API consumer directs the user to the 7digital authentication page located at account.7digital.com

3. The user is redirected back to the API consumer’s website

4. The API consumer makes a request to exchange the authorised request token for an access token using oauth/accesstoken

Using an access token

Once an API consumer has an access token for a user, it can be used to sign requests to allow the API consumer to request user resources (locker, checkout, etc.)

The primary difference between 3-legged OAuth requests and 2-legged OAuth requests is how the request is signed:

1. The access token must be provided as 'oauth_token' along with the other OAuth parameters. Format: http://api.7digital.com/a/resource?<standard oauth params>&oauth_token=D3432KG5O9opT563Fe5ijnE4I9LmJJ32

2. The signature key is comprised of the consumer secret and the token secret. Format: "<consumer secret>&<token secret>"

3-legged OAuth API endpoints

GEToauth/requesttokenHTTPSOAuth

Requests a new request token for 3-legged authentication

Method specific parameters:
nametypeusedescription
oauth_consumer_key
stringrequiredThe only requirement for this method is that the request is OAuth signed.
xoauth_client_identifier
stringoptionalAn arbitrary string that will be stored with the token. This string will be displayed to the user along with the token for easier reference to an account or device that the token is linked to. The identifier has to be meaningful to the end user, e.g. "IMEI: 1234564546" (device serial number), "john2004" (user's login name on your website).
Example request:
https://api.7digital.com/1.2/oauth/requesttoken?oauth_consumer_key=YOUR_KEY_HERE&oauth_nonce=ABCDEF&oauth_timestamp=1234567890&oauth_signature_method=
HMAC-SHA1&oauth_signature=4KO5478ghJ49Olsp3kJ3L589Ssslg5o5
Example response:
<response status="ok" version="1.2">
  <oauth_request_token>
    <oauth_token>ABCD123456</oauth_token>
    <oauth_token_secret>d2I8uj7yaoa39KKdu3upasybu98f89fln</oauth_token_secret>
  </oauth_request_token>
</response>
          

GETUser authentication - authorising a request tokenHTTPS

This is not an API method, but the URL that displays the form that a user will authenticate themselves to 7digital with.

After authenticating the user, the request will be redirected back to the API consumer's website (if returnUrl has been supplied).

Method specific parameters:
nametypeusedescription
oauth_token
stringrequiredThe oauth_token value returned to the API consumer from an oauth/requesttoken request.
oauth_callback
URLoptionalThe URL that 7digital will use to hand the user authentication back to the requesting API consumer.
Example request:
https://account.7digital.com/YOUR_KEY_HERE/oauth/authorise?oauth_token=AAAAAAA&oauth_callback=http%3a%2f%2fapi-consumer.com%2fhandback%3fconsumerparam%3dvalue
Example response:
HTTP/1.x 302 Found
Location: http://api-consumer.com/handback?consumerparam=value?oauth_token=AAAAAA&status=Authorised

GEToauth/accesstokenHTTPSOAuth

Grants an access token in exchange for an authorised request token. This method must be OAuth signed, using the original request token key and signature as described above.

Although not expiring automatically after a certain period of time, access tokens (and also authorised request tokens) can be revoked by users at any time.

In the near future we will also enforce a limit of maximum of 3 access tokens that can be active at the same time per one 7digital user account, api consumer key and xoauth_client_identifier combination. If a user has already approved 3 access tokens for your service, the next time you acquire another access token for this same user the first access token will automatically expire.

If the nature of your service allows/requires users to maintain multiple connections to a single 7digital account you are advised to use a distinct xoauth_client_identifier for each connection. E.g. if a user of your service has registered 5 different accounts ("joe_home", "joe_work", etc) and they want to link all these accounts to a single 7digital account you need to provide an xoauth_client_identifier (xoauth_client_identifier=joe_home, xoauth_client_identifier=joe_work, etc) at the stage of acquiring an oauth/requesttoken. For device based integrations we recommend to use device names (if available) or serial numbers or IMEIs for mobiles as the identifier.

Method specific parameters:
nametypeusedescription
oauth_token
stringrequiredThe original request token.
Example request:
https://api.7digital.com/1.2/oauth/accesstoken?oauth_consumer_key=YOUR_KEY_HERE&oauth_nonce=ABCDEF&oauth_timestamp=1234567890&oauth_signature_method=
HMAC-SHA1&oauth_token=yu87230J29DT7tyuGslO98wrR43e39Of&oauth_signature=lth409pPr989rmMjaE9po3h34oKER89e
Example response:
<response status="ok" version="1.2">
  <oauth_access_token>
    <oauth_token>E3w4FV3oirRfj4KfT7alOpa893mmn4HJ</oauth_token>
    <oauth_token_secret>923kj3Kspa304n4Oamd3201pLkgjeM32</oauth_token_secret>
  </oauth_access_token>
</response>

Locker API

GETuser/lockerHTTPSOAuth

Returns a paged list of all releases and tracks with download URLs from a User's locker (library of all purchased tracks). This method must be OAuth signed.

Method specific parameters:
nametypeusedescription
oauth_token
integerrequireduser's OAuth accesstoken
pagesize
integeroptionalsets the number of releases that will be returned per page, the default is 10
page
integeroptionalsets the page to be returned in paged list of the customers releases and tracks, by default this is the first page. page=1
country
ISO 2-character country codeoptionalThe code of the country the end user resides in. The country will default to GB if not provided.
releaseId
integeroptionalThe 7digital ID of the release to be that we are interested in. You will use this to filter out and return a specific release from the user's locker. Will return an empty locker response if no match is found.
trackId
integeroptional If supplied together with the releaseId, will returned only that specific track (provided it exists in user locker). Will return an empty locker response if no match is found.
purchaseId
integeroptional If supplied will return only the releases and tracks for that basket. Will return an error if no tracks are found.
sort
stringoptional Orders the returned results. Supplied as a string in the format: "{sortColumn} {sortOrder}", for example: "purchaseDate desc" will show recent purchases first. Currently you can sort by releaseTitle (asc or desc), purchaseDate (asc or desc) and artistName (asc or desc). If no sort is supplied, the default is "releaseTitle asc". If no order is supplied the default is ascending.
Example request:
http://api.7digital.com/1.2/user/locker?sort=purchaseDate%20desc&oauth_token=...
Example response:
<response status="ok" version="1.2">
  <locker>
    <lockerReleases>
      <page>1</page>
      <pageSize>10</pageSize>
      <totalItems>1</totalItems>
      <lockerRelease>
        <release id="302123">
          <title>Original Album Classics</title>
          <version/>
          <type>Album</type>
          <artist id="1194">
            <name>Patti Smith</name>
            <appearsAs>Patti Smith</appearsAs>
            <url>http://www.7digital.com/artists/patti-smith/?partner=123</url>
          </artist>
          <url>http://www.7digital.com/artists/patti-smith/original.../?partner=123</url>
          <image>http://cdn.7static.com/static/img/sleeveart/00/003/021/0000302123_50.jpg</image>
          <releaseDate>2008-06-16T00:00:00+01:00</releaseDate>
        </release>
        <lockerTracks>
          <lockerTrack>
            <track id="3544116">
              <title>Gloria</title>
              <version>Digitally Remastered 1996</version>
              <artist id="1194">
                <name>Patti Smith</name>
                <appearsAs>Patti Smith</appearsAs>
                <url>http://www.7digital.com/artists/patti-smith/?partner=123</url>
              </artist>
              <url>http://www.7digital.com/artists/patti-smith/original.../01-Gloria?partner=123</url>
            </track>
            <remainingDownloads>355</remainingDownloads>
            <purchaseDate>2009-07-22T11:41:41+01:00</purchaseDate>
            <downloadUrls>
              <downloadUrl>
                <url>http://media.geo.7digital.com/media/user/downloadtrack...</url>
                <format id="17">
                  <fileFormat>MP3</fileFormat>
                  <bitRate>320</bitRate>
                  <drmFree>true</drmFree>
                </format>
              </downloadUrl>
            </downloadUrls>
          </lockerTrack>
        </lockerTracks>
      </lockerRelease>
    </lockerReleases>
  </locker>
</response>

Purchasing API

The Purchasing API allows 3rd parties to deliver digital content to individual users. The API offers 2 ways of handling user payments for the delivered content:

  1. Payments are processed by 7digital
  2. Payments are processed by API Consumer

Payments processed by 7digital

Users' payments for all delivered content are handled by 7digital.

Users will need to have a valid payment method set up on their 7digital account. Due to security and legal reasons this cannot be done by a 3rd party via the API but only by the user directly on a page hosted by 7digital. They can do so either at the payments page at account.7digital.com which can be skinned (for details see separate 7digital account website documentation) or 7digital users can do so also on any 7digital consumer website (e.g. www.7digital.com).

The only available payment method at the moment is credit/debit card payments.

GETuser/purchase/itemHTTPSOAuthPremium

This method allows a user to purchase an item at the price as advertised on 7digital.com. It will return the download URL of each item purchased. For example, if a release consisting of multiple tracks was purchased, then the download URL of each item constituting the release will be returned.
For a user purchase to be processed, the user should already have a default debit or credit card set up for payments.
This method allows users to take advantage of 7digital.com promotional offers and is only available to selected partners building 7digital branded integrations. For white-label integrations please use user/purchase/rrpItem or user/purchase/pricedItem.

Method specific parameters:
nametypeusedescription
oauth_token
integerrequireduser's OAuth accesstoken
releaseId
integerrequiredThe unique ID of the release being purchased. If a track is being purchased, this needs to identify the release the track appears on.
trackId
integeroptionalThe unique ID of the track being purchased. If supplied, only the track is delivered - otherwise the full release is delivered.
price
decimalrequired The price that has been displayed to the user prior to purchase. If the actual 7digital.com price is different to the supplied value the purchase is aborted and 3004 error message is returned instead. This is used to ensure the users cannot be charged a different amount than the advertised price (e.g. if the price was cached and/or has changed after it was displayed.)
country
ISO 2-character country codeoptionalThe code of the country the end user resides in. The country will default to GB if not provided.
shopid
integeroptional The shop ID that all basket items were selected from. The shop ID will default to the 7digital UK shop if it is not provided. If the shop ID is provided, the country parameter will be ignored.
tag_*key*
stringoptional Additional data to be stored with successful transactions, for the purposes such as tagging affiliated or marketing information. up to 10 tags can be stored. A tag key can be a maximum of 50 characters, and a tag value a maximum of 100 characters. E.g. tag_MyPartner=MagazinePromoABC&tag_ApplicationVersion=1.5. This data will only be available to API clients subscribing to customized sales reports service.
Example request:
http://api.7digital.com/1.2/user/purchase/item?releaseid=786&trackid=6598&price=0.99&oauth_token=...
Example response:
<response status="ok" version="1.2">
  <purchase id="123">
    <purchaseDate>2009-08-10T11:00:00+01:00</purchaseDate>
    <lockerReleases>
      <lockerRelease>
        <release id="1">
          <title>Ill Communication</title>
          <version/>
          <type>Album</type>
          <artist id="357">
            <name>Beastie Boys</name>
            <appearsAs>Beastie Boys</appearsAs>
            <url>http://www.7digital.com/artists/beastie-boys</url>
          </artist>
          <url>http://www.7digital.com/artists/beastie-boys</url>
          <image>http://cdn.7static.com/static/img/sleeveart/00/004/915/0000491573_350.jpg</image>
        </release>
        <lockerTracks>
          <lockerTrack>
            <track id="456">
              <title>Sabotage</title>
              <version/>
              <artist id="0">
                <name>Beastie Boys</name>
                <appearsAs>Beastie Boys</appearsAs>
                <url>http://www.7digital.com/artists/beastie-boys</url>
              </artist>
              <url>http://www.7digital.com/artists/beastie-boys/ill.../06-Sabotage-(2009-Digital-Remaster)/</url>
            </track>
            <remainingDownloads>3</remainingDownloads>
            <purchaseDate>2009-08-10T11:00:00+01:00</purchaseDate>
            <downloadUrls>
              <downloadUrl>
                <url>http://media.geo.7digital.com/media/user/downloadtrack...</url>
                <format id="1">
                  <fileFormat>MP3</fileFormat>
                  <bitRate>320</bitRate>
                  <drmFree>true</drmFree>
                </format>
              </downloadUrl>
            </downloadUrls>
          </lockerTrack>
        </lockerTracks>
      </lockerRelease>
    </lockerReleases>
  </purchase>
</response>
Method specific errors:
codemessagedescription
3001
The user's card has expired
The user's default payment hard has expired.
3002
The user has no card details saved
User did not register a payment method. Before making a purchase on user's behalf they need to register a payment card.
3003
Payment for this purchase has failed
The payment with the default payment card have been declined by the bank (e.g. card details not valid, insufficient funds, etc). The card used will be automatically marked as inactive and user will have to re-enter new payment card.
3004
Price supplied is out of date
The price displayed to the user and supplied in price parameter is no longer valid. The user has not been charged. You can retrieve the updated price, notify the user of the change and repeat the purchase request.

GETuser/purchase/rrpItemHTTPSOAuthPremium

This method allows a user to purchase an item at 7digital recommended retail price (RRP). It will return the download URL of each item purchased. For example, if a release consisting of multiple tracks was purchased, then the download URL of each item constituting the release will be returned. For a user purchase to be processed, the user should already have a default debit or credit card set up for payments.

Method specific parameters:
nametypeusedescription
oauth_token
integerrequireduser's OAuth accesstoken
releaseId
integerrequiredThe unique ID of the release being purchased. If a track is being purchased, this needs to identify the release the track appears on.
trackId
integeroptionalThe unique ID of the track being purchased. If supplied, only the track is delivered - otherwise the full release is delivered.
price
decimalrequired The price that has been displayed to the user prior to purchase. If the actual 7digital recommended retail price is different to the supplied value the purchase is aborted and 3004 error message is returned instead. This is used to ensure the users cannot be charged a different amount than the advertised price (e.g. if the price was cached and/or has changed after it was displayed.)
country
ISO 2-character country codeoptional The country that all basket items were selected from. The country will default to UK if it is not provided. Provide this if you are purchasing from a territory other than the UK.
shopid
integeroptional The shop ID that all basket items were selected from. The shop ID will default to the 7digital UK shop if it is not provided. If the shop ID is provided, the country parameter will be ignored.
tag_*key*
stringoptional Additional data to be stored with successful transactions, for the purposes such as tagging affiliated or marketing information. up to 10 tags can be stored. A tag key can be a maximum of 50 characters, and a tag value a maximum of 100 characters. E.g. tag_MyPartner=MagazinePromoABC&tag_ApplicationVersion=1.5. This data will only be available to API clients subscribing to customized sales reports service.
Example request:
http://api.7digital.com/1.2/user/purchase/rrpItem?releaseid=786&trackid=6598&price=0.99&oauth_token=...
Example response:
<response status="ok" version="1.2">
  <purchase id="123">
    <purchaseDate>2009-08-10T11:00:00+01:00</purchaseDate>
    <lockerReleases>
      <lockerRelease>
        <release id="1">
          <title>Ill Communication</title>
          <version/>
          <type>Album</type>
          <artist id="357">
            <name>Beastie Boys</name>
            <appearsAs>Beastie Boys</appearsAs>
            <url>http://www.7digital.com/artists/beastie-boys</url>
          </artist>
          <url>http://www.7digital.com/artists/beastie-boys</url>
          <image>http://cdn.7static.com/static/img/sleeveart/00/004/915/0000491573_350.jpg</image>
        </release>
        <lockerTracks>
          <lockerTrack>
            <track id="456">
              <title>Sabotage</title>
              <version/>
              <artist id="0">
                <name>Beastie Boys</name>
                <appearsAs>Beastie Boys</appearsAs>
                <url>http://www.7digital.com/artists/beastie-boys</url>
              </artist>
              <url>http://www.7digital.com/artists/beastie-boys/ill.../06-Sabotage-(2009-Digital-Remaster)/</url>
            </track>
            <remainingDownloads>3</remainingDownloads>
            <purchaseDate>2009-08-10T11:00:00+01:00</purchaseDate>
            <downloadUrls>
              <downloadUrl>
                <url>http://media.geo.7digital.com/media/user/downloadtrack...</url>
                <format id="1">
                  <fileFormat>MP3</fileFormat>
                  <bitRate>320</bitRate>
                  <drmFree>true</drmFree>
                </format>
              </downloadUrl>
            </downloadUrls>
          </lockerTrack>
        </lockerTracks>
      </lockerRelease>
    </lockerReleases>
  </purchase>
</response>
Method specific errors:
codemessagedescription
3001
The user's card has expired
The user's default payment hard has expired.
3002
The user has no card details saved
User did not register a payment method. Before making a purchase on user's behalf they need to register a payment card.
3003
Payment for this purchase has failed
The payment with the default payment card have been declined by the bank (e.g. card details not valid, insufficient funds, etc). The card used will be automatically marked as inactive and user will have to re-enter new payment card.
3004
Price supplied is out of date
The price displayed to the user and supplied in price parameter is no longer valid. The user has not been charged. You can retrieve the updated price, notify the user of the change and repeat the purchase request.

GETuser/purchase/basketHTTPSOAuthPremium

This method allows a user to purchase a basket with items that have been added via basket/additem or basket/addpriceditem. It will return the download URL of each item purchased. For example, if a release consisting of multiple tracks was purchased, then the download URL of each item constituting the release will be returned.

If total amount due for a basket is greater than 0, the user will need to have a valid debit or credit card set up for payments otherwise a 300X error will be returned. Upon receiving a 300X error you should redirect the user to a new payment method registration screen (see Adding a payment card)

Method specific parameters:
nametypeusedescription
oauth_token
integerrequireduser's OAuth accesstoken
basketid
GUIDrequiredThis is the session ID for the basket that contains the items to purchase. This is the basketid returned from basket/create.
country
ISO 2-character country codeoptional The country that all basket items were selected from. The country will default to UK if it is not provided. Provide this if you are purchasing from a territory other than the UK.
shopid
integeroptional The shop ID that all basket items were selected from. The shop ID will default to the 7digital UK shop if it is not provided. If the shop ID is provided, the country parameter will be ignored.
tag_*key*
stringoptional Additional data to be stored with successful transactions, for the purposes such as tagging affiliated or marketing information. up to 10 tags can be stored. A tag key can be a maximum of 50 characters, and a tag value a maximum of 100 characters. E.g. tag_MyPartner=MagazinePromoABC&tag_ApplicationVersion=1.5. This data will only be available to API clients subscribing to customized sales reports service.
Example request:
http://api.7digital.com/1.2/user/purchase/basket?basketid=00000000-0000-0000-0000-000000000000&country=FR&oauth_token=...
Example response:
<response status="ok" version="1.2">
  <purchase id="123">
    <purchaseDate>2009-08-10T11:00:00+01:00</purchaseDate>
    <lockerReleases>
      <lockerRelease>
        <release id="1">
          <title>Ill Communication</title>
          <version/>
          <type>Album</type>
          <artist id="357">
            <name>Beastie Boys</name>
            <appearsAs>Beastie Boys</appearsAs>
            <url>http://www.7digital.com/artists/beastie-boys</url>
          </artist>
          <url>http://www.7digital.com/artists/beastie-boys</url>
          <image>http://cdn.7static.com/static/img/sleeveart/00/004/915/0000491573_350.jpg</image>
        </release>
        <lockerTracks>
          <lockerTrack>
            <track id="456">
              <title>Sabotage</title>
              <version/>
              <artist id="0">
                <name>Beastie Boys</name>
                <appearsAs>Beastie Boys</appearsAs>
                <url>http://www.7digital.com/artists/beastie-boys</url>
              </artist>
              <url>http://www.7digital.com/artists/beastie-boys/ill-communication-remastered-version/06-Sabotage-(2009-Digital-Remaster)/</url>
            </track>
            <remainingDownloads>3</remainingDownloads>
            <purchaseDate>2009-08-10T11:00:00+01:00</purchaseDate>
            <downloadUrls>
              <downloadUrl>
                <url>http://media.geo.7digital.com/media/user/downloadtrack?formatid=1&amp;oauth_consumer_key=YOUR_KEY_HERE&amp;...</url>
                <format id="1">
                  <fileFormat>MP3</fileFormat>
                  <bitRate>320</bitRate>
                  <drmFree>true</drmFree>
                </format>
              </downloadUrl>
            </downloadUrls>
          </lockerTrack>
          <lockerTrack>
            <track id="789">
              <title>Root Down</title>
              <version/>
              <artist id="0">
                <name>Beastie Boys</name>
                <appearsAs>Beastie Boys</appearsAs>
                <url>http://www.7digital.com/artists/beastie-boys</url>
              </artist>
              <url>http://www.7digital.com/artists/beastie-boys/ill-communication-remastered-version/05-Root-Down-(2009-Digital-Remaster)/</url>
            </track>
            <remainingDownloads>3</remainingDownloads>
            <purchaseDate>2009-08-10T11:00:00+01:00</purchaseDate>
            <downloadUrls>
              <downloadUrl>
                <url>http://media.geo.7digital.com/media/user/downloadtrack?formatid=1&amp;oauth_consumer_key=YOUR_KEY_HERE&amp;...</url>
                <format id="1">
                  <fileFormat>MP3</fileFormat>
                  <bitRate>320</bitRate>
                  <drmFree>true</drmFree>
                </format>
              </downloadUrl>
            </downloadUrls>
          </lockerTrack>
        </lockerTracks>
      </lockerRelease>
    </lockerReleases>
  </purchase>
</response>
Method specific errors:
codemessagedescription
3001
The user's card has expired
The user's default payment hard has expired.
3002
The user has no card details saved
User did not register a payment method. Before making a purchase on user's behalf they need to register a payment card.
3003
Payment for this purchase has failed
The payment with the default payment card have been declined by the bank (e.g. card details not valid, insufficient funds, etc). The card used will be automatically marked as inactive and user will have to re-enter new payment card.

GETAdding a payment cardHTTPSPremium

Due to security reasons this is not a standard API method, but a 7digital hosted secure web page that displays a form for adding payment card details directly by the user.

We recommend you direct users to this page only after attempting a purchase first and receiving one of the payment failed errors. This improves user experience by asking for payment details only when they're actually needed (rather than e.g. during registration) and also deals with situations when user has already registered a payment card previously through one of 7digital services (no need to ask for card details again) or when your application is aware that given user has registered payment card but this card has expired in the mean time or has insufficient funds, etc (user will need to enter new card details).

After successfully adding a card it will be set as default payment method for any subsequent user/purchase/* calls and the user will be redirected back to the API consumer's website or application (if returnUrl has been supplied).

Method specific parameters:
nametypeusedescription
oauth_token
stringoptionaluser's OAuth accesstoken, if provided and the requests has a valid OAuth signature the user will be automatically signed in. Otherwise the user will be presented with a sign in page before reaching the add card form
country
ISO 3166-1 Alpha-2 code optional ISO 3166-1 Alpha-2 code of the country the user resides in. If not supplied defaults to GB.
lang
ISO 639-1 codeoptional ISO 639-1 code of the language the add card form will be displayed in. Currently supported languages are: en, es, it, de, nl, pt and fr. If not provided the language will be picked according to the country parameter.
returnUrl
URLoptionalOnce the card has been added successfully the user will be redirected to this URL. If not provided the user will be redirected to a page listing all registered payment methods. In order to use this parameter, your FQDN must be white-listed with 7digital. If it is not, the redirect will not occur and the user will be redirected to the registered payment methods page. To white-list your FQDN please contact your 7digital account manager or api@7digital.com.
Example request:
https://account.7digital.com/YOUR_KEY_HERE/payment/addcard?oauth_token=AAAAAAA&returnUrl=http%3a%2f%2fapi-consumer.com%2fhandback%3fconsumerparam%3dvalue
Example response:
HTTP/1.x 302 Found
Location: http://api-consumer.com/handback?consumerparam=value

GETDisplaying a list of active payment cardsHTTPSPremium

Like the above this is not a standard API method, but a 7digital hosted secure web page that displays a list of active cards for given user. User's can set any of their cards as default payment method as well as delete any of the cards on file. Users can also register additional card directly form this page.

Method specific parameters:
nametypeusedescription
oauth_token
stringoptionaluser's OAuth accesstoken, if provided and the requests has a valid OAuth signature the user will be automatically signed in. Otherwise the user will be presented with a sign in page before reaching the page with list of their cards
country
ISO 3166-1 Alpha-2 code optional ISO 3166-1 Alpha-2 code of the country the user resides in. If not supplied defaults to GB.
lang
ISO 639-1 codeoptional ISO 639-1 code of the language the add card form will be displayed in. Currently supported languages are: en, es, it, de, nl, pt and fr. If not provided the language will be picked according to the country parameter.
Example request:
https://account.7digital.com/YOUR_KEY_HERE/payment?oauth_token=AAAAAAA&returnUrl=http%3a%2f%2fapi-consumer.com%2fhandback%3fconsumerparam%3dvalue

Payments handled by 7digital - custom pricing

The below methods allow you to customize the price items are being sold for to the customers. 7digital will charge the user price specified by you, report the sale price to labels and invoice you the difference between the wholesale prices and the prices the items have been sold for.

GETbasket/addpriceditemHTTPSOAuthPremium

This method allows an item to be added to a basket with a specified price. The specified price can be higher or lower than the 7digital catalogue price, including a price of 0.00 to make an item free.

For a full description of the basket responses, please refer to the Basket API section in the 7digital public API documentation.

Method specific parameters:
nametypeusedescription
basketId
guidrequiredThe unique identifier of the basket generated by the basket/create method
price
decimalrequired The custom price for the item to add to the basket e.g. "11.95". The price cannot be negative and must not be more than 2 decimal places. The price should not include any commas (",").
releaseId
intrequiredThe unique identifier of the release
trackId
intoptionalThe unique identifier of the track. If supplied, you must also supply the releaseId that the track belongs to.
Example request:
http://api.7digital.com/1.2/basket/addpriceditem?basketid=00000000-0000-0000-0000-000000000000&releaseid=123&price=12.30
Example response:
<response status="ok" version="1.2">
  <basket id="00000000-0000-0000-0000-000000000000">
    <itemCount>1</itemCount>
      <price> 
        <currency code="GBP">£</currency> 
        <value>12.3</value> 
        <formattedPrice>£12.30</formattedPrice> 
      </price>
      <amountDue> 
        <currency code="GBP">£</currency> 
        <value>12.3</value> 
        <formattedAmount>£12.30</formattedAmount> 
      </amountDue>
      <basketItems>
        <basketItem id="17590164"> 
          <type>release</type> 
          <itemName>Even Better Than The Real Thing (Remix)</itemName>
          <artistName>U2</artistName>
          <trackId></trackId>
          <releaseId>123</releaseId>
          <price> 
            <value>12.3</value> 
            <formattedPrice>£12.30</formattedPrice> 
          </price>
          <amountDue> 
            <value>12.3</value> 
            <formattedAmount>£12.30</formattedAmount> 
          </amountDue>
        </basketItem> 
    </basketItems>
  </basket>
</response>

GETuser/purchase/priceditemHTTPSOAuthPremium

This method allows a user to purchase a product or track at a specified price. The specified price can be higher or lower than the 7digital catalogue price, including a price of 0.00 to make an item free.

It will return the download URL of each item purchased. For example, if a release consisting of multiple tracks was purchased, then the download URL of each item constituting the release will be returned.

The user should already have a default debit or credit card set up for payments.

Method specific parameters:
nametypeusedescription
oauth_token
stringrequireduser's OAuth accesstoken
price
decimalrequired The custom price for the item to add to the basket e.g. "11.95". The price cannot be negative and must not be more than 2 decimal places. The price should not include any commas (",").
releaseId
integerrequiredThe unique ID of the release being purchased. If a track is being purchased, this needs to identify the release the track appears on.
trackId
integeroptionalThe unique ID of the track being purchased. If supplied, only the track is delivered - otherwise the full release is delivered.
country
ISO 2-character country codeoptional The country that all basket items were selected from. The country will default to UK if it is not provided. Provide this if you are purchasing from a territory other than the UK.
shopid
integeroptional The shop ID that all basket items were selected from. The shop ID will default to the 7digital UK shop if it is not provided. If the shop ID is provided, the country parameter will be ignored.
Example request:
http://api.7digital.com/1.2/user/purchase/priceditem?releaseid=10147&trackid=103818&price=2.00&country=FR&oauth_token=...
Example response:
<response status="ok" version="1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://localhost/api/static/7digitalAPI.xsd">
  <purchase id="49193524">
    <purchaseDate>2009-11-25T18:29:08Z</purchaseDate>
    <lockerReleases>
      <lockerRelease>
        <release id="10147">
          <title>Siamese Dream</title>
          <version />
          <type>Album</type>
          <artist id="7041">
            <name>The Smashing Pumpkins</name>
            <appearsAs>The Smashing Pumpkins</appearsAs>
            <url>http://www.7digital.com/artists/the-smashing-pumpkins/?partner=123</url>
          </artist>
          <url>http://www.7digital.com/artists/the-smashing-pumpkins/siamese-dream/?partner=123</url>
          <image>http://cdn.7static.com/static/img/sleeveart/00/000/101/0000010147_50.jpg</image>
          <releaseDate>2005-04-05T00:00:00+01:00</releaseDate>
        </release>
        <lockerTracks>
          <lockerTrack>
            <track id="103818">
              <title>Cherub Rock</title>
              <version />
              <artist id="7041">
                <name>The Smashing Pumpkins</name>
                <appearsAs>The Smashing Pumpkins</appearsAs>
                <url>http://www.7digital.com/artists/the-smashing-pumpkins/?partner=123</url>
              </artist>
              <url>http://www.7digital.com/artists/the-smashing-pumpkins/siamese-dream/01-Cherub-Rock?partner=123&partner=123</url>
            </track>
            <remainingDownloads>225</remainingDownloads>
            <purchaseDate>2009-11-24T14:51:56Z</purchaseDate>
            <downloadUrls>
              <downloadUrl>
                <url>http://media.geo.7digital.com/media/user/downloadtrack?formatid=17&oauth_consumer_key=test-api-extUsers&oauth_nonce=5954041&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1259173749&oauth_token=12345678&releaseid=10147&shopid=34&trackid=103818&oauth_signature=FAo3MI%2Bn%2FoVjm7AX8GJ2otA3fp8%3D</url>
                <format id="17">
                  <fileFormat>MP3</fileFormat>
                  <bitRate>320</bitRate>
                  <drmFree>true</drmFree>
                </format>
              </downloadUrl>
            </downloadUrls>
          </lockerTrack>
        </lockerTracks>
      </lockerRelease>
    </lockerReleases>
  </purchase>
</response>

Payments processed by API consumer

If you have an existing online store which can already handle payments and you would like to integrate digital downloads you can use the below API methods. 7digital will deliver the content to the user on your request and you will be invoiced for all deliveries made. Depending on your contract 7digital will also handle all labels and charts reporting.

GETuser/deliveritemHTTPSOAuthPremium

This method will deliver a track or release to user and return a purchase id identifying the transaction at 7digital's end and release and track information along with download URL for each track from the transaction.

Method specific parameters:
nametypeusedescription
oauth_token
stringrequireduser's OAuth accesstoken
emailAddress
stringoptionalThe email address of the User.
releaseId
integerrequiredThe 7digital ID of the release being delivered to the user. If a track is being delivered, this needs to identify the release the track appears on.
trackId
integeroptionalIf supplied, only the track is delivered - otherwise the full release is delivered.
country/shopId
country code/integeroptional A Country Code needs to be provided if you are delivering content from a 7digital international shop. Provide a shop ID if you have a dedicated pool of content and you have been assigned a shop ID by 7digital.
transactionId
stringrequiredThe transaction ID provided will be stored along with a 7digital purchase ID in the 7digital transactions log.
retailPrice
decimaloptionalCompulsory if you are charging your users different prices than 7digital RRP. If you're giving away items for free please use retailPrice=0, if you're using vouchers or you're not sure what to report please contact our sales team.
Example request:
http://api.7digital.com/1.2/user/deliveritem?country=US&trackId=4648051&releaseid=415019&transactionid=test4343&oauth_token=...
Example response:
<response status="ok" version="1.2">
  <purchase id="50454737">
    <purchaseDate>2009-11-10T14:59:39Z</purchaseDate>
    <lockerReleases>
      <lockerRelease>
        <release id="415019">
          <title>Perfect Symmetry</title>
          <version>US Album</version>
          <type>Album</type>
          <artist id="1">
            <name>Keane</name>
            <appearsAs>Keane</appearsAs>
            <url>http://us.7digital.com/artists/keane/</url>
          </artist>
          <url>http://us.7digital.com/artists/keane/perfect-symmetry-6/</url>
          <image>http://cdn.7static.com/static/img/sleeveart/00/004/150/0000415019_50.jpg</image>
          <releaseDate>2008-10-14T00:00:00+01:00</releaseDate>
        </release>
        <lockerTracks>
          <lockerTrack>
            <track id="4648051">
              <title>Spiralling</title>
              <version></version>
              <artist id="1">
                <name>Keane</name>
                <appearsAs>Keane</appearsAs>
                <url>http://us.7digital.com/artists/keane/</url>
              </artist>
              <url>http://us.7digital.com/artists/keane/perfect-symmetry-6/01-Spiralling/</url>
            </track>
            <remainingDownloads>15</remainingDownloads>
            <purchaseDate>2009-11-10T14:47:11Z</purchaseDate>
            <downloadUrls>
              <downloadUrl>
                <url>
                  http://media.geo.7digital.com/media/user/downloadtrack?formatid=17&amp;
                </url>
                  <format id="17">
                    <fileFormat>MP3</fileFormat>
                    <bitRate>320</bitRate>
                    <drmFree>true</drmFree>
                  </format>
                </downloadUrl>
            </downloadUrls>
          </lockerTrack>
        </lockerTracks>
      </lockerRelease>
    </lockerReleases>
  </purchase>
</response>

DELETEuser/purchase/{purchaseid}/release/{releaseid}OAuth

This method allows a user to remove a purchase of a release from the sales report when the purchase has been refunded.

It will return the purchase id and the release id of the item remvoved.

Method specific parameters:
nametypeusedescription
purchaseid
intrequiredpurchase id identifying the transaction at 7digital's end that the refunded item belongs to
releaseId
intrequired The 7digital id of the release being refunded
Example request:
http://api.7digital.com/1.2/user/purchase/49193524/release/87654?oauth_token=...
Example response:
<response status="ok" version="1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://localhost/api/static/7digitalAPI.xsd">
  <release>      
    <purchaseId>49193524</purchaseId>
    <releaseId>87654</releaseId>
  </release>
</response>
Method specific errors:
codemessagedescription
2001
Cannot find sale with purchaseId {purchaseid} and releaseId {releaseid}
Specified sale could not be found in the sales log
2002
Cannot exclude sale with purchaseId {purchaseid} and releaseId {releaseid}
Specified sale could not be removed because the sale does not fall within the current reporting period. (The reporting period being from the start of the current month to 5th of the succeeding month. e.g. In January the reporting period is 1st January to 4th February.

DELETEuser/purchase/{purchaseid}/track/{trackid}OAuth

This method allows a user to remove a purchase of a track from the sales report when the purchase has been refunded.

It will return the purchase id and the track id of the item remvoved.

Method specific parameters:
nametypeusedescription
purchaseid
intrequiredpurchase id identifying the transaction at 7digital's end that the refunded item belongs to
trackid
intrequired The 7digital id of the track being refunded
Example request:
http://api.7digital.com/1.2/user/purchase/49193524/track/87654?oauth_token=...
Example response:
<response status="ok" version="1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://localhost/api/static/7digitalAPI.xsd">
  <track>      
    <purchaseId>49193524</purchaseId>
    <trackId>87654</trackId>
  </track>
</response>
Method specific errors:
codemessagedescription
2001
Cannot find sale with purchaseId {purchaseid} and trackId {releaseid}
Specified sale could not be found in the sales log
2002
Cannot exclude sale with purchaseId {purchaseid} and trackId {trackid}
Specified sale could not be removed because the sale does not fall within the current reporting period. (The reporting period being from the start of the current month to 5th of the succeeding month. e.g. In January the reporting period is 1st January to 4th February.

Streaming API

POSTuser/subscription/logOAuth

Used to record stream plays only from the stream/subscription or offline/subscription endpoints.

Multiple plays can be batched into a single POST to this endpoint, and the body can be sent in either XML or JSON formats.

Situations on when you should and should not log to this endpoint:

Method specific parameters:
nametypeusedescription
oauth_token
stringrequiredUser's OAuth access token.
country
stringoptionalThe 2 letter ISO country code, as with our other endpoints. While optional, this will default to GB if unspecified, but it must ultimately be the country the user originated the stream from (e.g. set to US if the stream was played by a US user). If specified, it can only be placed as a query string parameter, not in the POST body or authorisation headers if those are used.
trackId
integerrequiredThe 7digital ID of the track that was streamed.
releaseId
integerrequiredThe 7digital ID of the release that was streamed.
formatId
integerrequiredThe 7digital ID of the format streamed.
userAgent
stringrequiredDetails of the device model and application version used to play the track.
dateTimePlayed
stringrequiredThe date and time when the track was played.
totalTimePlayed
stringrequiredThe total time the track was streamed in seconds.
playMode
stringrequiredEither "online", "offline", or "online-cached". Indicates if the play was with an active or inactive network connection and, if the network connection is active, whether or not it was read from the device cache.
Example request:
http://api.7digital.com/1.2/user/subscription/log?oauth_consumer_key=YOUR_KEY_HERE&oauth_token=...

With body:

<playLog>
	<playLogItem>
		<trackId>123456</trackId>
		<releaseId>123456</releaseId>
		<formatId>50</formatId>
		<playMode>online</playMode>
		<dateTimePlayed>2012-01-31T12:00+03:00</dateTimePlayed>
		<totalTimePlayed >12</totalTimePlayed>
		<userAgent>Device version 3, App version 6</userAgent>
	</playLogItem>
	<playLogItem>
		<trackId>123456</trackId>
		<releaseId>123456</releaseId>
		<formatId>50</formatId>
		<playMode>offline</playMode>
		<dateTimePlayed>2012-01-31T12:01+03:00</dateTimePlayed>
		<totalTimePlayed >150</totalTimePlayed>
		<userAgent>Device version 3, App version 6</userAgent>
	</playLogItem>
</playLog>
Example response:
<response status="ok" version="1.2">
   <playLogs>
       <count>2</count>
   </playLogs>
</response>

POSTuser/unlimitedStreaming/offlineOAuth

Used to authorise a device for offline mode. After authorised, a device can download in bulk from the offline/subscription endpoint.

The POST body can be sent in either XML or JSON formats.

Method specific parameters:
nametypeusedescription
oauth_token
stringrequiredUser's OAuth access token.
clientId
integerrequiredA unique identifier for the current device wanting to go offline.
offlineEnabled
boolrequiredtrue if the device is being enabled for offline streaming, false if it's being disabled.
country
stringrequiredThe code of the country the end user resides in.
Example request:
http://api.7digital.com/1.2/user/unlimitedStreaming/offline?oauth_consumer_key=YOUR_KEY_HERE&oauth_token=...

With body:

<offlineStatus>
	<clientId>e5ada89d-db5b-4d0e-b70b-820796d7d583</clientId>
	<offlineEnabled>true</offlineEnabled>
	<country>GB</country>
</offlineStatus>
Example response:
<response status=”ok” version=”1.2”>
	<offlineStatus>
		<offlineEnabled>true</offlineEnabled>
		<offlineMaxTrackCount>4000</offlineMaxTrackCount>
	</offlineStatus>
</response>

GETuser/unlimitedStreaming/offlineOAuth

Used to check the offline status of a specified device. This status can be changed with a POST to the user/unlimitedStreaming/offline endpoint.

Method specific parameters:
nametypeusedescription
oauth_token
stringrequiredUser's OAuth access token.
clientId
integerrequiredA unique identifier for the current device you're checking the offline status of.
Example request:
http://api.7digital.com/1.2/user/unlimitedStreaming/offline?oauth_consumer_key=YOUR_KEY_HERE&clientId=xyz&oauth_token=...
Example response:
<response status=”ok” version=”1.2”>
	<offlineStatus>
		<offlineEnabled>true</offlineEnabled>
		<offlineMaxTrackCount>4000</offlineMaxTrackCount>
	</offlineStatus>
</response>

Media delivery API

The Media delivery API allows end users to download or stream previously purchased or otherwise available content.

Error handling

The Media delivery is different to most of our other API methods, in that generally they are requested directly by the user's browser or device, and the resulting media file is returned directly to the user (bypassing your servers).

Due of this, in case of an error the Media delivery API doesn't return XML data, but instead sends a redirect request to a URL of your choosing, with the error information appended as query string parameters. By redirecting back to a URL on your server you can handle media errors in the most suitable way for your application.

In the event of an error the server always returns a 302 HTTP status code and a Location header starting with the errorUrl you supplied.

If no errorUrl parameter is supplied, the Location header will point to a standard 7digital error page.

If you are ingesting downloads within your own application and want to handle errors, you can have the application watch the status codes returned. In the event of a `302` status code, check the location header. If it starts with the errorUrl you supplied then treat this response as an error. You can then parse the location header for the 'errorCode' query string parameter.

Example error redirect:

HTTP/1.x 302 Found
Location: http://example.com/error/?errorCode=1001&errorMsg=Error%3a+Missing+%27trackId%27+query+parameter.

Downloading Methods

These methods will give you high-quality download access to media files provided by 7digital.

GETuser/downloadtrackOAuth

Allows the user to download a previously purchased track.

Endpoint's full location: http://media.geo.7digital.com/media/user/downloadtrack

Method specific parameters:
nametypeusedescription
oauth_token
stringrequiredUser's OAuth access token.
trackId
intrequiredThe 7digital ID of the track to be downloaded.
releaseId
integerrequiredThe 7digital ID of the release the track that is being delivered appears on.
formatId
integerrequiredThe 7digital ID of the format requested (from the list provided for each track by the purchasing API or locker response).
errorUrl
urloptionalURL encoded callback URL in the event of an error.
Example request:
http://media.geo.7digital.com/media/user/downloadtrack?trackid=123456&releaseid=123456&formatid=17&errorUrl=http%3a%2f%2fexample.com%2ferror
Example response:
HTTP/1.1 200 OK
Date: Thu, 19 Nov 2009 11:27:47 GMT
Content-Length: 7256280
Content-Disposition: attachment; filename="David Hasselhoff - Jump In My Car.mp3";
Content-Type: audio/x-mp3
Method specific errors:
codemessagedescription
1001
Error: Missing "parameter name" query parameter.
User did not specify all mandatory parameters.
1002
Invalid value for "parameter name": parameter value
Value for parameter in error message is not valid.
2002
No licences found for the download request.
Either the purchase Id supplied does not exist or does not belong to the User supplied, or the User does not exist.

GETuser/download/releaseOAuthPremium

Allows user to download a ZIP file of a previously purchased release.

Endpoint's full location: http://media.geo.7digital.com/media/user/download/release

Method specific parameters:
nametypeusedescription
oauth_token
stringrequiredUser's OAuth access token.
releaseId
intrequiredThe 7digital ID of the previously purchased release by the user to be downloaded.
formatId
intoptionalThe 7digital ID of the format requested (from the list provided for each track by the purchasing API or locker response).
errorUrl
urloptionalURL encoded callback URL in the event of an error.
Example request:
http://media.geo.7digital.com/media/user/download/release?releaseid=123456&errorUrl=http%3a%2f%2fexample.com%2ferror
Example response:
HTTP/1.1 200 OK
Date: Thu, 19 Nov 2009 11:27:47 GMT
Content-Length: 7256280
Content-Disposition: attachment; filename="Dardem - Nada.zip";
Content-Type: application/zip
Method specific errors:
codemessagedescription
1001
Error: Missing "parameter name" query parameter.
User did not specify all mandatory parameters.
1002
Invalid value for "parameter name": parameter value
Value for parameter in error message is not valid.
2002
No licences found for the download request.
Either the purchase Id supplied does not exist or does not belong to the User supplied, or the User does not exist.

GETuser/download/purchaseOAuthPremium

Allows user to download a ZIP file of a previously purchased basket.

Endpoint's full location: http://media.geo.7digital.com/media/user/download/purchase

Method specific parameters:
nametypeusedescription
oauth_token
stringrequiredUser's OAuth access token.
purchaseId
intrequiredThis is the 7digital ID of the purchase as returned by the user/purchase/* or user/deliveritem methods.
errorUrl
urloptionalURL encoded callback URL in the event of an error.
Example request:
http://media.geo.7digital.com/media/user/download/purchase?purchaseId=123456&errorUrl=http%3a%2f%2fexample.com%2ferror
Example response:
HTTP/1.1 200 OK
Date: Thu, 19 Nov 2009 11:27:47 GMT
Content-Length: 7256280
Content-Disposition: attachment; filename="7digital_Downloads_21-10-2010.zip";
Content-Type: application/zip
Method specific errors:
codemessagedescription
1001
Error: Missing "parameter name" query parameter.
User did not specify all mandatory parameters.
1002
Invalid value for "parameter name": parameter value
Value for parameter in error message is not valid.
2002
No licences found for the download request.
Either the purchase Id supplied does not exist or does not belong to the User supplied, or the User does not exist.

Streaming Methods

These methods will give you progressive streaming access to media provided by 7digital. All streaming endpoints support standard HTTP Range headers, and are available in low to high-quality AAC formats.

GETstream/lockerOAuthPremium

Allows user to stream a previously purchased track from their locker.

This endpoint can be used for online plays or offline caching (for plays when the device isn't connected to the Internet).

Endpoint's full location: http://stream.svc.7digital.net/stream/locker

Method specific parameters:
nametypeusedescription
oauth_token
stringrequiredUser's OAuth access token.
trackId
integerrequiredThe 7digital ID of the track to be streamed.
formatId
integerrequiredThe 7digital ID of the format requested. Please contact us for available formats.
errorUrl
urloptionalURL encoded callback URL in the event of an error.
Example request:
http://stream.svc.7digital.net/stream/locker?trackid=123456&formatid=??&errorUrl=http%3a%2f%2fexample.com%2ferror
Example response:
HTTP/1.1 200 OK
Date: Thu, 19 Nov 2009 11:27:47 GMT
Content-Length: 7256280
Content-Type: audio/x-mp3
Method specific errors:
codemessagedescription
1001
Error: Missing "parameter name" query parameter.
User did not specify all mandatory parameters.
1002
Invalid value for "parameter name": parameter value.
Value for parameter in error message is not valid.
2001
Release not found.
This release isn't available for streaming in your country or shop.
2002
Pre-release or license availability.
Either the requested track is not in the user's locker, or the track is not available for streaming (note that streaming release dates may differ from download or catalogue streaming release dates).

GETstream/subscriptionOAuthPremium

Allows user to stream any track available for streaming in their region, as long as they have a valid subscription account already set up with our subscription system (billed either by 7digital or your system).

This endpoint should only be used when a given device is actively connected to the Internet. Download speeds are throttled to match track play speeds. For unthrottled local caching in bulk, to be used for offline plays, see offline/subscription.

Tracks can be cached (in an encrypted format) on the end user's device, but all plays from either the cache or live must be reported with the user/subscription/log endpoint.

When the clientId parameter is supplied, mulitple devices will not be allowed to stream concurrently. Device A can start streaming, but if Device B starts, Device A will finish its current track then be blocked from playing again for a short time period. After that time period, Device A can play again, and Device B will become blocked.

Endpoint's full location: http://stream.svc.7digital.net/stream/subscription

Method specific parameters:
nametypeusedescription
oauth_token
stringrequiredUser's OAuth access token.
trackId
integerrequiredThe 7digital ID of the track to be streamed.
formatId
integerrequiredThe 7digital ID of the format requested. Please contact us for available formats.
clientId
stringoptionalA unique identifier for the current device streaming the track. Generally a music label requirement, this will allow us to block multiple devices from streaming on the same user account (see above for more information).
country
stringoptionalTwo character country code. If not supplied, this request will default to GB.
errorUrl
urloptionalURL encoded callback URL in the event of an error.
Example request:
http://stream.svc.7digital.net/stream/subscription?trackid=123456&formatid=??&errorUrl=http%3a%2f%2fexample.com%2ferror
Example response:
HTTP/1.1 200 OK
Date: Thu, 19 Nov 2009 11:27:47 GMT
Content-Length: 7256280
Content-Type: audio/x-mp3
Method specific errors:
codemessagedescription
1001
Error: Missing "parameter name" query parameter.
User did not specify all mandatory parameters.
1002
Invalid value for "parameter name": parameter value.
Value for parameter in error message is not valid.
2001
Release not found.
This release isn't available for streaming in your country or shop.
2002
Pre-release or subscription availability.
Either the user does not have a valid subscription account with us, or the track is not available for streaming (note that streaming release dates may differ from download or catalogue streaming release dates).

GEToffline/subscriptionOAuthPremium

Allows user to stream any track available for streaming in their region, as long as they have a valid subscription account already set up with our subscription system and their device is registered for offline play with the user/unlimitedStreaming/offline endpoint.

This endpoint will not throttle download speeds and should only be used when a given device is caching for offline track play (where it won't be connected to the Internet).

All plays done during offline mode must be reported to the user/subscription/log endpoint as soon as Internet connectivity is restored.

Endpoint's full location: http://stream.svc.7digital.net/offline/subscription

Method specific parameters:
nametypeusedescription
oauth_token
stringrequiredUser's OAuth access token.
trackId
integerrequiredThe 7digital ID of the track to be streamed.
formatId
integerrequiredThe 7digital ID of the format requested. Please contact us for available formats.
clientId
stringrequiredA unique identifier for the current device streaming the track. This should be the same clientId used to register the device for offline play with the user/unlimitedStreaming/offline endpoint.
country
stringoptionalTwo character country code. If not supplied, this request will default to GB.
errorUrl
urloptionalURL encoded callback URL in the event of an error.
Example request:
http://stream.svc.7digital.net/offline/subscription?trackid=123456&formatid=??&clientId=123&errorUrl=http%3a%2f%2fexample.com%2ferror
Example response:
HTTP/1.1 200 OK
Date: Thu, 19 Nov 2009 11:27:47 GMT
Content-Length: 7256280
Content-Type: audio/x-mp3
Method specific errors:
codemessagedescription
1001
Error: Missing "parameter name" query parameter.
User did not specify all mandatory parameters.
1002
Invalid value for "parameter name": parameter value.
Value for parameter in error message is not valid.
2001
Release not found.
This release isn't available for streaming in your country or shop.
2002
Pre-release or subscription availability.
Either the user does not have a valid subscription account with us, or the track is not available for streaming (note that streaming release dates may differ from download or catalogue streaming release dates).

GETstream/catalogueOAuthPremium

Allows user to stream any track in the 7digital catalogue available in their region. This endpoint is designed for radio style play where individual tracks cannot be selected by the user (i.e. not "on-demand" streaming), and is licensed differently than other streaming endpoints. Please contact us for more details.

Endpoint's full location: http://stream.svc.7digital.net/stream/catalogue

Method specific parameters:
nametypeusedescription
oauth_token / userId
stringrequiredIf you hold a 7digital oauth access token for the user streaming the track this needs to be provided. If not, you can pass your own identifier of the user (ID, GUID, username, etc). For streaming services that don't require users to sign, please contact us for alternative options of providing user identification (e.g. device IDs, autogenerated IDs stored in a cookie).
trackId
integerrequiredThe 7digital ID of the track to be streamed.
formatId
integerrequiredThe 7digital ID of the format requested. Please contact us for available formats.
country
stringoptionalTwo character country code. If not supplied, this request will default to GB.
errorUrl
urloptionalURL encoded callback URL in the event of an error.
Example request:
http://stream.svc.7digital.net/stream/catalogue?trackid=123456&formatid=??&errorUrl=http%3a%2f%2fexample.com%2ferror
Example response:
HTTP/1.1 200 OK
Date: Thu, 19 Nov 2009 11:27:47 GMT
Content-Length: 7256280
Content-Type: audio/x-mp3
Method specific errors:
codemessagedescription
1001
Error: Missing "parameter name" query parameter.
User did not specify all mandatory parameters.
1002
Invalid value for "parameter name": parameter value.
Value for parameter in error message is not valid.
2001
Release not found.
This release isn't available for streaming in your country or shop.
2002
Pre-release availability.
The track is not available for radio streaming (note that release dates may differ from subscription/locker streaming release dates).

Territories API

The Territories API serves data about countries that 7digital operates in, data about those counties, and a one or more languages with shop urls in each country.

Methods

GETcountriesOAuth

List of countries with their languages and shop urls. If a country has multiple languages, the primary 7digital shop for that country is returned as the main country url. The first language in the languages list will also be the language for that primary shop. Additional language entries are then returned in alphabetical order by localName.

Method specific parameters:

None.

Example request:
http://api.7digital.com/1.2/countries?oauth_consumer_key=YOUR_KEY_HERE
Example response:
<response status="ok" version="1.2">
  <countries>
    <country code="BE">
      <url>http://nl-be.7digital.com</url>
      <name>Belgium</name>
      <localName>België/Belgique</localName>
      <languages>
         <language>
           <name>Dutch</name>
           <localName>Nederlands</localName>
           <url>http://nl-be.7digital.com</url>
         </language>
         <language>
           <name>French</name>
           <localName>Français</localName>
           <url>http://fr-be.7digital.com</url>
         </language>
      </languages>
    </country>
    <country code="CA">
      <url>http://ca.7digital.com</url>
      <name>Canada</name>
      <localName>Canada</localName>
      <languages>
        <language>
          <name>English</name>
          <localName>English</localName>
          <url>http://ca.7digital.com</url>
        </language>
        <language>
          <name>French</name>
          <localName>Français</localName>
          <url>http://fr-ca.7digital.com</url>
        </language>
      </languages>
    </country>
    <country code="DE">
      <url>http://de.7digital.com</url>
      <name>Germany</name>
      <localName>Deutschland</localName>
      <languages>
        <language>
          <name>German</name>
          <localName>Deutsch</localName>
          <url>http://de.7digital.com</url>
        </language>
      </languages>
    </country>
  </countries>
</response>

Commercial API services

For commercial customers, we also offer premium functionality subject to contract. This includes management of own pool of user or direct access to media file streaming and downloads. Please contact us for more information.