Simplify EUDR Compliance with Prewave APIs
Description
This guide details how to integrate Prewave’s EUDR APIs for efficient regulatory compliance. It covers essential API endpoints for supplier syncing, product management, due diligence submissions, and record-keeping, along with implementation steps and troubleshooting tips.
Table of Contents
Overview
Introducing the Prewave EUDR APIs
Our Prewave APIs cover the core scenarios you need to become compliant. Using EUDR legislation, you have identified the products you need to be compliant on. As the products are connected to suppliers, before upload the product list, you need to ensure that the suppliers are in the Prewave system.
Generating DDSs linked to Purchase Orders
Prewave supports the generation of DDs linked to Purchase Orders. The process is the same than for DDS & Record Keeping.
-
Step 1: Submit DDS → link
-
Provide here your Purchase Order Number (or other reference numbers).
-
-
Step 2: Get DDS (activated on 01.December.2024)
-
Get DDSs via your Purchase Order Number (or other reference numbers).
-
Getting Started with Prewave EUDR APIs
This guide will help you quickly integrate with Prewave’s EUDR API endpoints.
Authentication With API Token
Prewave’s public API requires API tokens for authenticating with our RESTful service. You must include this token in the header of each HTTP request.
How to Obtain Your API Token
-
Log in to your account: Head over to → https://www.prewave.com/management/api .
-
Generate your token: Use your credentials to log in and click on “Create New” to generate a new API token.
-
Include the token in your requests: You’ll need to add this token in the request headers for API calls.
If you haven’t received your credentials or EUDR API access yet, please contact your Prewave representative.
Making Your First Request: Get Inbound Products
To get started, let’s try fetching a list of inbound products using our API.
If you don’t have any products to set up yet, create one by visiting Prewave Product Inbound. To test the endpoints, you can use our Swagger interface or any tool of your choice.
https://api.prewave.com/public/v2/products/inbound
The Get Inbound Products endpoint requires a query parameter. We'll use:
scope=NAME
Endpoint with filter:
You can filter products based on their scope:
https://api.prewave.com/public/v2/products/inbound?filter=scope=NAME
Request Headers:
headers = {
"Content-Type": "application/json",
"X-Auth-Token": "YOUR_API_KEY"
}
Response:
Returns Status Code: 200
and a JSON list with inbound products. For example:
[
{
"id": 1128,
"customerId": 14771,
"orgId": 20027756,
"name": "Certified Cattle",
"scientificName": "",
"reference": "720385",
"eudrScope": "EU",
"commodity": {
"id": 101355938,
"name": "EUDR Cattle"
},
"hsCode": {
"code": "020622",
"description": "MEAT AND EDIBLE MEAT OFFAL / Edible offal of bovine animals, swine, sheep, goats, horses, mules or hinnies, fresh, chilled or frozen; Livers"
},
"annualSpend": 16720608,
"annualQuantity": 93936,
"unit": "kg",
"origins": [],
"hasPendingOriginRequest": false,
"hasPendingDFCheckRequest": false,
"supplier": {
"id": 13756990,
"name": "Fantasy Department for Testing 5 (Vienna)",
"type": "Site",
"location": "Vienna, AT",
"countryId": 2147102
},
"ddsStatus": {
"status": "WaitingForOrigins",
"reason": "NoOrigins"
},
"supplierMaturity": {
"grading": "Good",
"inProgress": false
},
"active": true,
"creatorType": "Customer"
},
{
"id": 1129,
"customerId": 14771,
"orgId": 20027756,
"name": "Organic Cocoa Butter",
"scientificName": "",
"reference": "447990",
"eudrScope": "EU",
"commodity": {
"id": 101355941,
"name": "EUDR Cocoa"
},
"hsCode": {
"code": "1805",
"description": "COCOA AND COCOA PREPARATIONS / Cocoa powder, not containing added sugar or other sweetening matter"
},
"annualSpend": 682440,
"annualQuantity": 34122,
"unit": "kg",
"origins": [],
"hasPendingOriginRequest": false,
"hasPendingDFCheckRequest": false,
"supplier": {
"id": 13756990,
"name": "Fantasy Department for Testing 5 (Vienna)",
"type": "Site",
"location": "Vienna, AT",
"countryId": 2147102
},
"ddsStatus": {
"status": "WaitingForOrigins",
"reason": "NoOrigins"
},
"supplierMaturity": {
"grading": "Good",
"inProgress": false
},
"active": true,
"creatorType": "Customer"
}
]
Troubleshooting Common Issues
In case you experience any issues check this list of errors:
Error Code |
Response Message |
Fix |
---|---|---|
401 |
|
Check if your API key is valid, regenerate if needed. |
403 |
|
Verify API key and request headers. |
404 |
|
Ensure the endpoint URL is correct. |
500 |
|
Retry after refreshing or clearing cookies. |