Shopping from the US?
us.7digital.com
The 7digital API (beta) gives access to 7digital services and music data allowing developers to create new music download and streaming applications using web services.
To register your interest in the API, please sign-up via the 7digital partner program by clicking here
API users will be give a unique API key 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.
Access to the API for non-commercial use is free. If you
wish to use the API in a commercial application, please
contact us outlining
the proposed usage and we'll get back to you. Commercial users can also access
additional API methods allowing creation of more sophisticated commercial music
services.
Access to the services provided by 7digital will be provided through a REST interface.
A typical request (excl. authentication) will look as follows:
http://api.7digital.com/1.0/artist/details?artistId=1
Standard responses will be returned in XML format.
A successful response will have the following format:
<response status="ok" version="1.0">
<response content>
</response>
Response status equal 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.0">
<error code="1001">
<errorMessage>Missing release or artist ID</errorMessage>
</error>
</response>
Erorr codes can be split into following categories:
1XXX- input parameters missing or invalid (e.g. string supplied where number expected)
2XXX- parameter not matching 7digital data (e.g. non-existent productid supplied)
7XXX- internal 7digital error (e.g. DB server connectivity problem)
Requests to some special methods will return instead of XML response a client redirect (e.g. basket/checkout) or serve a media file (e.g. track/streampreview)
Access to the 7digital API is controlled by a consumer key which needs to be
supplied with every request. Keys are issued upon request, to obtain one please
apply here.
Some API methods might also require requests to be signed using OAuth
authentication protocol as described in OAuth
Consumer Request 1.0 Draft 1. This will be clearely stated in the method
description.
OAuth signed API requests will include the following parameters:
oauth_consumer_key –
a static value identifying Xxxxxxx’s requests
oauth_nonce –
a random string uniquely generated for each request
oauth_timestamp –
timepstamp of the request (number of seconds since Jan 1 1970 0:00:00 GMT)
oauth_signature_method –
signature method used to sign the request (currently only HMAC-SHA1
supported)
oauth_signature –
generated from the service url and all the parameter name/value pairs of the
request (inc. other oauth params) using the oauth_consumer_secret assigned
to Xxxxxxx’s oauth_consumer_key
In addition to the above oauth_token parameter
is required for requests accessing user specific resources. A unique oauth_token along
with oauth_token_secret will
be issued by 7digital for each user upon calling the login method for that
user.
In case a request won’t successfully authenticate instead of the usual XML response one of the following standard HTTP error responses will be returned:
HTTP 400 Bad Request
HTTP 401 Unauthorized
Lists & paging
All API methods that
return a list of items in the response accept the following paging
parameters:
|
|
Int |
optional |
Page number of the result set. If not supplied defaults to 1 |
|
|
Int |
optional |
Number of items to be returned per page. If not supplied defaults to 10 |
Paging information will also be
included in the response as per the format bellow:
<page>1</page>
<itemsPerPage>10</itemsPerPage>
<totalItems>21</totalItems>
Please contact us below for access to the full API documentation