Skip to main content
GET
/
api
/
v1
/
enterprise
/
eudr
/
batches
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.EnterpriseBatchesApi(api_client)
        response = api_instance.get_batches()
        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.batches.getBatches();
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");

EnterpriseBatchesApi apiInstance = new EnterpriseBatchesApi(defaultClient);
try {
Object result = apiInstance.getBatches();
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 EnterpriseBatchesApi(config);
try {
var result = await apiInstance.GetBatchesAsync();
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/batches \
--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/batches', 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/batches",
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/batches"

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/batches")

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": [
    {
      "batchId": "uuid-1234",
      "batchCode": "COFFEE-KE-20260612-ABCDEF",
      "status": "PENDING_RISK_ASSESSMENT"
    }
  ],
  "hasMore": true,
  "nextCursor": "<string>"
}
Returns a cursor-paginated list of all EUDR batches registered under your organisation. Use this endpoint to synchronise batch records with your ERP, monitor risk assessment progress, or build compliance dashboards. Each record in the response includes the batch’s batchCode, batchId, and current status. For full detail including linked polygon IDs and shipment IDs, fetch individual batches using GET /api/v1/enterprise/eudr/batches/{batchId}.

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 batches updated after this timestamp.
limitinteger100Maximum number of records to return per page.

Response — 200 OK

FieldTypeDescription
dataarrayList of batch summary objects (see below).
hasMorebooleantrue if additional records exist beyond this page.
nextCursorstring | nullPass to starting_after for the next page. null when no further records exist.
Each item in data contains:
FieldTypeDescription
batchIdstringUnique internal batch identifier (UUID).
batchCodestringHuman-readable compliance code, e.g. COFFEE-KE-20260612-ABCDEF.
statusstringLifecycle status: PENDING_RISK_ASSESSMENT, COMPLIANT, or HIGH_RISK.
{
  "data": [
    {
      "batchId": "uuid-1234",
      "batchCode": "COFFEE-KE-20260612-ABCDEF",
      "status": "COMPLIANT"
    }
  ],
  "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.EnterpriseBatchesApi(api_client)
        response = api_instance.get_batches(limit=100)

        for batch in response.data:
            print(batch.batch_id, batch.batch_code, batch.status)

        if response.has_more:
            next_page = api_instance.get_batches(
                starting_after=response.next_cursor,
                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 listBatches() {
  try {
    const response = await client.batches.getBatches({ limit: 100 });

    for (const batch of response.data) {
      console.log(batch.batchId, batch.batchCode, batch.status);
    }

    if (response.hasMore) {
      const nextPage = await client.batches.getBatches({
        startingAfter: response.nextCursor,
        limit: 100
      });
    }
  } catch (error) {
    console.error('Error:', error.message);
  }
}
curl -G https://live.agribackup.com/api/v1/enterprise/eudr/batches \
  -H "X-API-Key: sk_live_YOUR_API_KEY" \
  --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
updated_after
string
limit
integer<int32>
default:100

Response

200 - application/json

List of batches successfully retrieved

Paginated list of enterprise batches

data
object[]
required

List of batch records

hasMore
boolean
required

Indicates if there are more records available

nextCursor
string | null

Cursor to use in the 'starting_after' parameter for the next page