API Integration Guide
This guide describes the integration with Riskwolf's API for insurance products. The API allows you to manage quotes and policies for weather-based insurance products.
Authorization
All API requests must include proper authentication credentials. Authentication is done using OAuth 2 and Microsoft Authentication Library (MSAL).
See documentation for more details.
Obtaining token from command line (for testing)
#!/bin/bash
CLIENT_APP_ID='<client_id>'
CLIENT_SECRET='<secret>'
SERVER_APP_ID='<server_app_id>'
TENANT_ID='<tenant_id>'
curl -sS -d "client_id=${CLIENT_APP_ID}&scope=api%3A%2F%2F${SERVER_APP_ID}%2F.default&client_secret=${CLIENT_SECRET}&grant_type=client_credentials" -XPOST -H 'Content-Type: application/x-www-form-urlencoded' "https://login.microsoftonline.com/${TENANT_ID}/oauth2/v2.0/token" | jq -r '.access_token'
Base URL and Tenant Configuration
Base URL
The base URL for the API is constructed using the environment identifier. The format is:
https://{environment}.riskwolf.com/external
Tenant ID
Each request must include a tenant ID in the header. The tenant ID is a unique identifier assigned to your organization.
Add the tenant ID to your requests using the x-tenant-id
header:
x-tenant-id: your-tenant-id
Contact your Riskwolf representative to obtain the appropriate base URL and tenant ID for your integration. Please note that environment and tenant ID are different.
API Reference Documentation
Core API Operations
- Quote Management - Create, manage, and convert quotes to policies
- Quote Details & Examples - Detailed examples of quote operations with full request/response samples
- Policy Monitoring - Monitor active policies, activate/cancel policies, and track policy status
Error Handling & Support
- Error Handling - Comprehensive guide to API error codes and troubleshooting
Integration Examples
- Crop Insurance API Example - Complete integration example for parametric crop insurance
- Travel Insurance API Example - Complete integration example for travel weather insurance
Getting Started
- Authentication - Set up OAuth2 authentication using the guide above
- Quote Creation - Start with the Quote Management guide
- Policy Management - Use Policy Monitoring for ongoing policy operations
- Error Handling - Implement proper error handling using the Error Handling guide
For specific use case examples, refer to the Crop or Travel insurance integration examples.