Validate Download

Validate Download

Returns the availability of a download and whether this can be downloaded immediately. Downloads that can not be downloaded immediately will be emailed when requested.


POST /validatemusicdownloadrequest/{serviceToken}

Parameter Type Status
ServiceToken String Mandatory
Request Body XML Mandatory

Request body

The following are mandatory for a POST request
<validatemusicdownloadrequest>  
<membertoken>{membertoken}</membertoken> This element should contain the memberToken
<downloadtype>track</downloadtype> This element should be: 
  • track
  • playlist
  • album
  • favourites
<identifier>01f85a9be3d626e0</identifier> Identifier should be: 
  • track:
    • one content id (encrypted)
    • multiple content ids, separated by commas
  • playlist:
    • encrypted playlist id
  • album:
    • encrypted album id
  • favourites:
    • zero, one, or multiple content ids. Encrypted and comma separated if multiple. If none are provided, all of the member’s favourites will be downloaded, otherwise only the specified
<format>19b8f5935503adde</format>

Format should be an encrypted format identifier returned from getserviceinfo

Alternatively specify "wav" or "aiff" or "mp3" in the fileformat field to get the best available formats for these types.

 

<trimstartsecs>0</trimstartsecs><trimendsecs>0</trimendsecs> Trim values are in seconds only and are only used for single track downloads. Use 0 for both values otherwise
<includeversioncheck>true/false</includeversioncheck>

If you would like to request a download with all versions related to the requested tracks (used in track, playlist and favourite downloads), set the "includeversioncheck" parameter to true.

NOTE: when the downloadtype is album,includeversions parameter will be ignored and always return track versions.

</validatemusicdownloadrequest>  

Successful Response

The responsevalidatemusicdownload returns an array of valid music downloads objects.

The downloadallowed element indicates if the download is permitted for the memberoken.

The directdownloadallowed element indicates if the download is immediate or needs to go via the email process.

<responsevalidatemusicdownload>
<validatemusicdownloads>
    <validatemusicdownload>
    <format>19b8f5935503adde</format>
    <includeversions>true</includeversions>
    <downloadallowed>true</downloadallowed>
    <directdownloadallowed>true</directdownloadallowed>
    <error>
      <code>0</code>
      <description>error</description>
    </error>
</validatemusicdownload>
</validatemusicdownloads>
<maxdownloads>2147483647</maxdownloads>
</responsevalidatemusicdownload>

 

Error Response:

<responsemusicdownload>

 

<error>

<code>5</code>

<description>Invalid Token</description>

</error>

</responsemusicdownload>

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Article is closed for comments.