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 /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.