Skip to main content
Attachments

Get an attachment by attachment id

Get an existing attachment.

GET
/gb/attachments/{attachment_id}

To obtain the attachment binary contents:

  • forward the client to the url returned from the getAttachmentPresignedUrl method (recommended if applicable)
  • capture the binary stream from the url returned from the getAttachmentPresignedUrl method
  • invoke this API preferencing the 'application/octet-stream' response

This method requires the Attachments:Get permission to be associated with your role.

Authorizationstringheaderrequired

For accessing the API a valid token must be passed in all the queries in the 'Authorization' header.

A valid token is generated by the API and returned by the /authenticate method by supplying a valid username and password.

The following syntax must be used in the 'Authorization' header :

Bearer aaaaaa/bbbbbb.ccccccc.dddddd
attachment_idstringrequired

Attachment Id

Maximum string length: 10
Pattern: ^[1-9]{1}[0-9]{0,9}$

Response

application/vnd.catch-e-api.v1+json

Success

attachment_idstring

Attachment Id

Maximum string length: 10
Pattern: ^[1-9]{1}[0-9]*$
Example: 100000
createdstring
duplicate_checkboolean
extensionstring
Maximum string length: 10
Pattern: ^[a-zA-Z0-9]+$
Example: pdf
file_sizeinteger

File size in bytes

Required range: 0 <= x <= 1048576000
Example: 1293942
filenamestring
Maximum string length: 100
Example: hello-world
md5string
Required string length: 32 - 32
Example: fc5e038d38a57032085441e7fe7010b0
notesstring

Notes

Maximum string length: 65535
Pattern: ^[\w\W\d\s]*$
Example: Hello world
record_idstring

The unique id of the record in the target table the attachment is associated with

Maximum string length: 20
Pattern: ^[1-9]{1}[0-9]*$
Example: 123456
status_flagenum<string>default:active

Status flag

Available options: active
Example: active
table_nameenum<string>

Target table the attachment is associated with

Available options: bk_booking_events, fm_approvals, fm_client_events, fm_contract_events, fm_contract_payouts, fm_driver_events, fm_maintenance, fm_supplier_events, gb_report_queue, qt_quote_events
user_idstring
Maximum string length: 10
Pattern: ^[1-9]{1}[0-9]*$
Example: 10000