Skip to main content
Use the upload service to create many field boundaries at once from shapefiles, GeoJSON, or KML/KMZ files. This page covers the upload endpoints, supported formats, status values, and the follow-up calls you use to inspect results. For conceptual background, see Uploading Boundaries.

Base URL

Endpoints


Supported formats

You can upload field boundaries in the following formats:
  • Shapefile — packaged as a .zip containing .shp, .shx, .dbf, and optionally .prj
  • GeoJSON.json or .geojson
  • KML / KMZ.kml or .kmz
Leaf reprojects all uploaded geometries to WGS 84 (EPSG:4326).

Upload limits

Upload and entry statuses

Each upload progresses through the following statuses: Individual entries within an upload have their own statuses:

Upload a field file

POST /upload Uploads a field boundary file for the specified Leaf user. The file is processed asynchronously. Use the Get an upload or Get upload entries endpoints to track progress.

Parameters

Request

Response

If the .zip does not contain the required shapefile components (.shp, .shx, .dbf), the upload fails with status FAILED.

Get all uploads

GET /upload Returns a paginated list of field boundary uploads.

Parameters

Request

Response


Get an upload

GET /upload/{uploadId} Returns a single field boundary upload by its ID.

Parameters

Request

Response


Get upload entries

GET /upload/{uploadId}/entries Returns the individual entries for each recognized file extracted from an upload. Each entry tracks its own processing status and lists the Leaf field IDs created from that recognized file.

Parameters

Request

Response

Poll the entries endpoint to track each recognized file inside the upload. Use the fieldId array to fetch the created fields from the Fields API, and inspect createFieldErrorDetails when a file finishes with FAILED or PARTIALLY_FINISHED.
Last modified on March 19, 2026