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:
labelmodelmax_speedtypesubtypegaragetrailermanufacture_yearcoloradditional_infotrailer_reg_numberreg_numberchassis_numberframe_numbervinpassengerspayload_weightpayload_heightpayload_widthpayload_lengthgross_weightfuel_gradefuel_tank_volumefuel_costnorm_avg_fuel_consumptionfuel_typetyre_sizetyres_numberwheel_arrangementfree_insurance_policy_numberliability_insurance_policy_numberfree_insurance_valid_tillliability_insurance_valid_tilltracker_labeltagsundefined(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 importing vehicles from a spreadsheet previously uploaded through data/spreadsheet/parse.
Requires the vehicle_update right.
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 of the file preloaded with data/spreadsheet/parse.
Column headers, naming which vehicle field each column holds.
Optional. User-facing labels for the headers.
The import process
true if request finished successfully.
trueProcess ID, to poll with vehicle/import/read.
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.
Error 234: the file exceeds a size limit.
Error 15: too many requests, rate limit exceeded.
Error response object
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.
Return the state of one import process.
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.
ID of the import process.
The import process state
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error response object
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 the import processes of the current user. Callable with an empty body.
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.
Import processes
true if request finished successfully.
trueBad request. The response body carries the API-level error code in status.code. Validation failures also include an errors array naming each offending parameter.
Error response object
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 the rows an import could not process, so they can be corrected and retried.
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.
ID of the import process.
The failed rows as a file.
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.
Error 204: entity not found.
Error response object
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
}textErrors
These errors come in addition to the general error codes:
201, 204.
Last updated
Was this helpful?