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

Place import

Create many places at once from a spreadsheet, through a background import process.

Place import creates many places at once from a spreadsheet, rather than one call per place.

Convert the spreadsheet first with data/spreadsheet/parse, which stores it as a tab-separated file and returns its name. Pass that name to place/import/start as filename, follow the process with read or list, collect the rows that failed validation with download_failed, and close the finished process with finish.

Address and coordinates complete each other. A row that gives only an address gets its coordinates by geocoding, and a row that gives only coordinates gets its address by reverse geocoding. Tags that do not exist yet are created, within the user's quota for tags.

Import process object

API actions

API base path: /place/import.

Operations that list no errors of their own return only the general error codes.

Available fields for headers:

  • label

  • address

  • lat

  • lng

  • radius (default is 100 if not specified)

  • description

  • tags

  • custom field ID as a string, e.g. "131312" (see entity/fields)

  • undefined (if a meaning of a field is not known)

For custom fields of type employee and multi_employee, values are matched with the user's employees by full name. For multi_employee fields, multiple names can be listed separated by commas or semicolons.

A place is not imported if a required custom field is missing or holds an invalid value. Invalid values of non-required custom fields are skipped with a warning.


Required sub-user rights: place_update.

Start POI import

post
/place/import/start

Start the background process that imports points of interest from a preloaded TSV file, and return the process ID.

Create the file first with data/spreadsheet/parse, which converts a spreadsheet to TSV and returns its name as file_id. Pass that name here as filename.

Address and coordinates complete each other: given only an address the coordinates come from geocoding, and given only coordinates the address comes from reverse geocoding.

Tags that do not exist yet are created automatically, within the user's tag quota.

A POI is not imported when a required custom field is missing or invalid. An invalid value in a custom field that is not required is skipped with a warning.

Requires the place_update right.

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
filenamestring · min: 1Required

Name of the server-side TSV file, as returned by data/spreadsheet/parse in its file_id. Must not be empty.

headersstring[] · min: 1Required

What each column of the file holds, in order. Must not be empty. Accepted names are label, address, lat, lng, radius which defaults to 100, description, tags, a custom field ID as a string such as "131312", and undefined for a column whose meaning is not known.

For custom fields of type employee and multi_employee the value is matched against the user's employees by full name. A multi_employee field takes several names separated by commas or semicolons.

user_headersstring[]Optional

Optional. Display labels for the columns. Must be the same length as headers.

Responses
200

The started import

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
idintegerOptional

ID of the created import process.

post/place/import/start
POST /v2/place/import/start HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 62

{
  "filename": "text",
  "headers": [
    "text"
  ],
  "user_headers": [
    "text"
  ]
}
{
  "success": true,
  "id": 1
}

Errors

These errors come in addition to the general error codes:

  • 15 - Too many requests (rate limit exceeded) - if too many imports in progress

  • 233 - No data file - if the preloaded file is not found

  • 234 - Invalid data format - if the file is not a TSV

  • 247 - Entity already exists - there is another identical import with the same file


Read POI import

post
/place/import/read

Return one POI import process by ID, including its progress.

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.

Responses
200

The import process

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

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

{
  "process_id": 1
}
{
  "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 database (if import is not found)


List POI imports

post
/place/import/list

List the current user's unfinished POI import processes, meaning those with status created, in_progress, done or failed.

A process marked finished with place/import/finish drops out of this list.

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.

Responses
200

Unfinished import processes

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/place/import/list
POST /v2/place/import/list HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "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"
          }
        ]
      }
    }
  ]
}

Download failed POI rows

post
/place/import/download_failed

Return a file of the rows that failed validation, so they can be corrected and imported again.

The response is the file itself, not a JSON envelope.

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.

Responses
200

The failed rows as a file

text/tab-separated-values
string · binaryOptional
post/place/import/download_failed
POST /v2/place/import/download_failed HTTP/1.1
Host: api.eu.navixy.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 16

{
  "process_id": 1
}
binary

Errors

These errors come in addition to the general error codes:

  • 201 - Not found in database (if import is not found)

  • 204 - Entity not found (if file is not found)


Finish POI import

post
/place/import/finish

Mark an import process as finished, which drops it out of place/import/list.

Only a process that has stopped can be finished. One still running returns error 280.

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.

Responses
200

Import marked finished

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

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

{
  "process_id": 1
}
{
  "success": true
}

Errors

These errors come in addition to the general error codes:

  • 201 - Not found in database (if import is not found)

  • 280 - Invalid import request state (if the import process is still in progress)

Last updated

Was this helpful?