EUDR API Documentation

Interactive API Testing & Documentation Interface

🔑Authentication

Enter your OAuth2 Bearer token to test the API endpoints. The token will be automatically added to all requests.

📋API Templates

Get sample data structures and field descriptions for API operations. No authentication required.

GET http://eudr-ddapi.geodatalab.cloud/api/due-diligence/templates/
curl -X GET "http://eudr-ddapi.geodatalab.cloud/api/due-diligence/templates/"

📝Create Due Diligence

Create a new due diligence record with metadata and geometry.

POST http://eudr-ddapi.geodatalab.cloud/api/due-diligence/
Request Body (JSON)
Field Descriptions
Required Fields:
  • supplier - Name of the supplier
  • supplier_contact - Contact email
  • year - Year of the due diligence period (integer, e.g., 2021, 2024)
  • crs - Coordinate reference system (e.g., EPSG:4326)
  • commodity_type - Type of commodity
Optional Fields:
  • due_diligence - Due diligence information (ID, Date, Country, Agro-commodity, Parcels No., Total AOI, Total production)
  • parcel - Parcel-specific information (Parcel ID, AOI, Country, Agro-commodity)
Valid Commodity Types:
bare/built cattle coffee crops grass permanent-crops shrub-and-scrub soybean trees unknown water
curl -X POST "http://eudr-ddapi.geodatalab.cloud/api/due-diligence/" \ -H "Authorization: Bearer YOUR_TOKEN_HERE" \ -H "Content-Type: application/json" \ -d '{"metadata": {"supplier": "Example Supplier"}}'

📋List Due Diligence

Retrieve all due diligence records with optional filtering.

GET http://eudr-ddapi.geodatalab.cloud/api/due-diligence/
curl -X GET "http://eudr-ddapi.geodatalab.cloud/api/due-diligence/" \ -H "Authorization: Bearer YOUR_TOKEN_HERE"

🔍Get Single Due Diligence

Retrieve a specific due diligence record by external ID.

GET http://eudr-ddapi.geodatalab.cloud/api/due-diligence/{external_id}/
curl -X GET "http://eudr-ddapi.geodatalab.cloud/api/due-diligence/EXTERNAL_ID_HERE/" \ -H "Authorization: Bearer YOUR_TOKEN_HERE"

🔄Transition Due Diligence

Update the state of a due diligence record (Worker scope required).

POST http://eudr-ddapi.geodatalab.cloud/api/due-diligence/{external_id}/transition/
Request Body (JSON)
Note: This endpoint requires worker scope. Regular updates (PUT/PATCH) are not allowed since data is processed.
curl -X POST "http://eudr-ddapi.geodatalab.cloud/api/due-diligence/EXTERNAL_ID_HERE/transition/" \ -H "Authorization: Bearer YOUR_TOKEN_HERE" \ -H "Content-Type: application/json" \ -d '{"module": "validator", "new_state": "APPROVED"}'

🗑️Delete Due Diligence

Delete a due diligence record (Write scope required).

DELETE http://eudr-ddapi.geodatalab.cloud/api/due-diligence/{external_id}/
curl -X DELETE "http://eudr-ddapi.geodatalab.cloud/api/due-diligence/EXTERNAL_ID_HERE/" \ -H "Authorization: Bearer YOUR_TOKEN_HERE"

📎Attachments

Manage file attachments for due diligence records.

📋List Attachments

Get a list of all attachments for a due diligence record.

GET http://eudr-ddapi.geodatalab.cloud/api/due-diligence/{external_id}/attachments/
curl -H "Authorization: Bearer YOUR_TOKEN_HERE" \ "http://eudr-ddapi.geodatalab.cloud/api/due-diligence/EXTERNAL_ID_HERE/attachments/"

🔗Get Download URLs

Get download URLs for all attachments (useful for curl downloads).

GET http://eudr-ddapi.geodatalab.cloud/api/due-diligence/{external_id}/attachments/download-urls/
curl -H "Authorization: Bearer YOUR_TOKEN_HERE" \ "http://eudr-ddapi.geodatalab.cloud/api/due-diligence/EXTERNAL_ID_HERE/attachments/download-urls/"

⬆️Upload Attachment

Upload a file attachment to a due diligence record (Worker scope required).

POST http://eudr-ddapi.geodatalab.cloud/api/due-diligence/{external_id}/attachments/upload/
curl -X POST \ -H "Authorization: Bearer YOUR_TOKEN_HERE" \ -F "file=@/path/to/your/file.pdf" \ -F "description=Your file description" \ -F "uploaded_by=your_username" \ "http://eudr-ddapi.geodatalab.cloud/api/due-diligence/EXTERNAL_ID_HERE/attachments/upload/"

⬇️Download Attachment

Download a specific attachment file.

GET http://eudr-ddapi.geodatalab.cloud/api/due-diligence/{external_id}/attachments/{attachment_id}/download/
curl -L -OJ -H "Authorization: Bearer YOUR_TOKEN_HERE" \ "http://eudr-ddapi.geodatalab.cloud/api/due-diligence/EXTERNAL_ID_HERE/attachments/ATTACHMENT_ID_HERE/download/"

🔄Example Workflow

Complete workflow for managing attachments:

1. Get download URLs:
curl -H "Authorization: Bearer YOUR_TOKEN_HERE" \ "http://eudr-ddapi.geodatalab.cloud/api/due-diligence/EXTERNAL_ID_HERE/attachments/download-urls/"
2. Download each file:
curl -L -OJ -H "Authorization: Bearer YOUR_TOKEN_HERE" \ "http://eudr-ddapi.geodatalab.cloud/api/due-diligence/EXTERNAL_ID_HERE/attachments/ATTACHMENT_ID_HERE/download/"
3. Upload new attachment:
curl -X POST \ -H "Authorization: Bearer YOUR_TOKEN_HERE" \ -F "file=@/path/to/your/file.pdf" \ -F "description=Your file description" \ "http://eudr-ddapi.geodatalab.cloud/api/due-diligence/EXTERNAL_ID_HERE/attachments/upload/"