API Documentation
Introduction
Welcome to the Riwe API documentation. Our API provides programmatic access to our agricultural data and services, allowing you to integrate them into your own applications.
The API is organized around REST. All requests should be made over HTTPS, and all responses are returned as JSON.
Authentication
The Riwe API uses API keys to authenticate requests. You can view and manage your API keys in the API Keys section.
Authentication to the API is performed via the X-API-KEY
header. Your API key should be provided in this header with every request.
curl -X GET "https://api.riwe.io/v1/farms" \
-H "X-API-KEY: your_api_key_here"
All API requests must be made over HTTPS. Calls made over plain HTTP will fail.
Rate Limiting
The API has rate limiting to prevent abuse. The rate limit varies by endpoint and is specified in the endpoint documentation.
If you exceed the rate limit, you will receive a 429 Too Many Requests
response. The response will include a Retry-After
header indicating how many seconds to wait before making another request.
Errors
The API uses conventional HTTP response codes to indicate the success or failure of an API request. In general:
- Codes in the
2xx
range indicate success. - Codes in the
4xx
range indicate an error that failed given the information provided (e.g., a required parameter was omitted, authentication failed, etc.). - Codes in the
5xx
range indicate an error with our servers.
All error responses include a JSON object with an error
field that contains a brief description of the error and a message
field with more details.
{
"error": "Invalid API key",
"message": "The provided API key is invalid or has been deactivated"
}
API Endpoints
Weather API
4 endpoints available
Crops API
3 endpoints available
Earth Observation API
3 endpoints available
Farms API
7 endpoints available
Soil Analysis API
3 endpoints available
Market Data API
3 endpoints available
Pest & Disease API
3 endpoints available