# getAttachmentById

### Parameters

id - id of the attachment

### Example Usages

```javascript
   brixxApi.getAttachmentById(1234);
```

```javascript
   let allAttachmentsForThisRecord = brixxApi.getAttachmentsForCurrentRecord();
   let invoices = allAttachmentsForThisRecord.filter(singleAttachment => {return singleAttachment.documentTypeId == 2}); //We assume, that there is just one invoice
   let attachmentBlob = brixxApi.getAttachmentById(invoices[0].id);
   brixxApi.printBlob(attachmentBlob)
```
