JSON API » invoices » invoices/download
Gets a .pdf file containing multiple invoices, concatenated into a single file. This should only be used for multiple invoices. For a single invoice, use invoices/get instead.
Input parameters
Requires authentication and the callshop or reports role privileges.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
ids | String | IDs of invoices to get, separated by commas. | Yes | |
encoding | String | "base64" to return file base64 encoded, "raw" to return raw data. | No | "raw" |
Responses
Code | Description |
---|---|
200 | Success. |
401 | The authentication details provided are invalid. |
402 | Your role does not allow this. |
403 | Your rate plan does not allow this. |
404 | None of the invoices exist, or you do not have permission to view them. |
Data returned
A .pdf file containing the invoices requested.
Example: With required parameters
http://enswitch.example.com/api/json/invoices/download/?auth_username=user;auth_password=password;ids=101,102,103{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "file":"%PDF-1.5\n...", ... } }
Change history
Version | Changes |
---|---|
3.13 | Function added. |