GetTableImport

Get status of data import job to check if job finished validating data and ready to import.

Requires ImportTable permission.

HTTP Method

GET

Input - Header

Header should contain 'Accept' key with value = 'application/json' or 'application/vnd.catch-e-api.v1+json'.

Input - Path

Field

Format

Notes

Mandatory

table_import_id

string

Table import ID returned by RequestTableImport. For multiple tables, use comma to separate IDs.

Yes

URL Examples

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

Successful Output

{ "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

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

GetTablesAuthorisedForExport

Retrieve list of tables authorised for data export.

Requires ExportTable permission.

HTTP Method

GET

URL Examples

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

Successful Output

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

Error Codes

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

GetTablesAuthorisedForImport

Retrieve list of tables authorised for data import. This check done during Import Table Data and Insert or update record with auditing processes.

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

HTTP Method

GET

URL Examples

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

Successful Output

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

Error Codes

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

ExecuteImportTableData

Update table when can be done from query using defined rules. Audit records marked as external.

Uses same functionality as Import Table Data screen. Visit Import Table Data > Data File and check query meets those requirements or job will fail.

Scheduler Parameters

Parameter

Notes

Query ID

Lookup or enter Query ID to use. Query description shown below.

Module

Select module table belongs to (e.g. fm - Fleet Management)

Table

Select table to import. Some tables cannot be imported.

Error If No Data

Default: unchecked. If checked, email sent when query returns no data.

Validate

Default: checked. Validates query data before import. Uncheck to skip validation (super users only).

Mail

Parameter

Notes

Send Mail

Default: checked. Uncheck to not receive emails about job.

Sender

Stored sender used to create audit records. Recommend user called 'scheduler'. Records marked as external (X).

Recipients

Parameter

Notes

Recipient

Nominate recipient to monitor job.

Validations and Alerts

Alert

Notes

Type is required

Missing recipients and type from scheduler

Invalid query id

Missing or invalid Query ID

Nothing to Update

Duplicated file import

There was no data to Import

Missing rows in table

Messages

Message

Notes

There was no data to import

Query ran but no records returned

Import completed successfully. 1 record(s) updated OK

Number shown matches records created/updated when job ran

Import completed successfully. 0 record(s) updated. Nothing to update

Query returned records but data matches table, no updates required

Data validation has failed: 0 record(s) found, 0 records failed

Data validation has failed: {count} record...

Error Report attached. Job remains active; review/update query.


ExportTable

Download data for existing table data export request.

Requires ExportTable permission.

HTTP Method

GET

Input - Header

Header should contain 'Accept' key with value = 'application/vnd.catch-e-api.v1+json'.

Input - Path

Field

Format

Notes

Mandatory

table_export_id

string

Table export ID returned by Request table data export

Yes

URL Examples

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

Successful Output

{ "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=AKIAIOSFODNN7EXAMPLE%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

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

CancelTableImport

Cancel table data import.

Requires ImportTable permission.

HTTP Method

DELETE

URL Examples

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

Successful Output

Successful deletion returns Body Status '204 No Content'.

Error Codes

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

ImportPublicHolidays

Import public holidays data. For Salary Packaging, may need to import new public holiday records as annual task.

Imports data into table from data.gov.au website. Use API resource ID from Australian Public Holidays Dates Machine Readable Dataset.

Each resource ID has specific date range. Only select/run API using selected links for dates needed.

Warning: data.gov.au no longer maintaining Australian Public Holidays Dates Machine Readable Dataset. Records 2021-2025 available (except 2025 Friday before Grand Final Day missing).

Permissions

Enable ImportPublicHolidays permission:

  1. Go to System Roles and select 'web_services' role

  2. Navigate to Roles / APIs tab

  3. Find ImportPublicHolidays permission and check box

HTTP Method

POST

URL Examples

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

Input - Header

Header should contain 'Accept' key with value = 'application/vnd.catch-e-api.v1+json'.

Input - Body

Field

Format

Notes

Mandatory

data_source

string

Import data source link. Values: data.gov.au

Yes

resource_id

string

Resource ID for data source. Example: 33673aca-0857-42e5-b8f0-9981b4755686

Yes

Holidays Import Range (data.gov.au)

Resource ID

Year

33673aca-0857-42e5-b8f0-9981b4755686

2021-2025

33673aca-0857-42e5-b8f0-9981b4755686

2021-2024

d256f989-8f49-46eb-9770-1c6ee9bd2661

2022

2dee10ef-2d0c-44a0-a66b-eb8ce59d9110

2021

c4163dc4-4f5a-4cae-b787-43ef0fcf8d8b

2020

bda4d4f2-7fde-4bfc-8a23-a6eefc8cef80

2019

253d63c0-af1f-4f4c-b8d5-eb9d9b1d46ab

2017-2018

a24ecaf2-044a-4e66-989c-eacc81ded62f

2016-2017

13ca6df3-f6c9-42a1-bb20-6e2c12fe9d94

2015-2016

56a5ee91-8e94-416e-81f7-3fe626958f7e

2014-2015

Input Body Example

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

Response - 204 No Content

Successful import returns Body Status '204 No Content'.

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

Request table data import. Delivers function similar to Setup / Import Table Data.

Supports Dependent Records using UUID placeholder in import files to manage data where child records have key field dependency.

Permissions

Permission stored as ImportTable in gb_role_apis.

Only roles with link to this permission in gb_roles can run API.

Default: 'admin' and 'web-services' roles.

HTTP Method

POST

URL Examples

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

Input - Header

Header should contain 'Content-Type' key with value = 'application/x-www-form-urlencoded' or 'application/json' or 'application/hjson'.

Input - Body

Field

Format

Notes

Default

Mandatory

table_name

string

Destination table name

Yes

format

string

Format of data (csv, json)

Yes

data

file

Data to import

Yes

duplicate_import_check_flag

string

Set to 'no' to allow identical file import. Defaults to 'yes'.

yes

No

unique_ids_must_exist_flag

string

Unique IDs in import records must exist. If 'yes' and ID doesn't exist, import won't proceed.

no

Yes

procedure

string

Bypass validation: specify 'import'. Options: 'validate' or 'import'. Note: 'import' assumes correct data. System retries 2 times at 60-second intervals, then fails.

validate

No

timezone

string

Timestamps parsed in specified timezone. Format: named (Australia/Melbourne, US/Eastern) or offset (+10:00, -6:00, +05:30)

UTC

No

Successful Output

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

Error Codes

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