Imports

An import is a CSV file of POIs being processed in the background. Read the bulk import guide for the file format and how imports run.

The import model

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier (ULID) of the import.

  • Name
    status
    Type
    string
    Description

    queued, processing, completed or failed.

  • Name
    filename
    Type
    string
    Description

    Name of the uploaded file.

  • Name
    columns
    Type
    array
    Description

    Column names from the header, lowercased.

  • Name
    total_rows
    Type
    integer
    Description

    Number of data rows in the file.

  • Name
    processed_rows
    Type
    integer
    Description

    Rows handled so far. Use it with total_rows to show progress.

  • Name
    created
    Type
    integer
    Description

    POIs created so far.

  • Name
    failed
    Type
    integer
    Description

    Rows that were not imported.

  • Name
    limit_reached
    Type
    boolean
    Description

    Whether some rows were not imported because the team reached its POI limit.

  • Name
    errors
    Type
    array
    Description

    Up to 100 rows that were not imported, as line (line number in the file, counting the header as line 1) and message. line is null when the import stopped unexpectedly.

  • Name
    created_at
    Type
    timestamp
    Description

    When the file was uploaded.

  • Name
    started_at
    Type
    timestamp | null
    Description

    When processing started.

  • Name
    finished_at
    Type
    timestamp | null
    Description

    When processing finished.


GET/v1/imports

List all imports

Retrieve a paginated list of your imports, newest first. Requires the read-pois permission.

Optional attributes

  • Name
    limit
    Type
    integer
    Description

    Number of imports per page, between 1 and 100. Defaults to 15.

  • Name
    cursor
    Type
    string
    Description

    Cursor of the page to fetch, from the next attribute of the previous page.

Request

GET
/v1/imports
curl -G https://api.lanewise.app/v1/imports \
  -H "X-API-KEY: {YOUR_API_KEY}"

POST/v1/imports

Upload a CSV file

Upload a file as multipart/form-data with a file field and, optionally, create_missing_attributes. Returns a 202, or a 403 when your team is already at its POI limit. Requires the create-pois permission. See the bulk import guide for details and examples.

Request

POST
/v1/imports
curl https://api.lanewise.app/v1/imports \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -F [email protected]

GET/v1/imports/:id

Retrieve an import

Retrieve an import by its ID, to follow its progress. Requires the read-pois permission.

Request

GET
/v1/imports/01J9ZD1K7Q2W8TYB6M4C0HNX3E
curl https://api.lanewise.app/v1/imports/01J9ZD1K7Q2W8TYB6M4C0HNX3E \
  -H "X-API-KEY: {YOUR_API_KEY}"