Introduction
Welcome to the Pest Management Decision Guide (PMDG) API. This API allows authorized partners to access curated agricultural data, including crop-pest relationships and specific pest management guides.
Base URL:
Dev: https://1njj6psnyl.execute-api.ap-south-1.amazonaws.com/dev/
Prod: https://api-aws.cabi.org/
Authentication
All requests must include your unique API Key in the header.
Header: x-api-key: YOUR_API_KEY
Note: Your data access (Countries, Crops, Pests, etc.) is automatically scoped based on this key. For example, if you have access only to United Kingdom (UK) data but you include the United States (US) in your request, the response will contain data only for the UK. Same logic applies to Crops and Pests.
GET /countries
Retrieves the list of countries where PMDG content is available.
Request
GET /countries
Response Example
[
{
"isO2": "BD",
"countryName": "Bangladesh"
},
{
"isO2": "BF",
"countryName": "Burkina Faso"
},
{
"isO2": "BG",
"countryName": "Bulgaria"
}
]
POST /croppest
Retrieves Crop and Pest master data. Filters are optional; if omitted, defaults based on your API Key permissions will be applied.
Request Body
| Field | Type | Description |
|---|---|---|
countries |
Array[String] | Mandatory. List of ISO-2 Country Codes (e.g., ["IN", "BD"]). . Send an empty array [] to retrieve data for all entitled countries. |
crops |
Array[Int] | Mandatory. List of Crop IDs. . Send an empty array [] to retrieve data for all entitled crops. |
pests |
Array[Int] | Mandatory. List of Pest IDs. . Send an empty array [] to retrieve data for all entitled pests. |
Example Request
{
"countries": ["BD"],
"crops": [15395],
"pests": [12331]
}
{
"countries": ["KE, BD"], // Selects country Kenya and Bangladesh
"crops": [], // Empty array selects ALL entitled crops
"pests": [] // Empty array selects ALL entitled pests
}
POST /search
Search for PMDG records with pagination support.
Request Body
| Field | Type | Description |
|---|---|---|
countries |
Array[String] |
Mandatory. List of ISO-2 Country Codes (e.g., ["IN", "BD"]).Send an empty array [] to retrieve data for all entitled countries.
|
crops |
Array[Int] |
Mandatory. List of Crop IDs. Send an empty array [] to retrieve data for all entitled crops.
|
pests |
Array[Int] |
Mandatory. List of Pest IDs. Send an empty array [] to retrieve data for all entitled pests.
|
page |
Integer | Mandatory. Page number for pagination (0-indexed). |
rows |
Integer |
Mandatory. Number of results to return. Note: The backend enforces a maximum limit based on your entitlement. |
Example Request
{
"countries": ["BD"],
"crops": [15395, 29222, 32949, 115072],
"pests": [12331, 66242, 77409, 99219],
"page": 0,
"rows": 20
}
{
"countries": ["BD"],
"crops": [15395, 29222],
"pests": [12331],
"page": 1, // Requesting the 2nd page (0-indexed)
"rows": 20
}
{
"countries": ["IN"],
"crops": [], // Empty array selects ALL entitled crops for India
"pests": [], // Empty array selects ALL entitled pests for India
"page": 0,
"rows": 50
}
{
"countries": [], // Search in ALL entitled countries
"crops": [], // Search in ALL entitled crops
"pests": [66242], // Specific Pest ID only
"page": 0,
"rows": 100
}
POST /getpmdg
Retrieves detailed PMDG guide data by PAN ID.
Request Body
| Field | Type | Description |
|---|---|---|
pan |
BigInt |
Mandatory. The unique PAN identifier. Note: The backend returns PMDG based on your entitlement. |
Example Request
{
"pan": 20157801498
}
Error Codes
| Status | Meaning |
|---|---|
400 |
Bad Request: Invalid request JSON or Missing required fields. |
403 |
Access Denied: API Key missing, invalid, or no entitlements found. |
404 |
Not Found: The requested resource or path does not exist. |
500 |
Internal Server Error: An error occurred on the server side. |