Supported formats
Upload a.zip file containing one or more of:
- Shapefile — Must include at least
.shp,.dbf, and.shxfiles. - GeoJSON — Standard GeoJSON with Polygon or MultiPolygon geometries.
- KML/KMZ — Google Earth format.
name, Leaf uses it as the field name.
All geometries are projected to WGS 84 (EPSG:4326).
Limits
- Maximum file size: 3 GB
- Maximum fields per upload: 100
Uploading a file
POST /services/uploadservice/api/upload?leafUserId={leafUserId}
Send the file as multipart/form-data. The leafUserId parameter is required. You can optionally pass farmId to assign all created fields to a specific farm.
id you use to track progress.
Tracking upload status
GET /services/uploadservice/api/upload/{uploadId}
| Status | Meaning |
|---|---|
RECEIVED | Upload accepted, processing not started |
PROCESSED | All files processed, at least one field created successfully |
FAILED | No fields were created |
Getting created fields
GET /services/uploadservice/api/upload/{uploadId}/entries
Returns the processing result for each file in the zip. Each entry includes:
fieldId— Array of field IDs created from that file.converterFormat— Detected format:SHAPEFILE,GEOJSON, orKML.status— Per-file status:PROCESSING,CONVERTED,FINISHED,FAILED, orPARTIALLY_FINISHED.createFieldErrorDetails— Error messages for any fields that failed to create (e.g., self-intersecting geometry).
GET /services/fields/api/users/{leafUserId}/fields/{fieldId}.
What to do next
- Managing Fields — Create and update individual fields via the API.
- Fields Overview — How boundaries fit into the Grower/Farm/Field model.
- API Reference: Field Upload — Full endpoint reference for the upload service.

