SaaSFlow
DevelopersAPIReferenceintegration_uploads

Create integration upload

Import a CSV export from Pleo, Finway or DATEV payroll, the way the app's upload dialog does. The first pleoExport, finwayTransactions or datevPayroll…

Authentication

Checking whether you're signed in…
POST
/companies/{companyId}/integration_uploads

Authorization

headerAuthorization<token>

A SaaSFlow API key (format sf_…) or an OAuth bearer token. Paste only the key — the proxy adds the Bearer prefix. Create an API key in Settings → Company settings → API keys — see API keys.

Path Parameters

companyId*string
Length1 <= length

Request Body

application/json
  1. body
file*string

pleoExport: the Pleo account export. pleoReimbursements: the Pleo reimbursements export, after the account export. finwayTransactions: one month of Finway wallet transactions. finwayExpenses: the Finway expense requests (Anträge) export, which categorizes wallet rows already imported. datevPayroll: one month of the DATEV payroll journal (Lohnjournal).

Value in"pleoExport""pleoReimbursements""finwayTransactions""finwayExpenses""datevPayroll"
csvContent*string

The CSV file as text, unchanged.

Length1 <= length
csvFilename?string

The original file name. Finway checks the month in it against the rows.

Lengthlength <= 255
plMappingField?

Pleo only: the CSV column that decides the category, picked from the candidates of a needsMappingField reply.

mappings?

Answers to an earlier needsMappings or needsDefaults reply, keyed by its key (Pleo), costCenter1Id (Finway expenses) or personnelNumber (DATEV payroll). A template sets the category; null skips that value. SaaSFlow remembers them for later uploads.

overwriteAuto?boolean

Pleo only: also recategorize rows SaaSFlow categorized automatically before. Rows a person categorized are never changed.

dryRun?boolean

Finway transactions and DATEV payroll: count what the upload would change without importing anything.

confirmReplace?boolean

Finway transactions: import even though rows of that month would be updated or removed. Only after the person agreed to the 409 summary.

Response Body

Imported, counted (dry run), or waiting for decisions

application/json
  1. response
integrationId*string
created*boolean

True when this upload set up the integration.

upload*

The import result as the app shows it. upload.result is needsMappingField, needsMappings or needsDefaults when the person has decisions to make: nothing was imported, so ask them and send the same file again with plMappingField or mappings. The reply's aiSuggestions are good defaults to propose.

Example Request
curl -X POST 'https://api.saasflow.com/companies/string/integration_uploads' \  -H 'Content-Type: application/json' \  -d '{  "file": "pleoExport",  "csvContent": "string"}'
Example Response
{  "integrationId": "string",  "created": true,  "upload": {    "property1": null,    "property2": null  }}