XCover API (v2 – 2.77.4)

Download OpenAPI specification:Download

Documentation Home

Quotes

Opt-out

Report conversion of the main product without ancillary insurance products

path Parameters
partner_id
required
string
quote_package_id
required
string
header Parameters
x-idempotency-key
string

Idempotency key

Request Body schema: application/json
partner_metadata
object (Partner metadata)

This field takes partner-specific fields. The keys represent field names and can be any arbitrary string.The values must be one of the simple JSON types: string, boolean, number or null. It’s impossible to use complex types i.e. objects and arrays.

Responses

204

Request Succeeded

404

Unknown partner or booking, or booking does not belong to the partner

409

Duplicated request

422
423

Resource is locked

post/partners/{partner_id}/bookings/{quote_package_id}/opt_out
https://api.xcover.com/x/partners/{partner_id}/bookings/{quote_package_id}/opt_out

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "partner_metadata": { }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "type": "string",
  • "message": "string",
  • "code": "string",
  • "href": "string",
  • "errors":
    {
    }
}

Create quote

Create a quote with provided parameters

path Parameters
partner_id
required
string
query Parameters
fast_quote
boolean

Fast quote calculation.Quote will be calculated, but results won't be stored.

active_only
boolean

Select only active policies if testing API key is used.

include_extra_fields
boolean

Include extra_fields in Fast quote response. Shall be used in conjunction with "fast_quote"

Request Body schema: application/json
currency
required
string (Currency)
Enum: "AED" "ARS" "AUD" "BDT" "BGN" "BHD" "BRL" "BSD" "CAD" "CHF" "CLP" "CNY" "COP" "CRC" "CZK" "DKK" "EGP" "EUR" "GBP" "GTQ" "HKD" "HNL" "HRK" "HUF" "IDR" "ILS" "INR" "ISK" "JOD" "JPY" "KRW" "KWD" "KZT" "MAD" "MKD" "MUR" "MXN" "MYR" "NOK" "NZD" "OMR" "PEN" "PHP" "PLN" "QAR" "RON" "RSD" "RUB" "SAR" "SEK" "SGD" "THB" "TRY" "TWD" "UAH" "USD" "UYU" "UZS" "VND" "ZAR" "AFN" "KHR" "XPF" "FJD" "LAK" "MVR" "NGN" "PKR" "LKR"
request
required
Array of objects (PolicyRequest)
customer_country
required
string (Customer country)
Enum: "AF" "AX" "AL" "DZ" "AS" "AD" "AO" "AI" "AQ" "AG" "AR" "AM" "AW" "AU" "AT" "AZ" "BS" "BH" "BD" "BB" "BY" "BE" "BZ" "BJ" "BM" "BT" "BO" "BQ" "BA" "BW" "BV" "BR" "IO" "BN" "BG" "BF" "BI" "CV" "KH" "CM" "CA" "KY" "CF" "TD" "CL" "CN" "CX" "CC" "CO" "KM" "CG" "CD" "CK" "CR" "CI" "HR" "CU" "CW" "CY" "CZ" "DK" "DJ" "DM" "DO" "EC" "EG" "SV" "GQ" "ER" "EE" "SZ" "ET" "FK" "FO" "FJ" "FI" "FR" "GF" "PF" "TF" "GA" "GM" "GE" "DE" "GH" "GI" "GO" "GR" "GL" "GD" "GP" "GU" "GT" "GG" "GN" "GW" "GY" "HT" "HM" "VA" "HN" "HK" "HU" "IS" "IN" "ID" "IR" "IQ" "IE" "IM" "IL" "IT" "JM" "JP" "JE" "JO" "KZ" "KE" "KI" "XK" "KW" "KG" "LA" "LV" "LB" "LS" "LR" "LY" "LI" "LT" "LU" "MO" "MG" "MW" "MY" "MV" "ML" "MT" "MH" "MQ" "MR" "MU" "YT" "MX" "FM" "MD" "MC" "MN" "ME" "MS" "MA" "MZ" "MM" "NA" "NR" "NP" "NL" "NC" "NZ" "NI" "NE" "NG" "NU" "NF" "KP" "MK" "MP" "NO" "OM" "PK" "PW" "PS" "PA" "PG" "PY" "PE" "PH" "PN" "PL" "PT" "PR" "QA" "RE" "RO" "RU" "RW" "BL" "SH" "KN" "LC" "MF" "PM" "VC" "WS" "SM" "ST" "SA" "SN" "RS" "SC" "SL" "SG" "SX" "SK" "SI" "SB" "SO" "ZA" "GS" "KR" "SS" "ES" "LK" "SD" "SR" "SJ" "SE" "CH" "SY" "TW" "TJ" "TZ" "TH" "TL" "TG" "TK" "TO" "TT" "TN" "TR" "TM" "TC" "TV" "UG" "UA" "AE" "GB" "UM" "US" "UY" "UZ" "VU" "VE" "VN" "VG" "VI" "WF" "EH" "YE" "ZM" "ZW"
customer_region
string (Customer region) <= 64 characters Nullable

Country subdivision where the customer resides (as defined by ISO-3166-2, e.g. "AU-NSW", "FR-20R", "IS-1", "JP-13", "SE-T", "SI-099", "US-NY")

customer_language
string (Customer language) [ 1 .. 8 ] characters

Customer's language

customer_email
string <email> (Customer email) <= 254 characters Nullable

Email address of the customer (bq_policy_pii)

customer_ip
string (Customer ip) non-empty Nullable
customer_postcode
string (Customer postcode) <= 32 characters Nullable
customer_id
string <uuid> (Customer id)
partner_subsidiary
string (Partner subsidiary) <= 128 characters Nullable

Subsidiary of the Partner if applicable

partner_transaction_id
string (Partner transaction id) <= 1024 characters Nullable

A unique id of the transaction record (booking, order, etc) on the partner side. It can be used in get booking endpoint, but only if characters are limited to alphanumeric symbols, hyphens and underscores.

partner_customer_id
string (Partner customer id) <= 1024 characters Nullable

Partner's customer ID for this transaction

partner_metadata
object (Partner metadata)

This field can be used to pass custom information along with the quote request. The value of this field should be a JSON object representing key-value pairs with a string, boolean or number as a value. Complex data types like objects or array are not allowed.

policyholder
object (Policyholder) Nullable

Policyholder information (bq_policy_pii)

opt_out
boolean (Opt out)
Default: false

Should the created quote be automatically opted out (no booking can be made)

Responses

200

Fast Quote

201

Quote

404

Unknown partner

422

Quote params are incorrect or quote cannot be processed.

post/partners/{partner_id}/quotes/
https://api.xcover.com/x/partners/{partner_id}/quotes/

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "currency": "AED",
  • "request":
    [
    ],
  • "customer_country": "AF",
  • "customer_region": "string",
  • "customer_language": "string",
  • "customer_email": "[email protected]",
  • "customer_ip": "string",
  • "customer_postcode": "string",
  • "customer_id": "string",
  • "partner_subsidiary": "string",
  • "partner_transaction_id": "string",
  • "partner_customer_id": "string",
  • "partner_metadata": { },
  • "policyholder": { },
  • "opt_out": false
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "currency": "str",
  • "quotes":
    {
    },
  • "errors":
    {
    },
  • "fast_quote_id": "string"
}

Get quote

Get a specific quote information

path Parameters
partner_id
required
string
quote_package_id
required
string

Responses

200
get/partners/{partner_id}/quotes/{quote_package_id}/
https://api.xcover.com/x/partners/{partner_id}/quotes/{quote_package_id}/

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "status": "string",
  • "currency": "str",
  • "total_price": 0,
  • "total_price_formatted": "string",
  • "partner_transaction_id": "string",
  • "created_at": "2023-12-21T00:18:41Z",
  • "updated_at": "2023-12-21T00:18:41Z",
  • "pds_url": "http://example.com",
  • "security_token": "string",
  • "quotes":
    {
    },
  • "bundle_code": "string",
  • "bundle_price": 0,
  • "bundle_content":
    {
    },
  • "bundle_price_formatted": "string",
  • "bundle_discount_percent": 0,
  • "bundle_discount_amount": 0,
  • "bundle_discount_amount_formatted": "string",
  • "errors":
    {
    }
}

Update quote

Update an existing Quote in a Quote Package.

For addition or modification of specific field types(lists or objects) in the "request" field, send the new data appended to the existing data for that particular field type.

path Parameters
partner_id
required
string
quote_package_id
required
string
header Parameters
x-idempotency-key
string

Idempotency key

Request Body schema: application/json
currency
required
string (Currency)
Enum: "AED" "ARS" "AUD" "BDT" "BGN" "BHD" "BRL" "BSD" "CAD" "CHF" "CLP" "CNY" "COP" "CRC" "CZK" "DKK" "EGP" "EUR" "GBP" "GTQ" "HKD" "HNL" "HRK" "HUF" "IDR" "ILS" "INR" "ISK" "JOD" "JPY" "KRW" "KWD" "KZT" "MAD" "MKD" "MUR" "MXN" "MYR" "NOK" "NZD" "OMR" "PEN" "PHP" "PLN" "QAR" "RON" "RSD" "RUB" "SAR" "SEK" "SGD" "THB" "TRY" "TWD" "UAH" "USD" "UYU" "UZS" "VND" "ZAR" "AFN" "KHR" "XPF" "FJD" "LAK" "MVR" "NGN" "PKR" "LKR"
request
Array of objects Nullable
customer_country
required
string (Customer country)
Enum: "AF" "AX" "AL" "DZ" "AS" "AD" "AO" "AI" "AQ" "AG" "AR" "AM" "AW" "AU" "AT" "AZ" "BS" "BH" "BD" "BB" "BY" "BE" "BZ" "BJ" "BM" "BT" "BO" "BQ" "BA" "BW" "BV" "BR" "IO" "BN" "BG" "BF" "BI" "CV" "KH" "CM" "CA" "KY" "CF" "TD" "CL" "CN" "CX" "CC" "CO" "KM" "CG" "CD" "CK" "CR" "CI" "HR" "CU" "CW" "CY" "CZ" "DK" "DJ" "DM" "DO" "EC" "EG" "SV" "GQ" "ER" "EE" "SZ" "ET" "FK" "FO" "FJ" "FI" "FR" "GF" "PF" "TF" "GA" "GM" "GE" "DE" "GH" "GI" "GO" "GR" "GL" "GD" "GP" "GU" "GT" "GG" "GN" "GW" "GY" "HT" "HM" "VA" "HN" "HK" "HU" "IS" "IN" "ID" "IR" "IQ" "IE" "IM" "IL" "IT" "JM" "JP" "JE" "JO" "KZ" "KE" "KI" "XK" "KW" "KG" "LA" "LV" "LB" "LS" "LR" "LY" "LI" "LT" "LU" "MO" "MG" "MW" "MY" "MV" "ML" "MT" "MH" "MQ" "MR" "MU" "YT" "MX" "FM" "MD" "MC" "MN" "ME" "MS" "MA" "MZ" "MM" "NA" "NR" "NP" "NL" "NC" "NZ" "NI" "NE" "NG" "NU" "NF" "KP" "MK" "MP" "NO" "OM" "PK" "PW" "PS" "PA" "PG" "PY" "PE" "PH" "PN" "PL" "PT" "PR" "QA" "RE" "RO" "RU" "RW" "BL" "SH" "KN" "LC" "MF" "PM" "VC" "WS" "SM" "ST" "SA" "SN" "RS" "SC" "SL" "SG" "SX" "SK" "SI" "SB" "SO" "ZA" "GS" "KR" "SS" "ES" "LK" "SD" "SR" "SJ" "SE" "CH" "SY" "TW" "TJ" "TZ" "TH" "TL" "TG" "TK" "TO" "TT" "TN" "TR" "TM" "TC" "TV" "UG" "UA" "AE" "GB" "UM" "US" "UY" "UZ" "VU" "VE" "VN" "VG" "VI" "WF" "EH" "YE" "ZM" "ZW"
customer_region
string (Customer region) <= 64 characters Nullable

Country subdivision where the customer resides (as defined by ISO-3166-2, e.g. "AU-NSW", "FR-20R", "IS-1", "JP-13", "SE-T", "SI-099", "US-NY")

customer_language
string (Customer language) [ 1 .. 8 ] characters

Customer's language

customer_email
string <email> (Customer email) <= 254 characters Nullable

Email address of the customer (bq_policy_pii)

customer_ip
string (Customer ip) non-empty Nullable
customer_postcode
string (Customer postcode) <= 32 characters Nullable
customer_id
string <uuid> (Customer id)
partner_subsidiary
string (Partner subsidiary) <= 128 characters Nullable

Subsidiary of the Partner if applicable

partner_transaction_id
string (Partner transaction id) <= 1024 characters Nullable

A unique id of the transaction record (booking, order, etc) on the partner side. It can be used in get booking endpoint, but only if characters are limited to alphanumeric symbols, hyphens and underscores.

partner_customer_id
string (Partner customer id) <= 1024 characters Nullable

Partner's customer ID for this transaction

partner_metadata
object (Partner metadata)

This field can be used to pass custom information along with the quote request. The value of this field should be a JSON object representing key-value pairs with a string, boolean or number as a value. Complex data types like objects or array are not allowed.

policyholder
object (Policyholder) Nullable

Policyholder information (bq_policy_pii)

preview
boolean (Preview)
Default: false

When preview is True, the update will only be displayed but not saved.

Responses

200
404

Unknown partner

409

Duplicated request

422

Quote params are incorrect or quote cannot be processed.

423

Resource is locked

patch/partners/{partner_id}/quotes/{quote_package_id}/
https://api.xcover.com/x/partners/{partner_id}/quotes/{quote_package_id}/

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "currency": "AED",
  • "request":
    [
    ],
  • "customer_country": "AF",
  • "customer_region": "string",
  • "customer_language": "string",
  • "customer_email": "[email protected]",
  • "customer_ip": "string",
  • "customer_postcode": "string",
  • "customer_id": "string",
  • "partner_subsidiary": "string",
  • "partner_transaction_id": "string",
  • "partner_customer_id": "string",
  • "partner_metadata": { },
  • "policyholder": { },
  • "preview": false
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "status": "string",
  • "currency": "str",
  • "total_price": 0,
  • "total_price_formatted": "string",
  • "partner_transaction_id": "string",
  • "created_at": "2023-12-21T00:18:41Z",
  • "updated_at": "2023-12-21T00:18:41Z",
  • "pds_url": "http://example.com",
  • "security_token": "string",
  • "quotes":
    {
    },
  • "bundle_code": "string",
  • "bundle_price": 0,
  • "bundle_content":
    {
    },
  • "bundle_price_formatted": "string",
  • "bundle_discount_percent": 0,
  • "bundle_discount_amount": 0,
  • "bundle_discount_amount_formatted": "string",
  • "errors":
    {
    }
}

Add a quote

Add quotes to existing package

path Parameters
partner_id
required
string
quote_package_id
required
string
header Parameters
x-idempotency-key
string

Idempotency key

Request Body schema: application/json
request
required
Array of objects

Responses

201

Quote added

404

Unknown partner or package id

409

Duplicated request

422

Request params are incorrect or quote cannot be added

423

Resource is locked

post/partners/{partner_id}/quotes/{quote_package_id}/add/
https://api.xcover.com/x/partners/{partner_id}/quotes/{quote_package_id}/add/

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "request":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "status": "string",
  • "currency": "str",
  • "total_price": 0,
  • "total_price_formatted": "string",
  • "partner_transaction_id": "string",
  • "created_at": "2023-12-21T00:18:41Z",
  • "updated_at": "2023-12-21T00:18:41Z",
  • "pds_url": "http://example.com",
  • "security_token": "string",
  • "quotes":
    {
    },
  • "bundle_code": "string",
  • "bundle_price": 0,
  • "bundle_content":
    {
    },
  • "bundle_price_formatted": "string",
  • "bundle_discount_percent": 0,
  • "bundle_discount_amount": 0,
  • "bundle_discount_amount_formatted": "string",
  • "errors":
    {
    }
}

Delete quote

Delete quotes from existing package

path Parameters
partner_id
required
string
quote_package_id
required
string
header Parameters
x-idempotency-key
string

Idempotency key

Request Body schema: application/json
quotes
required
Array of objects (QuoteID)

Responses

200

Quote deleted

404

Unknown partner or quote package

409

Duplicated request

422

Request params are incorrect or quote cannot be deleted

423

Resource is locked

post/partners/{partner_id}/quotes/{quote_package_id}/delete/
https://api.xcover.com/x/partners/{partner_id}/quotes/{quote_package_id}/delete/

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "quotes":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "status": "string",
  • "currency": "str",
  • "total_price": 0,
  • "total_price_formatted": "string",
  • "partner_transaction_id": "string",
  • "created_at": "2023-12-21T00:18:41Z",
  • "updated_at": "2023-12-21T00:18:41Z",
  • "pds_url": "http://example.com",
  • "security_token": "string",
  • "quotes":
    {
    },
  • "bundle_code": "string",
  • "bundle_price": 0,
  • "bundle_content":
    {
    },
  • "bundle_price_formatted": "string",
  • "bundle_discount_percent": 0,
  • "bundle_discount_amount": 0,
  • "bundle_discount_amount_formatted": "string",
  • "errors":
    {
    }
}

Bookings

List booking

Lists all partner bookings filtered by the query parameters. Datetime fields need to use url-encoded ISO 8601 date format.

path Parameters
partner_id
required
string
query Parameters
id
string
customer__email
string
customer__email__startswith
string
customer__phone
string
customer__phone__startswith
string
created_at__date__lte
string
created_at__date__gte
string
updated_at__date__lte
string
updated_at__date__gte
string
status
string
updated_before
string

ISO8601 format datetime. YYYY-MM-DDThh:mm:ss[.SSS]+|-hh:mm

updated_after
string

ISO8601 format datetime. YYYY-MM-DDThh:mm:ss[.SSS]+|-hh:mm

created_before
string

ISO8601 format datetime. YYYY-MM-DDThh:mm:ss[.SSS]+|-hh:mm

created_after
string

ISO8601 format datetime. YYYY-MM-DDThh:mm:ss[.SSS]+|-hh:mm

force_policyholder_update
string
limit
integer

Number of results to return per page.

offset
integer

The initial index from which to return the results.

Responses

200
404

Unknown partner.

422
get/partners/{partner_id}/bookings/
https://api.xcover.com/x/partners/{partner_id}/bookings/

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "count": 0,
  • "previous": "http://example.com",
  • "results":
    [
    ]
}

Get booking

Get booking details for the provided quote package id or partner_transaction_id.

path Parameters
partner_id
required
string
quote_package_id
required
string

Booking id (INS-number generated by XCover API) or partner_transaction_id.

Responses

200

Successful request

404

Unknown partner or booking

get/partners/{partner_id}/bookings/{quote_package_id}/
https://api.xcover.com/x/partners/{partner_id}/bookings/{quote_package_id}/

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "status": "string",
  • "currency": "str",
  • "total_price": 0,
  • "total_price_formatted": "string",
  • "partner_transaction_id": "string",
  • "created_at": "2023-12-21T00:18:41Z",
  • "updated_at": "2023-12-21T00:18:41Z",
  • "pds_url": "http://example.com",
  • "security_token": "string",
  • "quotes":
    [
    ],
  • "coi":
    {},
  • "account_url": "http://example.com",
  • "sign_up_url": "http://example.com",
  • "policyholder":
    {
    },
  • "total_tax": 0,
  • "total_tax_formatted": "string",
  • "total_premium": 0,
  • "total_premium_formatted": "string",
  • "fnol_link": "string",
  • "partner":
    {
    },
  • "partner_metadata": { },
  • "customer_language": "string"
}

Create booking

Convert a specific quote to booking

path Parameters
partner_id
required
string
quote_package_id
required
string
header Parameters
x-idempotency-key
string

Idempotency key

Request Body schema: application/json
quotes
required
Array of objects (BookingRequestQuote)
policyholder
required
object (Policyholder)
require_payment_confirmation
boolean (Require payment confirmation)
partner_transaction_id
string (Partner transaction id) non-empty
xpay_charge_id
string (Xpay charge id) non-empty

Deprecated. Please use the payment_details.

xpay_customer_token_id
string (Xpay customer token id) non-empty

Deprecated. Please use the payment_details.

payment_details
object (PaymentDetails)

Responses

200

Successful booking

400

Request format is invalid

404

Unknown partner

409

Duplicated request

422

Request data is invalid

423

Resource is locked

post/partners/{partner_id}/bookings/{quote_package_id}/
https://api.xcover.com/x/partners/{partner_id}/bookings/{quote_package_id}/

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "quotes":
    [
    ],
  • "policyholder":
    {
    },
  • "require_payment_confirmation": true,
  • "partner_transaction_id": "string",
  • "xpay_charge_id": "string",
  • "xpay_customer_token_id": "string",
  • "payment_details":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "status": "string",
  • "currency": "str",
  • "total_price": 0,
  • "total_price_formatted": "string",
  • "partner_transaction_id": "string",
  • "created_at": "2023-12-21T00:18:41Z",
  • "updated_at": "2023-12-21T00:18:41Z",
  • "pds_url": "http://example.com",
  • "security_token": "string",
  • "quotes":
    [
    ],
  • "coi":
    {},
  • "account_url": "http://example.com",
  • "sign_up_url": "http://example.com",
  • "policyholder":
    {
    },
  • "total_tax": 0,
  • "total_tax_formatted": "string",
  • "total_premium": 0,
  • "total_premium_formatted": "string",
  • "fnol_link": "string"
}

Change owner

Change the owner of a booking to another user.

path Parameters
partner_id
required
string
quote_package_id
required
string
header Parameters
x-idempotency-key
string

Idempotency key

Request Body schema: application/json
first_name
required
string (First name) [ 1 .. 255 ] characters

First name

last_name
required
string (Last name) <= 255 characters Nullable

Last name

email
string (Email) Nullable

Email address

phone
string (Phone) Nullable

Phone number

address1
string (Address1) <= 256 characters Nullable

Address line 1

address2
string (Address2) <= 256 characters Nullable

Address line 2

postcode
string (Postcode) <= 32 characters Nullable

Postcode

company
string (Company) <= 256 characters Nullable

Company name

company_reg_id
string (Company reg id) <= 64 characters Nullable

Company registration ID

middle_name
string (Middle name) <= 256 characters Nullable
country
required
string (Country)
Enum: "AF" "AX" "AL" "DZ" "AS" "AD" "AO" "AI" "AQ" "AG" "AR" "AM" "AW" "AU" "AT" "AZ" "BS" "BH" "BD" "BB" "BY" "BE" "BZ" "BJ" "BM" "BT" "BO" "BQ" "BA" "BW" "BV" "BR" "IO" "BN" "BG" "BF" "BI" "CV" "KH" "CM" "CA" "KY" "CF" "TD" "CL" "CN" "CX" "CC" "CO" "KM" "CG" "CD" "CK" "CR" "CI" "HR" "CU" "CW" "CY" "CZ" "DK" "DJ" "DM" "DO" "EC" "EG" "SV" "GQ" "ER" "EE" "SZ" "ET" "FK" "FO" "FJ" "FI" "FR" "GF" "PF" "TF" "GA" "GM" "GE" "DE" "GH" "GI" "GO" "GR" "GL" "GD" "GP" "GU" "GT" "GG" "GN" "GW" "GY" "HT" "HM" "VA" "HN" "HK" "HU" "IS" "IN" "ID" "IR" "IQ" "IE" "IM" "IL" "IT" "JM" "JP" "JE" "JO" "KZ" "KE" "KI" "XK" "KW" "KG" "LA" "LV" "LB" "LS" "LR" "LY" "LI" "LT" "LU" "MO" "MG" "MW" "MY" "MV" "ML" "MT" "MH" "MQ" "MR" "MU" "YT" "MX" "FM" "MD" "MC" "MN" "ME" "MS" "MA" "MZ" "MM" "NA" "NR" "NP" "NL" "NC" "NZ" "NI" "NE" "NG" "NU" "NF" "KP" "MK" "MP" "NO" "OM" "PK" "PW" "PS" "PA" "PG" "PY" "PE" "PH" "PN" "PL" "PT" "PR" "QA" "RE" "RO" "RU" "RW" "BL" "SH" "KN" "LC" "MF" "PM" "VC" "WS" "SM" "ST" "SA" "SN" "RS" "SC" "SL" "SG" "SX" "SK" "SI" "SB" "SO" "ZA" "GS" "KR" "SS" "ES" "LK" "SD" "SR" "SJ" "SE" "CH" "SY" "TW" "TJ" "TZ" "TH" "TL" "TG" "TK" "TO" "TT" "TN" "TR" "TM" "TC" "TV" "UG" "UA" "AE" "GB" "UM" "US" "UY" "UZ" "VU" "VE" "VN" "VG" "VI" "WF" "EH" "YE" "ZM" "ZW"

Country of residence

age
integer (Age) Nullable

Age

city
string (City) <= 128 characters Nullable

City of residence

region
string (Region) <= 64 characters Nullable

Region

secondary_email
string (Secondary email) non-empty Nullable

Secondary email address

birth_date
string <date> (Birth date) Nullable

Date of birth

tax_payer_id
string (Tax payer id) <= 32 characters Nullable

Tax payer ID

Responses

200

Successful request

409

Duplicated request

422
423

Resource is locked

patch/partners/{partner_id}/bookings/{quote_package_id}/change_owner
https://api.xcover.com/x/partners/{partner_id}/bookings/{quote_package_id}/change_owner

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "first_name": "string",
  • "last_name": "string",
  • "email": "string",
  • "phone": "string",
  • "address1": "string",
  • "address2": "string",
  • "postcode": "string",
  • "company": "string",
  • "company_reg_id": "string",
  • "middle_name": "string",
  • "country": "AF",
  • "age": 0,
  • "city": "string",
  • "region": "string",
  • "secondary_email": "string",
  • "birth_date": "2023-12-21",
  • "tax_payer_id": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "status": "string",
  • "currency": "str",
  • "total_price": 0,
  • "total_price_formatted": "string",
  • "partner_transaction_id": "string",
  • "created_at": "2023-12-21T00:18:41Z",
  • "updated_at": "2023-12-21T00:18:41Z",
  • "pds_url": "http://example.com",
  • "security_token": "string",
  • "quotes":
    [
    ],
  • "coi":
    {},
  • "account_url": "http://example.com",
  • "sign_up_url": "http://example.com",
  • "policyholder":
    {
    },
  • "total_tax": 0,
  • "total_tax_formatted": "string",
  • "total_premium": 0,
  • "total_premium_formatted": "string",
  • "fnol_link": "string",
  • "partner":
    {
    },
  • "partner_metadata": { },
  • "customer_language": "string"
}

Confirm booking

Confirms booking in two-step booking scenario. In this case require_payment_confirmation flag in the Create booking request needs to be set.

path Parameters
partner_id
required
string
quote_package_id
required
string
header Parameters
x-idempotency-key
string

Idempotency key

Request Body schema: application/json
payment_details
object (PaymentDetails)
xpay_charge_id
string (Xpay charge id) non-empty

Deprecated, moved into payment_details.

Responses

201
409

Duplicated request

422
423

Resource is locked

put/partners/{partner_id}/bookings/{quote_package_id}/confirm
https://api.xcover.com/x/partners/{partner_id}/bookings/{quote_package_id}/confirm

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "payment_details":
    {
    },
  • "xpay_charge_id": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "status": "string",
  • "currency": "str",
  • "total_price": 0,
  • "total_price_formatted": "string",
  • "partner_transaction_id": "string",
  • "created_at": "2023-12-21T00:18:41Z",
  • "updated_at": "2023-12-21T00:18:41Z",
  • "pds_url": "http://example.com",
  • "security_token": "string",
  • "quotes":
    [
    ],
  • "coi":
    {},
  • "account_url": "http://example.com",
  • "sign_up_url": "http://example.com",
  • "policyholder":
    {
    },
  • "total_tax": 0,
  • "total_tax_formatted": "string",
  • "total_premium": 0,
  • "total_premium_formatted": "string",
  • "fnol_link": "string"
}

Manually trigger email

Manually triggers policy lifecycle email to be sent to the customer

path Parameters
partner_id
required
string
quote_package_id
required
string
header Parameters
x-idempotency-key
string

Idempotency key

Request Body schema: application/json
email
string (Email) Nullable

Email address

event
string (Event) Nullable
Enum: "BOOKING_CREATED" "BOOKING_CANCELLED"

Defines what email to trigger

Responses

202

Email queued successfully

404

Unknown partner or booking, or booking does not belong to the partner

409

Duplicated request

422
423

Resource is locked

post/partners/{partner_id}/bookings/{quote_package_id}/send_email
https://api.xcover.com/x/partners/{partner_id}/bookings/{quote_package_id}/send_email

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "email": "string",
  • "event": "BOOKING_CREATED"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "type": "string",
  • "message": "string",
  • "code": "string",
  • "href": "string",
  • "errors":
    {
    }
}

Instant booking

Make quote and booking in a single step

path Parameters
partner_id
required
string
query Parameters
active_only
boolean

Select only active policies if testing API key is used.

header Parameters
x-idempotency-key
string

Idempotency key

Request Body schema: application/json
partner_transaction_id
string (Partner transaction id) <= 1024 characters Nullable

A unique id of the transaction record (booking, order, etc) on the partner side. It can be used in get booking endpoint, but only if characters are limited to alphanumeric symbols, hyphens and underscores.

policyholder
required
object (Policyholder)
customer_ip
string (Customer ip) non-empty Nullable
partner_customer_id
string (Partner customer id) <= 1024 characters Nullable

Partner's customer ID for this transaction

xpay_charge_id
string (Xpay charge id) non-empty

Deprecated, moved into payment_details.

payment_details
object (PaymentDetails)
request
required
Array of objects (BookingPolicyRequest)
partner_subsidiary
string (Partner subsidiary) <= 128 characters Nullable

Subsidiary of the Partner if applicable

partner_metadata
object (Partner metadata)

This field can be used to pass custom information along with the quote request. The value of this field should be a JSON object representing key-value pairs with a string, boolean or number as a value. Complex data types like objects or array are not allowed.

fast_quote_id
string <uuid> (Fast quote id)
customer_language
string (Customer language) [ 1 .. 8 ] characters

Customer's language

customer_id
string <uuid> (Customer id)
currency
required
string (Currency)
Enum: "AED" "ARS" "AUD" "BDT" "BGN" "BHD" "BRL" "BSD" "CAD" "CHF" "CLP" "CNY" "COP" "CRC" "CZK" "DKK" "EGP" "EUR" "GBP" "GTQ" "HKD" "HNL" "HRK" "HUF" "IDR" "ILS" "INR" "ISK" "JOD" "JPY" "KRW" "KWD" "KZT" "MAD" "MKD" "MUR" "MXN" "MYR" "NOK" "NZD" "OMR" "PEN" "PHP" "PLN" "QAR" "RON" "RSD" "RUB" "SAR" "SEK" "SGD" "THB" "TRY" "TWD" "UAH" "USD" "UYU" "UZS" "VND" "ZAR" "AFN" "KHR" "XPF" "FJD" "LAK" "MVR" "NGN" "PKR" "LKR"

Responses

200

Successful booking

400

Request format is invalid

404

Unknown partner

409

Duplicated request

422

Request data is invalid

423

Resource is locked

post/partners/{partner_id}/instant_booking/
https://api.xcover.com/x/partners/{partner_id}/instant_booking/

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "partner_transaction_id": "string",
  • "policyholder":
    {
    },
  • "customer_ip": "string",
  • "partner_customer_id": "string",
  • "xpay_charge_id": "string",
  • "payment_details":
    {
    },
  • "request":
    [
    ],
  • "partner_subsidiary": "string",
  • "partner_metadata": { },
  • "fast_quote_id": "string",
  • "customer_language": "string",
  • "customer_id": "string",
  • "currency": "AED"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "status": "string",
  • "currency": "str",
  • "total_price": 0,
  • "total_price_formatted": "string",
  • "partner_transaction_id": "string",
  • "created_at": "2023-12-21T00:18:41Z",
  • "updated_at": "2023-12-21T00:18:41Z",
  • "pds_url": "http://example.com",
  • "security_token": "string",
  • "quotes":
    [
    ],
  • "coi":
    {},
  • "account_url": "http://example.com",
  • "sign_up_url": "http://example.com",
  • "policyholder":
    {
    },
  • "total_tax": 0,
  • "total_tax_formatted": "string",
  • "total_premium": 0,
  • "total_premium_formatted": "string",
  • "fnol_link": "string"
}

Modifications

Booking modification

Modifies booking. This endpoint can potentially trigger premium change.

path Parameters
partner_id
required
string
quote_package_id
required
string
header Parameters
x-idempotency-key
string

Idempotency key

Request Body schema: application/json
quotes
Array of objects (UpdateBookingRequestQuote) non-empty
xpay_charge_id
string (Xpay charge id) non-empty
policyholder
object (PolicyholderUpdate)
skip_xpay_transaction
boolean (Skip xpay transaction)
Default: false

Responses

200
409

Duplicated request

422
423

Resource is locked

patch/partners/{partner_id}/bookings/{quote_package_id}/
https://api.xcover.com/x/partners/{partner_id}/bookings/{quote_package_id}/

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "quotes":
    [
    ],
  • "xpay_charge_id": "string",
  • "policyholder":
    {
    },
  • "skip_xpay_transaction": false
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "status": "string",
  • "currency": "str",
  • "total_price": 0,
  • "total_price_formatted": "string",
  • "partner_transaction_id": "string",
  • "created_at": "2023-12-21T00:18:42Z",
  • "updated_at": "2023-12-21T00:18:42Z",
  • "pds_url": "http://example.com",
  • "security_token": "string",
  • "quotes":
    [
    ],
  • "coi":
    {},
  • "account_url": "http://example.com",
  • "sign_up_url": "http://example.com",
  • "policyholder":
    {
    },
  • "total_tax": 0,
  • "total_tax_formatted": "string",
  • "total_premium": 0,
  • "total_premium_formatted": "string",
  • "fnol_link": "string",
  • "total_price_diff": 0,
  • "total_price_diff_formatted": "string"
}

Confirm booking modification

Confirms booking modification and set parameters as provided in the previous " modification" request

path Parameters
partner_id
required
string
quote_package_id
required
string
update_id
required
string
header Parameters
x-idempotency-key
string

Idempotency key

Request Body schema: application/json
xpay_charge_id
string (Xpay charge id) non-empty

Responses

201
409

Duplicated request

422
423

Resource is locked

post/partners/{partner_id}/bookings/{quote_package_id}/confirm_update/{update_id}/
https://api.xcover.com/x/partners/{partner_id}/bookings/{quote_package_id}/confirm_update/{update_id}/

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "xpay_charge_id": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "status": "string",
  • "currency": "str",
  • "total_price": 0,
  • "total_price_formatted": "string",
  • "partner_transaction_id": "string",
  • "created_at": "2023-12-21T00:18:42Z",
  • "updated_at": "2023-12-21T00:18:42Z",
  • "pds_url": "http://example.com",
  • "security_token": "string",
  • "quotes":
    [
    ],
  • "coi":
    {},
  • "account_url": "http://example.com",
  • "sign_up_url": "http://example.com",
  • "policyholder":
    {
    },
  • "total_tax": 0,
  • "total_tax_formatted": "string",
  • "total_premium": 0,
  • "total_premium_formatted": "string",
  • "fnol_link": "string",
  • "total_price_diff": 0,
  • "total_price_diff_formatted": "string"
}

Quote for booking modification

Generates a quote for booking modification. The modification then needs to be confirmed using the update_id parameter provided in the response.

path Parameters
partner_id
required
string
quote_package_id
required
string
header Parameters
x-idempotency-key
string

Idempotency key

Request Body schema: application/json
quotes
Array of objects (UpdateBookingRequestQuote) non-empty
xpay_charge_id
string (Xpay charge id) non-empty
policyholder
object (PolicyholderUpdate)
skip_xpay_transaction
boolean (Skip xpay transaction)
Default: false

Responses

200
409

Duplicated request

422
423

Resource is locked

patch/partners/{partner_id}/bookings/{quote_package_id}/quote_for_update
https://api.xcover.com/x/partners/{partner_id}/bookings/{quote_package_id}/quote_for_update

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "quotes":
    [
    ],
  • "xpay_charge_id": "string",
  • "policyholder":
    {
    },
  • "skip_xpay_transaction": false
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "status": "string",
  • "currency": "str",
  • "total_price": 0,
  • "total_price_formatted": "string",
  • "partner_transaction_id": "string",
  • "created_at": "2023-12-21T00:18:42Z",
  • "updated_at": "2023-12-21T00:18:42Z",
  • "pds_url": "http://example.com",
  • "security_token": "string",
  • "quotes":
    [
    ],
  • "coi":
    {},
  • "account_url": "http://example.com",
  • "sign_up_url": "http://example.com",
  • "policyholder":
    {
    },
  • "total_tax": 0,
  • "total_tax_formatted": "string",
  • "total_premium": 0,
  • "total_premium_formatted": "string",
  • "fnol_link": "string",
  • "total_price_diff": 0,
  • "total_price_diff_formatted": "string",
  • "update_id": "string",
  • "payment_methods":
    [
    ]
}

Cancellations

Cancel booking

Cancel a specific booking.

path Parameters
partner_id
required
string
quote_package_id
required
string
header Parameters
x-idempotency-key
string

Idempotency key

Request Body schema: application/json
preview
boolean (Preview)
Default: false
refund_required
boolean (Refund required)
Default: true

Deprecated. Refund will be created on a best-effort basis

quotes
Array of objects (CancelBookingRequestQuote)

Responses

200

If "preview" is False: successfully cancelled or partially cancelled. If "preview" is True: the cancellation can be successfully made

404

Unknown partner or booking, or booking does not belong to the partner

409

Duplicated request

422

Unsuccessful cancellation. Potential reasons include: booking has no policies which can be cancelled, booking was cancelled before, booking was not purchased.

423

Resource is locked

post/partners/{partner_id}/bookings/{quote_package_id}/cancel
https://api.xcover.com/x/partners/{partner_id}/bookings/{quote_package_id}/cancel

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "preview": false,
  • "refund_required": true,
  • "quotes":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "status": "string",
  • "quotes":
    [
    ],
  • "policyholder":
    {
    },
  • "pds_url": "http://example.com",
  • "coi":
    {},
  • "created_at": "2023-12-21T00:18:42Z",
  • "updated_at": "2023-12-21T00:18:42Z",
  • "total_price": 0,
  • "total_price_formatted": "string",
  • "total_refund": 0,
  • "total_refund_formatted": "string",
  • "total_tax": 0,
  • "total_tax_formatted": "string",
  • "total_premium": 0,
  • "total_premium_formatted": "string",
  • "currency": "str",
  • "cancellation_id": "string",
  • "confirm_before": "2023-12-21T00:18:42Z",
  • "partner":
    {
    },
  • "refund_amount": 0,
  • "refund_amount_formatted": "string",
  • "cancellation_payout_url": "string"
}

Confirm booking cancellation

Confirm the cancellation that is created by booking cancellation preview

path Parameters
cancellation_id
required
string
partner_id
required
string
quote_package_id
required
string
header Parameters
x-idempotency-key
string

Idempotency key

Request Body schema: application/json
reason_for_cancellation
string (Reason for cancellation) <= 1000 characters Nullable

Responses

200

Successfully cancelled or partially cancelled

404

Unknown partner or booking, or booking does not belong to the partner

409

Duplicated request

422

Unsuccessful cancellation. Potential reasons include: the cancellation_id does not exist, new cancellation preview has been made so that thecancellation_id is obsolete, the cancellation preview has expired

423

Resource is locked

post/partners/{partner_id}/bookings/{quote_package_id}/confirm_cancellation/{cancellation_id}/
https://api.xcover.com/x/partners/{partner_id}/bookings/{quote_package_id}/confirm_cancellation/{cancellation_id}/

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "reason_for_cancellation": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "status": "string",
  • "quotes":
    [
    ],
  • "policyholder":
    {
    },
  • "pds_url": "http://example.com",
  • "coi":
    {},
  • "created_at": "2023-12-21T00:18:42Z",
  • "updated_at": "2023-12-21T00:18:42Z",
  • "total_price": 0,
  • "total_price_formatted": "string",
  • "total_refund": 0,
  • "total_refund_formatted": "string",
  • "total_tax": 0,
  • "total_tax_formatted": "string",
  • "total_premium": 0,
  • "total_premium_formatted": "string",
  • "currency": "str",
  • "cancellation_id": "string",
  • "confirm_before": "2023-12-21T00:18:42Z",
  • "partner":
    {
    },
  • "refund_amount": 0,
  • "refund_amount_formatted": "string",
  • "cancellation_payout_url": "string"
}

Renewals

Renewal confirmation

Creates a renewal with parameters provided in the previous "Quote for renewal" request

path Parameters
partner_id
required
string
pending_renewal_id
required
string
quote_package_id
required
string
query Parameters
return_booking_detail
boolean

Return booking details in response

header Parameters
x-idempotency-key
string

Idempotency key

Request Body schema: application/json
quotes
required
Array of objects (BookingRequestQuote)

Responses

200
204

Renewal confirmation is accepted

400

Request parameters are incorrect

404

Unknown partner or quote does not belong to the partner

409

Duplicated request

422

Request parameters are incorrect

423

Resource is locked

post/partners/{partner_id}/renewals/{quote_package_id}/confirm/{pending_renewal_id}/
https://api.xcover.com/x/partners/{partner_id}/renewals/{quote_package_id}/confirm/{pending_renewal_id}/

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "quotes":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "renewal_id": "string",
  • "quotes":
    [
    ]
}

Renewal opt-out

Calling this endpoint indicates that customer is not intended to renew the policyinsurance products

path Parameters
partner_id
required
string
quote_package_id
required
string
header Parameters
x-idempotency-key
string

Idempotency key

Request Body schema: application/json
quotes
Array of objects (RenewalOptoutRequestQuote)

Responses

204

Request Succeeded

404

Unknown partner or booking, or booking does not belong to the partner

409

Duplicated request

422
423

Resource is locked

post/partners/{partner_id}/renewals/{quote_package_id}/opt_out/
https://api.xcover.com/x/partners/{partner_id}/renewals/{quote_package_id}/opt_out/

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "quotes":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "type": "string",
  • "message": "string",
  • "code": "string",
  • "href": "string",
  • "errors":
    {
    }
}

Quote for renewal

Generates a Quote for renewal as specified in the request which can then be confirmed using the endpoint specified in the Response or through auto_confirm flag in the Request.

path Parameters
partner_id
required
string
quote_package_id
required
string
header Parameters
x-idempotency-key
string

Idempotency key

Request Body schema: application/json
auto_confirm
boolean (Auto confirm)
Default: false

Should the created renewal be automatically confirmed

use_newest_policy
boolean (Use newest policy)
Default: false

Use newest policy on renewal

due_date_within
integer (Due date within)

Only renew quotes whose due dates are within the specified number of days from when the request is sent. If not provided, all quotes that are eligible for renewal will be renewed. Accepts non-positive values as well.

Responses

200
404
409

Duplicated request

422
423

Resource is locked

patch/partners/{partner_id}/renewals/{quote_package_id}/quote_for_renewal/
https://api.xcover.com/x/partners/{partner_id}/renewals/{quote_package_id}/quote_for_renewal/

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "auto_confirm": false,
  • "use_newest_policy": false,
  • "due_date_within": 0
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "renewal_id": "string",
  • "quotes":
    [
    ]
}

Instalments

Get instalments

Get instalments details for the provided quote package id.

path Parameters
partner_id
required
string
quote_package_id
required
string

Booking id (INS-number generated by XCover API)

Responses

200

Successful request

404

Unknown partner or quote package

get/partners/{partner_id}/bookings/{quote_package_id}/instalments/
https://api.xcover.com/x/partners/{partner_id}/bookings/{quote_package_id}/instalments/

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "quotes":
    [
    ],
  • "currency": "string"
}

Update instalment payment

Update instalment payment status

path Parameters
partner_id
required
string
quote_package_id
required
string
header Parameters
x-idempotency-key
string

Idempotency key

Request Body schema: application/json
quotes
required
Array of objects (QuoteInstalment)

Responses

204

Successful update

400

Request format is invalid

404

Unknown partner

409

Duplicated request

422

Request data is invalid

423

Resource is locked

post/partners/{partner_id}/bookings/{quote_package_id}/instalments/
https://api.xcover.com/x/partners/{partner_id}/bookings/{quote_package_id}/instalments/

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "quotes":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "type": "string",
  • "message": "string",
  • "code": "string",
  • "href": "string",
  • "errors":
    {
    }
}

Tables

List tables

List tables.

path Parameters
partner_id
required
string
query Parameters
ordering
string

Which field to use when ordering the results.

limit
integer

Number of results to return per page.

offset
integer

The initial index from which to return the results.

Responses

200
get/partners/{partner_id}/tables/
https://api.xcover.com/x/partners/{partner_id}/tables/

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "count": 0,
  • "previous": "http://example.com",
  • "results":
    [
    ]
}

Get table

Get table.

path Parameters
id
required
string
partner_id
required
string

Responses

200
get/partners/{partner_id}/tables/{id}/
https://api.xcover.com/x/partners/{partner_id}/tables/{id}/

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "table_id": "string",
  • "slug": "string",
  • "version": 0,
  • "file":
    {
    },
  • "active_from": "2023-12-21T00:18:42Z",
  • "template":
    {
    },
  • "data": { }
}

Utils

Health check

Validates health of the internal systems.

Responses

200

Service is healthy

500

Service is unhealthy

get/healthcheck
https://api.xcover.com/x/healthcheck

Ping

Tests connection to the service

Responses

200

Successful response

get/ping
https://api.xcover.com/x/ping