Register a field
const url = 'https://api.agrosat.uz/v1/fields';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"name":"North parcel 3","external_id":"f-1001","geometry":{"type":"Polygon","coordinates":[[[68.552,40.3084],[68.56,40.3084],[68.56,40.3139],[68.552,40.3139],[68.552,40.3084]]]}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.agrosat.uz/v1/fields \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "name": "North parcel 3", "external_id": "f-1001", "geometry": { "type": "Polygon", "coordinates": [ [ [ 68.552, 40.3084 ], [ 68.56, 40.3084 ], [ 68.56, 40.3139 ], [ 68.552, 40.3139 ], [ 68.552, 40.3084 ] ] ] } }'Registers a GeoJSON Polygon or MultiPolygon in WGS84 under your external_id and starts preparing its history. Repeating the request with the same external_id and geometry returns the existing field with 200. The field area is consumed from the contracted hectares and is not returned when the field is deleted or shrunk. Costs no units.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Example
North parcel 3Your identifier for the field, unique per organization
Example
f-1001GeoJSON Polygon or MultiPolygon geometry in WGS84
object
Polygon: array of rings; MultiPolygon: array of polygons
Example
{ "type": "Polygon", "coordinates": [ [ [ 68.552, 40.3084 ], [ 68.56, 40.3084 ], [ 68.56, 40.3139 ], [ 68.552, 40.3139 ], [ 68.552, 40.3084 ] ] ]}Responses
Section titled “Responses”Same external_id and geometry: the existing field
object
object
Area in hectares
Pending while history is prepared, then ready
Example
{ "success": true, "data": { "id": "cmgz7k2qv0004l8p3a9d1x6rt", "external_id": "f-1001", "name": "North parcel 3", "area_ha": 41.53, "status": "pending", "created_at": "2026-04-28T09:14:03.512Z" }}Field registered; status is pending until history is prepared
object
object
Area in hectares
Pending while history is prepared, then ready
Example
{ "success": true, "data": { "id": "cmgz7k2qv0004l8p3a9d1x6rt", "external_id": "f-1001", "name": "North parcel 3", "area_ha": 41.53, "status": "pending", "created_at": "2026-04-28T09:14:03.512Z" }}The body or geometry is not acceptable
object
object
English text; may change, branch on code
Field already holding this external_id or geometry (409 only)
Examples
invalid_geometry
{ "success": false, "error": { "code": "invalid_geometry", "message": "geometry must be GeoJSON in WGS84 (longitude, latitude)." }}field_too_large
{ "success": false, "error": { "code": "field_too_large", "message": "Field area 6120.4 ha exceeds the 5000 ha per-field limit." }}invalid_request
{ "success": false, "error": { "code": "invalid_request", "message": "external_id should not be empty" }}X-API-Key is missing, unknown, revoked or expired, or the API is not enabled.
object
object
English text; may change, branch on code
Field already holding this external_id or geometry (409 only)
Examples
invalid_api_key
{ "success": false, "error": { "code": "invalid_api_key", "message": "Missing or invalid API key." }}Contracted hectares are used up
object
object
English text; may change, branch on code
Field already holding this external_id or geometry (409 only)
Examples
quota_exceeded
{ "success": false, "error": { "code": "quota_exceeded", "message": "Contracted hectares exceeded (980.0/1000 ha consumed)." }}The field clashes with one you already registered
object
object
English text; may change, branch on code
Field already holding this external_id or geometry (409 only)
Examples
external_id_conflict
{ "success": false, "error": { "code": "external_id_conflict", "message": "A field with this external_id already exists with a different geometry.", "existing_field_id": "cmgz7k2qv0004l8p3a9d1x6rt" }}duplicate_geometry
{ "success": false, "error": { "code": "duplicate_geometry", "message": "Field overlaps 93% with existing field \"North parcel 3\". Duplicate fields are not allowed.", "existing_field_id": "cmgz7k2qv0004l8p3a9d1x6rt" }}Over the per-key request rate. Not billed.
object
object
English text; may change, branch on code
Field already holding this external_id or geometry (409 only)
Examples
rate_limited
{ "success": false, "error": { "code": "rate_limited", "message": "Rate limit exceeded." }}Headers
Section titled “Headers”Example
30Seconds to wait before repeating the request
