Import financial records into Trakli
POST
/import
const url = 'http://localhost:8000/api/v1/import';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"file":"binary"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8000/api/v1/import \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "file": "binary" }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
file
File to upload
string format: binary
Example generated
{ "file": "binary"}Responses
Section titled “ Responses ”Successful response
Media type application/json
object
id
ID of the file import
integer
name
Name of the file to import
string
file_type
Type of the file to import
string
progress
Current import progress
integer
num_rows
Total number of records to import
integer
failed_imports_count
Total number of failed imports
integer
Example generated
{ "id": 1, "name": "example", "file_type": "example", "progress": 1, "num_rows": 1, "failed_imports_count": 1}Unauthorized
Server error