Megatix

Create booking

POST /api/partners/{partner_id}/quotes/{quote_id}/bookings

The Create Booking API endpoint allows partners to convert a quote into a booking. Partners can provide necessary details about the policyholder and insured parties to finalise the booking process. This endpoint requires a valid access token obtained from the Authentication.

Path parameters

ParameterTypeDescription

partner_id

string

The partner identifier provided during onboarding

quote_id

string

Unique identifier of the quote returned in the widget

Headers

NameValue

Accept

application/json

Content-Type

application/json

Authorization

Bearer <token>

Body

NameTypeDescription

policy_holder.first_name

string

First name

policy_holder.last_name

string

Last name

policy_holder.country

string

Two letters country code

policy_holder.email

string

Email address

policy_holder.phone

string

Phone number

policy_holder.address1

string

Address line 1

policy_holder.address2

string

Address line 2

policy_holder.city

string

City of residence

policy_holder.region

string

Region

policy_holder.postcode

string

Postcode

quotes

array

quotes[].id

string

Unique identifier of the quote policy

quotes[].brightwrite_details.bw_experiment_id

string

ID of the BrightWrite experiment

quotes[].brightwrite_details.bw_variant_id

string

ID of the experiment variant generated for the customer

quotes[].brightwrite_details.bw_device_id

string

ID of the customer device

quotes[].insured

array

A list of insured

quotes[].insured[].first_name

string

First name

quotes[].insured[].last_name

string

Last name

quotes[].insured[].email

string

Email address

quotes[].insured[].country

string

Two letters country code

quotes[].insured[].address1

string

Address line 1

quotes[].insured[].address2

string

Address line 2

quotes[].insured[].city

string

City of residence

quotes[].insured[].region

string

Region

quotes[].insured[].postcode

string

Postcode

quotes[].insured[].phone

string

Phone number

quotes[].insured[].birth_date

string

Date of birth

quotes[].insured[].company

string

Company name

{
    "policy_holder": {
        "first_name": "Kaitlin",
        "last_name": "Brown",
        "country": "AU",
        "email": "[email protected]",
        "phone": "+1-630-477-5267",
        "address1": "50827 Halvorson Way"
        "city": "Sydney",
        "region": "NSW",
        "postcode": "68988-3838"
    },
    "quotes": [
        {
            "id": "9696f4be-0938-4e1e-9915-b8caf116b223",
            "insured":
            [
                {
                    "first_name": "Kaitlin",
                    "last_name": "Brown",
                    "email": "[email protected]",
                    "country": "AU",
                    "address1": "50827 Halvorson Way",
                    "city": "Sydney",
                    "region": "NSW",
                    "postcode": "68988-3838",
                    "phone": "+1-630-477-5267",
                    "birth_date": "1953-06-23",
                    "company": "Gibson LLC"
                }
            ]
        }
    ]
}

Response

{
    "data": {
        "provider_reference": "XWDYX-GKPRT-INS",
        "language": "en",
        "provider_customer_id": null,
        "status": "CONFIRMED",
        "currency": "AUD",
        "price": 5.39,
        "security_token": "TlCHE-U123S-HlxB8-YZq0C",
        "created_at": "2024-03-06T21:53:03.000000Z",
        "updated_at": "2024-03-06T21:53:03.000000Z",
        "is_instant_booking": false,
        "policies": [
            {
                "status": "CONFIRMED",
                "policy_start_date": "2024-03-06T00:00:00.000000Z",
                "policy_end_date": "2024-04-05T00:00:00.000000Z",
                "price": 5.39,
                "tax": 0.49,
                "commission": 2.08,
                "cover_amount": null,
                "policy_type": "event_ticket_protection",
                "policy_code": "MECMTX01",
                "policy_version": "257ac948-c36b-4825-ac46-fdb0ba411d6a",
                "policy_content": {
                    "title": "Missed Event Protection",
                    "header": null,
                    "description": "Ticket Protection",
                    "optout_msg": "",
                    "inclusions": [],
                    "exclusions": [],
                    "disclaimer": "By clicking the button you confirm that you have read and agreed to the Terms and Conditions. The Missed Event Protection plan is a service provided by XCover.com, a trading name of Booking Protect Ltd. ",
                    "disclaimer_html": "<p data-block-key=\"eymfx\">By clicking the button you confirm that you have read and agreed to the <a href=\"https://www.xcover.com/en/pds/XWDYX-GKPRT-INS?policy_type=event_ticket_protection_v3\" rel=\"noopener noreferrer\" target=\"_blank\">Terms and Conditions</a>. The Missed Event Protection plan is a service provided by XCover.com, a trading name of Booking Protect Ltd. </p>",
                    "payment_disclaimer": "",
                    "in_path_disclaimer": ""
                },
                "claim_selector_id": "0d5d86cc-fa57-4cdd-9def-efae75099bce",
                "pds_url": "https://www.xcover.com/en/pds/XWDYX-GKPRT-INS?policy_type=event_ticket_protection_v3",
                "extra_fields": {
                    "retail_premium": "5.389999999999999930055949449",
                    "uw_fee": "1.259999999999999904798375638",
                    "get_tickets": [
                        {
                            "type": "Second Release",
                            "price": 35,
                            "scanned_at": null
                        },
                        {
                            "type": "Second Release",
                            "price": 35,
                            "scanned_at": null
                        }
                    ],
                    "cg_revenue": "1.560000000000000095201624362"
                },
                "confirmed_at": "2024-03-06T21:53:03.000000Z",
                "cancelled_at": null,
                "created_at": "2024-03-06T21:53:03.000000Z",
                "updated_at": "2024-03-06T21:53:03.000000Z",
                "id": "20f6523b-108b-4465-9eb4-83b580155352"
            }
        ],
        "policyholder": {
            "first_name": "Kaitlin",
            "last_name": "Brown",
            "email": "[email protected]",
            "phone": "+1-630-477-5267",
            "country": "AU",
            "date_of_birth": null,
            "address1": "50827 Halvorson Way",
            "address2": null,
            "city": "Sydney",
            "region": "NSW",
            "postcode": "68988-3838",
            "created_at": "2024-03-06T21:53:03.000000Z",
            "updated_at": "2024-03-06T21:53:03.000000Z",
            "id": "db710ee6-c939-4d1b-b12c-96d8bd66f4ee"
        },
        "id": "8cac6369-f8a8-4bd6-8bb8-eeab06bbda57"
    }
}

Last updated