For the complete documentation index, see llms.txt. This page is also available as Markdown.

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, 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.


Parse spreadsheet

post
/data/spreadsheet/parse

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".

Authorizations
AuthorizationstringRequired

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.

Body
filestring · binaryRequired

The spreadsheet to upload, in XLSX, XLS or CSV format.

preview_countinteger · min: 1 · max: 20Optional

How many parsed rows to return as a preview. From 1 to 20.

parse_headerbooleanOptional

Whether to read the first row as a header rather than as data.

header_mapstringOptional

When parse_header is true, a JSON map of column name to field identifier, such as {"Label": "label", "Latitude": "lat"}.

Responses
200

The parsed spreadsheet

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
file_idstringOptional

Name of the server-side TSV file, to pass to an import operation as filename.

post/data/spreadsheet/parse
POST /v2/data/spreadsheet/parse HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 75

{
  "file": "binary",
  "preview_count": 1,
  "parse_header": true,
  "header_map": "text"
}
{
  "success": true,
  "file_id": "text",
  "preview": [
    {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  ]
}

Errors

These errors come in addition to the general error codes:

  • 234 - Invalid data format.


List imports

post
/data/import/list

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.

Authorizations
AuthorizationstringRequired

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.

Body
Responses
200

Unfinished import processes

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/data/import/list
POST /v2/data/import/list HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 19

{
  "types": [
    "place"
  ]
}
{
  "success": true,
  "list": [
    {
      "id": 1,
      "user_id": 1,
      "subuser_id": 1,
      "created": "text",
      "type": "place",
      "params": {
        "headers": [
          "text"
        ],
        "user_headers": [
          "text"
        ]
      },
      "filename": "text",
      "status": "created",
      "status_change_date": "text",
      "progress": {
        "imported": 1,
        "failed": 1,
        "percent": null,
        "processed_lines": 1,
        "warnings": [
          {
            "line": 1,
            "message": "text"
          }
        ],
        "errors": [
          {
            "line": 1,
            "message": "text"
          }
        ]
      }
    }
  ]
}

Read import

post
/data/import/read

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.

Authorizations
AuthorizationstringRequired

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.

Body
process_idinteger · min: 1Required

ID of the import process.

typestring · enumRequired

Which kind of entity the import is for.

Possible values:
Responses
200

The import process

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/data/import/read
POST /v2/data/import/read HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 31

{
  "process_id": 1,
  "type": "place"
}
{
  "success": true,
  "value": {
    "id": 1,
    "user_id": 1,
    "subuser_id": 1,
    "created": "text",
    "type": "place",
    "params": {
      "headers": [
        "text"
      ],
      "user_headers": [
        "text"
      ]
    },
    "filename": "text",
    "status": "created",
    "status_change_date": "text",
    "progress": {
      "imported": 1,
      "failed": 1,
      "percent": null,
      "processed_lines": 1,
      "warnings": [
        {
          "line": 1,
          "message": "text"
        }
      ],
      "errors": [
        {
          "line": 1,
          "message": "text"
        }
      ]
    }
  }
}

Errors

These errors come in addition to the general error codes:

  • 201 - Not found in the database.

Last updated

Was this helpful?