Price a quote

A quote is the insurer's firm price for your customer's answers. Your customer can buy it until it expires.

1. Request the quotelink

curl -X POST https://insure-api.netapps.ng/api/v1/quotes \
  -H "x-api-key: $INSURETECH_API_KEY" \
  -H "Idempotency-Key: 3f0e6a52-8c1b-4d7e-9a41-2b6c5d8e7f90" \
  -H "X-Request-Id: order_10293" \
  -H "Content-Type: application/json" \
  -d '{
    "providerId": "66f1c2a9e4b0d3a1c8e7f512",
    "productId": "prod_motor_comprehensive_v3",
    "formId": "form_motor_quote",
    "formVersion": 1,
    "formData": {
      "vehicle": {
        "make": "TOYOTA",
        "age": 4,
        "sumInsured": { "amountMinor": 600000000, "currency": "NGN" }
      }
    },
    "channel": "web"
  }'

Add configuration when your customer chose a variant or add-ons from the product's config.

2. Show the pricelink

FieldWhat to do with it
quote.quoteIdKeep it. You buy the quote with it.
quote.totalMinor, quote.currencyThe full price. 4037500 NGN is ₦40,375.00.
quote.expiresAtBuy before this time, or quote again.
quote.usableWhether the quote can still be bought.
quote.document.breakdownBase premium, add-ons, discounts, fees and taxes, to show your customer.
quote.document.paymentOptionsInstallment schedules, when the insurer offers them.

3. Handle background pricinglink

Some insurers price in the background. Then you get 202, quote.usable is false and quote.document.status is PENDING. Either:

  • wait for the quote.completed webhook, or
  • poll GET /quotes/{providerId}/{quoteId} until usable is true.

Buying a pending quote is 409 QUOTE_PENDING.

Fix what the insurer refuseslink

AnswerWhat to do
422 VALIDATION_FAILED with fieldErrorsShow each error next to its field, then quote again with a new Idempotency-Key.
409 PRODUCT_NOT_PURCHASABLEThe insurer is not available to your business in this environment. details.reasons says why. Offer another product.
503 MAINTENANCEThe insurer cannot be called in this environment. Contact support.

Nextlink

Take payment and buy the quote.