📖
KASKO Integration: Webapp & API Documentation
  • 👋Welcome to KASKO Integration: Webapp & API Documentation
  • Integration Methods
  • Keys
  • Testing
  • KASKO JS
    • KASKO JS
  • REST API
    • Introduction
    • Getting started
    • Resources
      • Quote
      • Offer
      • Payment
      • Policy
    • Data API
  • Webhooks
    • Webhooks
Powered by GitBook
On this page
  • Quote object
  • Create a quote
  • Create a quote
  1. REST API
  2. Resources

Quote

Quote object

Name
Type
Description

token

String

Generated quote token.

gross_payment_amount

Integer

Gross payment amount calculated from the pricing.

extra_data

Object

Object with extra data provided from the pricing.

Quote object example
{
    "token": "<QUOTE-TOKEN>",
    "gross_payment_amount": 275000,
    "extra_data": {
        "gross_premium": 275000,
        "premium_tax": 25000,
        "net_premium": 250000,
        "tax_rate": 0.1
    }
}

Create a quote

Create a quote

POST https://api.qa-u.eu1.kaskoqa.com/quotes

Query Parameters

Name
Type
Description

key*

String

Public key

Headers

Name
Type
Description

Accept*

String

application/vnd.kasko.v3+json

Request Body

Name
Type
Description

item_id*

String

Item ID

subscription_plan_id*

String

Subscription plan ID

integration_id*

String

Integration ID

integration_version_id

String

Integration version ID. Can be used instead of live_integration parameter to indicate specific version to use

product_version_id

String

Product version ID. Can be used instead of live_product parameter to indicate specific version to use

data*

JSON

Product-specific quote data fields

live_integration

String

Indicates whether to load most recent published or unpublished integration

live_integration

String

Indicates whether to load most recent published or unpublished product

{
    "token": "<QUOTE-TOKEN>",
    "gross_payment_amount": 0,
    "extra_data": {
        "gross_premium": 0,
        "premium_tax": 0,
        "net_premium": 0,
        "tax_rate": 0.1
    }
}

{
    "status": "Bad Request",
    "message": "Data validation failed.",
    "errors": [
    ...
        {
            "code": "invalid_value",
            "field": "invalid_field_name"
        }
    ...
    ]
{
    "status": "Bad Request",
    "message": "Brief description"
}

This response is returned in case any of the provided resources such as the integration, subscription plan or pricing logic cannot be located within the platform.

Some examples of such cases are:

{
    "status": "Not Found",
    "message": "Subscription plan with id - pp_a6c37bc94f56cafaa7fcc02d77111 not found."
}
{
    "status": "Not Found",
    "message": "Integration - in_e2b0a5a90e0595939c2b1978e5ccf product - ins_97980026870abce8b812668b2d11 not found."
}

This response indicates that a conflict condition is met. In such cases, during the execution of the quote request, pricing calculation logic creation is in process.

{
    "status": "Conflict",
    "message": "Pricing calculation creation is in progress."
}

This response indicates that the quote calculation resulted in knockout condition.

{
    "status": "Unprocessable Entity",
    "message": "knockout"
}

This response indicates that quote calculation failed and server cannot handle the request. In such cases either the third party quote integration execution or the calculator client failed execution.

Example request
curl --location 'https://api.eu1.kaskocloud.com/quotes?key=pk_test_2jngq6d7GRmxQ58w0yVKW3PBrJXbEvoM' \
--header 'Accept: application/vnd.kasko.v3+json' \
--header 'Content-Type: application/json' \
--data '{
  "data": {
    "insured_sum": 10000
  },
  "item_id": "ins_97980026870abce8b812668b2d09",
  "subscription_plan_id": "pp_a6c37bc94f56cafaa7fcc02d771a0",
  "integration_id": "in_e2b0a5a90e0595939c2b1978e5ccf",
    "live_product": "false",
    "live_integration": "false",
  "key": "pk_test_2jngq6d7GRmxQ58w0yVKW3PBrJXbEvoM"
}'

Last updated 1 year ago