Skip to content

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

Error Handling & Support

  • Error Handling - Comprehensive guide to API error codes and troubleshooting

Integration Examples

Getting Started

  1. Authentication - Set up OAuth2 authentication using the guide above
  2. Quote Creation - Start with the Quote Management guide
  3. Policy Management - Use Policy Monitoring for ongoing policy operations
  4. 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.