Print purchase order (Base64)

Print purchase order

Print purchase order (Base64)

Print a purchase order

ParameterMandatoryDescriptionExamplesMore Info
APIYesThe API areapurchases.json
GeneralYesParameters described in overviewsee overviewStructure of an API call
ActionYesThe action to performpurchaseinputprints -2096
Purchase orderYesPurchase IDpurchase=10009372

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 - returns -a Base64 Blob

Authorization: Bearer <access_token>
http://<SERVER>/jsonapi/purchases.json?&version=6&action=purchaseinputprints-2096&purchase=10009372

Example request (legacy username/password):

http://<SERVER>/jsonapi/purchases.json?&version=6&action=purchaseinputprints-2096&purchase=10009372&user=<username>&password=<password>

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "responsemessage": "PDF created successfully.",
  "warningmessage": "",
  "success": true,
  "data": [
    {
      "expensesheetAttachmentBase64Blob": "JVBERi0xLjMKJeLjz9MKNSAwIG9iajw8L0ZpbHRlci9GbGF0ZURlY29kZgbiAKMDAwMDAwMDAzNjc0IDAwMDASb290IDEgMCBSL1NpemUgMTU+PgpzdGFydHhyZWYKOTcwNzkzCiUlRU9GCg==",
      "expensesheetAttachmentFilename": "Expense Sheet1914.PDF"
    }
  ]
}