Requests & Responses

Example payloads for requests to and responses from XCE

Quote Request

The below is an example quote request to send to the XCE widget during initialization

const quoteData = {
        currency: "USD",
        customer_language: "en-US",
        customer_country: "US",
        customer_postcode: "12345",
        customer_region: "NY",
        partner_customer_id: "220974115-8713648",
        partner_subsidiary: "",
        partner_metadata: {
          context_id: 220974115,
          event_id: 357,
        },
        request: [
          {
            policy_type: "event_ticket_protection",
            policy_start_date: "2023-10-06T23:09:38.446Z",
            event_datetime: "2023-11-09T23:09:38.446Z",
            event_name: "Lil Baby",
            event_country: "US",
            event_city: "Los Angeles",
            event_address: "1111 S. Figueroa Street",
            event_postcode: "90015",
            event_location: "Crypto.com Arena",
            number_of_tickets: 1,
            tickets: [
              {
                price: 99.5,
              },
              {
                price: 12,
              },
            ],
            total_event_cost: 200,
          },
        ],
      };

Quote Response

The below is an example response provided by XCE during the onSet function once a quote was successfully generated for a customer. This data is required to be stored for later consumption in the booking request.

{
    "provider_reference": "ULBRT-XW3JL-INS",
    "currency": "USD",
    "language": "en-US",
    "expires_at": "2024-01-15T22:18:31.000000Z",
    "created_at": "2023-11-16T22:18:31.000000Z",
    "updated_at": "2023-11-16T22:18:31.000000Z",
    "security_token": "TYfaB-HOLBB-OqRFy-wbff2",
    "is_fast_quote": false,
    "policies": [
        {
            "policy_start_date": "2023-10-06T00:00:00.000000Z",
            "policy_end_date": "2023-11-09T00:00:00.000000Z",
            "price": 14.02,
            "policy_type": "event_ticket_protection",
            "policy_code": "TKAXSUS3",
            "policy_version": "cd0b1c66-1255-439e-a368-bda2ca41b545",
            "policy_content": {
                "title": "Missed Event Cover for Lil Baby",
                "header": null,
                "description": "90% of attendees add Missed Event Cover for generous protection when things go wrong or your plans change. For only  per ticket it covers you - and all ticket holders - if:",
                "optout_msg": "",
                "disclaimer": "<p>This insurance is arranged by Cover Genius Ltd which is authorised and regulated by the FCA (No.750711). Policies are underwritten by Markel International Insurance Company Limited which is authorised by the PRA and regulated by the FCA, (No.202570).</p>"
            },
            "pds_url": "https://staging.xcover.com/pds/ULBRT-XW3JL-INS?policy_type=event_ticket_protection_v2",
            "extra_fields": {
                "seller_entity": "Cover Genius Insurance Services, LLC.",
                "policy_duration": 34,
                "retail_price": 14.02,
                "event_datetime": "2023-11-09T23:09:38.446Z",
                "policy_start_date": "2023-10-06T23:09:38.446Z"
            },
            "created_at": "2023-11-16T22:18:31.000000Z",
            "updated_at": "2023-11-16T22:18:31.000000Z",
            "provider_reference": "9f9bbbff-6f59-4dd0-84c3-bd9a99f1ea4c",
            "price_formatted": "US$14.02",
            "tax": 0,
            "tax_formatted": "US$0.00"
        }
    ],
    "id": "25042880-d6f9-4fd6-9693-c8f2351bb25f",
    "total_price": 14.02,
    "total_price_formatted": "US$14.02",
    "pds_url": "https://staging.xcover.com/pds/ULBRT-XW3JL-INS",
    "brightwrite_details": {
        "bw_device_id": "de506c6f-d65e-4abd-89f2-9daebb1b721a",
        "bw_experiment_id": null,
        "bw_variant_id": null
    }
}

Booking Request

{
  "quotes": [
    {
      "id": "{{quote_id}}",
      "insured": [
        {
          "first_name": "first_name",
          "last_name": "last_name",
          "email": "[email protected]",
          "country": "US",
          "phone": "0439000000",
          "postcode": "28715-9602",
          "region": "NC"
        }
      ],
      "brightwrite_details": {
          "bw_experiment_id": "{{bw_experiment_id}}",
          "bw_variant_id": "{{bw_variant_id}}",
          "bw_device_id": "{{bw_device_id}}"
      }
    }
  ],
  "policyholder": {
    "first_name": "first_name",
    "last_name": "last_name",
    "email": "[email protected]",
    "country": "US",
    "city": "Candler",
    "phone": "0439000000",
    "postcode": "28715-9602",
    "region": "NC",
    "company": "mycompany"
  },
  "partner_transaction_id": "440977605-3019788",
  "payment_details": {
    "customer_token_id": "81c48b09-0abe-4e08-a839-7cfa14f4919f"
  }
}

Booking Response

{
  "id": "ULBRT-XW3JL-INS",
  "status": "CONFIRMED",
  "currency": "USD",
  "total_price": 14.02,
  "total_price_formatted": "US$14.02",
  "partner_transaction_id": "49231117102023",
  "created_at": "2023-11-17T00:23:47.436178Z",
  "updated_at": "2023-11-17T00:23:49.771834Z",
  "pds_url": "https://staging.xcover.com/pds/ULBRT-XW3JL-INS",
  "security_token": "si3yo-UPA72-emHyD-pUOr5",
  "quotes": [
    {
      "id": "ae5ec819-3b53-405f-9cf0-eacf6b1b2e8b",
      "policy_start_date": "2023-11-17T00:23:47.407645+00:00",
      "policy_end_date": "2023-12-17T00:23:47.097000+00:00",
      "status": "CONFIRMED",
      "price": 14.02,
      "price_formatted": "US$14.02",
      "policy": {
        "policy_type": "event_ticket_protection",
        "policy_type_group_name": "event",
        "policy_name": "AXS US Missed Event (Trip Cancellation)",
        "policy_code": "TKAXSUS3",
        "policy_version": "cd0b1c66-1255-439e-a368-bda2ca41b545",
        "category": "event_ticket_protection",
        "content": {
          "title": "Missed Event Cover for Lil Baby",
          "header": null,
          "description": "90% of attendees add Missed Event Cover for generous protection when things go wrong or your plans change. For only  per ticket it covers you - and all ticket holders - if:",
          "optout_msg": "",
          "disclaimer": "<p>This insurance is arranged by Cover Genius Ltd which is authorised and regulated by the FCA (No.750711). Policies are underwritten by Markel International Insurance Company Limited which is authorised by the PRA and regulated by the FCA, (No.202570).</p>"
        },
        "underwriter": {
          "disclaimer": "This policy is underwritten by US Fire and arranged by XCover.com",
          "name": "AXS US Fire"
        },
        "claim_selector_id": "82aaec8e-81c7-42c5-b67f-80322c19f651"
      },
      "insured": [
        {
          "id": "a138aa7d-0f7b-4615-aebe-2eebab0c872c",
          "first_name": "first_name",
          "last_name": "last_name",
          "email": "[email protected]",
          "country": "US",
          "postcode": "12345",
          "region": "NC",
          "phone": "0412345678"
        }
      ],
      "tax": {
        "total_tax": 0.0,
        "total_amount_without_tax": 14.02,
        "total_tax_formatted": "US$0.00",
        "total_amount_without_tax_formatted": "US$14.02",
        "taxes": []
      },
      "duration": "29 23:59:59.689355",
      "benefits": [
        {
          "benefit_content_id": "a669593c-e04f-4c7a-97c3-2a72aff6dc2a",
          "limit": 100.0,
          "limit_policy_currency": 100.0,
          "limit_formatted": "US$100.00",
          "limit_policy_currency_formatted": "US$100.00"
        }
      ],
      "commission": {
        "partner_commission": 0.0,
        "partner_commission_formatted": "US$0.00",
        "surcharge_commission": 0.0,
        "surcharge_commission_formatted": "US$0.00",
        "total_commission": 0.0,
        "total_commission_formatted": "US$0.00"
      },
      "created_at": "2023-11-17T00:23:47.407645Z",
      "confirmed_at": "2023-11-17T00:23:49.748932Z",
      "updated_at": "2023-11-17T00:23:49.756725Z",
      "cancelled_at": null,
      "is_renewable": false,
      "is_pricebeat_enabled": null,
      "cover_amount": 100.0,
      "cover_amount_formatted": "US$100.00",
      "pds_url": "https://staging.xcover.com/pds/ULBRT-XW3JL-INS?policy_type=event_ticket_protection_v2",
      "attachments": [],
      "files": [],
      "custom_documents": null,
      "extra_fields": {
        "seller_entity": "Cover Genius Insurance Services, LLC.",
        "policy_duration": 30,
        "retail_price": 14.02,
        "event_datetime": "2023-12-17T00:23:47.097Z",
        "policy_start_date": "2023-11-17T00:23:47.407645+00:00"
      },
      "surcharge": {
        "total_amount": null,
        "total_amount_formatted": null,
        "surcharges": null
      },
      "parent_quote_status": null,
      "next_renewal": null,
      "can_be_cancelled": true,
      "third_party_admins": [],
      "ombudsman_list": []
    }
  ],
  "coi": {
    "url": "https://staging.xcover.com/coi/ULBRT-XW3JL-INS?security_token=si3yo-UPA72-emHyD-pUOr5",
    "pdf": "https://staging.xcover.com/coi/ULBRT-XW3JL-INS.pdf?security_token=si3yo-UPA72-emHyD-pUOr5"
  },
  "account_url": "https://staging.xcover.com/account?id=de1b18bb-5c02-4e8a-a4f2-35be87d1bfe7&signup_token=U0cvH-AdYgA-gm7Zy-yM6lA&region=eu-central-1",
  "sign_up_url": "https://staging.xcover.com/account?id=de1b18bb-5c02-4e8a-a4f2-35be87d1bfe7&signup_token=U0cvH-AdYgA-gm7Zy-yM6lA&region=eu-central-1",
  "policyholder": {
    "first_name": "first_name",
    "last_name": "last_name",
    "email": "[email protected]",
    "phone": "04390000000",
    "address1": null,
    "address2": null,
    "postcode": "28715-9602",
    "company": "mycompany",
    "company_reg_id": null,
    "middle_name": null,
    "country": "US",
    "age": null,
    "city": "Candler",
    "region": "NC",
    "secondary_email": null,
    "birth_date": null,
    "allow_updates": true,
    "fields_allowed_to_update": [
      "last_name",
      "company",
      "address2",
      "phone",
      "birth_date",
      "city",
      "middle_name",
      "region",
      "postcode",
      "address1",
      "company_reg_id",
      "tax_payer_id",
      "email",
      "age",
      "secondary_email",
      "first_name"
    ]
  },
  "total_tax": 0.0,
  "total_tax_formatted": "US$0.00",
  "total_premium": 14.02,
  "total_premium_formatted": "US$14.02",
  "fnol_link": "https://staging.xcover.com/account/claims/fnol?bookingID=ULBRT-XW3JL-INS&security_token=si3yo-UPA72-emHyD-pUOr5"
}

Last updated