Get an Attachment Resource Pre-signed URL
Allows you to create a pre-signed URL for the given attachment.
To obtain the attachment binary contents:
Forward the user 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.
Permissions
To run this API, the nominated 'web-services' role needs to be given permission.
If you are not actively using the API, leave the permission off for better security.
Go to Roles / APIs and check on Attachments:Get.
HTTP Method
Use the HTTP Method 'GET' for consuming this web service.
URL Examples
Input Fields (Body)
Input Fields (JSON)
{ "attachment_id": 100000, "url_timeout": 300 } Successful Response Example
{ "url": "https://catch-e-client-assets.s3.ap-southeast-2.amazonaws.com/client/example/100000?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F20190201%2Fap-southeast-2%2Fs3%2Faws4_request&X-Amz-Date=20190201T045824Z&X-Amz-SignedHeaders=host&X-Amz-Expires=300&X-Amz-Signature=6dcb136a7e0d285419ec8f88602785df41dc0036df8657bbc6e20309d3f3d5ba" } Error Response Details
Save an Attachment
This service allows you to save an attachment via the API rather than using the regular web-based attachment upload function.
Permissions
To run this API, the nominated 'web-services' role needs to be given permission.
If you are not actively using the API, leave the permission off for better security.
Go to Roles / APIs and check on Attachments:Save.
HTTP Method
Use the HTTP Method 'POST' for consuming this web service.
URL Examples
Headers
Input Fields (Body)
Successful Response Example
{ "attachment_id": "100348", "table_name": "fm_approvals", "record_id": 104256, "filename": "fm_approvals", "extension": "csv", "md5": "79db7ccbfc353b8ed0f816f27c70792d", "file_size": 24, "notes": null, "user_id": "11065", "created": "2021-07-20T05:05:03Z", "duplicate_check": true, "status_flag": "active", "_links": { "self": { "href": "https://api.catch-e.com/gb/attachments/100348" } } } Error Response Details
Delete an Attachment
Allows you to delete an attachment.
Permissions
To run this API, the nominated 'web-services' role needs to be given permission.
If you are not actively using the API, leave the permission off for better security.
Go to Roles / APIs and check on Attachments:Delete.
HTTP Method
Use the HTTP Method 'DELETE' for consuming this web service.
URL Examples
Input Fields (Body)
Input Fields (JSON)
{ "attachment_id": 100000 } Successful Response Example
204 No Content Error Response Details
Template Attachments
Emails can be set-up to contain template attachments. This includes emails generated by scheduler mailQuery jobs. You can attach one or multiple attachments.
Examples of Suitable Applications
Attaching an FBT Statutory Declaration to Novated Driver Reports at FBT year end
Attaching an explanatory document to the Novated Driver login notification
Attaching a finance application to a Novated Vehicle Quote
Using HTML to customise the email message when sending a quote
Contact Catch-e support if you would like to have any attachments set up.
Technical Description
Template reports are setup in the table gb_templates. The table gb_template_attachments is linked to gb_templates via template_id.
This allows multiple static attachments to be included. The static document needs to be uploaded to the following folder:
/[client]/core/fleet/reports/attachments/
Table Fields
The table gb_template_attachments has the following fields:
Each entry in this table represents one additional file attachment for the email. Multiple entries for a given template_id will result in multiple attachments.
Customising Quote Email Body
The email body when sending a quote email is linked to the Quote PDF document. The template may be named 'pdf_quote_nofb_lease'. Instructions for editing this template:
Use a docx file
Change document as required and save (Catch-e will keep a copy in a project task)
Save the document again with the format 'Web Page, Filtered'
Open the resulting file in notepad and cut and paste the text into the message field in gb_templates for the required template
Get Suppressed Destination
This API is used to check if a specified email address is a suppressed destination.
Suppressed emails will bounce. See reporting details of this on the Mail Failed page.
Permissions
To run this API, the nominated 'web-services' role needs to be given permission.
If you are not actively using the API, leave the permission off for better security.
Go to Roles / APIs and check on Mail:SuppressedDestinationGet.
Input Fields (Header)
Header should contain the 'accept' Key with the Value = 'application/problem+json' or 'application/vnd.catch-e-api.v1+json'.
Input Fields (Body)
URL Examples
https://api.catch-e.com/docs/#/Mail/getSuppressedDestination
Response Details
Delete Suppressed Destination
This API is used to remove an email address from the suppression list.
Suppressed emails will bounce. See reporting details of this on the Mail Failed page.
Permissions
To run this API, the nominated 'web-services' role needs to be given permission.
If you are not actively using the API, leave the permission off for better security.
Go to Roles / APIs and check on Mail:SuppressedDestinationDelete.
Input Fields (Header)
Header should contain the 'accept' Key with the Value = 'application/problem+json' or 'application/vnd.catch-e-api.v1+json'.
Input Fields (Body)
URL Examples
https://api.catch-e.com/docs/#/Mail/deleteSuppressedDestination