Skip to main content
Files

Import file

Import a file.

POST
/gb/files

Please note that file data can take up to 5 minutes to refresh on the back-office system.

This method requires the Files:Import 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
Audit-User-Idstringheader

(Optional) User Id to use for audit purposes. This header requires the Audit:UserIdOverride permission to be associated with your role.

Maximum string length: 5
Pattern: ^[1-9]{1}[0-9]*$
Time-Zonestringheaderdefault:UTC

The timezone value can be given in several formats, none of which are case sensitive:

  • As a named time zone, such as 'Europe/Helsinki', 'US/Eastern', or 'MET'.
  • As a string indicating an offset from UTC of the form [H]H: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;
Maximum string length: 100
Pattern: ^[a-zA-Z0-9\/\:\+\-\_]+$

Body

multipart/form-data
filestringrequired

File to import

file_namestring

(Optional) File Name.

If not specified, the file name will be the name of the file imported.

Maximum string length: 200
file_typestringrequired

File Type

Example: Quote Templates

Maximum string length: 50
platformenum<string>required

Platform

Available options: catch-e, catch-e-api, catch-e-driver-portal

Response

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

Success - File imported successfully

file_idstring
file_type_idstring
last_editstring
md5string
namestring
status_flagenum<string>
Available options: active, inactive
super_flagenum<string>
Available options: yes, no
user_id_last_editstring