Skip to main content
GET
/
api
/
v1
/
enterprise
/
eudr
/
polygons
Python
import agribackup
from agribackup.rest import ApiException

# Initialize Client
configuration = agribackup.Configuration(host="https://live.agribackup.com/api/v1")
configuration.api_key['ApiKeyAuth'] = 'sk_live_YOUR_API_KEY'

with agribackup.ApiClient(configuration) as api_client:
    try:
        api_instance = agribackup.EnterprisePolygonsApi(api_client)
        response = api_instance.get_polygons()
        print(response)
    except ApiException as e:
        print("Exception when calling API: %s\n" % e)
import { AgriBackupClient } from '@agribackup/sdk';

// Initialize Client
const client = new AgriBackupClient({
apiKey: 'sk_live_YOUR_API_KEY',
baseUrl: 'https://live.agribackup.com/api/v1'
});

async function execute() {
try {
const response = await client.polygons.getPolygons();
console.log(response);
} catch (error) {
console.error(error);
}
}
import com.agribackup.client.*;
import com.agribackup.client.api.*;
import com.agribackup.client.model.*;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://live.agribackup.com/api/v1");
defaultClient.setApiKey("sk_live_YOUR_API_KEY");

EnterprisePolygonsApi apiInstance = new EnterprisePolygonsApi(defaultClient);
try {
Object result = apiInstance.getPolygons();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling API: " + e.getResponseBody());
}
}
}
using System;
using System.Threading.Tasks;
using AgriBackup.SDK.Api;
using AgriBackup.SDK.Client;
using AgriBackup.SDK.Model;

class Program {
static async Task Main() {
Configuration config = new Configuration();
config.BasePath = "https://live.agribackup.com/api/v1";
config.AddApiKey("ApiKeyAuth", "sk_live_YOUR_API_KEY");

var apiInstance = new EnterprisePolygonsApi(config);
try {
var result = await apiInstance.GetPolygonsAsync();
Console.WriteLine(result);
} catch (ApiException e) {
Console.WriteLine("Exception when calling API: " + e.Message);
}
}
}
curl --request GET \
--url https://live.agribackup.com/api/v1/enterprise/eudr/polygons \
--header 'X-API-Key: <api-key>'
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('https://live.agribackup.com/api/v1/enterprise/eudr/polygons', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://live.agribackup.com/api/v1/enterprise/eudr/polygons",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://live.agribackup.com/api/v1/enterprise/eudr/polygons"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-API-Key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
require 'uri'
require 'net/http'

url = URI("https://live.agribackup.com/api/v1/enterprise/eudr/polygons")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "data": [
    {
      "polygonId": "uuid-1234",
      "commodity": "Coffee",
      "eudrStatus": "COMPLIANT",
      "areaHectares": 2.5,
      "createdAt": "2023-11-07T05:31:56Z"
    }
  ],
  "hasMore": true,
  "nextCursor": "<string>"
}
{
"code": "VALIDATION_FAILED",
"message": "Invalid polygon coordinates",
"details": [
{
"code": "INVALID_COORDINATE_CLOSURE",
"field": "features[0].properties.area",
"issue": "Area must be specified in hectares and cannot be negative"
}
]
}
{
"code": "VALIDATION_FAILED",
"message": "Invalid polygon coordinates",
"details": [
{
"code": "INVALID_COORDINATE_CLOSURE",
"field": "features[0].properties.area",
"issue": "Area must be specified in hectares and cannot be negative"
}
]
}
Returns a cursor-paginated list of all farm boundary polygons registered under your organisation. Use query parameters to filter by compliance status (PENDING, COMPLIANT, HIGH_RISK) or to retrieve only records updated after a specific timestamp — useful for incremental sync with your ERP system. Polygons with eudrStatus: COMPLIANT are eligible to be referenced in a batch registration.

Request Headers

HeaderRequiredDescription
X-API-KeyYour live API key, e.g. sk_live_....

Query Parameters

ParameterTypeDefaultDescription
starting_afterstringCursor value from the previous page’s nextCursor field. Omit for the first page.
updated_afterstring (ISO-8601)Return only polygons updated after this timestamp, e.g. 2026-01-01T00:00:00Z.
limitinteger100Maximum records to return per page.
statusstringFilter by compliance status: PENDING, COMPLIANT, or HIGH_RISK.

Response — 200 OK

FieldTypeDescription
dataarrayList of PolygonStatusResponse objects (see below).
hasMorebooleantrue if additional records exist beyond this page.
nextCursorstring | nullPass this value to starting_after to retrieve the next page. null when no further records exist.
Each item in data contains:
FieldTypeDescription
polygonIdstringUnique polygon identifier.
commoditystringCrop commodity produced on the plot (e.g. Coffee).
eudrStatusstringCompliance status: PENDING, COMPLIANT, or HIGH_RISK.
areaHectaresnumberPlot area in hectares.
createdAtstring (ISO-8601)Timestamp when the polygon was registered.
{
  "data": [
    {
      "polygonId": "uuid-1234",
      "commodity": "Coffee",
      "eudrStatus": "COMPLIANT",
      "areaHectares": 2.5,
      "createdAt": "2026-06-01T08:30:00Z"
    }
  ],
  "hasMore": false,
  "nextCursor": null
}

Code Examples

import agribackup
from agribackup.rest import ApiException

configuration = agribackup.Configuration(host="https://live.agribackup.com/api/v1")
configuration.api_key['ApiKeyAuth'] = 'sk_live_YOUR_API_KEY'

with agribackup.ApiClient(configuration) as api_client:
    try:
        api_instance = agribackup.EnterprisePolygonsApi(api_client)

        response = api_instance.get_polygons(
            status='COMPLIANT',
            limit=100
        )

        for polygon in response.data:
            print(polygon.polygon_id, polygon.eudr_status)

        if response.has_more:
            # Fetch next page
            next_page = api_instance.get_polygons(
                starting_after=response.next_cursor,
                status='COMPLIANT',
                limit=100
            )
    except ApiException as e:
        print("Error:", e)
import { AgriBackupClient } from '@agribackup/sdk';

const client = new AgriBackupClient({
  apiKey: 'sk_live_YOUR_API_KEY',
  baseUrl: 'https://live.agribackup.com/api/v1'
});

async function listPolygons() {
  try {
    const response = await client.polygons.getPolygons({
      status: 'COMPLIANT',
      limit: 100
    });

    for (const polygon of response.data) {
      console.log(polygon.polygonId, polygon.eudrStatus);
    }

    if (response.hasMore) {
      const nextPage = await client.polygons.getPolygons({
        startingAfter: response.nextCursor,
        status: 'COMPLIANT',
        limit: 100
      });
    }
  } catch (error) {
    console.error('Error:', error.message);
  }
}
curl -G https://live.agribackup.com/api/v1/enterprise/eudr/polygons \
  -H "X-API-Key: sk_live_YOUR_API_KEY" \
  --data-urlencode "status=COMPLIANT" \
  --data-urlencode "limit=100"

Authorizations

X-API-Key
string
header
required

Enterprise API Key provided via the AgriBackup developer console.

Query Parameters

starting_after
string

Cursor to retrieve the next page of results

updated_after
string

Filter for polygons updated after this ISO-8601 timestamp

limit
integer<int32>
default:100

Maximum number of records to return

status
enum<string>

Filter by compliance status

Available options:
PENDING,
COMPLIANT,
HIGH_RISK

Response

List of polygons successfully retrieved

Cursor-paginated collection response for enterprise polygons

data
object[]
required

List of verified polygons

hasMore
boolean
required

Indicates if more records are available

nextCursor
string | null

Cursor to retrieve next page (null if no more records)