> For the complete documentation index, see [llms.txt](https://navixy.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://navixy.com/docs/navixy-api/user-api/resources/commons/data.md).

# Data

Turn a spreadsheet into the tab-separated file every import operation starts from.

Every import in this API starts here. `data/spreadsheet/parse` takes an uploaded spreadsheet, converts it to a tab-separated file on the server, and returns that file's name along with a preview of the parsed rows.

The returned name is what the import operations take as `filename`: [geofence import](/docs/navixy-api/user-api/resources/tracking/zone/import.md), place import, employee import, vehicle import, and the rest. The two remaining operations here read the import processes that follow.

## API actions

API base path: `/data`.

Operations that list no errors of their own return only the [general error codes](/docs/navixy-api/general/errors.md#error-codes).

***

## Parse spreadsheet

> Upload a spreadsheet, convert it to a tab-separated file on the server, and return its name plus a preview of the parsed rows.\
> \
> \*\*This is the first step of every import.\*\* The returned name is what \`place/import/start\`, \`employee/import/start\` and the other import operations take as \`filename\`.\
> \
> \*\*This is a multipart request\*\*, not JSON: \`multipart/form-data\` with the spreadsheet in a part named \`file\`. A JSON body returns error 5, "Wrong request format".

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Account and platform","description":"Platform-level resources shared across the account, such as the plugins that change how other calls behave."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Either a user session hash or an API key, with the \"NVX \" prefix, for example \"NVX 22eac1c27af4be7b9d04da2ce1af111b\". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.","name":"Authorization","in":"header"}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/data/spreadsheet/parse":{"post":{"tags":["Account and platform"],"summary":"Parse spreadsheet","description":"Upload a spreadsheet, convert it to a tab-separated file on the server, and return its name plus a preview of the parsed rows.\n\n**This is the first step of every import.** The returned name is what `place/import/start`, `employee/import/start` and the other import operations take as `filename`.\n\n**This is a multipart request**, not JSON: `multipart/form-data` with the spreadsheet in a part named `file`. A JSON body returns error 5, \"Wrong request format\".","operationId":"dataSpreadsheetParse","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","description":"The spreadsheet to upload, in XLSX, XLS or CSV format.","format":"binary"},"preview_count":{"type":"integer","description":"How many parsed rows to return as a preview. From 1 to 20.","minimum":1,"maximum":20},"parse_header":{"type":"boolean","description":"Whether to read the first row as a header rather than as data."},"header_map":{"type":"string","description":"When `parse_header` is `true`, a JSON map of column name to field identifier, such as `{\"Label\": \"label\", \"Latitude\": \"lat\"}`."}},"required":["file"]}}}},"responses":{"200":{"description":"The parsed spreadsheet","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"file_id":{"type":"string","description":"Name of the server-side TSV file, to pass to an import operation as `filename`."},"preview":{"type":"array","description":"The first rows as parsed, so the caller can confirm the column mapping before importing.","items":{"type":"object","additionalProperties":true}}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"402":{"description":"Error 234: the file could not be parsed as a spreadsheet.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 234 - Invalid data format.

***

## List imports

> List the current user's unfinished import processes \*\*across all entity types at once\*\*.\
> \
> This is the cross-family view. Each family also has its own list, such as \`place/import/list\`, which returns only that family's processes.\
> \
> Callable with an empty body.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Account and platform","description":"Platform-level resources shared across the account, such as the plugins that change how other calls behave."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Either a user session hash or an API key, with the \"NVX \" prefix, for example \"NVX 22eac1c27af4be7b9d04da2ce1af111b\". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.","name":"Authorization","in":"header"}},"schemas":{"ImportProcess":{"type":"object","description":"A background import of records from a preloaded TSV file.\n\n**One shape, shared by every import family**: places, vehicles, employees, zones and the rest all return this object, differing only in `type`.","properties":{"id":{"type":"integer","description":"Import process ID."},"user_id":{"type":"integer","description":"ID of the master user the import belongs to."},"subuser_id":{"type":"integer","description":"ID of the sub-user who started the import. Not listed in the published object description."},"created":{"type":"string","description":"When the import process was created."},"type":{"type":"string","description":"What is being imported.","enum":["place","vehicle","employee","driver","fsm_employee","zone","customer"]},"params":{"type":"object","description":"The import parameters, as given when it was started.","properties":{"headers":{"type":"array","description":"What each column of the file holds, in order.","items":{"type":"string"}},"user_headers":{"type":"array","description":"Optional. Display labels for the columns.","items":{"type":"string"}}}},"filename":{"type":"string","description":"Name of the preloaded TSV file being imported."},"status":{"type":"string","description":"Where the import is. `created` is waiting to start, `done` finished on its own, `failed` could not complete, and `finished` was closed by the user.","enum":["created","in_progress","done","failed","finished"]},"status_change_date":{"type":"string","description":"When the status last changed."},"progress":{"type":"object","description":"How far the import has got.","properties":{"imported":{"type":"integer","description":"Records imported successfully."},"failed":{"type":"integer","description":"Rows that did not pass validation."},"percent":{"type":["integer","null"],"description":"Approximate percentage of rows processed."},"processed_lines":{"type":"integer","description":"Lines processed so far."},"warnings":{"type":"array","description":"The first 25 warnings.","items":{"$ref":"#/components/schemas/ImportLineMessage"}},"errors":{"type":"array","description":"The first 25 errors.","items":{"$ref":"#/components/schemas/ImportLineMessage"}}}}}},"ImportLineMessage":{"type":"object","description":"One problem found in the imported file, tied to the line it was found on.","properties":{"line":{"type":"integer","description":"Line number in the file."},"message":{"type":"string","description":"What was wrong with it."}}}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/data/import/list":{"post":{"tags":["Account and platform"],"summary":"List imports","description":"List the current user's unfinished import processes **across all entity types at once**.\n\nThis is the cross-family view. Each family also has its own list, such as `place/import/list`, which returns only that family's processes.\n\nCallable with an empty body.","operationId":"dataImportList","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"types":{"type":"array","description":"Optional. Restrict to these entity types.","items":{"type":"string","enum":["place","vehicle","employee","driver","fsm_employee","zone","customer"]}}}}}}},"responses":{"200":{"description":"Unfinished import processes","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"list":{"type":"array","items":{"$ref":"#/components/schemas/ImportProcess"}}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

***

## Read import

> Return one import process, given both its ID and its entity type.\
> \
> \*\*\`type\` is required as well as \`process\_id\`\*\*, because process IDs are only unique within a type. The per-family reads such as \`place/import/read\` know their own type and take the ID alone.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Account and platform","description":"Platform-level resources shared across the account, such as the plugins that change how other calls behave."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Either a user session hash or an API key, with the \"NVX \" prefix, for example \"NVX 22eac1c27af4be7b9d04da2ce1af111b\". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.","name":"Authorization","in":"header"}},"schemas":{"ImportProcess":{"type":"object","description":"A background import of records from a preloaded TSV file.\n\n**One shape, shared by every import family**: places, vehicles, employees, zones and the rest all return this object, differing only in `type`.","properties":{"id":{"type":"integer","description":"Import process ID."},"user_id":{"type":"integer","description":"ID of the master user the import belongs to."},"subuser_id":{"type":"integer","description":"ID of the sub-user who started the import. Not listed in the published object description."},"created":{"type":"string","description":"When the import process was created."},"type":{"type":"string","description":"What is being imported.","enum":["place","vehicle","employee","driver","fsm_employee","zone","customer"]},"params":{"type":"object","description":"The import parameters, as given when it was started.","properties":{"headers":{"type":"array","description":"What each column of the file holds, in order.","items":{"type":"string"}},"user_headers":{"type":"array","description":"Optional. Display labels for the columns.","items":{"type":"string"}}}},"filename":{"type":"string","description":"Name of the preloaded TSV file being imported."},"status":{"type":"string","description":"Where the import is. `created` is waiting to start, `done` finished on its own, `failed` could not complete, and `finished` was closed by the user.","enum":["created","in_progress","done","failed","finished"]},"status_change_date":{"type":"string","description":"When the status last changed."},"progress":{"type":"object","description":"How far the import has got.","properties":{"imported":{"type":"integer","description":"Records imported successfully."},"failed":{"type":"integer","description":"Rows that did not pass validation."},"percent":{"type":["integer","null"],"description":"Approximate percentage of rows processed."},"processed_lines":{"type":"integer","description":"Lines processed so far."},"warnings":{"type":"array","description":"The first 25 warnings.","items":{"$ref":"#/components/schemas/ImportLineMessage"}},"errors":{"type":"array","description":"The first 25 errors.","items":{"$ref":"#/components/schemas/ImportLineMessage"}}}}}},"ImportLineMessage":{"type":"object","description":"One problem found in the imported file, tied to the line it was found on.","properties":{"line":{"type":"integer","description":"Line number in the file."},"message":{"type":"string","description":"What was wrong with it."}}}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/data/import/read":{"post":{"tags":["Account and platform"],"summary":"Read import","description":"Return one import process, given both its ID and its entity type.\n\n**`type` is required as well as `process_id`**, because process IDs are only unique within a type. The per-family reads such as `place/import/read` know their own type and take the ID alone.","operationId":"dataImportRead","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"process_id":{"type":"integer","description":"ID of the import process.","minimum":1},"type":{"type":"string","description":"Which kind of entity the import is for.","enum":["place","vehicle","employee","driver","fsm_employee","zone","customer"]}},"required":["process_id","type"]}}}},"responses":{"200":{"description":"The import process","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"value":{"$ref":"#/components/schemas/ImportProcess"}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 201 - Not found in the database.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://navixy.com/docs/navixy-api/user-api/resources/commons/data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
