This endpoint accepts a CSV file upload, validates that the file is present and has the correct MIME type (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/titobrian97/Prueba-tecnica-ts-node---gestion-de-csv/llms.txt
Use this file to discover all available pages before exploring further.
text/csv), parses it into an array of row objects using convert-csv-to-json with a comma delimiter, and stores the result in the server’s in-memory usersData array. The fully parsed dataset is returned in the response body.
Endpoint
Request
The request must be sent asmultipart/form-data. Include the CSV file in the file field.
The CSV file to upload. Must have the MIME type
text/csv. The first row is treated as the header row — each column name becomes a key in the parsed row objects.Example Request
Success Response — HTTP 200
When the file is valid and parsed successfully, the server responds with HTTP200 and a JSON body containing the full parsed dataset along with a confirmation message.
Array of row objects parsed from the CSV. Each object’s keys correspond to the CSV column headers (from the first row), and all values are strings.
Human-readable confirmation string. Always
"El archivo se cargo correctamente" on success.Example Success Response
Error Responses — HTTP 500
All error conditions return HTTP500 with a JSON body. The data field is always an empty array on error.
No file provided
No file provided
Returned when the request does not include a
file field in the multipart body.Wrong MIME type
Wrong MIME type
Returned when a file is attached but its MIME type is not
text/csv (e.g., uploading a .xlsx or .txt file).Parse error
Parse error
Returned when the file passes MIME validation but
convert-csv-to-json throws an exception while parsing the content.