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/ |
Del |
book/customrule/customrules/{workbenchID}/?RuleRecordSequence={XYZ} 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
The Custom Rule Add request adds the name of a custom rule to a booking A confirmed reservation with the carrier. A held booking is a reservation that has not yet been ticketed. The terms booking and reservation are interchangeable.. Send it as part of a workbench session, either during the initial booking workflow after an offer
In the JSON Search APIs, an offer is a product available at a specific price under a set of terms and conditions. An offer includes the flight or connecting flights for one leg of the itinerary, plus a service level that includes the cabin class and any fare codes that may apply. At booking, the selected offer from the Search response - including the flight/s, service level, price, terms and conditions, and brand if applicable - is converted into a single Offer object that is subsequently returned for that booking. is added, or a post-commit
Refers to the state of a booking after the booking is created, which happens after the initial booking workbench is commited and the reservation locator code issued. 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 API call that ends a workbench session, finalizing all changes and requests in that session. Depending on the workbench transactions, the commit workbench request may create a reservation, issue a ticket or EMD, exchange tickets, or modify a reservation. 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.
Send the Custom Rule Delete request in any workbench session to delete one or all custom rules from a reservation.
Custom rules are created in a rules booking engine used by your agency. See the Custom Rules for details.
Note the following:
- The RuleRecordName parameter must send a rule name that has already been created and associated with your PCC
Pseudo city code. A travel provider's identification code for the JSON APIs, provisioned from Travelport. Used to determine access and other settings in the JSON APIs for your company.. 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
Also see Authorization and Common Headers.
Query Parameters
Parameter | Description | Required/Optional |
---|---|---|
RuleRecordName |
Use in the Add request 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 to add |
PCC |
Use in the Add request to add a custom rule associated with another PCC with which your PCC has a selective access agreement. |
Optional |
RuleRecordSequence |
Use in the Delete request to specify the sequence number of a single rule to remove from the booking, or all rules from the booking. Supported values:
|
Required to delete |
Request Body
There is no message payload.
Response
The response for the Add request returns a standard transaction identifier.

Object |
Description |
---|---|
CustomRuleResponse |
Top level object. Includes Identifier object. |
Identifier |
System-generated identifier for the transaction:
|
Example Request
Add examples
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
Delete examples
Send a numeric value in the RuleRecordSequence query parameter to remove the custom rule in that sequence number from a booking:
https://api.pp.travelport.com/11/air/book/customrule/customrules/cfa7a3a6-fefa-47e7-87a7-5c5cbde146cf/?RuleRecordSequence=001
Send the value ALL in the RuleRecordSequence query parameter to remove all custom rules from a booking:
https://api.pp.travelport.com/11/air/book/customrule/customrules/cfa7a3a6-fefa-47e7-87a7-5c5cbde146cf/?RuleRecordSequence=ALL
Example Response
The Add response returns a standard system-generated identifier for the transaction. The Delete response does not return a payload.

{
"CustomRuleResponse": {
"Identifier": {
"value": "fc9ab7f1-c6ec-4787-a978-ae7f793704d6",
"authority": "Travelport"
}
}
}