Skip to content
Last updated

Retrieve Terms & Conditions for Car rental orders

Learn how to use the /orders/details/cars/terms-and-conditions endpoint to retrieve the full structured terms and conditions for one or more existing car rental orders.


| ✓ Post-booking | Beta|

Use the /orders/details/cars/terms-and-conditions endpoint to retrieve the complete legal terms associated with confirmed car rental orders.

The response returns hierarchical legal content, organised into chapters containing nested sections, clauses, sub-clauses, and clause options. This structure is designed for rendering in user interfaces such as booking confirmations, vouchers, or order detail pages.

Use cases:

  • Display full rental contract details to travellers.
  • Show terms and conditions on order detail pages.
  • Recreate the booking voucher terms section.
  • Support legal and compliance requirements.

How it works

  • You can provide up to 10 order IDs per request.
  • The API returns a map of order IDs to their terms and conditions.
  • Each order ID maps to either:
    • An object containing a terms field, or
    • null if the order ID is invalid or not found.

The endpoint supports partial success:

  • Valid order IDs return their terms.
  • Invalid or unknown order IDs return null.

Important notes

  • Include at least one valid order ID.
  • Provide booker.country to ensure correct legal and regional terms.
  • Use filters.voucher: true to return only the subset of terms required for the booking voucher.
  • The language field accepts a BCP 47 language tag (for example en-gb, es). If not specified or unsupported, the response defaults to English.

Request body

Field
RequiredTypeDescription
booker.country✔StringTwo-letter country code (ISO 3166-1 alpha-2, e.g., es) identifying the booker's country.
orders✔Array of stringCar rental order IDs for which to retrieve terms and conditions. Must include at least one valid ID.
languageOptionalStringPreferred language for the response (ISO 639-1 language code e.g., en-gb). Defaults to English if not specified or unsupported.
filters.voucherOptionalBooleanWhen true returns only the terms required to be shown on the booking voucher displayed to the traveller at pick-up.

Example request:


{
  "booker": {
    "country": "gb"
  },
  "language": "en-gb",
  "orders": ["765255700", "invalid_order"],
  "filters": {
    "voucher": true
  }
}

Response structure

The response includes:

  • request_id – Unique identifier for the request.
  • data – A map of order IDs to their terms and conditions.

Data map behaviour

  • Each key is an order ID from the request.
  • Each value is either:
    • An object containing a termsfield, or
    • null if the order is invalid or not found.

Example:

{
  "request_id": "123456789",
  "data": {
    "765255700": {
      "terms": [ ... ]
    },
    "invalid_order": null
  }
}

Terms object

  • terms – A hierarchical array representing the full rental agreement.
  • Each node includes:
    • type (chapter, section, clause, sub_clause, clause_option)
    • Optional title
    • Optional children
  • Leaf nodes (clause_option) contain the final displayable text in text.

Example response:

{
  "request_id": "123456789",
  "data": {
    "765255700": {
      "terms": [
        {
          "type": "chapter",
          "title": "Rental agreement",
          "children": [
            {
              "type": "section",
              "title": "Driver requirements",
              "children": [
                {
                  "type": "clause",
                  "title": "Age restrictions",
                  "children": [
                    {
                      "type": "sub_clause",
                      "children": [
                        {
                          "type": "clause_option",
                          "text": "Driver must be <b>at least 25 years of age</b> to rent this vehicle."
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }

Best practices

✅ Validate input

  • Ensure all order IDs in the orders array are valid strings.
  • Invalid IDs return terms: null.

✅ Always include booker context

  • Providebooker.country to ensure correct legal and regional terms.

✅ Use language for localisation

  • Set language to match the traveller’s locale where possible.

✅ Voucher filtering

  • Use filters.voucher:true when displaying only the terms required on the traveller’s booking voucher page.

✅ Render hierarchy correctly

  • Preserve the nested structure when displaying terms.
  • Only clause_option.text contains final displayable legal text.
  • text may include basic HTML (for example tags). Ensure safe rendering or sanitisation where required.

Integration tips

  • Treat the response as a tree structure, not flat content.
  • Avoid flattening unless your UI explicitly requires it.
  • Preserve ordering of all nodes when rendering.
  • Use recursive rendering logic for best fidelity to legal structure.

Next steps

Curious to know more?
  • See the Car tutorial for a complete booking flow.
  • Refer to the Orders section for more details.