Planfix API file.download

From Planfix
Revision as of 07:26, 12 March 2024 by Dmitri (talk | contribs) (Created page with "Function for downloading files. Request format: <source lang="xml"> <?xml version="1.0" encoding="UTF-8"?> <request method="file.download"> <account></account> <sid></sid> <file> <id></id> <uniqueId></uniqueId> </file> <signature></signature> </request> </source> {| class="wikitable" style="margin-top: 1em; width:100% " !width="150"|Name !!width="200"| Type !!width="50%"| Value !! Note |- |file.id ||int ||file identifier || |- |file.uniqueId ||int ||uni...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Function for downloading files. Request format:

<?xml version="1.0" encoding="UTF-8"?>
<request method="file.download">
  <account></account>
  <sid></sid>
  <file>
    <id></id>
    <uniqueId></uniqueId>
  </file>
  <signature></signature>
</request>
Name Type Value Note
file.id int file identifier
file.uniqueId int unique file identifier
signature string(32) signature

When calling the function, you can use either id or uniqueId. The presence of the id parameter excludes the use of the uniqueId parameter

The result of the function is deciphered by the HTTP response code

Value Description Note
200 response body - file
302 direct link to the file is in the Location header
403 access denied response body - standard XML response with error decoding
404 such a file does not exist response body - standard XML response with error decoding

Error response body:

<?xml version="1.0" encoding="UTF-8"?>
<response status="error">
  <code></code>
</response>


Go To