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. 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.
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. 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"
}
}
}