> For the complete documentation index, see [llms.txt](https://partner-docs.covergenius.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://partner-docs.covergenius.com/offers/guides/migrating-from-rentalcover/purchase-flow.md).

# Purchase flow

Replace RentalCover Quote and Purchase with Create Offer and Confirm Offer.

On RentalCover you call **Quote**, then **Purchase**. On the Offers API you call **Create Offer**, render the offer, then call **Confirm Offer** or **Opt-out**.

Two things move:

* **Personal data moves to Confirm.** Create Offer only describes the rental. Names, email and age are sent when the customer accepts.
* **The INS is issued at Confirm**, not at quote time. Until then you work with an offer ID and quote IDs, which are UUIDs.

{% stepper %}
{% step %}

#### Create an offer

Send the rental context instead of a flat quote request.

{% tabs %}
{% tab title="Before: RentalCover" %}
{% code title="POST /insurances/quote" overflow="wrap" %}

```json
{
  "Type": "FullProtection",
  "Currency": "EUR",
  "Country": "NL",
  "LanguageCode": "en",
  "PartnerSite": "example-site",
  "BWCookie": "CUST-0007654321",
  "PartnerCollectingPayment": true,
  "ContactCustomer": 0,
  "ExpressCode": "EXAMPLE10",
  "FirstName": "Alex",
  "LastName": "Example",
  "Email": "alex.example@email.com",
  "CustomerAge": 25,
  "FromDate": "2027-03-12 10:00:00",
  "ToDate": "2027-03-19 10:00:00",
  "DestinationCountry": "DE",
  "VehiclePickupTime": "2027-03-12T10:00:00+01:00",
  "VehicleDropoffTime": "2027-03-19T10:00:00+01:00",
  "VehiclePickupCity": "Frankfurt",
  "VehiclePickupPostalCode": "60549",
  "VehicleDropoffCity": "Frankfurt",
  "VehicleRentalGross": 420,
  "VehicleCode": "CDMR",
  "VehicleClass": "Compact",
  "CDWIncluded": 1,
  "VehicleStdLiabilityHigh": 1500,
  "VehicleStdLiabilityCurrency": "EUR",
  "VehicleSupplierId": 1234,
  "VehicleSupplierName": "Example Rental Co",
  "MetaData": "{\"airport_pickup\":\"true\",\"experience_type\":\"standard\"}"
}
```

{% endcode %}
{% endtab %}

{% tab title="After: XCover Offers" %}
{% code title="POST /partners/{partner\_code}/offers/" overflow="wrap" %}

```json
{
  "customer": { "currency": "EUR", "country": "NL", "language": "en" },
  "partner": {
    "subsidiary": "example-site",
    "transaction_id": "TXN-0001234567",
    "customer_id": "CUST-0007654321",
    "metadata": {
      "sales_channel": "InPath",
      "device": "Web",
      "airport_pickup": "true",
      "experience_type": "standard"
    }
  },
  "context": {
    "product": "full_protection",
    "price": 420,
    "num_drivers": 1,
    "coverage_charges": [
      { "rate_type": "CollisionDamageWaiver", "deductible": 1500.0 },
      { "rate_type": "ThirdPartyInsurance", "deductible": 0.0 }
    ],
    "pickup": {
      "country": "DE",
      "city": "Frankfurt",
      "pickup_site": "Frankfurt Airport",
      "postcode": "60549",
      "date": "2027-03-12T10:00:00+01:00"
    },
    "dropoff": {
      "country": "DE",
      "city": "Frankfurt",
      "return_site": "Frankfurt Airport",
      "date": "2027-03-19T10:00:00+01:00"
    },
    "vehicle_details": { "code": "CDMR" },
    "vehicle_supplier": { "name": "Example Rental Co", "country": "DE", "site": "Frankfurt Airport" }
  }
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

The fields that matter most:

| RentalCover                                     | XCover Offers                           | Notes                                                                                     |
| ----------------------------------------------- | --------------------------------------- | ----------------------------------------------------------------------------------------- |
| `Currency`                                      | `customer.currency`                     | ISO 4217                                                                                  |
| `Country`                                       | `customer.country`                      | Country of **residence**. Must match `policyholder.country` at Confirm                    |
| `LanguageCode`                                  | `customer.language`                     | ISO 639-1                                                                                 |
| `Type`                                          | `context.product`                       | `full_protection`, `extra_cover` or `sli`. See [Products](#products)                      |
| `VehicleRentalGross`                            | `context.price`                         | The car rental price, not the insurance price                                             |
| `FromDate` + `VehiclePickupTime`                | `context.pickup.date`                   | One RFC 3339 value with the local offset                                                  |
| `ToDate` + `VehicleDropoffTime`                 | `context.dropoff.date`                  | One RFC 3339 value with the local offset                                                  |
| `CDWIncluded`, `SLIIncluded`                    | `context.coverage_charges[].rate_type`  | One entry per included cover                                                              |
| `VehicleStdLiabilityHigh` / `Low`               | `context.coverage_charges[].deductible` | The excess under that cover                                                               |
| `VehicleCode`                                   | `context.vehicle_details.code`          | SIPP code. Cover Genius checks eligibility from it                                        |
| `PartnerReference` (sent at Purchase)           | `partner.transaction_id`                | Your booking reference, now sent at Create Offer and returned as `partner_transaction_id` |
| `BWCookie`                                      | `partner.customer_id`                   | Stable customer identifier                                                                |
| `PartnerSite`                                   | `partner.subsidiary`                    | Your site or subsidiary                                                                   |
| `MetaData`                                      | `partner.metadata`                      | Free-form key-value pairs. Send an object, not a JSON-encoded string                      |
| `FirstName`, `LastName`, `Email`, `CustomerAge` | —                                       | Not sent. Moved to [Confirm](#confirm-the-offer)                                          |

Tax, commission, surcharge and benefit details are left out of the response unless you ask for them. Add `?extra_fields=` with any of `tax`, `commission`, `surcharge` and `benefits`, for example `?extra_fields=tax,commission`.

<details>

<summary>Full Create Offer field mapping</summary>

| RentalCover                                                                                            | XCover Offers                                      | Notes                                                                                                                    |
| ------------------------------------------------------------------------------------------------------ | -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `Currency`                                                                                             | `customer.currency`                                | ISO 4217                                                                                                                 |
| `Country`                                                                                              | `customer.country`                                 | Residency, ISO 3166-1 alpha-2. RentalCover also accepted IP country; Offers needs residency                              |
| `LanguageCode`                                                                                         | `customer.language`                                | ISO 639-1                                                                                                                |
| —                                                                                                      | `customer.region`                                  | Optional region of residence                                                                                             |
| `PartnerReference` (sent at Purchase)                                                                  | `partner.transaction_id`                           | Your booking reference, returned as `partner_transaction_id`                                                             |
| `BWCookie`                                                                                             | `partner.customer_id`                              | Stable customer identifier, needed for experiments                                                                       |
| —                                                                                                      | `partner.metadata.sales_channel`                   | Where the offer is shown, such as `InPath`. Values agreed in scoping                                                     |
| —                                                                                                      | `partner.metadata.device`                          | Device type, such as `Web`. Values agreed in scoping                                                                     |
| `PartnerSite`                                                                                          | `partner.subsidiary`                               | Your site or subsidiary                                                                                                  |
| `MetaData`                                                                                             | `partner.metadata`                                 | Free-form object of your own key-value pairs. Not validated. RentalCover took a JSON-encoded string; send an object      |
| —                                                                                                      | `partner.metadata.rebooking`, `rebooking_prior_id` | See [Rebooking](https://partner-docs.covergenius.com/offers/guides/migrating-from-rentalcover/cancellation.md#rebooking) |
| `Type`                                                                                                 | `context.product`                                  | Product family                                                                                                           |
| `VehicleRentalGross`                                                                                   | `context.price`                                    | Car rental price                                                                                                         |
| `CoverAmount`                                                                                          | `context.cover_amount`                             | US markets only                                                                                                          |
| `OtherDriverAge1`, `OtherDriverAge2`                                                                   | `context.num_drivers`                              | Number of drivers. Defaults to `1`. Ages are not sent                                                                    |
| `CDWIncluded`                                                                                          | `context.coverage_charges[].rate_type`             | `CollisionDamageWaiver`                                                                                                  |
| `SLIIncluded`                                                                                          | `context.coverage_charges[].rate_type`             | `ThirdPartyInsurance`                                                                                                    |
| `LDWIncluded`                                                                                          | —                                                  | Agreed in scoping                                                                                                        |
| `VehicleStdLiabilityHigh`, `VehicleStdLiabilityLow`                                                    | `context.coverage_charges[].deductible`            | One amount per entry                                                                                                     |
| `VehicleStdLiabilityCurrency`                                                                          | —                                                  | Uses `customer.currency`                                                                                                 |
| `FromDate`, `VehiclePickupTime`                                                                        | `context.pickup.date`                              | RFC 3339 with offset                                                                                                     |
| `DestinationCountry`, `VehiclePickupCountry`                                                           | `context.pickup.country`                           | ISO 3166-1 alpha-2                                                                                                       |
| `VehiclePickupCity`                                                                                    | `context.pickup.city`                              |                                                                                                                          |
| `VehiclePickupPostalCode`                                                                              | `context.pickup.postcode`                          | String                                                                                                                   |
| `FromLocationName`                                                                                     | `context.pickup.pickup_site`                       |                                                                                                                          |
| `VehiclePickupRegion`                                                                                  | `context.pickup.region`                            | Where applicable                                                                                                         |
| `ToDate`, `VehicleDropoffTime`                                                                         | `context.dropoff.date`                             | RFC 3339 with offset                                                                                                     |
| `VehicleDropoffCountry`                                                                                | `context.dropoff.country`                          |                                                                                                                          |
| `VehicleDropoffCity`                                                                                   | `context.dropoff.city`                             |                                                                                                                          |
| `ToLocationName`                                                                                       | `context.dropoff.return_site`                      |                                                                                                                          |
| —                                                                                                      | `context.dropoff.region`                           | Where applicable                                                                                                         |
| `VehicleCode`                                                                                          | `context.vehicle_details.code`                     | SIPP code                                                                                                                |
| `VehicleSupplierName`                                                                                  | `context.vehicle_supplier.name`                    |                                                                                                                          |
| —                                                                                                      | `context.vehicle_supplier.country`                 | New. Supplier country, ISO 3166-1 alpha-2                                                                                |
| —                                                                                                      | `context.vehicle_supplier.site`                    | Supplier branch                                                                                                          |
| —                                                                                                      | `context.channel`                                  | Sales channel. Values configured per integration                                                                         |
| —                                                                                                      | `context.bundled`                                  | `true` when the offer is part of a bundle                                                                                |
| —                                                                                                      | `context.increased_limit`                          | Increased-limit variant. Only where agreed                                                                               |
| `FirstName`, `LastName`, `Email`, `CustomerAge`, `Phone`, address fields                               | —                                                  | Sent at Confirm                                                                                                          |
| `OtherEmail`                                                                                           | —                                                  | Sent at Confirm as `policyholder.secondary_email`                                                                        |
| `PolicyPrice`                                                                                          | —                                                  | Sent at Confirm as `quotes[].partner_price`                                                                              |
| `PartnerCollectingPayment`                                                                             | —                                                  | Set by your partner code. See [Payments](#payments)                                                                      |
| `VehicleName`, `VehicleCategory`, `VehicleBerths`, `VehicleOffroad4x4`, `VehicleClass`, `VehicleTypes` | —                                                  | Not sent. Eligibility comes from the SIPP code                                                                           |
| `VehicleNettPrice`                                                                                     | —                                                  | Not sent unless agreed                                                                                                   |
| `VehicleSupplierId`                                                                                    | —                                                  | Not sent                                                                                                                 |
| `ExpressCode`, `ContactCustomer`, `UserIpAddress`                                                      | —                                                  | Not sent                                                                                                                 |

</details>
{% endstep %}

{% step %}

#### Render the offer

The response contains one or more products. Use these fields:

| Field                                                      | Use it for                                                     |
| ---------------------------------------------------------- | -------------------------------------------------------------- |
| `id`                                                       | The offer ID. Used in the Confirm and Opt-out URLs             |
| `products[].id`                                            | The quote ID. Sent as `quotes[].id` at Confirm                 |
| `products[].details.finance.price.total_amount`            | Price to charge. Use `total_amount_formatted` for display only |
| `products[].details.pds_url`, `products[].details.files[]` | Policy wording and documents to link                           |
| `content.products[].title`, `description`, `benefits`      | Offer copy, if you use the content from the API                |
| `content.products[].disclaimer_html`                       | Disclaimer to show next to the opt-in                          |

{% hint style="warning" %}
**Presentation rules**

* **Render every product returned.** Cover Genius may add products by market. Don't assume there is exactly one.
* **Don't pre-select** the cover. Acceptance must be an active choice.
* **Never block checkout.** If the call fails or `products` is empty, continue the rental booking without the offer.
* **Per-day price is gone.** If you show one, divide `total_amount` by the rental days.
  {% endhint %}

Store the offer ID, the quote IDs and the total you displayed. You need them at Confirm.

<details>

<summary>Full Create Offer response mapping</summary>

| RentalCover                                                | XCover Offers                                                                                                    |
| ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `Reference` (quote)                                        | `id` (offer ID) and `products[].id` (quote ID)                                                                   |
| `Policy`                                                   | `products[]`                                                                                                     |
| `Policy.Name`                                              | `products[].name`, `content.products[].title`                                                                    |
| `TotalAmount`, `TotalAmountFormatted`                      | `products[].details.finance.price.total_amount`, `total_amount_formatted`                                        |
| —                                                          | `...price.total_amount_without_tax`                                                                              |
| —                                                          | `...price.total_amount_min`, `total_amount_max` (partner price bounds, only when partner-set pricing is enabled) |
| `TaxesAndFees`                                             | `products[].details.finance.tax.total_amount`                                                                    |
| `Commission.TotalCommission`                               | `products[].details.finance.commission.total_amount`                                                             |
| `FromDate`, `ToDate`, `CoveredDays`                        | `products[].details.start_date`, `end_date`                                                                      |
| `Policy.PdsUrl`                                            | `products[].details.pds_url`                                                                                     |
| —                                                          | `products[].details.files[]` (`name`, `url`, `type`)                                                             |
| `InsuranceCoverAmount`, `Policy.InclusionsList`            | `products[].details.benefits[]`                                                                                  |
| `Experiment`                                               | `products[].details.experiment`                                                                                  |
| `Policy.SectionHeader`                                     | `content.heading`                                                                                                |
| `PartnerContent` button fields                             | `content.positive_cta`, `content.negative_cta`                                                                   |
| `Policy.Description`                                       | `content.products[].description`                                                                                 |
| `Policy.SellingPoints`                                     | `content.products[].benefits`                                                                                    |
| `Policy.Inclusions`                                        | `content.products[].inclusions`, `exclusions`                                                                    |
| `Disclaimer`, `Disclaimer2`                                | `content.products[].disclaimer`, `disclaimer_html`                                                               |
| `BubbleText`                                               | `content.products[].credibility_badge`                                                                           |
| `Language`                                                 | `content.locale`                                                                                                 |
| `DailyAmountFormatted`, `PerDayText`                       | Not returned                                                                                                     |
| `Discount`, `Coupon`, `Merchant`, `Logos`, `PoweredByLogo` | Not returned                                                                                                     |

</details>
{% endstep %}

{% step %}

#### Confirm the offer

When the customer accepts, confirm the offer. This is where personal data is sent and the INS is issued. Send an `x-idempotency-key`.

{% tabs %}
{% tab title="Before: RentalCover" %}
{% code title="POST /insurances/purchase" overflow="wrap" %}

```json
{
  "AgentReference": "XXXX-XXXX-INS",
  "PolicyCode": "RC001",
  "PartnerReference": "TXN-0001234567",
  "FromDate": "2027-03-12 10:00:00",
  "ToDate": "2027-03-19 10:00:00",
  "Country": "NL",
  "FirstName": "Alex",
  "LastName": "Example",
  "Email": "alex.example@email.com",
  "CustomerAge": 25,
  "PartnerCollectingPayment": true
}
```

{% endcode %}
{% endtab %}

{% tab title="After: XCover Offers" %}
{% code title="POST /partners/{partner\_code}/offers/{offer\_id}/confirm/" overflow="wrap" %}

```json
{
  "quotes": [
    {
      "id": "{quote_id}",
      "insured": [
        { "first_name": "Alex", "last_name": "Example", "email": "alex.example@email.com" }
      ]
    }
  ],
  "policyholder": {
    "first_name": "Alex",
    "last_name": "Example",
    "email": "alex.example@email.com",
    "phone": "+31 20 000 0000",
    "country": "NL",
    "age": 25,
    "postcode": "1000 AA"
  }
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

| RentalCover                                              | XCover Offers                                                              | Notes                                                                                            |
| -------------------------------------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| `AgentReference`                                         | `{offer_id}` in the URL                                                    | The offer ID from Create Offer                                                                   |
| `PolicyCode`                                             | `quotes[].id`                                                              | One entry per product the customer accepted                                                      |
| `FirstName`, `LastName`, `Email`                         | `quotes[].insured[]` and `policyholder`                                    | One insured person per policy                                                                    |
| `CustomerAge`                                            | `policyholder.age`                                                         |                                                                                                  |
| `Country`                                                | `policyholder.country`                                                     | Must equal `customer.country` from Create Offer                                                  |
| `Phone`, `Address1`, `City`                              | `policyholder.phone`, `address1`, `address2`, `city`, `region`, `postcode` | Whether you send an address is agreed in scoping                                                 |
| `PolicyPrice`                                            | `quotes[].partner_price`                                                   | Optional, where agreed. Tax inclusive, within `total_amount_min` and `total_amount_max`          |
| `FromDate`, `ToDate`, `Currency`, `Type`, `LanguageCode` | —                                                                          | Not resent. Fixed at Create Offer                                                                |
| `PartnerReference`, `BWCookie`, `PartnerSite`            | —                                                                          | Sent at Create Offer as `partner.transaction_id`, `partner.customer_id` and `partner.subsidiary` |

Then check the response:

* `id` is the INS. Store it: it identifies the booking from now on.
* `status` is `CONFIRMED`.
* `total_price` matches the price you showed. **If it differs, don't charge the customer.**
* Use `pds_url`, `coi.url`, `account_url` and `fnol_link` exactly as returned.

{% hint style="info" %}
**Confirm later: pending bookings**

To issue the booking now but finalise it after a payment check, add `"require_payment_confirmation": true` to the Confirm body. The booking is created with status `PENDING_PAYMENT` and an INS, but no certificate of insurance. When payment succeeds, call `PUT /partners/{partner_code}/bookings/{booking_id}/confirm` (no trailing slash) with an `x-idempotency-key`. No body is needed. The booking moves to `CONFIRMED`.
{% endhint %}

<details>

<summary>Full Confirm response mapping</summary>

| RentalCover                                 | XCover Offers                                                  |
| ------------------------------------------- | -------------------------------------------------------------- |
| `Reference`, `BookingId`                    | `id` (INS)                                                     |
| `Status`                                    | `status`, `quotes[].status`                                    |
| `TotalAmount`, `TotalAmountFormatted`       | `total_price`, `total_price_formatted`                         |
| `TaxesAndFees.TotalAmountAfterTax`          | `total_premium`                                                |
| `TaxesAndFees.TotalTax`                     | `total_tax`, itemised in `quotes[].tax.taxes[]`                |
| `PartnerReference`                          | `partner_transaction_id`                                       |
| `Policy.PdsUrl`                             | `pds_url`, `quotes[].pds_url`                                  |
| —                                           | `coi.url`, `coi.pdf` (certificate of insurance)                |
| `Policy.ModifyUrl`                          | `account_url`, `sign_up_url`                                   |
| `Policy.CancelUrl`                          | `quotes[].can_be_cancelled`                                    |
| —                                           | `fnol_link` (claims)                                           |
| `FromDate`, `ToDate`, `CoveredDays`         | `quotes[].policy_start_date`, `policy_end_date`, `duration`    |
| `Policy.Type`, `Policy.Name`, `Policy.Code` | `quotes[].policy.policy_type`, `policy_name`, `policy_code`    |
| `SettlementCurrencyObject`                  | `quotes[].policy.policy_currency` (can differ from `currency`) |
| `Policy.SupplierName`                       | `quotes[].policy.underwriter.name`                             |
| `Commission`                                | `quotes[].commission`                                          |
| `InsuranceCoverAmount`                      | `quotes[].cover_amount`, `quotes[].benefits[]`                 |
| `ConfirmedOn`                               | `quotes[].confirmed_at`                                        |
| `Customer.*`                                | `policyholder.*`                                               |
| `Customer.BackupEmail`                      | `policyholder.secondary_email`                                 |
| `Customer.DateOfBirth`                      | `policyholder.birth_date`                                      |

</details>
{% endstep %}

{% step %}

#### Record opt-outs

When the customer declines, call opt-out with the offer ID. There is no body, and the call returns `204`. Opting out of the same offer twice returns `422`. You no longer need to record an opt-in: Confirm does that.

{% tabs %}
{% tab title="Before: RentalCover" %}
{% code title="POST /insurances/coverOptOut/{reference}" %}

```json
{ "CoverOptIn": 0, "PartnerReference": "TXN-0001234567" }
```

{% endcode %}
{% endtab %}

{% tab title="After: XCover Offers" %}

```http
POST /partners/{partner_code}/offers/{offer_id}/opt_out/
```

{% endtab %}
{% endtabs %}
{% endstep %}
{% endstepper %}

## Products

| RentalCover product                  | `context.product` | Markets                                                |
| ------------------------------------ | ----------------- | ------------------------------------------------------ |
| Full Protection                      | `full_protection` | EU, UK and other excess markets                        |
| Extra Cover (Roadside Assistance)    | `extra_cover`     | EU and UK                                              |
| SLI                                  | `sli`             | US and Canada as destination. Not sold to EU residents |
| CDW, Excess Reduction, Comprehensive | Agreed in scoping | —                                                      |
| Baggage                              | Not requested     | Bundled automatically where the market includes it     |

The final product mix also depends on residency, pickup and drop-off country, included covers, `bundled`, `increased_limit`, `channel` and the SIPP code.

## Payments

* **Single payment:** unchanged. You collect the premium with the rental. Confirm carries no payment details. See [Single Payment](https://partner-docs.covergenius.com/offers/guides/payment-process/single-payment.md).
* **Dual payment:** card details are no longer sent to the booking API. Tokenise the card with XPay and pass the token on Confirm in `payment_details.customer_token_id`. See [Dual Payment using XPay Token](https://partner-docs.covergenius.com/offers/guides/payment-process/payment.md).
* **Mixed:** each payment model has its own partner code. Use the same partner code for every call on a booking.

{% hint style="warning" %}
**Watch out for**

* **Residency must match.** `customer.country` at Create Offer must equal `policyholder.country` at Confirm. Take both from the same stored value.
* **Offers expire.** The validity window is set per integration (30 days by default). Confirming an expired offer returns `404`: create a new offer and don't reuse the old IDs.
* **One insured per policy.** `num_drivers` carries the driver count.
* **One offer per vehicle.** For multi-vehicle bookings, create one offer per vehicle, each with its own `transaction_id`.
* **Lost Confirm response?** Retry with the same idempotency key and body, which returns `409` with the original booking. A retry without the key returns `422` because the booking already exists. Don't create a second offer.
  {% endhint %}

## See also

* [Create Offer](https://partner-docs.covergenius.com/offers/guides/purchase-workflow-overview/create-offer.md)
* [Confirm Offer](https://partner-docs.covergenius.com/offers/guides/purchase-workflow-overview/confirm-offer.md)
* [Opt-out Offer](https://partner-docs.covergenius.com/offers/guides/purchase-workflow-overview/opt-out-offer.md)
* [Broken mention](broken://pages/FuffrqqpfoVQRjK77gtJ)
* [Payment Process](https://partner-docs.covergenius.com/offers/guides/payment-process.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://partner-docs.covergenius.com/offers/guides/migrating-from-rentalcover/purchase-flow.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
