Add Custom Rule API Reference

POST

book/customrule/customrules/{workbenchID}/?RuleRecordName={NAME}

For {workbenchID} send the workbench identifier returned in ReservationResponse/Identifer/value in the workbench create response.

Base path:

Pre-production https://api.pp.travelport.com/11/air/

Production https://api.travelport.com/11/air/

Related Content: Custom Rules Guide

AirReservation 23.11.36 and later.

The Add Custom Rule request adds the name of a custom rule to a booking. Send it as part of a workbench session, either during the initial booking workflow after an offer is added, or a post-commit workbench for an existing reservation.

This request must be followed at some point by a workbench commit to apply the conditions in the rule to the booking. The commit compares the booking to the conditions in the attached rules. If any conditions are not met, an error message is returned and workbench changes are not committed. The workbench session is maintained to allow the conditions required by the attached rule to be corrected in the booking.

Custom rules are created in a rules booking engine used by your agency. See the Custom Rules Guide for details.

Note the following:

  • The RuleRecordName parameter must send a rule name that has already 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 by sending that PCC in the optional PCC query parameter. 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 a booking, the error message RULE {NAME} ALREADY ATTACHED - CustomRule is returned.

Request

Query Parameters

Parameter Description Required/Optional

RuleRecordName

Use to add the name of a custom rule associated with your PCC to the booking. You can send a Custom Rule List request to return a list of all rules associated with a specific PCC.

You can add up to three custom rules to a booking; send a separate request for each rule.

Required

PCC

Use to add a custom rule associated with another PCC with which your PCC has a selective access agreement.

Optional

Request Body

There is no message payload.

Response

The response returns a standard transaction identifier.

Example Request

Use only the RuleRecordName query parameter to add a custom rule associated with your PCC:

https://api.pp.travelport.com/11/air/book/customrule/customrules/cfa7a3a6-fefa-47e7-87a7-5c5cbde146cf/?RuleRecordName=TKT

Add the PCC query parameter to add a custom rule associated with a PCC with which your PCC has a selective access agreement.

https://api.pp.travelport.com/11/air/book/customrule/customrules/cfa7a3a6-fefa-47e7-87a7-5c5cbde146cf/?PCC=0XS4&RuleRecordName=TKT

Example Response

The response returns a standard system-generated identifier for the transaction.