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.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
idsStringIDs of invoices to get, separated by commas.Yes
encodingString"base64" to return file base64 encoded, "raw" to return raw data.No"raw"

Responses

CodeDescription
200Success.
401The authentication details provided are invalid.
402Your role does not allow this.
403Your rate plan does not allow this.
404None 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

VersionChanges
3.13Function added.