<!-- x-generated: Generated by the Hyperscale artifact pipeline; do not edit by hand -->

# Air Travel Agency

> The frozen Air Travel Agency Product Build, version 1.

- Composition id: `air_travel_agency`
- Version: 1
- Digest: `32f4e5060cf2b356152995a6d2a0d29390d780c8e6967a361de4bb7b41ef1b82`
- Currencies: `SAR`
- Webhook events: 24

## Instruments

| Instrument | Title | States | Actions |
| --- | --- | --- | --- |
| [`flight_booking`](../instruments/flight_booking.md) | Flight booking | 9 | cancel_confirm, cancel_quote, confirm, create |

## Journeys

### Release a flight hold

- Journey id: `flight_hold_released`
- Steps: 9

1. `sandbox_customer_onboard`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/sandbox/customer-onboarding`, scopes customer:write, idempotency required, receipt yes
   - Body: displayName, productId
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: none
2. `sandbox_customer_access_activate`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/sandbox/customer-access/{customerAccessId}/activate`, scopes customer:write, idempotency required, receipt yes
   - Body: none
   - Path: customerAccessId
   - Query: none
   - Expect: none
   - Bindings: customerAccessId <- customer.customerAccessId
3. `account_create`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/accounts`, scopes account:write, idempotency required, receipt yes
   - Body: currency, owner, role
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: owner.id <- customer.customerId
4. `sandbox_customer_onboard`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/sandbox/customer-onboarding`, scopes customer:write, idempotency required, receipt yes
   - Body: displayName, productId
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: none
5. `sandbox_customer_access_activate`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/sandbox/customer-access/{customerAccessId}/activate`, scopes customer:write, idempotency required, receipt yes
   - Body: none
   - Path: customerAccessId
   - Query: none
   - Expect: none
   - Bindings: customerAccessId <- operator_customer.customerAccessId
6. `account_create`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/accounts`, scopes account:write, idempotency required, receipt yes
   - Body: currency, owner, role
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: owner.id <- operator_customer.customerId
7. `subject_create`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/subjects`, scopes product:write, idempotency required, receipt yes
   - Body: attributes, declaredValue, kind, kindVersion, productId
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: none
8. `flight_booking_create`
   - Actor: product
   - Action: `flight_booking.create`
   - Route: `POST /v1/flight-bookings`, scopes flight_booking:write, idempotency required, receipt yes
   - Body: bookingNote, currency, departsAt, fareAmount, holdExpiresAt, operatorAccountId, productId, subject, travelerAccountId
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: operatorAccountId <- operator.accountId, subject <- subject.subjectId, travelerAccountId <- traveler.accountId
9. `flight_booking_release`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/flight-bookings/{flightBookingId}/release`, scopes flight_booking:write, idempotency required, receipt yes
   - Body: none
   - Path: flightBookingId
   - Query: none
   - Expect: none
   - Bindings: flightBookingId <- booking.flightBookingId

### Release a held stay

- Journey id: `release_held_stay`
- Steps: 7

1. `sandbox_customer_onboard`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/sandbox/customer-onboarding`, scopes customer:write, idempotency required, receipt yes
   - Body: displayName, productId
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: none
2. `sandbox_customer_access_activate`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/sandbox/customer-access/{customerAccessId}/activate`, scopes customer:write, idempotency required, receipt yes
   - Body: none
   - Path: customerAccessId
   - Query: none
   - Expect: none
   - Bindings: customerAccessId <- customer.customerAccessId
3. `subject_create`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/subjects`, scopes product:write, idempotency required, receipt yes
   - Body: attributes, declaredValue, kind, kindVersion, productId
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: none
4. `account_create`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/accounts`, scopes account:write, idempotency required, receipt yes
   - Body: currency, owner, role
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: owner.id <- customer.customerId
5. `account_create`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/accounts`, scopes account:write, idempotency required, receipt yes
   - Body: currency, owner, role
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: owner.id <- customer.customerId
6. `hotel_stay_create`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/hotel-stays`, scopes hotel_stay:write, idempotency required, receipt yes
   - Body: checkInAt, checkOutAt, currency, guestAccountId, holdExpiresAt, productId, propertyAccountId, rateAmount, subject
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: guestAccountId <- guest_account.accountId, propertyAccountId <- property_account.accountId, subject <- stay_subject.subjectId
7. `hotel_stay_release`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/hotel-stays/{hotelStayId}/release`, scopes hotel_stay:write, idempotency required, receipt yes
   - Body: none
   - Path: hotelStayId
   - Query: none
   - Expect: none
   - Bindings: hotelStayId <- stay.hotelStayId

### Complete a travel package

- Journey id: `complete_travel_package`
- Steps: 7

1. `sandbox_customer_onboard`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/sandbox/customer-onboarding`, scopes customer:write, idempotency required, receipt yes
   - Body: displayName, productId
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: none
2. `sandbox_customer_access_activate`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/sandbox/customer-access/{customerAccessId}/activate`, scopes customer:write, idempotency required, receipt yes
   - Body: none
   - Path: customerAccessId
   - Query: none
   - Expect: none
   - Bindings: customerAccessId <- customer.customerAccessId
3. `subject_create`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/subjects`, scopes product:write, idempotency required, receipt yes
   - Body: attributes, declaredValue, kind, kindVersion, productId
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: none
4. `account_create`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/accounts`, scopes account:write, idempotency required, receipt yes
   - Body: currency, owner, role
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: owner.id <- customer.customerId
5. `travel_package_create`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/travel-packages`, scopes travel_package:write, idempotency required, receipt yes
   - Body: departAt, memo, payerAccountId, productId, subject
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: payerAccountId <- payer_account.accountId, subject <- traveler_subject.subjectId
6. `travel_package_confirm`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/travel-packages/{travelPackageId}/confirm`, scopes travel_package:write, idempotency required, receipt yes
   - Body: none
   - Path: travelPackageId
   - Query: none
   - Expect: none
   - Bindings: travelPackageId <- package.travelPackageId
7. `travel_package_complete`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/travel-packages/{travelPackageId}/complete`, scopes travel_package:write, idempotency required, receipt yes
   - Body: none
   - Path: travelPackageId
   - Query: none
   - Expect: none
   - Bindings: travelPackageId <- package.travelPackageId

### Sell a flight

- Journey id: `air_agency_booking_settlement`
- Steps: 12

1. `sandbox_customer_onboard`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/sandbox/customer-onboarding`, scopes customer:write, idempotency required, receipt yes
   - Body: displayName, productId
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: none
2. `sandbox_customer_access_activate`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/sandbox/customer-access/{customerAccessId}/activate`, scopes customer:write, idempotency required, receipt yes
   - Body: none
   - Path: customerAccessId
   - Query: none
   - Expect: none
   - Bindings: customerAccessId <- traveler.customerAccessId
3. `account_create`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/accounts`, scopes account:write, idempotency required, receipt yes
   - Body: currency, owner, role
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: owner.id <- traveler.customerId
4. `sandbox_account_fund`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/sandbox/account-funding`, scopes transfer:write, idempotency required, receipt yes
   - Body: amount, currency, destinationAccountId
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: destinationAccountId <- traveler_account.accountId
5. `sandbox_customer_onboard`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/sandbox/customer-onboarding`, scopes customer:write, idempotency required, receipt yes
   - Body: displayName, productId
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: none
6. `sandbox_customer_access_activate`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/sandbox/customer-access/{customerAccessId}/activate`, scopes customer:write, idempotency required, receipt yes
   - Body: none
   - Path: customerAccessId
   - Query: none
   - Expect: none
   - Bindings: customerAccessId <- agency.customerAccessId
7. `account_create`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/accounts`, scopes account:write, idempotency required, receipt yes
   - Body: currency, owner, role
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: owner.id <- agency.customerId
8. `subject_create`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/subjects`, scopes product:write, idempotency required, receipt yes
   - Body: attributes, declaredValue, kind, kindVersion, productId
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: none
9. `flight_booking_create`
   - Actor: product
   - Action: `flight_booking.create`
   - Route: `POST /v1/flight-bookings`, scopes flight_booking:write, idempotency required, receipt yes
   - Body: bookingNote, currency, departsAt, fareAmount, holdExpiresAt, operatorAccountId, productId, subject, travelerAccountId
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: travelerAccountId <- traveler_account.accountId, operatorAccountId <- agency_account.accountId, subject <- itinerary.subjectId
10. `flight_booking_confirm`
   - Actor: product
   - Action: `flight_booking.confirm`
   - Route: `POST /v1/flight-bookings/{flightBookingId}/confirm`, scopes flight_booking:write, transfer:write, idempotency required, receipt yes
   - Body: none
   - Path: flightBookingId
   - Query: none
   - Expect: none
   - Bindings: flightBookingId <- booking.flightBookingId
11. `flight_booking_cancel_quote`
   - Actor: product
   - Action: `flight_booking.cancel_quote`
   - Route: `POST /v1/flight-bookings/{flightBookingId}/cancel-quote`, scopes flight_booking:write, idempotency required, receipt yes
   - Body: none
   - Path: flightBookingId
   - Query: none
   - Expect: none
   - Bindings: flightBookingId <- booking.flightBookingId
12. `flight_booking_cancel_confirm`
   - Actor: product
   - Action: `flight_booking.cancel_confirm`
   - Route: `POST /v1/flight-bookings/{flightBookingId}/cancel-confirm`, scopes flight_booking:write, transfer:write, idempotency required, receipt yes
   - Body: none
   - Path: flightBookingId
   - Query: none
   - Expect: none
   - Bindings: flightBookingId <- booking.flightBookingId

### Register an itinerary

- Journey id: `air_agency_itinerary`
- Steps: 1

1. `subject_create`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/subjects`, scopes product:write, idempotency required, receipt yes
   - Body: attributes, declaredValue, kind, kindVersion, productId
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: none

### Onboard a traveler

- Journey id: `air_agency_traveler_onboarding`
- Steps: 2

1. `sandbox_customer_onboard`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/sandbox/customer-onboarding`, scopes customer:write, idempotency required, receipt yes
   - Body: displayName, productId
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: none
2. `sandbox_customer_access_activate`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/sandbox/customer-access/{customerAccessId}/activate`, scopes customer:write, idempotency required, receipt yes
   - Body: none
   - Path: customerAccessId
   - Query: none
   - Expect: none
   - Bindings: customerAccessId <- traveler.customerAccessId

### Move fare funds

- Journey id: `air_agency_fare_movement`
- Steps: 9

1. `sandbox_customer_onboard`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/sandbox/customer-onboarding`, scopes customer:write, idempotency required, receipt yes
   - Body: displayName, productId
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: none
2. `sandbox_customer_access_activate`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/sandbox/customer-access/{customerAccessId}/activate`, scopes customer:write, idempotency required, receipt yes
   - Body: none
   - Path: customerAccessId
   - Query: none
   - Expect: none
   - Bindings: customerAccessId <- payer.customerAccessId
3. `account_create`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/accounts`, scopes account:write, idempotency required, receipt yes
   - Body: currency, owner, role
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: owner.id <- payer.customerId
4. `sandbox_account_fund`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/sandbox/account-funding`, scopes transfer:write, idempotency required, receipt yes
   - Body: amount, currency, destinationAccountId
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: destinationAccountId <- payer_account.accountId
5. `sandbox_customer_onboard`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/sandbox/customer-onboarding`, scopes customer:write, idempotency required, receipt yes
   - Body: displayName, productId
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: none
6. `sandbox_customer_access_activate`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/sandbox/customer-access/{customerAccessId}/activate`, scopes customer:write, idempotency required, receipt yes
   - Body: none
   - Path: customerAccessId
   - Query: none
   - Expect: none
   - Bindings: customerAccessId <- payee.customerAccessId
7. `account_create`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/accounts`, scopes account:write, idempotency required, receipt yes
   - Body: currency, owner, role
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: owner.id <- payee.customerId
8. `internal_transfer_reserve`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/internal-transfers/reserve`, scopes transfer:write, idempotency required, receipt yes
   - Body: amount, currency, destinationAccountId, memo, sourceAccountId
   - Path: none
   - Query: none
   - Expect: none
   - Bindings: sourceAccountId <- payer_account.accountId, destinationAccountId <- payee_account.accountId
9. `internal_transfer_post`
   - Actor: product
   - Action: platform write
   - Route: `POST /v1/internal-transfers/{transferId}/post`, scopes transfer:write, idempotency required, receipt yes
   - Body: none
   - Path: transferId
   - Query: none
   - Expect: none
   - Bindings: transferId <- fare_reserve.transferId

## Cost

Cost table version 2026-09-02.1. Flat amounts are multiplied by the action count; basis points price the meter's moved amount, which an action count does not determine.

| Instrument | Action | Effect | Meter | Flat per action | Rate on meter | 1,000 per month | 100,000 per month | 10,000,000 per month |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| `flight_booking` | `amend_collect` | `moves.transfer.internal` | `transfer.internal.volume_sar` | 0.75 SAR | 11 bps | 750.00 SAR | 75,000.00 SAR | 7,500,000.00 SAR |
| `flight_booking` | `amend_fee` | `moves.transfer.internal` | `transfer.internal.volume_sar` | 0.75 SAR | 11 bps | 750.00 SAR | 75,000.00 SAR | 7,500,000.00 SAR |
| `flight_booking` | `amend_refund` | `moves.transfer.internal` | `transfer.internal.volume_sar` | 0.75 SAR | 11 bps | 750.00 SAR | 75,000.00 SAR | 7,500,000.00 SAR |
| `flight_booking` | `cancel_confirm` | `moves.transfer.internal` | `transfer.internal.volume_sar` | 0.75 SAR | 11 bps | 750.00 SAR | 75,000.00 SAR | 7,500,000.00 SAR |
| `flight_booking` | `cancel_quote` | `holds.quote` | `instrument.event.count` | 0.00 SAR | 0 bps | 0.00 SAR | 0.00 SAR | 0.00 SAR |
| `flight_booking` | `cancel_quote` | `schedules.expiry` | `instrument.event.count` | 0.00 SAR | 0 bps | 0.00 SAR | 0.00 SAR | 0.00 SAR |
| `flight_booking` | `collect_penalty` | `moves.transfer.internal` | `transfer.internal.volume_sar` | 0.75 SAR | 11 bps | 750.00 SAR | 75,000.00 SAR | 7,500,000.00 SAR |
| `flight_booking` | `complete` | `moves.transfer.internal` | `transfer.internal.volume_sar` | 0.75 SAR | 11 bps | 750.00 SAR | 75,000.00 SAR | 7,500,000.00 SAR |
| `flight_booking` | `complete` | `schedules.due` | `instrument.event.count` | 0.00 SAR | 0 bps | 0.00 SAR | 0.00 SAR | 0.00 SAR |
| `flight_booking` | `confirm` | `decides.air_carrier` | `instrument.event.count` | 0.00 SAR | 0 bps | 0.00 SAR | 0.00 SAR | 0.00 SAR |
| `flight_booking` | `confirm` | `moves.transfer.internal` | `transfer.internal.volume_sar` | 0.75 SAR | 11 bps | 750.00 SAR | 75,000.00 SAR | 7,500,000.00 SAR |
| `flight_booking` | `confirm` | `schedules.deadline` | `instrument.event.count` | 0.00 SAR | 0 bps | 0.00 SAR | 0.00 SAR | 0.00 SAR |
| `flight_booking` | `create` | `reads.requires_refs` | `instrument.event.count` | 0.00 SAR | 0 bps | 0.00 SAR | 0.00 SAR | 0.00 SAR |
| `flight_booking` | `expire` | `schedules.due` | `instrument.event.count` | 0.00 SAR | 0 bps | 0.00 SAR | 0.00 SAR | 0.00 SAR |
| `flight_booking` | `package_cancel` | `moves.transfer.internal` | `transfer.internal.volume_sar` | 0.75 SAR | 11 bps | 750.00 SAR | 75,000.00 SAR | 7,500,000.00 SAR |
| `flight_booking` | `package_cancel` | `schedules.due` | `instrument.event.count` | 0.00 SAR | 0 bps | 0.00 SAR | 0.00 SAR | 0.00 SAR |
| **Total flat** | | | | | | **6,000.00 SAR** | **600,000.00 SAR** | **60,000,000.00 SAR** |
