# Validate a CSV file

> POST /imports/validate

Source: https://docs.trykintsugi.com/reference/2026-07-21/validate-a-csv-file

POST /imports/validate

Validate a CSV file

Check a CSV file's contents before uploading it. Always answers 200; check `isValid` and `errors` to see whether the file passed.

Category: Imports

Request body:
fileName (string, required) - Name of the file being validated.
data (string, required) - Raw CSV file contents.
source (string, required) - Import source the file was exported for.
direction (PublicTransactionDirectionEnum) - SALE or PURCHASE for the whole file; blank per-row direction cells take this value.
  allowed values: SALE, PURCHASE

Response fields:
isValid (boolean, required) - True when every row passed validation.
fileName (string, required) - Name of the file that was validated.
rowCount (integer, required) - Number of data rows found in the file.
errors (string[]) - Human-readable validation error messages. Empty when isValid is true.
resultData (ImportPreviewRow[]) - Rows that passed validation, parsed and normalized. Empty when the file was rejected outright or every row failed.
  relatedExternalId (string) - Id of a related transaction, for a credit note row.
  transactionExternalId (string, required) - Id of the transaction in the source system.
  status (PublicTransactionStatusEnum, required) - Transaction status in the source system.
    allowed values: PENDING, COMMITTED, CANCELLED, FULLY_REFUNDED, PARTIALLY_REFUNDED, INVALID
  transactionSource (string) - Source of the transaction (a connector name, or IMPORT for a manual CSV upload).
  date (string, required) - Date the transaction took place.
  currency (CurrencyEnum, required) - Currency of the transaction.
    allowed values: AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD (and 150 more, see the reference page)
  description (string) - Description of the transaction.
  customerId (string, required) - Id of the customer in the source system.
  taxId (string) - Tax registration number of the customer.
  customerName (string) - Full name of the customer.
  customerEmail (string) - Email address of the customer.
  customerCompanyName (string) - Registered or legal business name of the customer.
  marketplace (boolean) - True when the transaction was facilitated by a marketplace.
  shipToPhone (string) - Phone number of the ship-to address.
  shipToStreetLine1 (string) - First line of the ship-to address.
[truncated, see the reference page]

---

Index of every page: https://docs.trykintsugi.com/llms.txt
