DmzUploadFile
DmzUploadFile
Upload file stored in DMZ folder to external site via SFTP. File can be renamed during upload.
Note: Consider using newer DmzUploadSpool method to transfer files via SFTP. DmzUploadSpool transfers all files in folder in one move with automatic archiving, simplifying file naming and management.
dmzUploadFile sometimes used with dmzMoveFile job to ensure file created fully before SFTP polling by external system.
Workflow Steps
Create interfaceQuery job to build file using temporary filename, or place correctly named file into temporary sub-folder
Create dmzMoveFile child job to rename file and/or place into folder for SFTP polling
Create dmzUploadFile child job to upload file to external SFTP location (if required)
Parameters
Setup
SFTP access credentials stored in gbdmzuploadfiledestinations table. Contact Catch-e Support to add new records.
Outbound files can be encrypted on transfer if SFTP credentials stored with encryption key. Encryption key coded into base64 on deployment (must be decoded for checks). Supported encryption: GPG. Digital transmission format: ASCII (.asc extension).
Encryption Key Setup
If using encryption, key_name must contain email address linked to encryption key.
Set record with email address first. Example: keyprovider@encrypt.com.au
If files don't transfer, confirm name attached to email address and try adding it. Example: Encrypt Business keyprovider@encrypt.com.au
Warning: Incorrect encryption key_name is most common cause of failure. Investigate first.
gbdmzuploadfiledestinations Table Schema
IP Addresses
Receiving organisation may need these IP addresses for firewall configuration:
Error Codes
CATCH_E_ERROR_DMZ_DESTINATION_NOT_FOUND
CATCH_E_ERROR_DMZ_FILENAME_NOT_FOUND - Shows if:
Specified file does not exist
Encryption keyname incorrect
CATCH_E_ERROR_DMZ_SFTP_PUT_FAILED - SFTP connection could not be established:
Invalid credentials: "system::dmzuploadfile DMZ SFTP PUT failed. Error code: 67"
DMZ folder unavailable: "system::dmzuploadfile DMZ SFTP PUT failed. Error code: 79" (SSH connection issue or insufficient space)
DmzUploadSpool
Transfer all files stored in DMZ folder to another site via SFTP. Transferred files automatically archived.
Can be used with other jobs to create then transfer files. Can be scheduled as child job or separately.
Use Cases
Use gl / jde / createExportBatch to create accounting files, then dmzUploadSpool to transfer to accounting system
Use gl / greentree / createExportBatch to create accounting files, then dmzUploadSpool to transfer
Use gb / queries / interfaceQuery to create custom reports, then dmzUploadSpool to transfer to business supplier
Parameters
Setup
SFTP access credentials stored in gbdmzuploadfiledestinations table. Contact Catch-e Support for new records.
gbdmzuploadfiledestinations Table Schema
IP Addresses
Receiving organisation may need these IP addresses for firewall configuration:
Error Codes
CATCH_E_ERROR_DMZ_DESTINATION_NOT_FOUND
CATCH_E_ERROR_DMZ_SFTP_PUT_FAILED - SFTP connection could not be established. Check with destination SFTP server organization. May be undergoing maintenance or short-term outage when job ran.
DmzMoveFile
Move file from one DMZ folder to another or simply rename file in preparation for SFTP transfer.
Sometimes used with dmzUploadFile job to ensure file created fully before SFTP polling by external system.
Note: May not need this job if using DmzUploadSpool to transfer files via SFTP. DmzUploadSpool transfers all files in folder in one move with automatic archiving, making renaming unnecessary and management simpler.
Workflow Steps
Create interfaceQuery job to build file using temporary filename, or place correctly named file into temporary sub-folder
Create dmzMoveFile child job to rename file and/or place into folder for SFTP polling
Create dmzUploadFile child job to upload file to external SFTP location (if required)
Parameters
BillingReprintWebService
Replicates system's Billing / Re-print function.
Supplementary SWAGGER documentation: api.catch-e.com/docs/#/Web%20Services/billingReprintWebService
Setup
Go to Setup / Reference Data and find gbcontrols "apiwebserviceswrapper_login" control. Populate with 'web_services' user login and password for API use.
Permissions
To run this API, nominated 'web-services' role needs permission.
If not actively using, leave off for better security.
Go to Roles / APIs and check on WebServices.
Authentication
Authenticate with the API before running this API.
HTTP Method
POST
URL Examples
https://api.catch-e.com/web-services/fm/billing/reprint Headers
Body (form-data)
Response - 201 Created
%PDF-1.3 3 0 obj<</Filter /FlateDecode /Length 1983>>stream Successful request returns PDF file. For Postman users: Use "Save Response" option to download PDF to chosen location.
Response - 401 Unauthorized
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unauthorized", "status": 401, "detail": "Unauthorized" } You have not authenticated or token_timeout has passed. Authenticate again.
Response - 403 Forbidden
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Forbidden", "status": 403, "detail": "Forbidden" } You do not have permissions. Go to System Roles, enter 'web_services', navigate to Roles / APIs and check permissions.
Response - 406 Not Acceptable
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Not Acceptable", "status": 406, "detail": "Cannot honor Accept type specified" } Accept Header must be 'application/octet-stream'. Update and try again.
Response - 418 Invalid Credentials
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Invalid Credentials", "status": 418, "detail": "Web services API wrapper credentials have not been configured" } Enable Web Services. Go to Setup / Reference Data and find apiwebserviceswrapper_login control. Populate with 'web_services' user login and password.
Response - 422 Unprocessable Entity
{ "validation_messages": { "invoice_no": { "invoiceNotFound": "Invoice No '1999999' not found" } }, "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unprocessable Entity", "status": 422, "detail": "Failed Validation" } invoice_no not valid. Invoices at 'deleted' status cannot be re-printed.
Response - 424 Failed Dependency
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Failed Dependency", "status": 424, "detail": "Upstream service temporarily unavailable. Please retry." } API cannot run at this time. Service resource limits exceeded or system in maintenance mode.
ImportTransactions
Import and post card service files (e.g. fuel transactions) by automating Card Transactions steps. Targets import files in DMZ area. Each file removed once processed.
Related: WEX Motorpass
Parameters
Queue
Import Process Outcomes
Inactive Card Handling
If fminterfaces.process_inactive_card_flag set to 'yes', card transactions processed and imported even when card 'Status' is 'inactive'. Default: 'no'.