[RESTful Web-service Documentation]
go top

download-media

get/buy/redownload an media file

Requires a charged prepaid account or distribution partner account.
For prepaid accounts, each download is subtracted from the deposit of the specified account.
If there is no deposit on the account, a (get/buy) download is not possible anymore (Error code 402).
Distribution partners require as sales report account, need a special agreement. Please contact our sales team.


Creates a new licensing order, and starts the media delivery process.
To check the status of this process, use the returned "queue_hash". After the file is ready for download, this method returns a download URL.

Parameter

Parameter (*=required)
Possible values
Default value
Description
id_media *
[string]
Sample: "2345"


id_article *
[string] comma separated
Sample: "eur-56,eur-480" or "image-73821"

Please use method get-media-info (with parameter "show_articles=yes") to see all articles for this image.
  • For subscription and packets you only use a single article id (i.e. "id_article=image-73821")

  • For singlebuy (credits and real currency) you get several article ids (one for the size, another one for extended rights):
    • Article id for size is obligatory.
    • Article id for extended right is optional, if don't set the standard licence is sold.
    • Both article ids (size and extended rights) are separated with comma, i.e. "id_article=eur-56,eur-480"
id_download [integer]
redownload:
This ID will be returnd by the answer or the method "get-downloaded-images" (content body or for content-type "application/octet-stream" by http headers) of the initial call.
If you use the parameter id_download the parameter id_article get be void.

Attention:Use it only for redownload of same purchase.
Don't use it, if have a special contract account with "marking"!

queue_hash [string]
status check:
To check the status of the order process.

callback_url [string]
When the order becomes "ready", a POST request will be sent to the given "callback_url" to notify you that the download is ready with the download status and download url.

lang
[string] single value
  • da
  • de
  • en
  • es
  • it
  • pl
  • pt

en
language

see also get-user-content-langs for getting all language values dynamically
metadata
[string] single value
  • all  (iptc and xmp)
  • iptc  (only for mimetype image/jpeg)
  • xmp
  • none
none
Information Interchange Model:
type of metadata applied to the image file (IPTC, XMP, both or none).

In IPTC or XMP metadata all kind of informations are stored, i.e. keywords, author, copyright etc.

test
[string] single value
  • yes
  • no
no
For free testing of download:
If test=yes, the downloaded image has a watermark and no deposit is settled (nevertheless you see the info how much deposit would be settled) .



User-Authentication

optional  (if you call this method without user auth, the method use the deposit from app account)

Endpoint

http://rest.panthermedia.net/download-media

Sample Request - buy media

POST http://rest.panthermedia.net/download-media
Accept-Version: 1.0
Content-Type: application/x-www-form-urlencoded
api_key=a5e7b0dada779347e0fdd4db91ad883d0592aaca031e2c81234f3cb8008fdd1f&access_key=9de82c2a78df66e615274eec2622b53795abb2dd&timestamp=Thu%2C%2002%20Aug%202012%2005%3A54%3A55%20UTC&nonce=123&algo=sha1&auth_token=c0c0b98897b5f72b965990b50adec67264a6f07b9134173e9ac60e6b73fe0474&access_token=da857e7ff0013b003185aee5cd41178bead62e46&id_media=813689&id_article=eur-56

Sample Request - check status

POST http://rest.panthermedia.net/download-media
Accept-Version: 1.0
Content-Type: application/x-www-form-urlencoded
api_key=a5e7b0dada779347e0fdd4db91ad883d0592aaca031e2c81234f3cb8008fdd1f&access_key=9de82c2a78df66e615274eec2622b53795abb2dd&timestamp=Thu%2C%2002%20Aug%202012%2005%3A54%3A55%20UTC&nonce=123&algo=sha1&auth_token=c0c0b98897b5f72b965990b50adec67264a6f07b9134173e9ac60e6b73fe0474&access_token=da857e7ff0013b003185aee5cd41178bead62e46&id_media=813689&queue_hash=0D704D6A-B1CE-C856-DA35-7DE4B4D34D78

Sample Request - redownload

POST http://rest.panthermedia.net/download-media
Accept-Version: 1.0
Content-Type: application/x-www-form-urlencoded
api_key=a5e7b0dada779347e0fdd4db91ad883d0592aaca031e2c81234f3cb8008fdd1f&access_key=9de82c2a78df66e615274eec2622b53795abb2dd&timestamp=Thu%2C%2002%20Aug%202012%2005%3A54%3A55%20UTC&nonce=123&algo=sha1&auth_token=c0c0b98897b5f72b965990b50adec67264a6f07b9134173e9ac60e6b73fe0474&access_token=da857e7ff0013b003185aee5cd41178bead62e46&id_media=813689&id_download=7419514

Sample Error - not enough deposit

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rsp stat="fail">
<err code="402" msg="Payment Required (not enough deposit left)" />
    <buy_deposit_url><![CDATA[https://stockagency.panthermedia.net/cms/credits]]></buy_deposit_url>
    <internal><![CDATA[vcvNSlUfMt/tRi8db1NwkNbHe/pbj22P0XBK2bp0ZetytDwZCckR/19LjP/0jw1xUUeyMy6RCKNX+AO0TWqkprAoOfhMNlfI8XX7QgW6nOX4p18O6ZRWPbQidL7LIfKQT5S3ki0ctLma+F2wueyO2nNY5BqAGCpj5xgWdzuPAlUkzue8HVWvyY5yQ87/Nqi2EbAsmO0ulWC5cOPIL/8dwnvpZat62n0Xsq9MTDyVdlo6E2QvRGuR3TE/fLFGQAkpeHjpVVa5If6cn98nf9lv5SBzsq0PCmT8DM7dUu0fzmvm01spQna85ggNCFkP3L+PBsCxIJ10/f4n5rLn+PBYy5yh+TczugqwnNn1wPK/uPWwJBEzwsIA/DXVt+AdVWLxQbtpUHZJRYNsdNsrXnzqGUz7oujvTp72JxMRyLQnEqwYEg8g9PIKIHtlG1kLk9HSlQ9B6cnQDYaK/6J/4Wm2IscXs6JsqyOEwqEsadjAgAvj364WQb9O7QU467aGte7gKhU8awaYAykQuwX1nqCsrc0Z7Bt4wN45riZgIOM72Od1jq9LmAEK9vNV3dHLMBr1YQ9kLkKrvA1USjVEgoL0BA==]]></internal>
</rsp>

Sample Error - download error

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rsp stat="fail">
  <err code="500" msg="unknown error, please contact PantherMedia" />
  <token>5d8a4a195c9eac24a519f1dde8a396654f557b27e323ec8d6651caa2dc7f9c54</token>
  <download_status>
    <id_media>174846</id_media>
    <id_download>174846</id_download>
    <queue_hash>0D704D6A-B1CE-C856-DA35-7DE4B4D34D78</queue_hash>
    <mimetype>image/jpeg</mimetype>
    <status>error</status>
    <download_url/>
  </download_status>
</rsp>

Sample Answer - buy media

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rsp stat="ok">
  <token>5d8a4a195c9eac24a519f1dde8a396654f557b27e323ec8d6651caa2dc7f9c54</token>
  <download_infos>
    <extended_rights>allext</extended_rights>
    <deposit_settled>56</deposit_settled>
    <deposit_currency>CREDITS</deposit_currency>
  </download_infos>
  <download_status>
    <id_media>174846</id_media>
    <id_download>7419514</id_download>
    <queue_hash>0D704D6A-B1CE-C856-DA35-7DE4B4D34D78</queue_hash>
    <mimetype>image/jpeg</mimetype>
    <status>pending</status>
    <download_url/>
  </download_status>
</rsp>

Sample Answer - download ready

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rsp stat="ok">
  <token>5d8a4a195c9eac24a519f1dde8a396654f557b27e323ec8d6651caa2dc7f9c54</token>
  <download_status>
    <id_media>174846</id_media>
    <id_download>7419514</id_download>
    <queue_hash>0D704D6A-B1CE-C856-DA35-7DE4B4D34D78</queue_hash>
    <mimetype>image/jpeg</mimetype>
    <status>ready</status>
    <download_url>https://download.panthermedia.net/dlm.php?authcode=k6KGc3yTooZzfJOihnN8k6KGc3yTooZzhJeqi3aFlqWHeIOcqY16gZa</download_url>
  </download_status>
</rsp>