Skip to main content

Price Alerts

Configure and manage real-time price alerts for commodities.

Create Alert​

POST https://api.yodi.tg/v1/climate/alerts

Request Body​

{
"commodity": "maize",
"region": "maritime",
"condition": "above",
"threshold": 300,
"phone": "+22890123456"
}
ParameterTypeDescription
commoditystringCommodity name
regionstringRegion code
conditionstringTrigger condition: above or below
thresholdnumberPrice threshold in FCFA
phonestringPhone number for SMS notification

Example Request​

curl -X POST "https://api.yodi.tg/v1/climate/alerts" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"commodity": "maize",
"region": "maritime",
"condition": "above",
"threshold": 300,
"phone": "+22890123456"
}'

Example Response​

{
"message": "ALERT_CREATED",
"error": false,
"data": {
"id": 7,
"commodity": "maize",
"region": "maritime",
"condition": "above",
"threshold": 300,
"active": true
},
"status": 201
}

List Alerts​

GET https://api.yodi.tg/v1/climate/alerts

Example Request​

curl -X GET "https://api.yodi.tg/v1/climate/alerts" \
-H "x-api-key: YOUR_API_KEY"

Example Response​

{
"message": "ALERTS_LISTED",
"error": false,
"data": [
{
"id": 7,
"commodity": "maize",
"region": "maritime",
"condition": "above",
"threshold": 300,
"active": true,
"createdAt": "2025-07-10T10:00:00Z"
}
],
"status": 200
}

Use Cases​

  • Get notified when crop prices reach a target
  • Monitor market volatility
  • Plan purchase or sale timing

Next Steps​