Attachment View

Views an attachment from an expense line.

Attachment View

ParameterMandatoryDescriptionExamplesMore Info
APIYesThe API areaexpenselines.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=attachmentview
IdentifierYesExpense line ID or UUIDexpenseline=3404

Example request (OAuth 2.0):

Authorization: Bearer <access_token>
http://<SERVER>/jsonapi/expenselines.json?&version=6&company=1&action=attachmentview&expenseline=4022

Example request (legacy username/password):

http://<SERVER>/jsonapi/expenselines.json?&version=6&company=1&action=attachmentview&expenseline=4022&user=<username>&password=<password>

Example response:

{
  "responsecode": 1,
  "responsestatus": "OK",
  "errorcode": 0,
  "errormessage": "",
  "totalrows": 1,
  "totalpages": 1,
  "responsemessage": "",
  "pagerows": 0,
  "pagenumber": 1,
  "success": true,
  "data": [
    {
      "attachmentUuid": "96718E76A5624745B535E0371C6B4B1F",
      "attachmentTimestampModified": 1523968717,
      "attachmentRecordVersionNumber": 0,
      "attachmentOriginalFilename": "office.txt",
      "attachmentBase64": "ZnJvbSBUOlxTdXBwbGllclxNaWNyb3NvZnRcT2ZmaWNlIDIwMTYgUHJvZmVzc2lvbmFsXCAgVGhlIGxpY=",
      "attachmentContentDisposition": "attachment; filename=\"doc.txt\"",
      "attachmentContentType": "application"
    }
  ]
}