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

Vehicle import

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

Vehicle import creates many vehicles at once from a spreadsheet, rather than one call per vehicle.

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

API actions

API base path: /vehicle/import.

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

Starting the background process of importing vehicles.


Required sub-user rights: vehicle_update.

Available fields:

  • label

  • model

  • max_speed

  • type

  • subtype

  • garage

  • trailer

  • manufacture_year

  • color

  • additional_info

  • trailer_reg_number

  • reg_number

  • chassis_number

  • frame_number

  • vin

  • passengers

  • payload_weight

  • payload_height

  • payload_width

  • payload_length

  • gross_weight

  • fuel_grade

  • fuel_tank_volume

  • fuel_cost

  • norm_avg_fuel_consumption

  • fuel_type

  • tyre_size

  • tyres_number

  • wheel_arrangement

  • free_insurance_policy_number

  • liability_insurance_policy_number

  • free_insurance_valid_till

  • liability_insurance_valid_till

  • tracker_label

  • tags

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

Response

Example

cURL

Errors

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

  • 233 - No data file

  • 234 - Invalid data format

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

Start vehicle import

post
/vehicle/import/start

Start importing vehicles from a spreadsheet previously uploaded through data/spreadsheet/parse.

Requires the vehicle_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
filenamestringRequired

Name of the file preloaded with data/spreadsheet/parse.

headersstring[]Required

Column headers, naming which vehicle field each column holds.

user_headersstring[]Optional

Optional. User-facing labels for the headers.

Responses
200

The import process

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
valueintegerOptional

Process ID, to poll with vehicle/import/read.

post/vehicle/import/start
POST /v2/vehicle/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,
  "value": 1
}

Errors

These errors come in addition to the general error codes:

  • 15 (rate limit), 233, 234, 247.


Reads the state of one import process.

Read vehicle import

post
/vehicle/import/read

Return the state of one import process.

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_idintegerRequired

ID of the import process.

Responses
200

The import process state

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/vehicle/import/read
POST /v2/vehicle/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 the database.


Lists the import processes of the current user.

List vehicle imports

post
/vehicle/import/list

List the import processes of the current user. 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

Import processes

application/json
successbooleanRead-onlyOptional

true if request finished successfully.

Example: true
post/vehicle/import/list
POST /v2/vehicle/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"
          }
        ]
      }
    }
  ]
}

Downloads the rows the import could not process, so they can be corrected and retried.

Download failed import rows

post
/vehicle/import/download_failed

Download the rows an import could not process, so they can be corrected and retried.

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_idintegerRequired

ID of the import process.

Responses
200

The failed rows as a file.

text/csv
stringOptional
post/vehicle/import/download_failed
POST /v2/vehicle/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
}
text

Errors

These errors come in addition to the general error codes:

  • 201, 204.

Last updated

Was this helpful?