User's locker

The locker allows you to manage an individual user's purchased tracks and releases.Get a paged list of releases and tracks for a user's locker (collection of all purchased tracks).

OAuth User token

Example request

GET https://api.7digital.com/1.2/user/locker?country=GB&sort=purchaseDate%20desc&oauth_token=...

Example Response

{
    "status": "ok",
    "version": "1.2",
    "schema": "http://api.7digital.com/1.2/static/7digitalAPI.xsd",
    "locker": {
        "lockerReleases": {
            "page": 1,
            "pageSize": 10,
            "totalItems": 1,
            "lockerRelease": [
                {
                    "release": {
                        "id": 569720,
                        "title": "Awake",
                        "version": "",
                        "type": "Album",
                        "barcode": "075679983732",
                        "artist": {
                            "id": 4617,
                            "name": "Skillet",
                            "appearsAs": "Skillet",
                            "slug": "skillet"
                        },
                        "slug": "awake-569720",
                        "image": "http://artwork-cdn.7static.com/static/img/sleeveart/00/005/697/0000569720_50.jpg",
                        "label": {
                            "id": 116,
                            "name": "Atlantic Records"
                        },
                        "licensor": {
                            "id": 18,
                            "name": "Warner"
                        },
                        "download": {
                            "releaseDate": "2013-10-21T13:00:00Z"
                        }
                    },
                    "lockerTracks": {
                        "lockerTrack": [
                            {
                                "track": {
                                    "id": 6313215,
                                    "title": "Hero",
                                    "version": "",
                                    "artist": {
                                        "id": 4617,
                                        "name": "Skillet",
                                        "appearsAs": "Skillet",
                                        "slug": "skillet"
                                    },
                                    "trackNumber": 1,
                                    "duration": 190,
                                    "isrc": "USAT20901852",
                                    "disc": 1,
                                    "number": 1
                                },
                                "remainingDownloads": 10,
                                "purchaseId": 824007092,
                                "purchaseDate": "2017-03-21T11:51:13.77Z",
                                "completeAlbumPurchase": true,
                                "downloadUrls": {
                                    "downloadUrl": [
                                        {
                                            "url": "http://media.geo.7digital.com/media/user/downloadtrack?formatid=17&releaseid=569720&shopid=1064&trackid=6313215",
                                            "format": {
                                                "id": 17,
                                                "description": "MP3 320"
                                            }
                                        },
                                        {
                                            "url": "http://media.geo.7digital.com/media/user/downloadtrack?formatid=48&releaseid=569720&shopid=1064&trackid=6313215",
                                            "format": {
                                                "id": 48,
                                                "description": "MP3 256"
                                            }
                                        }
                                    ]
                                }
                            }
                        ]
                    },
                    "available": true
                }
            ]
        }
    }
}
<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>
            <slug>patti-smith</slug>
          </artist>
          <slug>original-album-classics</slug>
          <image>http://artwork-cdn.7static.com/static/img/sleeveart/00/003/021/0000302123_50.jpg</image>
          <licensor id="2">
            <name>Sony Music</name>
          </licensor>
          <download>
            <releaseDate>2008-06-16T00:00:00+01:00</releaseDate>
          </download>
          <label id="92">
            <name>Arista</name>
          </label>
        </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>
                <slug>patti-smith</slug>
              </artist>
              <trackNumber>2</trackNumber>
              <duration>150</duration>
              <isrc>USRC10301017</isrc>
              <discNumber>1</discNumber>
              <number>2</number>
            </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">
                  <description>MP3 320</description>
                </format>
              </downloadUrl>
            </downloadUrls>
          </lockerTrack>
        </lockerTracks>
        <available>true</available>
      </lockerRelease>
    </lockerReleases>
  </locker>
</response>

Download limits - several licensors restrict the number of times their content can be re-downloaded. This is indicated in the lockerTrack.remainingDownloads property. If the value reaches 0 then the given track can't be re-downloaded anymore (download attempts resulting in an error message). Given the download limits vary from licensor to licensor we DO NOT recommend to display the remaining downloads to end users to avoid confusion. But we DO recommend to disable the download button (and provide an explanatory message) when all downloads have been used up. To improve end user experience you can also display a friendly warning when only 1 last re-download remains. Streaming from locker does not affect remaining downloads and tracks with their re-download limits used up can still be streamed.

Availability -
in some cases releases might be removed from the MassiveMusic catalogue (or from a particular service only), this is indicated in the lockerRelease.available property. If the value is set to false all tracks from this release in the user's locker are no longer available for re-download. In these cases, properties that are irrelevant to unavailable content, such as download, downloadUrls and remainingDownloads will no longer be available on the release:

"lockerRelease": [
    {
        "release": {
            "id": 662888,
            "title": "Do You Want The Truth Or Something Beautiful?",
            "version": "Live From BBC 1's Radio Live Lounge",
            "type": "Single",
            "barcode": "884977432688",
            "artist": {
                "id": 329482,
                "name": "Paloma Faith",
                "appearsAs": "Paloma Faith",
                "slug": "paloma-faith"
                    },
            "slug": "do-you-want-the-truth-or-something-beautiful-2",
            "image": "http://artwork-cdn.7static.com/static/img/sleeveart/00/628/88_50.jpg",
            "label": {
                "id": 1085,
                "name": "Epic"
            },
            "licensor": {
                "id": 2,
                "name": "Sony Music"
            }
        },
        "lockerTracks": {
            "lockerTrack": [
                {
                    "track": {
                        "id": 7352778,
                        "title": "Do You Want The Truth Or Something Beautiful?",
                        "version": "Jonny L Remix",
                        "artist": {
                            "id": 329482,
                            "name": "Paloma Faith",
                            "appearsAs": "Paloma Faith",
                            "slug": "paloma-faith"
                        },
                        "trackNumber": 3,
                        "duration": 335,
                        "isrc": "GBARL0901537",
                        "disc": 1,
                        "number": 3
                    },
                    "purchaseId": 0,
                    "purchaseDate": "2010-01-13T21:19:58.81Z",
                    "completeAlbumPurchase": false,
                    "downloadUrls": null
                }
            ]
        },
        "available": false
    }
]
<lockerRelease>
    <release id="662888">
        <title>Do You Want The Truth Or Something Beautiful?</title>
        <version>Live From BBC 1's Radio Live Lounge</version>
        <type>Single</type>
        <barcode>884977432688</barcode>
        <artist id="329482">
            <name>Paloma Faith</name>
            <appearsAs>Paloma Faith</appearsAs>
            <slug>paloma-faith</slug>
        </artist>
        <slug>do-you-want-the-truth-or-something-beautiful-2</slug>
        <image>http://artwork-cdn.7static.com/static/img/sleeveart/00/006/628/2888_50.jpg</image>
        <label id="1085">
            <name>Epic</name>
        </label>
        <licensor id="2">
            <name>Sony Music</name>
        </licensor>
    </release>
    <lockerTracks>
        <lockerTrack>
            <track id="7352778">
                <title>Do You Want The Truth Or Something Beautiful?</title>
                <version>Jonny L Remix</version>
                <artist id="329482">
                    <name>Paloma Faith</name>
                    <appearsAs>Paloma Faith</appearsAs>
                    <slug>paloma-faith</slug>
                </artist>
                <trackNumber>3</trackNumber>
                <duration>335</duration>
                <isrc>GBARL0901537</isrc>
                <discNumber>1</discNumber>
                <number>3</number>
            </track>
            <purchaseId>0</purchaseId>
            <purchaseDate>2010-01-13T21:19:58.81Z</purchaseDate>
            <completeAlbumPurchase>false</completeAlbumPurchase>
        </lockerTrack>
    </lockerTracks>
    <available>false</available>
</lockerRelease>

Any attempts to download (or stream) these tracks will result in an error page being returned by the relevant media delivery endpoint (instead of the actual media file). We recommend not to provide a download (or play) button in the end user interface (or disable/grey it out) for any releases with lockerRelease.available set to false.

Query Params
int32
required

The unique identifier of the user. For information on creating users click here.

int32

Sets the number of releases that will be returned per page. The default is 10, the maximum is 50.

int32

Sets the page to be returned in a paged list of the customers releases and tracks; by default this is the first page (page=1).

string
required

ISO 2-character country code which the end user resides in.

int32

The MassiveMusic ID of the release you wish to filter down to, a specific release from the user's locker should be returned. Will return an empty locker response if no match is found on the releaseId.

int32

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.

int32

If supplied will return only the releases and tracks for that basket indicated by the purchaseId. Will return an error if no tracks are found.

string

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) or artistName (asc or desc). Defaults to "releaseTitle asc".

Language
LoadingLoading…