URL: https://api.erplybooks.com/api/attachments


Query parameters: 

  • documentId
  • changedSince – seconds ago. Meaning when you add 1000, then it searches seconds ago from current time



URL: https://api.erplybooks.com/api/attachments/{attachmentId}




URL: https://api.erplybooks.com/api/attachments

Json: {“documentId”:DocumentID,”filename”:”FileName.png”,”base64″:”data:image/png;base64,XXXXX”}

Adding attachments via API can be done in three ways: 

  • Add attachment to existing invoice (add documentId)
  • Add attachment to Purchase Inbox (do not add documentId)
  • Add attachment and create expense document instantly (fill all the possible fields)

If you want to create expense document instantly then make sure you add at least total field. If this has value then document is created. 




idlongAttachment ID (internal)
documentIdlongDocument ID (internal)
partnerDocumentIdStringDocumDocument ID (From external system)ent ID (From ERPLY)
attributeIdlongThis is readable value and is returned when saving document to Purchase Inbox
filenameStringName of the file
numberStringInvoice number. If missing then default value is “undefined”
contactNameStringSupplier name. If missing then default value is “undefined”
expenseTypeStringExpense category. If filled then system finds corresponding expense account (by name/number) and fills invoice row description with given text
netTotaldecimalNet total value of the document. If not available then by default total = netTotal and tax = 0 is used
totaldecimalTotal value of the expense document. If you need to track VAT/GST then this is the total document value. NB: if you want to add attachment to invoice or Purchase Inbox then total must be null! 
descriptionStringIf available then used as expense description
taxRateIdlongIf available then used as invoice tax rate
base64StringFile in base 64 format