Parse Accounts CSV File
POST /v1/account/import/parse
Imports accounts from a CSV file, applies field mapping and validation, and returns a summary of parsed results. Valid rows may be included in accounts; rows that fail validation appear in invalid with their original data and error messages.
Request Body
accounts: @file(/Users/users_username_orgnr_semicolon.csv)
Response Example — Success
{
"accounts": [],
"invalid": [
{
"row": {
"id": "account-id-1",
"name": "Example Account A",
"email": {},
"address": {
"postal": { "street": "", "line2": "" },
"delivery": { "street": "", "line2": "" },
"invoice": { "street": "", "line2": "" },
"official": { "street": "", "line2": "" },
"visit": { "street": "", "line2": "" }
}
},
"errors": ["email must be provided", "country must be provided"]
},
{
"row": {
"id": "account-id-2",
"name": "Example Account B",
"email": {},
"address": {
"postal": { "street": "", "line2": "" },
"delivery": { "street": "", "line2": "" },
"invoice": { "street": "", "line2": "" },
"official": { "street": "", "line2": "" },
"visit": { "street": "", "line2": "" }
}
},
"errors": ["email must be provided", "country must be provided"]
}
]
}
Response Example — Error
{
"message": "No file uploaded",
"error": {
"message": "No file uploaded",
"status": 400
}
}