Planfix API file.download
From Planfix
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>