Print purchase order
Print a purchase order
Parameter | Description | Examples |
---|---|---|
API | The API area | purchases.json |
action | Return a Base64 blob | &action=purchaseinputprints -2096 |
or.. | ||
action | Download a document via the browser | &action=purchaseinputfiles -2096 |
<General> | Parameters described in overview | user=user&password=user&version=3.23 |
purchase order | Purchase ID | &purchase=10008327 |
Example requests:
Note: The number displayed after the action parameter is the internal ID of the requested HM reports layout used to build the document. To find the available template IDs see List print templates/files
example 1 returns -a Base64 Blob
http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.3&action=purchaseinputprints -2096&purchase=10008327
example 2 downloads a fully formed document via the browser
http://<SERVER>/jsonapi/purchases.json?user=user&password=user&version=3.3&action=purchaseinputfiles -2096&purchase=10008327
Example response:
{
"responsecode": 1,
"responsestatus": "OK",
"errorcode": 0,
"errormessage": "",
"responsemessage": "PDF created successfully.",
"warningmessage": "",
"success": true,
"data": [
{
"expensesheetAttachmentBase64Blob": "JVBERi0xLjMKJeLjz9MKNSAwIG9iajw8L0ZpbHRlci9GbGF0ZURlY29kZS9MZW5ndGggNiAwIFI+PgpzdHJ58SVcS5kJ458Hs3ZcyPfWcud+J4Tt672lLJx1vVBm7Dm2rTANKhS701YF6SVrK4MdtKk92TNxCp0JDhdOp82i3DLlCazqlqJTcgX5aydnJ0fHXv9gkceqvulzPSa1WWhltx0MTFBNTE4MTNCRkExMzk1MjIyRDQyNzNEQkYyPl0vSW5mbyAyIDAgUi9Sb290IDEgMCBSL1NpemUgMTk+PgpzdGFydHhyZWYKMTQ0NTU5OAolJUVPRgo=",
"expensesheetAttachmentFilename": ".PDF"
}
]
}