Importing POIs
Sample CSV file
Even though you can create POIs manually using the API, you can also import them in bulk. This way, you can create multiple POIs at once, which is especially useful if you have a large number of locations to add.
Here you can download a sample CSV file that you can use to import POIs into Lanewise. The file contains the following columns:
latitude: The latitude of the POI.longitude: The longitude of the POI.category_id: The ID of the category that the POI belongs to.category_name: The name of the category that the POI belongs to.attribute[<name>]: The value of the attribute with the name<name>.
Dispatch Import Job
To import POIs into Lanewise, you need to send a POST request to the /import endpoint. You need to include the CSV file in the request body.
Request POIs import
curl -X POST https://api.lanewise.app/v1/import \
-H "X-API-KEY: {YOUR_API_KEY}" \
-F "file=@/path/to/file.csv"
Response
{
"data": {
"id": "LpaJXbYb9wQrEFuM",
"status": "pending",
"rows": 1000,
"processed": 0,
"created_at": "2021-10-01T12:00:00Z",
"updated_at": "2021-10-01T12:00:00Z"
},
}
Check Import Job Status
You can check the status of the import job by sending a GET request to the /import/{id} endpoint.
Request import job status
curl -G https://api.lanewise.app/v1/import/{id} \
-H "X-API-KEY: {YOUR_API_KEY}"
Response
{
"data": {
"id": "LpaJXbYb9wQrEFuM",
"status": "processing",
"rows": 1000,
"processed": 500,
"created_at": "2021-10-01T12:00:00Z",
"updated_at": "2021-10-01T12:00:00Z"
},
}