Hopper Cancel For Any Reason (CFAR) API

**What is Cancel For Any Reason?** Cancel For Any Reason (CFAR) enables airlines to offer refundability as an ancillary with HTS powering the dynamic pricing and supporting the refund cost. **** **How it works** There are two distinct flows for CFAR: - The _purchase flow_, enabling customers to purchase the product within the airline’s booking flow. - The _exercise flow_, enabling customers to cancel their booking and get a refund. For each of these flows, the first step is to [Create a Session](#operation/postSessions) Both the purchase and the exercise of CFAR should be tracked by the airline in the airline’s Passenger Name Record (PNR) according to the applicable industry standards. **** **Purchase flow** CFAR follows the industry standard of a two step purchase process. 1. Once the user is landing on the page displaying the CFAR offer, the airline will call the [Create CFAR Offers](#operation/postCfar_offers) endpoint. CFAR Offers can be created at multiple granular levels. The request must include a description of the Itinerary for which the offers are requested. The response will contain - the price for the product (`premium`), - the refundable amount (`coverage`), - the UTC date and time until when the cancellation can be requested (`contract_expiry_date_time`) - and the description of the offer in the available languages (`contents`). 2. If a user is attaching CFAR to his booking, the airline will call the [Create CFAR Contract](#operation/postCfar_contracts) endpoint. The request must include the selected `offer_id`(s) and a description of the Itinerary for which the contract is requested, which must match the one of the Offer(s). At this stage, the CFAR Contract is only _created_. It will be confirmed once the customer has made the payment, which can be done in two ways: 1. If the airline is the Merchant of Records (MoR), it will capture the payment for the total amount of the booking, including the CFAR fee amount. Upon a successful payment, the airline will call the Update CFAR Contract Status endpoint to set the CFAR contract to _confirmed_. The airline will track this purchase in its PNR following the industry standards that apply to ticketing or ticketless carriers. 2. If HTS is the Merchant of Records (MoR), the airline will capture the payment for the amount of the booking excluding the CFAR fee, while HTS will capture the payment for the CFAR fee amount. Upon a successful payment of its portion, the airline will call the Process CFAR Payment endpoint for HTS to capture the payment for the CFAR fee amount. Once successful, the CFAR contract will be set to _confirmed_. The airline will track this purchase in its PNR. The details of a CFAR contract can be retrieved at any time through the Get a CFAR Contract endpoint. **** **Exercise flow** CFAR exercise follows a two step process. 1. The user will request the exercise from the “Manage My Bookings” (MMB) page of the airline, through a dedicated Call to action displayed based on the tracker added to the PNR at the time of booking. Once the user is requesting the exercise, the airline will call the [Create CFAR Exercise](#operation/postCfar_contract_exercises) endpoint to authorize the exercise. The request must include the Contract ID, the Itinerary at the time of the exercise request and some optional information on the refund option that may be offered by the airline. If eligible to the exercise, the response will contain the refundable amounts, both in cash and Future Travel Credit (FTC) if applicable. 2. Once the user has followed the steps of the refund portal and confirmed the cancellation request, HTS will make a call back to the airline to launch the PNR update flow on the airline’s end. The actual PNR update flow depends on each airline’s specifics and is not described here. Upon a successful update of the PNR, the airline will confirm the exercise to HTS by calling the [Complete CFAR Exercise](#operation/putCfar_contract_exercisesIdMark_completed) endpoint.

OpenAPI Specification

hopper-com-cancel-for-any-reason-cfar-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Airline Analytics Cancel For Any Reason (CFAR) API
  version: v1.1
  description: In order to measure and continuously improve HTS Ancillaries performance, specific events occurring during a customer session can be sent by the partner airlines using some dedicated endpoints.
servers:
- url: https://airlines-api.hopper.com/airline/v1.1
tags:
- description: "**What is Cancel For Any Reason?**\n\nCancel For Any Reason (CFAR) enables airlines to offer refundability as an ancillary with HTS powering the dynamic pricing and supporting the refund cost.\n\n****\n\n**How it works**\n\nThere are two distinct flows for CFAR:\n\n- The _purchase flow_, enabling customers to purchase the product within the airline’s booking flow.\n- The _exercise flow_, enabling customers to cancel their booking and get a refund.\n\nFor each of these flows, the first step is to [Create a Session](#operation/postSessions)\n\nBoth the purchase and the exercise of CFAR should be tracked by the airline in the airline’s Passenger Name Record (PNR) according to the applicable industry standards.\n\n****\n\n**Purchase flow**\n\nCFAR follows the industry standard of a two step purchase process.\n\n1. Once the user is landing on the page displaying the CFAR offer, the airline will call the [Create CFAR Offers](#operation/postCfar_offers) endpoint. CFAR Offers can be created at multiple granular levels. The request must include a description of the Itinerary for which the offers are requested. The response will contain\n\n   - the price for the product (`premium`),\n   - the refundable amount (`coverage`),\n   - the UTC date and time until when the cancellation can be requested (`contract_expiry_date_time`)\n   - and the description of the offer in the available languages (`contents`).\n\n2. If a user is attaching CFAR to his booking, the airline will call the [Create CFAR Contract](#operation/postCfar_contracts) endpoint. The request must include the selected `offer_id`(s) and a description of the Itinerary for which the contract is requested, which must match the one of the Offer(s). At this stage, the CFAR Contract is only _created_. It will be confirmed once the customer has made the payment, which can be done in two ways:\n\n    1. If the airline is the Merchant of Records (MoR), it will capture the payment for the total amount of the booking, including the CFAR fee amount. Upon a successful payment, the airline will call the Update CFAR Contract Status endpoint to set the CFAR contract to _confirmed_. The airline will track this purchase in its PNR following the industry standards that apply to ticketing or ticketless carriers.\n    2. If HTS is the Merchant of Records (MoR), the airline will capture the payment for the amount of the booking excluding the CFAR fee, while HTS will capture the payment for the CFAR fee amount. Upon a successful payment of its portion, the airline will call the Process CFAR Payment endpoint for HTS to capture the payment for the CFAR fee amount. Once successful, the CFAR contract will be set to _confirmed_. The airline will track this purchase in its PNR.\n\nThe details of a CFAR contract can be retrieved at any time through the Get a CFAR Contract endpoint.\n\n****\n\n**Exercise flow**\n\nCFAR exercise follows a two step process.\n\n1. The user will request the exercise from the “Manage My Bookings” (MMB) page of the airline, through a dedicated Call to action displayed based on the tracker added to the PNR at the time of booking. Once the user is requesting the exercise, the airline will call the [Create CFAR Exercise](#operation/postCfar_contract_exercises) endpoint to authorize the exercise. The request must include the Contract ID, the Itinerary at the time of the exercise request and some optional information on the refund option that may be offered by the airline. If eligible to the exercise, the response will contain the refundable amounts, both in cash and Future Travel Credit (FTC) if applicable.\n2. Once the user has followed the steps of the refund portal and confirmed the cancellation request, HTS will make a call back to the airline to launch the PNR update flow on the airline’s end. The actual PNR update flow depends on each airline’s specifics and is not described here. Upon a successful update of the PNR, the airline will confirm the exercise to HTS by calling the [Complete CFAR Exercise](#operation/putCfar_contract_exercisesIdMark_completed) endpoint.\n"
  name: Cancel For Any Reason (CFAR)
paths:
  /cfar_offers:
    post:
      description: Create CFAR offers for a user's trip
      operationId: postCfar_offers
      parameters:
      - description: The ID of the current airline session, see [Sessions](#tag/Sessions)
        example: 9fd3f2f9-e5aa-4128-ace9-3c4ee37b685f
        explode: false
        in: header
        name: HC-Session-ID
        required: false
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create_cfar_offer_request'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/cfar_offer'
                type: array
          description: The created CFAR offers
          headers:
            Expires:
              explode: false
              required: true
              schema:
                type: string
              style: simple
            Cache-Control:
              explode: false
              required: true
              schema:
                type: string
              style: simple
            HTS-Session-ID:
              description: The ID of the current session, see [Sessions](#tag/Sessions)
              example: 9fd3f2f9-e5aa-4128-ace9-3c4ee37b685f
              explode: false
              required: true
              schema:
                type: string
              style: simple
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad_request'
          description: Syntactic errors were encountered while handling the request
        '401':
          description: The client could not be authenticated
        '403':
          description: The authenticated client does not have permission to call this endpoint
        '404':
          description: The requested resource could not be found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unprocessable_entity'
          description: Semantic errors were encountered while handling the request
        '500':
          description: The server encountered an internal error
      security:
      - PartnerAuth: []
        apiKeyAuth: []
      summary: Create CFAR Offers
      tags:
      - Cancel For Any Reason (CFAR)
  /cfar_offers/external:
    post:
      description: Create a CFAR offer with externally provided pricing and coverage details (temporal API for data migration)
      operationId: postCfar_offersExternal
      parameters:
      - description: The ID of the current airline session, see [Sessions](#tag/Sessions)
        example: 9fd3f2f9-e5aa-4128-ace9-3c4ee37b685f
        explode: false
        in: header
        name: HC-Session-ID
        required: false
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create_external_cfar_offer_request'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/cfar_offer'
          description: The created CFAR offer
          headers:
            Expires:
              explode: false
              required: true
              schema:
                type: string
              style: simple
            Cache-Control:
              explode: false
              required: true
              schema:
                type: string
              style: simple
            HTS-Session-ID:
              description: The ID of the current session, see [Sessions](#tag/Sessions)
              example: 9fd3f2f9-e5aa-4128-ace9-3c4ee37b685f
              explode: false
              required: true
              schema:
                type: string
              style: simple
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad_request'
          description: Syntactic errors were encountered while handling the request
        '401':
          description: The client could not be authenticated
        '403':
          description: The authenticated client does not have permission to call this endpoint
        '404':
          description: The requested resource could not be found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unprocessable_entity'
          description: Semantic errors were encountered while handling the request
        '500':
          description: The server encountered an internal error
      security:
      - PartnerAuth: []
        apiKeyAuth: []
      summary: Create External CFAR Offer
      tags:
      - Cancel For Any Reason (CFAR)
  /cfar_contracts:
    post:
      description: Create a CFAR contract from selected CFAR offer(s).
      operationId: postCfar_contracts
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create_cfar_contract_request'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/cfar_contract'
          description: The created CFAR contract
          headers:
            Expires:
              explode: false
              required: true
              schema:
                type: string
              style: simple
            Cache-Control:
              explode: false
              required: true
              schema:
                type: string
              style: simple
        '204':
          description: The CFAR contract creation request was successfully validated but not performed
          headers:
            Expires:
              explode: false
              required: true
              schema:
                type: string
              style: simple
            Cache-Control:
              explode: false
              required: true
              schema:
                type: string
              style: simple
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad_request'
          description: Syntactic errors were encountered while handling the request
        '401':
          description: The client could not be authenticated
        '403':
          description: The authenticated client does not have permission to call this endpoint
        '404':
          description: The requested resource could not be found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unprocessable_entity'
          description: Semantic errors were encountered while handling the request
        '500':
          description: The server encountered an internal error
      security:
      - PartnerAuth: []
        apiKeyAuth: []
      summary: Create a CFAR Contract
      tags:
      - Cancel For Any Reason (CFAR)
  /cfar_contracts/{id}:
    get:
      description: Get a CFAR contract
      operationId: getCfar_contractsId
      parameters:
      - description: A unique identifier for a contract
        explode: false
        in: path
        name: id
        required: true
        schema:
          type: string
        style: simple
      - description: The ID of the current airline session, see [Sessions](#tag/Sessions)
        example: 9fd3f2f9-e5aa-4128-ace9-3c4ee37b685f
        explode: false
        in: header
        name: HC-Session-ID
        required: false
        schema:
          type: string
        style: simple
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/cfar_contract'
          description: The requested CFAR contract
          headers:
            Expires:
              explode: false
              required: true
              schema:
                type: string
              style: simple
            Cache-Control:
              explode: false
              required: true
              schema:
                type: string
              style: simple
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad_request'
          description: Syntactic errors were encountered while handling the request
        '401':
          description: The client could not be authenticated
        '403':
          description: The authenticated client does not have permission to call this endpoint
        '404':
          description: The requested resource could not be found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unprocessable_entity'
          description: Semantic errors were encountered while handling the request
        '500':
          description: The server encountered an internal error
      security:
      - PartnerAuth: []
        apiKeyAuth: []
      summary: Get a CFAR Contract
      tags:
      - Cancel For Any Reason (CFAR)
  /cfar_contracts/{id}/update_status:
    put:
      description: Update the CFAR contract
      operationId: putCfar_contractsIdUpdate_status
      parameters:
      - description: A unique identifier for a contract
        explode: false
        in: path
        name: id
        required: true
        schema:
          type: string
        style: simple
      - description: The ID of the current airline session, see [Sessions](#tag/Sessions)
        example: 9fd3f2f9-e5aa-4128-ace9-3c4ee37b685f
        explode: false
        in: header
        name: HC-Session-ID
        required: false
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update_cfar_contract_request'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/cfar_contract'
          description: The updated CFAR contract
          headers:
            Expires:
              explode: false
              required: true
              schema:
                type: string
              style: simple
            Cache-Control:
              explode: false
              required: true
              schema:
                type: string
              style: simple
        '204':
          description: The CFAR contract status update request was successfully validated but not performed
          headers:
            Expires:
              explode: false
              required: true
              schema:
                type: string
              style: simple
            Cache-Control:
              explode: false
              required: true
              schema:
                type: string
              style: simple
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad_request'
          description: Syntactic errors were encountered while handling the request
        '401':
          description: The client could not be authenticated
        '403':
          description: The authenticated client does not have permission to call this endpoint
        '404':
          description: The requested resource could not be found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unprocessable_entity'
          description: Semantic errors were encountered while handling the request
        '500':
          description: The server encountered an internal error
      security:
      - PartnerAuth: []
        apiKeyAuth: []
      summary: Update CFAR Contract Status
      tags:
      - Cancel For Any Reason (CFAR)
  /cfar_contracts/{id}/forms_of_payment:
    put:
      description: Update forms of payment linked with a CFAR contract
      operationId: putCfar_contractsIdForms_of_payment
      parameters:
      - description: A unique identifier for a contract
        explode: false
        in: path
        name: id
        required: true
        schema:
          type: string
        style: simple
      - description: The ID of the current airline session, see [Sessions](#tag/Sessions)
        example: 9fd3f2f9-e5aa-4128-ace9-3c4ee37b685f
        explode: false
        in: header
        name: HC-Session-ID
        required: false
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update_cfar_form_of_payment_request'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/cfar_contract'
          description: The updated CFAR contract
          headers:
            Expires:
              explode: false
              required: true
              schema:
                type: string
              style: simple
            Cache-Control:
              explode: false
              required: true
              schema:
                type: string
              style: simple
        '204':
          description: Forms of payment update request was successfully validated but not performed
          headers:
            Expires:
              explode: false
              required: true
              schema:
                type: string
              style: simple
            Cache-Control:
              explode: false
              required: true
              schema:
                type: string
              style: simple
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad_request'
          description: Syntactic errors were encountered while handling the request
        '401':
          description: The client could not be authenticated
        '403':
          description: The authenticated client does not have permission to call this endpoint
        '404':
          description: The requested resource could not be found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unprocessable_entity'
          description: Semantic errors were encountered while handling the request
        '500':
          description: The server encountered an internal error
      security:
      - PartnerAuth: []
        apiKeyAuth: []
      summary: Update forms of payment of a CFAR Contract
      tags:
      - Cancel For Any Reason (CFAR)
  /cfar_contracts/{id}/payment:
    post:
      description: "When HTS is the Merchant of Record (MoR), the customer's credit card is charged by HTS for the CFAR fee.\n\nHTS is relying on an external payment gateway to process the payments, it allows the partner airline to tokenize the customer's credit card details and then pass the generated token in HTS Ancillaries for Airlines API payment endpoints in order to process the payment and confirm the contract related to the purchased product.\n\n**Token URL**: https://core.spreedly.com/v1/payment_methods.json\n  \n**Example Token Request**:  \n  \n```  \ncurl --request POST --url https://core.spreedly.com/v1/payment_methods.json --header 'content-type: application/json' -u  \"login:password\" --data '{\n\t\"payment_method\": {\n\t\t\"email\": \"aaa@bbb.ccc\",\n\t\t\"credit_card\": {\n\t\t\t\"number\": \"4111111111111111\",\n\t\t\t\"month\": \"09\",\n\t\t\t\"year\": \"2029\",\n\t\t\t\"first_name\": \"John\",\n\t\t\t\"last_name\": \"Smith\",\n\t\t\t\"address1\": \"123 12th St\",\n\t\t\t\"address2\": \"Building B\",\n\t\t\t\"city\": \"Quebec City\",\n\t\t\t\"state\": \"QC\",\n\t\t\t\"zip\": \"G1R 4S9\",\n\t\t\t\"country\": \"CA\",\n\t\t\t\"verification_value\": \"123\"\n\t\t}\n\t}\n}'\n```\n**Example Token Response**:  \n```  \n{\n\t\"transaction\":  {\n\t\t\"token\":  \"KtToV20m9qT1Yi8pbTeLNz0Ypns\",\n\t\t\"created_at\":  \"2023-11-29T13:31:56Z\",\n\t\t\"updated_at\":  \"2023-11-29T13:31:56Z\",\n\t\t\"succeeded\":  true,\n\t\t\"transaction_type\":  \"AddPaymentMethod\",\n\t\t\"retained\":  false,\n\t\t\"state\":  \"succeeded\",\n\t\t\"message_key\":  \"messages.transaction_succeeded\",\n\t\t\"message\":  \"Succeeded!\",\n\t\t\"payment_method\":  {\n\t\t\t\"token\":  \"MxyYEhDK12CUAA18bJDkAq0ab3y\",\n\t\t\t\"created_at\":  \"2023-11-29T13:31:56Z\",\n\t\t\t\"updated_at\":  \"2023-11-29T13:31:56Z\",\n\t\t\t\"email\":  \"aaa@bbb.ccc\",\n\t\t\t\"data\":  null,\n\t\t\t\"storage_state\":  \"cached\",\n\t\t\t\"test\":  true,\n\t\t\t\"metadata\":  null,\n\t\t\t\"callback_url\":  null,\n\t\t\t\"last_four_digits\":  \"1111\",\n\t\t\t\"first_six_digits\":  \"411111\",\n\t\t\t\"card_type\":  \"visa\",\n\t\t\t\"first_name\":  \"John\",\n\t\t\t\"last_name\":  \"Smith\",\n\t\t\t\"month\":  9,\n\t\t\t\"year\":  2029,\n\t\t\t\"address1\":  \"123 12th St\",\n\t\t\t\"address2\":  \"Building B\",\n\t\t\t\"city\":  \"Quebec City\",\n\t\t\t\"state\":  \"QC\",\n\t\t\t\"zip\":  \"G1R 4S9\",\n\t\t\t\"country\":  \"CA\",\n\t\t\t\"phone_number\":  null,\n\t\t\t\"company\":  null,\n\t\t\t\"full_name\":  \"John Smith\",\n\t\t\t\"eligible_for_card_updater\":  true,\n\t\t\t\"shipping_address1\":  null,\n\t\t\t\"shipping_address2\":  null,\n\t\t\t\"shipping_city\":  null,\n\t\t\t\"shipping_state\":  null,\n\t\t\t\"shipping_zip\":  null,\n\t\t\t\"shipping_country\":  null,\n\t\t\t\"shipping_phone_number\":  null,\n\t\t\t\"issuer_identification_number\":  \"41111111\",\n\t\t\t\"click_to_pay\":  false,\n\t\t\t\"managed\":  true,\n\t\t\t\"payment_method_type\":  \"credit_card\",\n\t\t\t\"errors\":  [],\n\t\t\t\"bin_metadata\":  {\n\t\t\t\t\"message\":  \"BIN Metadata is available only to Advanced Vault enrolled customers and payment methods. Reach out to your account representative for more details.\"\n\t\t\t},\n\t\t\t\"fingerprint\":  \"7ccffcf38900f224fc946cf2a9c8e260072b\",\n\t\t\t\"verification_value\":  \"XXX\",\n\t\t\t\"number\":  \"XXXX-XXXX-XXXX-1111\"\n\t\t}\n\t}\n}\n```\nHere the returned payment method token **MxyYEhDK12CUAA18bJDkAq0ab3y** has to be used in the Process CFAR Payment request below."
      operationId: postCfar_contractsIdPayment
      parameters:
      - description: A unique identifier for a contract
        explode: false
        in: path
        name: id
        required: true
        schema:
          type: string
        style: simple
      - description: The ID of the current airline session, see [Sessions](#tag/Sessions)
        example: 9fd3f2f9-e5aa-4128-ace9-3c4ee37b685f
        explode: false
        in: header
        name: HC-Session-ID
        required: false
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/process_cfar_payment_request'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/cfar_payment'
          description: The result of the transaction
          headers:
            Expires:
              explode: false
              required: true
              schema:
                type: string
              style: simple
            Cache-Control:
              explode: false
              required: true
              schema:
                type: string
              style: simple
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad_request'
          description: Syntactic errors were encountered while handling the request
        '401':
          description: The client could not be authenticated
        '403':
          description: The authenticated client does not have permission to call this endpoint
        '404':
          description: The requested resource could not be found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unprocessable_entity'
          description: Semantic errors were encountered while handling the request
        '500':
          description: The server encountered an internal error
      security:
      - PartnerAuth: []
        apiKeyAuth: []
      summary: Process CFAR Payment
      tags:
      - Cancel For Any Reason (CFAR)
  /cfar_contracts/{id}/itinerary_slices:
    put:
      description: Update itinerary slices of a CFAR contract.
      operationId: putCfar_contractsIdItinerary_slices
      parameters:
      - description: A unique identifier for a contract
        explode: false
        in: path
        name: id
        required: true
        schema:
          type: string
        style: simple
      - description: The ID of the current airline session, see [Sessions](#tag/Sessions)
        example: 9fd3f2f9-e5aa-4128-ace9-3c4ee37b685f
        explode: false
        in: header
        name: HC-Session-ID
        required: false
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update_cfar_contract_itinerary_slices_request'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/cfar_contract'
          description: The updated CFAR contract
          headers:
            Expires:
              explode: false
              required: true
              schema:
                type: string
              style: simple
            Cache-Control:
              explode: false
              required: true
              schema:
                type: string
              style: simple
        '204':
          description: The CFAR Contract Itinerary Slices update request was successfully validated but not performed
          headers:
            Expires:
              explode: false
              required: true
              schema:
                type: string
              style: simple
            Cache-Control:
              explode: false
              required: true
              schema:
                type: string
              style: simple
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad_request'
          description: Syntactic errors were encountered while handling the request
        '401':
          description: The client could not be authenticated
        '403':
          description: The authenticated client does not have permission to call this endpoint
        '404':
          description: The requested resource could not be found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unprocessable_entity'
          description: Semantic errors were encountered while handling the request
        '500':
          description: The server encountered an internal error
      security:
      - PartnerAuth: []
        apiKeyAuth: []
      summary: Update CFAR Contract Itinerary Slices
      tags:
      - Cancel For Any Reason (CFAR)
  /cfar_contract_exercises:
    post:
      description: Record that a request to exercise a CFAR contract has occurred.
      operationId: postCfar_contract_exercises
      parameters:
      - description: The ID of the current airline session, see [Sessions](#tag/Sessions)
        example: 9fd3f2f9-e5aa-4128-ace9-3c4ee37b685f
        explode: false
        in: header
        name: HC-Session-ID
        required: false
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create_cfar_contract_exercise_request'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/cfar_contract_exercise'
          description: The created CFAR contract exercise
          headers:
            Expires:
              explode: false
              required: true
              schema:
                type: string
              style: simple
            Cache-Control:
              explode: false
              required: true
              schema:
                type: string
              style: simple
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad_request'
          description: Syntactic errors were encountered while handling the request
        '401':
          description: The client could not be authenticated
        '403':
          description: The authenticated client does not have permission to call this endpoint
        '404':
          description: The requested resource could not be found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unprocessable_entity'
          description: Semantic errors were encountered while handling the request
        '500':
          description: The server encountered an internal error
      security:
      - PartnerAuth: []
        apiKeyAuth: []
      summary: Create CFAR Exercise
      tags:
      - Cancel For Any Reason (CFAR)
  /cfar_contract_exercises/{id}/mark_completed:
    put:
      description: Record that a request to exercise a CFAR contract has been completed
      operationId: putCfar_contract_exercisesIdMark_completed
      parameters:
      - description: A unique identifier for a exercise
        explode: false
        in: path
        name: id
        required: true
        schema:
          type: string
        style: simple
      - description: The ID of the current airline session, see [Sessions](#tag/Sessions)
        example: 9fd3f2f9-e5aa-4128-ace9-3c4ee37b685f
        explode: false
        in: header
        name: HC-Session-ID
        required: false
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/mark_cfar_contract_exercise_complete_request'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/cfar_contract_exercise'
          description: The updated CFAR contract exercise
          headers:
            Expires:
              explode: false
              required: true
              schema:
                type: string
              style: simple
            Cache-Control:
              explode: false
              required: true
              schema:
                type: string
              style: simple
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bad_request'
          description: Syntactic errors were encountered while handling the request
        '401':
          description: The client could not be authenticated
        '403':
          description: The authenticated client does not have permission to call this endpoint
        '404':
          description: The requested resource could not be found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/unprocessable_entity'
          description: Semantic errors were encountered while handling the request
        '500'

# --- truncated at 32 KB (144 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/hopper-com/refs/heads/main/openapi/hopper-com-cancel-for-any-reason-cfar-api-openapi.yml