Create Import Session
Create Import Session
Upload a source file and create a new import session
POST
Create Import Session
Create Import Session
Upload a CSV or XLSX file and create an import session. The backend parses the file, detects column headers, and returns metadata needed to begin the mapping and validation workflow.This is the entry point for every import. After creating a session, proceed to Suggest Mapping to auto-map source columns, then validate and submit.
Request
Headers
string
required
Your API key for authenticationExample:
sk_live_1234567890abcdefstring
required
Your organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51faBody (multipart/form-data)
string
required
Backend template identifier. Determines which columns are expected and how values are validated.Examples:
logistics_requests, purchases, wastes, invoices_electricityfile
required
The source CSV or XLSX file to import
string
Locale for decimal number parsing. Use this when your file uses commas as decimal separators.Example:
es_ES (parses 1.234,56 as 1234.56)string
Preferred date format for ambiguous slash-separated dates.Values:
dmy (European: 05/04/2026 = April 5th), mdy (US: 05/04/2026 = May 4th)When omitted, the parser auto-detects from unambiguous values in the column.string
Language hint for header detection and value matchingExample:
es, en, frstring
Sheet to read for multi-sheet XLSX uploads. When omitted on a multi-sheet file, the first sheet is used.
string
UUID of the project to scope this import to
string
UUID of the folder within the project
string
UUID of the facility. Required for templates that declare
facility_id as a context field (e.g. wastes, invoices_electricity).string
Transport direction. Required for
transport_routes template.Values: upstream, downstreamResponse
string
UUID of the created import session. Use this in all subsequent workflow calls.
string
Original filename of the uploaded file
integer
Number of data rows parsed (excluding header)
string | null
The numeric locale applied during parsing
string | null
The date locale applied (
dmy or mdy), or null if auto-detectedarray[string]
List of sheet names in the workbook (empty for CSV)
string | null
The sheet that was parsed
integer
Zero-based index of the detected header row
array[string]
Column headers detected in the source file
array[array]
First few rows of parsed data for preview
Example
Successful Response
Common Errors
401 Unauthorized
Cause: Missing or invalid API key403 Forbidden
Cause: The authenticated user is not a member of the organization400 Bad Request
Cause: File could not be parsed (unsupported format, empty, or corrupt)422 Unprocessable Entity
Cause: Missing required context field for the templateRelated Endpoints
Import Overview
Full import workflow guide
Get Import Status
Check session status and validation summary
Submit Import
Submit the validated session for processing
Delete Session
Abandon and clean up a session