Upload and validate a CSV file for bulk distributor import. Returns row-by-row validation report. CSV columns: name, description, vat, address, city, main_contact, email, phone, language, notes. Max 1000 rows, max 10MB.
POST
/distributors/import/validate
curl \
--request POST 'https://api.your-domain.com/api/distributors/import/validate' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: multipart/form-data" \
--form "file=@file"
Response examples (200)
{
"code": 200,
"message": "distributors import validated",
"data": {
"import_id": "550e8400-e29b-41d4-a716-446655440000",
"total_rows": 50,
"valid_rows": 45,
"error_rows": 3,
"duplicate_rows": 2,
"rows": [
{
"row_number": 2,
"status": "valid",
"data": {},
"errors": [
{
"field": "email",
"message": "required",
"value": "not-an-email"
}
]
}
]
}
}
Response examples (400)
{
"code": 400,
"message": "validation failed",
"data": {
"type": "validation_error",
"errors": [
{
"key": "username",
"message": "required",
"value": "string"
}
]
}
}
Response examples (401)
{
"code": 401,
"message": "invalid token",
"data": {}
}
Response examples (403)
{
"code": 403,
"message": "insufficient permissions",
"data": {}
}