Expense Sheet Print (Base64)

Expense Sheet Print (Base64)

Print an expense sheet

ParameterMandatoryDescriptionExamplesMore Info
APIYesThe API areaexpensesheets.json
GeneralYesParameters described in overviewAuthorization: Bearer <access_token> header — see Synergist API AuthenticationStructure of an API call
CompanyYesThe company numbercompany=1
ActionYesThe action to performaction=expensesheetprint-2227
Expense sheetYesExpense sheet ID or UUIDexpensesheet=1914

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/expensesheets.json?&version=6&company=1&action=expensesheetprint-2227&expensesheet=2093

Example request (legacy username/password):

http://<SERVER>/jsonapi/expensesheets.json?&version=6&company=1&action=expensesheetprint-2227&expensesheet=2093&user=<username>&password=<password>

4022

Example response:

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