Skip to content

Quote Details

Create Quote

To create a quote, use the endpoint /quotes. This endpoint uses the POST method and accepts a JSON body with the necessary criteria. You can include attribute externalRef to store external reference for quote/policy.

Create quote will contain all coverages matching location (monitoringTargetId) and fall into risk period. It should be 12 line items, one for each month and each containing two covers.

To get monitoring target ID, mapping file will be provided for mapping between pin code and monitoring target IDs.

Example Request:

POST /quotes HTTP/1.1
Host: https://project1.riskwolf.com
Content-Type: application/json
x-tenant-id: [Your-Tenant-ID]
Authorization: Bearer {your-token}

{
    "monitoringTargetId": "ind__3__ind.12.5.1_1",
    "riskPeriodFrom": "2024-12-01",
    "riskPeriodTo": "2025-11-30",
    "sumInsuredForLineItem": {
        "amount": 1000,
        "currency": "INR"
    }
}

Example Response:

{
  "id": "bf600ce6-e3d2-4b0b-a73b-59433de97764",
  "inceptionDate": "2024-11-30",
  "expiryDate": "2025-11-29",
  "externalRef": null,
  "name": "01-12-2024 - 30-11-2025",
  "status": "CREATED",
  "totalSumInsured": {
    "amount": 12000,
    "currency": "INR"
  },
  "grossPremiumAmount": {
    "amount": 528,
    "currency": "INR"
  },
  "lineItems": [
    {
      "coverages": [
        {
          "grossWrittenPremiumPct": 0.044,
          "id": "6b8ecb89-de4c-4a98-9c1e-311d3d4a0c02",
          "indexDefinition": {
            "description": "Total rainfall over the period  > Trigger",
            "id": "00000000-0000-0000-0000-000000000011"
          },
          "monitoringTarget": {
            "geometry": {
              "type": "Point",
              "coordinates": [
                76.96348,
                28.38254
              ]
            },
            "id": "ind__3__ind.12.5.1_1",
            "name": "Gurgaon / Gurgaon"
          },
          "riskPeriodStart": "2024-12-01",
          "riskPeriodEnd": "2024-12-31",
          "triggerUnit": "mm",
          "triggerValue": 70.0
        },
        {
          "grossWrittenPremiumPct": 0.044,
          "id": "fea756e2-f6f0-4800-aa41-02063fdd5f29",
          "indexDefinition": {
            "description": "Maximum wind speed is over the trigger",
            "id": "00000000-0000-0000-0000-000000000201"
          },
          "monitoringTarget": {
            "geometry": {
              "type": "Point",
              "coordinates": [
                76.96348,
                28.38254
              ]
            },
            "id": "ind__3__ind.12.5.1_1",
            "name": "Gurgaon / Gurgaon"
          },
          "riskPeriodStart": "2024-12-01",
          "riskPeriodEnd": "2024-12-31",
          "triggerUnit": "km/h",
          "triggerValue": 118.0
        }
      ],
      "id": "02eb0a57-3667-40d2-91ed-dece54f6ba21",
      "minPayout": {
        "amount": 100,
        "currency": "INR"
      },
      "name": "01-12-2024 - 31-12-2024",
      "payoutPerUnit": {
        "amount": 0,
        "currency": "INR"
      },
      "quantity": 1.0,
      "sumInsured": {
        "amount": 1000,
        "currency": "INR"
      },
      "totalSumInsured": {
        "amount": 1000,
        "currency": "INR"
      }
    },
    {
      "coverages": [
        {
          "grossWrittenPremiumPct": 0.044,
          "id": "2b8cac7f-97e9-436b-8f62-b13cdc985456",
          "indexDefinition": {
            "description": "Total rainfall over the period  > Trigger",
            "id": "00000000-0000-0000-0000-000000000011"
          },
          "monitoringTarget": {
            "geometry": {
              "type": "Point",
              "coordinates": [
                76.96348,
                28.38254
              ]
            },
            "id": "ind__3__ind.12.5.1_1",
            "name": "Gurgaon / Gurgaon"
          },
          "riskPeriodEnd": "2025-01-31",
          "riskPeriodStart": "2025-01-01",
          "triggerUnit": "mm",
          "triggerValue": 110.0
        },
        {
          "grossWrittenPremiumPct": 0.044,
          "id": "f199223e-e469-43b1-9bad-ee61424d2333",
          "indexDefinition": {
            "description": "Maximum wind speed is over the trigger",
            "id": "00000000-0000-0000-0000-000000000201"
          },
          "monitoringTarget": {
            "geometry": {
              "type": "Point",
              "coordinates": [
                76.96348,
                28.38254
              ]
            },
            "id": "ind__3__ind.12.5.1_1",
            "name": "Gurgaon / Gurgaon"
          },
          "riskPeriodEnd": "2025-01-31",
          "riskPeriodStart": "2025-01-01",
          "triggerUnit": "km/h",
          "triggerValue": 118.0
        }
      ],
      "id": "34a12a1c-2905-45c1-9b5d-8ad5b8890153",
      "minPayout": {
        "amount": 100,
        "currency": "INR"
      },
      "name": "01-01-2025 - 31-01-2025",
      "payoutPerUnit": {
        "amount": 0,
        "currency": "INR"
      },
      "quantity": 1.0,
      "sumInsured": {
        "amount": 1000,
        "currency": "INR"
      },
      "totalSumInsured": {
        "amount": 1000,
        "currency": "INR"
      }
    },
    ...
  ]
}

## Accept Quote and Convert to Policy

After creating a quote, you can convert it into a policy by using the endpoint `/quotes/{quoteId}` with the `PATCH` method.
This action will convert quote into policy draft and returns newly created policy.

**Example Request:**

```http
PATCH /quotes/{quoteId} HTTP/1.1
Host: https://project1.riskwolf.com
x-tenant-id: [Your-Tenant-ID]

Example Response:

{
  "expiryDate": "2025-11-30",
  "externalRef": null,
  "grossPremiumAmount": {
    "amount": 528,
    "currency": "INR"
  },
  "id": "0056c39d-1066-4e7f-8888-d437a09ac612",
  "inceptionDate": "2024-12-01",
  "lineItems": [
    {
      "coverages": [
        {
          "grossWrittenPremiumPct": 0.044,
          "id": "6b8ecb89-de4c-4a98-9c1e-311d3d4a0c02",
          "indexDefinition": {
            "description": "Total rainfall over the period  > Trigger",
            "id": "00000000-0000-0000-0000-000000000011"
          },
          "monitoringTarget": {
            "geometry": {
              "type": "Point",
              "coordinates": [
                76.96348,
                28.38254
              ]
            },
            "id": "ind__3__ind.12.5.1_1",
            "name": "Gurgaon / Gurgaon"
          },
          "riskPeriodStart": "2024-12-01",
          "riskPeriodEnd": "2024-12-31",
          "triggerUnit": "mm",
          "triggerValue": 70.0
        },
        {
          "grossWrittenPremiumPct": 0.044,
          "id": "fea756e2-f6f0-4800-aa41-02063fdd5f29",
          "indexDefinition": {
            "description": "Maximum wind speed is over the trigger",
            "id": "00000000-0000-0000-0000-000000000201"
          },
          "monitoringTarget": {
            "geometry": {
              "type": "Point",
              "coordinates": [
                76.96348,
                28.38254
              ]
            },
            "id": "ind__3__ind.12.5.1_1",
            "name": "Gurgaon / Gurgaon"
          },
          "riskPeriodStart": "2024-12-01",
          "riskPeriodEnd": "2024-12-31",
          "triggerUnit": "km/h",
          "triggerValue": 118.0
        }
      ],
      "id": "0d083500-8c28-4cc4-af6e-85111878f2ef",
      "minPayout": {
        "amount": 1000,
        "currency": "INR"
      },
      "name": "01-12-2024 - 31-12-2024",
      "payoutPerUnit": {
        "amount": 0,
        "currency": "INR"
      },
      "quantity": 1.0,
      "sumInsured": {
        "amount": 1000,
        "currency": "INR"
      },
      "totalSumInsured": {
        "amount": 1000,
        "currency": "INR"
      }
    },
    {
      "coverages": [
        {
          "grossWrittenPremiumPct": 0.044,
          "id": "2b8cac7f-97e9-436b-8f62-b13cdc985456",
          "indexDefinition": {
            "description": "Total rainfall over the period  > Trigger",
            "id": "00000000-0000-0000-0000-000000000011"
          },
          "monitoringTarget": {
            "geometry": {
              "type": "Point",
              "coordinates": [
                76.96348,
                28.38254
              ]
            },
            "id": "ind__3__ind.12.5.1_1",
            "name": "Gurgaon / Gurgaon"
          },
          "riskPeriodEnd": "2025-01-31",
          "riskPeriodStart": "2025-01-01",
          "triggerUnit": "mm",
          "triggerValue": 110.0
        },
        {
          "grossWrittenPremiumPct": 0.044,
          "id": "f199223e-e469-43b1-9bad-ee61424d2333",
          "indexDefinition": {
            "description": "Maximum wind speed is over the trigger",
            "id": "00000000-0000-0000-0000-000000000201"
          },
          "monitoringTarget": {
            "geometry": {
              "type": "Point",
              "coordinates": [
                76.96348,
                28.38254
              ]
            },
            "id": "ind__3__ind.12.5.1_1",
            "name": "Gurgaon / Gurgaon"
          },
          "riskPeriodEnd": "2025-01-30",
          "riskPeriodStart": "2024-12-31",
          "triggerUnit": "km/h",
          "triggerValue": 118.0
        }
      ],
      "id": "1043af4f-38b8-460c-943f-1c80fb54b552",
      "minPayout": {
        "amount": 1000,
        "currency": "INR"
      },
      "name": "01-01-2025 - 31-01-2025",
      "payoutPerUnit": {
        "amount": 0,
        "currency": "INR"
      },
      "quantity": 1.0,
      "sumInsured": {
        "amount": 1000,
        "currency": "INR"
      },
      "totalSumInsured": {
        "amount": 1000,
        "currency": "INR"
      }
    },
    ...
  ],
  "name": "01-12-2024 - 30-11-2025",
  "status": "CREATED",
  "totalSumInsured": {
    "amount": 12000,
    "currency": "INR"
  }
}


## Reject Quote

If a quote is not accepted, you can reject it using `/quotes/{quoteId}/reject`. This is useful for housekeeping and to mark quotes that are no longer relevant.

**Example Request:**

```http
DELETE /quotes/quote-id-1/reject HTTP/1.1
Host: https://project1.riskwolf.com
x-tenant-id: [Your-Tenant-ID]

Get Quote

Retrieves details of a specific quote using its unique identifier. This endpoint returns comprehensive information about the quote, including monitoring targets, risk periods, and sum insured details.

Endpoint: GET /quotes/{quoteId}

Parameters:

  • quoteId (path parameter): The unique identifier of the quote to retrieve

Headers:

  • x-tenant-id: Your tenant identifier
  • Authorization: Bearer token for authentication

Query Parameters:

  • page (optional): Page number for pagination (default: 0)
  • size (optional): Number of items per page (default: 20)

Example Request:

GET /quotes/{quoteId} HTTP/1.1
Host: https://project1.riskwolf.com
Authorization: Bearer {your-token}
x-tenant-id: [Your-Tenant-ID]

Response:

{
  "id": "quote-id",
  "status": "DRAFT",
  "monitoringTargetId": "target-id",
  "riskPeriodFrom": "2024-01-01",
  "riskPeriodTo": "2024-12-31",
  "sumInsuredForLineItem": {
    "amount": 1000,
    "currency": "INR"
  }
}

List Quotes

Retrieves a list of all quotes associated with your tenant. This endpoint is useful for tracking and managing multiple quotes.

Endpoint: GET /quotes

Headers:

  • x-tenant-id: Your tenant identifier
  • Authorization: Bearer token for authentication

Query Parameters:

  • page (optional): Page number for pagination (default: 0)
  • size (optional): Number of items per page (default: 20)

Example Request:

GET /quotes HTTP/1.1
Host: https://project1.riskwolf.com
Authorization: Bearer {your-token}
x-tenant-id: [Your-Tenant-ID]

Response:

{
  "content": [
    {
      "id": "quote-id-1",
      "status": "DRAFT",
      "monitoringTargetId": "target-id-1",
      "riskPeriodFrom": "2024-01-01",
      "riskPeriodTo": "2024-12-31"
    },
    {
      "id": "quote-id-2",
      "status": "ACCEPTED",
      "monitoringTargetId": "target-id-2",
      "riskPeriodFrom": "2024-02-01",
      "riskPeriodTo": "2025-01-31"
    }
  ],
  "totalElements": 2,
  "totalPages": 1,
  "size": 20,
  "number": 0
}