Import Csv
Import a CSV of expenditure items into the claim.
Admin-only. Accepts a multipart upload with file (the CSV), mode (append | replace), and column_mapping (JSON object mapping target field names to CSV header names — see _CSV_IMPORT_TARGET_FIELDS).
- append: keeps every existing item; creates a new import record and inserts the parsed rows alongside.
- replace: soft-deletes every active item on the claim across every prior import (Xero/QBO included) before inserting the CSV rows. The caller signed off on this scope. Re-running Xero/QBO will un-soft-delete matching rows from those sources, but any prior manual category edits on the wiped rows are lost.
Rows whose eligibility cell is a valid value (r_and_d/ non_eligible) are inserted with manual_override=True. Rows with blank/invalid eligibility are inserted uncategorised for the user to categorise manually on the categorised page.
Activity-name lookup is by exact name within the claim's projects. Misses are surfaced in skip_reasons and the row is inserted with activity_id = NULL.
Auth is intentionally a pair of dependencies: get_admin_user checks the real session owner (so impersonation can't elevate), and get_released_editable_salary_visible_claim_for_user checks claim access and editability on the active identity. Don't collapse them.
Request
- Base URLhttps://api.claimkit.co (the document declares no server; this is the origin it was published from)
- URLhttps://api.claimkit.co/claims/{claim_id}/expenditures/imports/csv
- Authnone declared
Path parameters
Request body multipart/form-data
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.