getAttachment
getAttachment
Overview
This method returns an existing attachment.
To obtain the attachment's binary contents, you can:
forward the client to the URL returned by the getAttachmentPresignedUrl API (recommended if applicable)
capture the binary stream from the URL returned by the getAttachmentPresignedUrl API
call this API with an
Acceptheader ofapplication/octet-stream
This method requires the Attachments:Get permission to be associated with your role.
Permissions
The permission for this api is stored in [gb_api_permissions]permission as 'Attachments:Get'.
Only roles with a stored link to this permission in [gb_role_api_permissions] can run this api.
HTTP Method
Use the HTTP Method 'GET' for consuming this web service.
URL Examples
https://api.demo.catch-e.com/gb/attachments/{attachment_id} https://api.{{environment}}.catch-e.com/gb/attachments/{attachment_id} https://api.test.catch-e.com/gb/attachments/{attachment_id} Path Parameters
Response Details
Success
200 - OK
With the default Accept header, the attachment details are returned as JSON. With an Accept header of application/octet-stream, the file contents are returned.
{ "attachment_id": "1234", "table_name": "fm_approvals", "record_id": "5678", "filename": "invoice", "extension": "pdf", "md5": "[MD5-HASH]", "file_size": 204800, "notes": "Supplier invoice", "user_id": "1234", "created": "2026-01-15T09:30:00Z", "duplicate_check": false, "status_flag": "active", "_links": { "self": { "href": "https://api.catch-e.loc/gb/attachments/1234" } } } Error Response Details
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unauthorized", "status": 401, "detail": "Unauthorized" } { "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Forbidden", "status": 403, "detail": "Forbidden" } { "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Not Found", "status": 404, "detail": "Not Found" } { "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Not Acceptable", "status": 406, "detail": "Not Acceptable" } { "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "string", "status": 599, "detail": "string" }