Data & Automation API: GetTableImport

API endpoints for table management, DMZ uploads, billing, and automation

GetTableImport

Overview

This method is used to get the status of the data import job to check if the job has finished validating data and it is ready to import.

This method requires the ImportTable permission to be associated with your role.

HTTP Method

Use the HTTP Method 'GET' for consuming this web service.

Input Fields (Header)

  • Header should contain the 'Accept' Key with the Value = 'application/json' or 'application/vnd.catch-e-api.v1+json'.

Input Fields (Path)

FieldFormatNotesMandatory
tableimportidstringTable import id returned by RequestTableImport). For multiple tables use comma to separate RequestTableImport)'sYes

Input URL Examples

Single table:https://api.catch-e.com/gb/import/table/{table_import_id}ORMultiple tables:https://api.test.catch-e.com/gb/import/table?table_import_id={table_import_id},{table_import_id},{table_import_id},{table_import_id}

(Successful) Output Example

{ "table_import_id": "a5f5b489d019521eb16f5c579faa9e15afc7a4bb", "table_name": "qt_variant_profiles", "sha256_checksum": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "status": "validated", "rows_valid": 50, "rows_invalid": 0, "rows_imported": 0, "rows_updated": 0, "rows_inserted": 0}

Error Codes

Example error output

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Not Found", "status": 404, "detail": "Invalid supplier id"}

GetTablesAuthorisedForExport

Overview

Allows you to retrieve a list of tables authorised for data export.

HTTP Method

Use the HTTP Method 'GET' for consuming this web service.

This method requires the ExportTable permission to be associated with your role.

Input URL Examples

For a tables:

https://api.test.catch-e.com/gb/export/table/authorised

(Successful) Output Example (sample)

[ "qt_quote_budgets", "qt_quote_tyres", "qt_variant_residuals", "qt_variant_state_reg_ctp", "gl_controls"]

Error Codes

Example error output

{ "status": 404, "title": "Not Found", "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "detail": "API endpoint not found"}

GetTablesAuthorisedForImport

Allows you to retrieve a list of tables authorised for data import.

This check is done during the Import Table Data and Insert or update a record with auditing processes.

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 ImportTable.

HTTP Method

Use the HTTP Method 'GET' for consuming this web service.

Input URL Examples

For a tables:

https://api.test.catch-e.com/gb/import/table/authorised

(Successful) Output Example (sample)

[ "qt_quote_budgets", "qt_quote_tyres", "qt_variant_residuals", "qt_variant_state_reg_ctp", "gl_controls"]

Error Codes

Example error output

{ "status": 404, "title": "Not Found", "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "detail": "API endpoint not found"}

ExecuteImportTableData

Use this method to update a table when this can be done from a query using defined rules.

Audit records for these updates will be marked as external.

It uses the same functionality as the Import Table Data screen.

Visit the Import Table Data β†’ Data File page and check that the query you create meets those requirements or the job will fail.

See User Defined Queries for instructions on writing queries for the Scheduler.

Parameters

These are the different parameter settings that you can set up on the Scheduler / Job tab

  • Query ID β€” Lookup or enter the Query ID you want to use for this import. The query description is shown below.
  • Module β€” Select the module that the table you want to import belongs to. E.g. will be in 'fm - Fleet Management'
  • Table β€” Select the table you want to import. Some tables cannot be imported.
  • Error If No Data β€” Un-checked by default. If the query returns no data when the job is run, no email will be sent and the queue message will be blank. If checked, an email will be sent.
  • Validate β€” Checked by default. Checks the linked query data to ensure its correct before the actual table import. Uncheck the checkbox to skip validation for long running but consistent jobs. Access to Super users only.

Mail

  • Send Mail β€” This field is checked by default. Un-check this if you don't want to receive any emails about this job.
  • Sender β€” The stored sender will be used to create the required audit records. We recommend creating and using a user called 'scheduler'. The audit records are marked as 'X' ( external).

Recipients

  • Recipient β€” Nominate a recipient to monitor this job.

Validations and Alerts

AlertComments
Save
Type is requiredMissing recipients and type from the scheduler
Invalid query idMissing or invalid Query id
Import
Noting to UpdateDuplicated file import
There was no data to ImportMissing rows in the table

Messages

The messages below are shown on Scheduler / Schedule as "Last Message" and also on Scheduler / Queue as "Message".

MessageComments
Completed
There was no data to import.The query ran, but no records were returned.
The import has completed successfully. 1 record(s) updated OKThe number of records shown will match the number of records created or updated when the job ran.
The import has completed successfully. 0 record(s) updated. Nothing to update.The query ran and returned records, but the data matches your table, so no updates were required.
Data validation has failed as follows: 0 record(s) found, 0 records failed to validate
Failed
Data validation has failed as follows: {count} record…If this message is shown, an Error Report will be attached to your email. The job remains active, but you will need to review and update the query.

Support Notes

If a job like this fails, run the query in Workbench and then upload it via the Import Table Data screen.

Use the Error Report as the first step in diagnosing issues.

ExportTable

Overview

Download data for an existing table data export request in Request a table data export.

This method requires the ExportTable permission to be associated with your role.

HTTP Method

Use the HTTP Method 'GET' for consuming this web service.

Input Fields (Header)

  • Header should contain the 'Accept' Key with the Value = 'application/vnd.catch-e-api.v1+json'.

Input Fields (Path)

FieldFormatNotesMandatory
tableexportidstringTable export id returned by Request a table data exportYes

Input URL Examples

https://api.catch-e.com/gb/import/table/{table_import_id}

(Successful) Output Example

{ "table_export_id": "0eb06f50-4210-4ed2-9723-2c2e24df4670", "uri": "https://catch-e-api-table-exports.s3.ap-southeast-2.amazonaws.com/example/0eb06f50-4210-4ed2-9723-2c2e24df4670?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ZKIBIA46LLA7H5KN5S4Q%2F20190201%2Fap- southeast-2%2Fs3%2Faws4_request&X-Amz-Date=20190201T045824Z&X-Amz-SignedHeaders=host&X-Amz-Expires=300&X-Amz-Signature=6dcb136a7e0d285419ec8f88602785df41dc0036df8657bbc6e20309d3f3d5ba", "uri_expiry": "2019-02-01T16:03:24+11:00"}

Error Codes

Example error output

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Not Found", "status": 404, "detail": "Invalid supplier id"}

CancelTableImport

Overview

Allows you to cancel a table data import.

HTTP Method

Use the HTTP Method 'DELETE' for consuming this web service.

This method requires the ImportTable permission to be associated with your role.

Input URL Examples

https://api.catch-e.com/gb/import/table/{table_import_id}

(Successful) Output Example (sample)

A successful deletion will only return a Body Status '204 No Content'.

Error Codes

Example error output

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Not Found", "status": 404, "detail": "The specified driver asset does not exist"}

ImportPublicHolidays

If you are Salary Packaging, you may need to import new public holiday records as one of your annual tasks.

Import public holidays data into the table . Currently, this will only import data from the data.gov.au website.

Use the API resource id from Australian Public Holidays Dates Machine Readable Dataset to import the public holidays data.
Each resource id will have a specific date range. Only select and run the API using selected links for the dates you want.

Warning: data.gov.au is no longer maintaining the Australian Public Holidays Dates Machine Readable Dataset.
Records for 2021 - 2025 are still available (except for the 2025 Friday before Grand Final Day, this date is missing from the dataset).

Permissions

If you want to use this API in your system, enable ImportPublicHolidays 1. Go to System Roles and select the 'web_services' role

  1. Navigate to the Roles / APIs tab
  2. Find the ImportPublicHolidays permission and check it's check box

HTTP Method

Use the HTTP Method 'POST' for consuming this web service.

URL Examples

https://api.catch-e.com/gb/import/public-holidays

Input Fields (Header)

  • Header should contain the 'Accept' Key with the Value = 'application/vnd.catch-e-api.v1+json'.

Input Fields (Body)

FieldFormatNotesMandatory
data_sourcestringImport data source link. Available values : data.gov.auYes
resource_idstringResource id for the specified data source. e.g. 33673aca-0857-42e5-b8f0-9981b4755686Yes

Holidays import Range(data.gov.au)

Resource IdYear
33673aca-0857-42e5-b8f0-9981b47556862021-2025
33673aca-0857-42e5-b8f0-9981b47556862021-2024
d256f989-8f49-46eb-9770-1c6ee9bd26612022
2dee10ef-2d0c-44a0-a66b-eb8ce59d91102021
c4163dc4-4f5a-4cae-b787-43ef0fcf8d8b2020
bda4d4f2-7fde-4bfc-8a23-a6eefc8cef802019
253d63c0-af1f-4f4c-b8d5-eb9d9b1d46ab2017-2018
a24ecaf2-044a-4e66-989c-eacc81ded62f2016-2017
13ca6df3-f6c9-42a1-bb20-6e2c12fe9d942015-2016
56a5ee91-8e94-416e-81f7-3fe626958f7e2014-2015

Input Fields Body

data_source=data.gov.au&resource_id=33673aca-0857-42e5-b8f0-9981b4755686

Successful Output Example

A successful import will only return a Body Status '204 No Content'.

Response Details

Validation MessagesComments
204 No Content
The request was successful request. No response is required
401 - Unauthorized
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unauthorized", "status": 401, "detail": "Unauthorized"}

| You have not authenticated before running this API or The token_timeout of the current session has passed. You need to authenticate again. |
| 403 - Forbidden | | |

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Forbidden", "status": 403, "detail": "Forbidden"}

| You do not have permissions for this request. Go to System Roles and enter 'web_services' Navigate to the Roles / APIs tab to make sure the permission you need to run this API is checked. |
| 404 - Not Found | | |

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Not Found", "status": 404, "detail": "Client error:..."}

| Incorrect datasource or resourceid specified. |

RequestTableImport

This web service allows you to request a table data import.

This API delivers a function that is similar to Setup / Import Table Data.

Dependent Records

You can use a UUID placeholder in the import files to manage data where there are child records that have a key field dependency,
E.g. .
Visit the Dependent Records page for the details of how to use this feature.

Permissions

The permission for this api is stored in as ImportTable.

Only roles with a stored link to this permission in can run this api.

API access to this function is provided to the roles 'admin' and 'web-services' as the default setting.

HTTP Method

Use the HTTP Method 'POST' for consuming this web service.

Input Example

https://api.test.catch-e.com/gb/import/table

Input Fields (Header)

  • Header should contain the 'Content-Type' Key with the Value = 'application/x-www-form-urlencoded'.

  • Header should contain the 'Content-Type' Key with the Value = 'application/json' or 'application/hjson'.

Input Fields (Body)

JSON FieldFormatNotesDefaultMandatory
table_namestringDestination table name.Yes
formatstringFormat of data. csv, jsonYes
datafileData to import.Yes
duplicateimportcheck_flagstringSetting this to no allows an identical file to be imported. Defaults to yes if not included.noNo
uniqueidsmustexistflagstringUnique Ids specified in import records must exist when this flag is 'yes'. If a specified unique id does not exist on an import record, the import process will not proceed.noYes
procedurestringTo bypass validation, specify 'import' in the procedure field. Options are either 'validate' or 'import'. NOTE: When using 'import' the system will assume you have the correct data. If you do not have acceptable data, we'll retry 2 more times, at 60 second intervals then the import will fail with a relevant error_message.validateNo
timezonestringTimestamps in import files will be parsed in the specified timezone. The timezone value can be given in several formats, none of which are case sensitive: As a named time zone, such as 'Australia/Melbourne', 'Pacific/Auckland', 'Europe/Helsinki', 'US/Eastern', or 'MET'. As a string indicating an offset from UTC of the form :MM, prefixed with a + or -, such as '+10:00', '-6:00', or '+05:30'. A leading zero can optionally be used for hours values less than 10;UTCNo

Output Example (Sucessful)

{ "table_import_id": "a5f5b489d019521eb16f5c579faa9e15afc7a4bb", "format": "csv"}

Error Codes

error output

{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html", "title": "Unauthorized", "status": 401, "detail": "Unauthorized"}