Custom Rules Guide

Related Content: Booking Guide

In this guide:

The JSON Custom Rules APIs allow you to manage and use the custom rules set up for your PCC (pseudo city code, a travel provider's identification code provisioned from Travelport).

APIs in this topic were released in AirReservation 23.11.40.

Basic Concepts

Custom rules are created in a booking file management tool to validate against specific criteria. They could be organization rules, corporate rules, business rules, personal rules, and so on. For example, a custom rule could check for non-mandatory data such as that every booking must contain a delivery address, or that an after hours contact number must be sent to the airline as an OSI remark. Or, a rule could check for items required for back office systems such as a name remark.

Custom rules are not created in the JSON APIs but can be applied to bookings in the JSON APIs. You can add up to three custom rules to a booking.

If custom rules are configured for your PCC at Travelport, the AirReservation workbench commit compares the booking to the conditions in any rules that have been added to the booking. If any conditions are not met, an error message is returned and the changes in the workbench are not committed. The workbench session is maintained so that the conditions required by the attached rule can be corrected in the booking.

Note the following:

  • When adding a rule to a booking, that rule must already have been created and associated with your PCC. Otherwise, the error message INVALID - RULE {NAME} DOES NOT EXIST - CustomRule is returned.
  • The exception is that you can send a rule name created for a PCC with which your PCC has an agreement. If your PCC does not have an agreement with that PCC, the error message NO AGREEMENT EXISTS FOR PSEUDO CITY - {PCC} - CustomRule is returned.
  • You must send a separate request for each rule to add.
  • You can add up to three custom rules to a booking. If additional rules are sent, the error message INVALID - THREE RULES ALREADY ATTACHED - CustomRule is returned.
  • If you send a rule name that has already been attached to the booking, the error message RULE {NAME} ALREADY ATTACHED - CustomRule is returned.

Custom Rule APIs

The JSON APIs include the following APIs for using custom rules with bookings made in the JSON APIs. See the linked API references for details:

  • Add Custom Rule: Add a custom rule to a booking. Sent in a workbench session.
  • Delete Custom Rule: Delete one or all custom rules from a specific booking. Sent in a workbench session.
  • Custom Rule List: Return a list of all custom rules associated with a PCC. Standalone request that can be sent as part of a workbench or without a workbench.
  • Custom Rule Details: Return details of a specific custom rule associated with a PCC. Standalone request that can be sent as part of a workbench or without a workbench.

To return the rules associated with a specific booking, send a reservation retrieve with detail view requested.