OCN

This guide will help you to understand the workflow of OCN (Order Change Notification) implementation. If the specific airline has changes made involuntarily to the booking PNR, this service will notify you in that PNR itinerary something was changed as the itinerary for that PNR such as delays or rescheduling.

For the OCN changes may either happen after the PNR creation or after ticketing or if the booking has hold status and these changes happen based on the airline.

What do you need to start?

To get started you will receive the notification that if the PNR has any modification (Involuntary Changes) via the airline, you will provide details to which endpoint to push the OCN response.

[Reference: Visit our Ticket user guide, if you haven’t yet learned how to create a booking and getting your ticket]

You only encounter the OCN flow after completing the booking or ticketing process.

[Reference: Visit our OrderChangeNotification user guide, to learn more details about the config the URL with authorization and the response part].

curl --location --request POST 'customer_ocn_listner_url' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic EncryptionKey' \
--data-raw '{
  "OrderViewRS": {
    "Document": {
      "Name": "API GATEWAY",
      "ReferenceVersion": "1.2"
    },
    "Party": {
      "Sender": {
        "TravelAgencySender": {
          "Name": "test Travels",
          "IATA_Number": "",
          "AgencyID": "test Travels",
          "Contacts": {
            "Contact": [
              {
                "EmailContact": "test@gmail.com"
              }
            ]
          }
        }
      }
    },
    "ShoppingResponseId": "1724067361311310318",
    "Success": {},
    "Payments": {
      "Payment": [
        {
          "Type": "CARD",
          "Amount": "486.66",
          "Method": {
            "PaymentCard": {
              "CardCode": "VI",
              "CardNumber": "card_number_a1fa7c4e51ed6c506a49cf2e412f8d238abb883a1149e857cd8233d9",
              "SeriesCode": "cvv_a1fa7c4e51ed6c506a49cf2e412f8d238abb883a1149e857cd8233d9",
              "CardHolderName": "card_holder_name_a1fa7c4e51ed6c506a49cf2e412f8d238abb883a1149e857cd8233d9",
              "EffectiveExpireDate": {
                "Effective": "",
                "Expiration": "exp_year_a1fa7c4e51ed6c506a49cf2e412f8d238abb883a1149e857cd8233d9-exp_month_a1fa7c4e51ed6c506a49cf2e412f8d238abb883a1149e857cd8233d9"
              }
            }
          }
        }
      ]
    },
    "Order": [
      {
        "OrderID": "EJD8UG7F",
        "GdsBookingReference": "RSGDXQ",
        "OrderStatus": "BOOKED",
        "PaymentStatus": "PAID",
        "TicketStatus": "TICKETED",
        "PnrStatus": "",

        "ScheduleChangeIndicator": false,
        "ScheduleChangeStatus": "",
        "NeedToTicket": "N",
        "OfferID": "117498831724067367341788002",
        "Owner": "WS",
        "OwnerName": "Westjet",
        "IsBrandedFare": "Y",
        "BrandedFareOptions": [],
        "InstantTicket": "N",
        "CabinOptions": [],
        "IsAdditionalCabinType": "N",
        "Eticket": "",
        "TimeLimits": {
          "OfferExpirationDateTime": "2024-08-23T13:11:19"
        },
        "BookingCurrencyCode": "CAD",
        "EquivCurrencyCode": "CAD",
        "HstPercentage": "",
        "RewardSettings": {
          "RewardAvailable": "N",
          "PointTypes": [],
          "PointValues": {}
        },
        "BookingFeeInfo": {
          "FeeType": "",
          "BookingCurrencyPrice": 0,
          "EquivCurrencyPrice": 0
        },
        "TotalPrice": {
          "BookingCurrencyPrice": 456.66,
          "EquivCurrencyPrice": 456.66
        },
        "BasePrice": {
          "BookingCurrencyPrice": 270.75,
          "EquivCurrencyPrice": 270.75
        },
        "TaxPrice": {
          "BookingCurrencyPrice": 185.91,
          "EquivCurrencyPrice": 185.91
        },
        "Commission": {
          "AgencyCommission": {
            "BookingCurrencyPrice": 0,
            "EquivCurrencyPrice": 0
          },
          "AgencyYqCommission": {
            "BookingCurrencyPrice": 0,
            "EquivCurrencyPrice": 0
          }
        },
        "PortalCharges": {
          "Markup": {
            "BookingCurrencyPrice": 0,
            "EquivCurrencyPrice": 0
          },
          "Surcharge": {
            "BookingCurrencyPrice": 0,
            "EquivCurrencyPrice": 0
          },
          "Discount": {
            "BookingCurrencyPrice": 0,
            "EquivCurrencyPrice": 0
          }
        },
        "AgentMarkupInfo": {
          "OnflyMarkup": {
            "BookingCurrencyPrice": 30,
            "EquivCurrencyPrice": 30
          },
          "OnflyDiscount": {
            "BookingCurrencyPrice": 0,
            "EquivCurrencyPrice": 0
          },
          "OnflyHst": {
            "BookingCurrencyPrice": 0,
            "EquivCurrencyPrice": 0
          },
          "PromoDiscount": {
            "BookingCurrencyPrice": 0,
            "EquivCurrencyPrice": 0,
            "PromoCode": ""
          }
        },
        "Penalty": {
          "ChangeFee": {
            "Before": {
              "BookingCurrencyPrice": "NA",
              "EquivCurrencyPrice": "NA"
            },
            "After": {
              "BookingCurrencyPrice": "NA",
              "EquivCurrencyPrice": "NA"
            }
          },
          "CancelationFee": {
            "Before": {
              "BookingCurrencyPrice": "NA",
              "EquivCurrencyPrice": "NA"
            },
            "After": {
              "BookingCurrencyPrice": "NA",
              "EquivCurrencyPrice": "NA"
            }
          }
        },
        "PaxSeatInfo": [],
        "OfferItem": [
          {
            "OfferItemID": "OFFERITEMID1",
            "Refundable": "false",
            "PassengerType": "ADT",
            "PassengerQuantity": 2,
            "TotalPriceDetail": {
              "TotalAmount": {
                "BookingCurrencyPrice": 304.44,
                "EquivCurrencyPrice": 304.44
              }
            },
            "Service": [
              {
                "ServiceID": "SV1",
                "PassengerRefs": "ADT1 ADT2",
                "FlightRefs": "Flight1"
              }
            ],
            "FareDetail": {
              "PassengerRefs": "ADT1 ADT2",
              "Price": {
                "TotalAmount": {
                  "BookingCurrencyPrice": 304.44,
                  "EquivCurrencyPrice": 304.44
                },
                "BaseAmount": {
                  "BookingCurrencyPrice": 180.5,
                  "EquivCurrencyPrice": 180.5
                },
                "TaxAmount": {
                  "BookingCurrencyPrice": 123.94,
                  "EquivCurrencyPrice": 123.94
                },
                "Commission": {
                  "AgencyCommission": {
                    "BookingCurrencyPrice": 0,
                    "EquivCurrencyPrice": 0
                  },
                  "AgencyYqCommission": {
                    "BookingCurrencyPrice": 0,
                    "EquivCurrencyPrice": 0
                  }
                },
                "BookingFee": {
                  "BookingCurrencyPrice": 0,
                  "EquivCurrencyPrice": 0
                },
                "PortalCharges": {
                  "Markup": {
                    "BookingCurrencyPrice": 0,
                    "EquivCurrencyPrice": 0
                  },
                  "Surcharge": {
                    "BookingCurrencyPrice": 0,
                    "EquivCurrencyPrice": 0
                  },
                  "Discount": {
                    "BookingCurrencyPrice": 0,
                    "EquivCurrencyPrice": 0
                  }
                },
                "Taxes": [
                  {
                    "TaxCode": "RC",
                    "BookingCurrencyPrice": 35.02,
                    "EquivCurrencyPrice": 35.02
                  },
                  {
                    "TaxCode": "SQ",
                    "BookingCurrencyPrice": 70,
                    "EquivCurrencyPrice": 70
                  },
                  {
                    "TaxCode": "CA",
                    "BookingCurrencyPrice": 18.92,
                    "EquivCurrencyPrice": 18.92
                  }
                ]
              }
            },
            "FareComponent": [
              {
                "PriceClassRef": "PCR_1",
                "SegmentRefs": "Segment1",
                "FareBasis": {
                  "FareBasisCode": {
                    "Refs": "FG_1",
                    "Code": "ACUD0ZBJ/CLO"
                  },
                  "RBD": "A",
                  "CabinType": "Y",
                  "SeatLeft": "9"
                }
              }
            ]
          },
          {
            "OfferItemID": "OFFERITEMID2",
            "Refundable": "false",
            "PassengerType": "CHD",
            "PassengerQuantity": 1,
            "TotalPriceDetail": {
              "TotalAmount": {
                "BookingCurrencyPrice": 152.22,
                "EquivCurrencyPrice": 152.22
              }
            },
            "Service": [
              {
                "ServiceID": "SV1",
                "PassengerRefs": "CHD1",
                "FlightRefs": "Flight1"
              }
            ],
            "FareDetail": {
              "PassengerRefs": "CHD1",
              "Price": {
                "TotalAmount": {
                  "BookingCurrencyPrice": 152.22,
                  "EquivCurrencyPrice": 152.22
                },
                "BaseAmount": {
                  "BookingCurrencyPrice": 90.25,
                  "EquivCurrencyPrice": 90.25
                },
                "TaxAmount": {
                  "BookingCurrencyPrice": 61.97,
                  "EquivCurrencyPrice": 61.97
                },
                "Commission": {
                  "AgencyCommission": {
                    "BookingCurrencyPrice": 0,
                    "EquivCurrencyPrice": 0
                  },
                  "AgencyYqCommission": {
                    "BookingCurrencyPrice": 0,
                    "EquivCurrencyPrice": 0
                  }
                },
                "BookingFee": {
                  "BookingCurrencyPrice": 0,
                  "EquivCurrencyPrice": 0
                },
                "PortalCharges": {
                  "Markup": {
                    "BookingCurrencyPrice": 0,
                    "EquivCurrencyPrice": 0
                  },
                  "Surcharge": {
                    "BookingCurrencyPrice": 0,
                    "EquivCurrencyPrice": 0
                  },
                  "Discount": {
                    "BookingCurrencyPrice": 0,
                    "EquivCurrencyPrice": 0
                  }
                },
                "Taxes": [
                  {
                    "TaxCode": "RC",
                    "BookingCurrencyPrice": 17.51,
                    "EquivCurrencyPrice": 17.51
                  },
                  {
                    "TaxCode": "SQ",
                    "BookingCurrencyPrice": 35,
                    "EquivCurrencyPrice": 35
                  },
                  {
                    "TaxCode": "CA",
                    "BookingCurrencyPrice": 9.46,
                    "EquivCurrencyPrice": 9.46
                  }
                ]
              }
            },
            "FareComponent": [
              {
                "PriceClassRef": "PCR_1",
                "SegmentRefs": "Segment1",
                "FareBasis": {
                  "FareBasisCode": {
                    "Refs": "FG_1",
                    "Code": "ACUD0ZBJ/CLO"
                  },
                  "RBD": "A",
                  "CabinType": "Y",
                  "SeatLeft": "9"
                }
              }
            ]
          }
        ],
        "BaggageAllowance": [
          {
            "SegmentRefs": "Segment1",
            "PassengerRefs": "ADT1 ADT2",
            "BaggageAllowanceRef": "Bag1"
          },
          {
            "SegmentRefs": "Segment1",
            "PassengerRefs": "CHD3",
            "BaggageAllowanceRef": "Bag1"
          }
        ],
        "SplitPaymentInfo": [
          {
            "AirItineraryId": "117498831724067367341788002",
            "MultipleFop": "N",
            "MaxCardsPerPax": 0,
            "MaxCardsPerPaxInMFOP": 0
          }
        ],

        "ScheduleChangeInfo": [
          {
            "FlightKey": "Flight1",
            "SegmentRefs": "Segment1"
          },

          {
            "AmendmentsActions": {
              "Accept": "Y",
              "Cancel": "Y",
              "ReSchedule": "Y"
            }
          }
        ],
        "BookingToEquivExRate": 1,
        "FopRef": "FOP_124_0_988_0_ALL_ITX"
      }
    ],
    "DataLists": {
      "PassengerList": {
        "Passengers": [
          {
            "attributes": {
              "PassengerID": "ADT1"
            },
            "PassengerID": "ADT1",
            "PTC": "ADT",
            "BirthDate": "1998-09-10",
            "NameTitle": "Mr",
            "FirstName": "Ram",
            "MiddleName": "",
            "LastName": "Kumar",
            "Gender": "Male",
            "TravelDocument": {
              "DocumentNumber": "",
              "ExpiryDate": "0000-00-00",
              "IssuingCountry": "",
              "DocumentType": "P"
            },
            "Preference": {
              "WheelChairPreference": {
                "Reason": ""
              },
              "SeatPreference": ""
            },
            "LoyaltyProgramAccount": [],
            "ContactInfoRef": "CTC1"
          },
          {
            "attributes": {
              "PassengerID": "ADT2"
            },
            "PassengerID": "ADT2",
            "PTC": "ADT",
            "BirthDate": "1998-09-10",
            "NameTitle": "Mr",
            "FirstName": "Shantha",
            "MiddleName": "",
            "LastName": "Kumar",
            "Gender": "Male",
            "TravelDocument": {
              "DocumentNumber": "",
              "ExpiryDate": "0000-00-00",
              "IssuingCountry": "",
              "DocumentType": "P"
            },
            "Preference": {
              "WheelChairPreference": {
                "Reason": ""
              },
              "SeatPreference": ""
            },
            "LoyaltyProgramAccount": [],
            "ContactInfoRef": "CTC1"
          },
          {
            "attributes": {
              "PassengerID": "CHD3"
            },
            "PassengerID": "CHD3",
            "PTC": "CHD",
            "BirthDate": "2013-09-12",
            "NameTitle": "Mstr",
            "FirstName": "Rakesh",
            "MiddleName": "",
            "LastName": "Gowda",
            "Gender": "Male",
            "TravelDocument": {
              "DocumentNumber": "",
              "ExpiryDate": "0000-00-00",
              "IssuingCountry": "",
              "DocumentType": "P"
            },
            "Preference": {
              "WheelChairPreference": {
                "Reason": ""
              },
              "SeatPreference": ""
            },
            "LoyaltyProgramAccount": [],
            "ContactInfoRef": "CTC1"
          }
        ]
      },
      "DisclosureList": {
        "Disclosures": []
      },
      "contactEmail": ["test@gmail.com"],
      "contactNumber": ["9876543213"],
      "ContactAddress": ["toronto"],
      "FareList": {
        "FareGroup": [
          {
            "FareGroupRef": "FG_1",
            "FareCode": "750",
            "FareBasisCode": "ACUD0ZBJ/CLO"
          }
        ]
      },
      "FlightSegmentList": {
        "FlightSegment": [
          {
            "SegmentKey": "Segment1",
            "Departure": {
              "AirportCode": "YYZ",
              "Date": "2024-09-12",
              "Time": "12:00:00",
              "AirportName": "Lester B. Pearson International Airport",
              "Terminal": {
                "Name": ""
              }
            },
            "Arrival": {
              "AirportCode": "YVR",
              "Date": "2024-09-12",
              "Time": "14:15:00",
              "AirportName": "Vancouver International Airport",
              "Terminal": {
                "Name": ""
              }
            },
            "MarketingCarrier": {
              "AirlineID": "WS",
              "Name": "Westjet",
              "FlightNumber": "5495"
            },
            "OperatingCarrier": {
              "AirlineID": null,
              "Name": null,
              "FlightNumber": "5495"
            },
            "Equipment": {
              "AircraftCode": "Boeing 737-800 (winglets) pax",
              "Name": "Boeing 737-800 (winglets) pax"
            },
            "Code": {
              "MarriageGroup": ""
            },
            "FlightDetail": {
              "FlightDuration": {
                "Value": "5 Hrs 15 Min"
              },
              "Stops": {
                "Value": 0
              },
              "InterMediate": [],
              "AirMilesFlown": ""
            },
            "BrandId": "BASIC"
          }
        ]
      },
      "FlightList": {
        "Flight": [
          {
            "FlightKey": "Flight1",
            "Journey": {
              "Stops": 0
            },
            "SegmentReferences": "Segment1"
          }
        ]
      },
      "OriginDestinationList": {
        "OriginDestination": [
          {
            "OriginDestinationKey": "OD1",
            "DepartureCode": "YYZ",
            "ArrivalCode": "YVR",
            "FlightReferences": "Flight1"
          }
        ]
      },

      "ScheduleChangeSegmentList": {
        "ScheduleChangeSegment": [
          {
            "SegmentKey": "Segment1",
            "SegmentDetails": [
              {
                "Arrival": {
                  "Date": "2024-09-13",
                  "Time": "15:00:00"
                },
                "MarketingCarrier": {
                  "FlightNumber": "5498"
                },
                "OperatingCarrier": {
                  "AirlineID": "AC",
                  "Name": "Air Canada"
                },
                "FlightDetail": {
                  "FlightDuration": {
                    "Value": "5 Hrs 40 Min"
                  }
                }
              }
            ]
          }
        ]
      },
      "PriceClassList": {
        "PriceClass": [
          {
            "PriceClassID": "PCR_1",
            "Name": "Ultrabasic",
            "Code": "Ultrabasic",
            "Descriptions": {
              "Description": []
            }
          }
        ]
      },
      "BaggageAllowanceList": {
        "BaggageAllowance": [
          {
            "BaggageAllowanceID": "Bag1",
            "BaggageCategory": "Checked",
            "AllowanceDescription": {
              "ApplicableParty": "Traveler",
              "Description": "CHECKED ALLOWANCE"
            },
            "PieceAllowance": {
              "ApplicableParty": "Traveler",
              "TotalQuantity": "0",
              "Unit": "Pieces"
            }
          }
        ]
      },
      "FopList": [
        {
          "CC": {
            "Allowed": "Y",
            "Types": {
              "AX": {
                "F": {
                  "BookingCurrencyPrice": 0,
                  "EquivCurrencyPrice": 0
                },
                "P": 0,
                "Charges": {
                  "BookingCurrencyPrice": 0,
                  "EquivCurrencyPrice": 0
                }
              },
              "MC": {
                "F": {
                  "BookingCurrencyPrice": 0,
                  "EquivCurrencyPrice": 0
                },
                "P": 0,
                "Charges": {
                  "BookingCurrencyPrice": 0,
                  "EquivCurrencyPrice": 0
                }
              },
              "VI": {
                "F": {
                  "BookingCurrencyPrice": 0,
                  "EquivCurrencyPrice": 0
                },
                "P": 0,
                "Charges": {
                  "BookingCurrencyPrice": 0,
                  "EquivCurrencyPrice": 0
                }
              },
              "JC": {
                "F": {
                  "BookingCurrencyPrice": 0,
                  "EquivCurrencyPrice": 0
                },
                "P": 0,
                "Charges": {
                  "BookingCurrencyPrice": 0,
                  "EquivCurrencyPrice": 0
                }
              }
            }
          },
          "DC": {
            "Allowed": "Y",
            "Types": {
              "MC": {
                "F": {
                  "BookingCurrencyPrice": 0,
                  "EquivCurrencyPrice": 0
                },
                "P": 0,
                "Charges": {
                  "BookingCurrencyPrice": 0,
                  "EquivCurrencyPrice": 0
                }
              },
              "VI": {
                "F": {
                  "BookingCurrencyPrice": 0,
                  "EquivCurrencyPrice": 0
                },
                "P": 0,
                "Charges": {
                  "BookingCurrencyPrice": 0,
                  "EquivCurrencyPrice": 0
                }
              }
            }
          },
          "CASH": {
            "Allowed": "Y",
            "Types": []
          },
          "CHEQUE": {
            "Allowed": "Y",
            "Types": []
          },
          "ACH": {
            "Allowed": "Y",
            "Types": []
          },
          "PG": {
            "Allowed": "Y",
            "Types": []
          },
          "FopKey": "FOP_124_0_988_0_ALL_ITX"
        }
      ]
    },
    "MetaData": {}
  }
}'

What will you send in return?

You will send it back to the Acknowledge as a response

After those above stage you will have to choose three options to respond to the OCN:

[Note: All three options are not applicable to all the content, it may vary based on the Airline].

  1. AirOrderInvoluntaryAccept
  2. AirOrderInvoluntaryCancel
  3. Exchange(Reschedule the ticket)

Step 1. Air Order Involuntary Accept

This option allows you to accept the changes made by airlines such as delays, and rescheduling.

You need to provide Order ID and GDS Booking Reference for this request.

[Reference: Visit OrderInvoluntaryAccept endpoint to know more about air order involuntary accept and the relevant parameters.]

curl --location --request POST 'http://newapi.tltid.com/AirOrderInvoluntaryAccept' \
--header 'Content-Type: application/json' \
--header 'Authorization: <$auth_token>' \
--data-raw '{
    "OrderInvoluntaryAcceptRQ": {
        "Query": {
            "OrderID": "57BY7DND",
            "GdsBookingReference": [
                "ECVC5E"
            ]
        }
    }
}'

What will you get in return?

As a result of this request, you will be notified about the status of your booking, which is whether your request has been cancelled or succeeded.

Step 2. Air Order Involuntary Cancel

This option allows you to cancel the changes made by airlines such as delays, and rescheduling.

[Reference: Visit OrderInvoluntaryCancel endpoint to know more about air order involuntary cancel and the relevant parameters.]

You need to provide Order ID and GDS Booking Reference for this request.

curl --location --request POST 'http://newapi.tltid.com/AirOrderInvoluntaryCancel' \
--header 'Content-Type: application/json' \
--header 'Authorization: <$auth_token>' \
--data-raw '{
    "OrderInvoluntaryCancelRQ": {
        "Query": {
            "OrderID": "57BY7DND",
            "GdsBookingReference": [
                "ECVC5E"
            ]
        }
    }
}'

What will you get in return?

As a result of this request, you will be notified about the status of your booking, which is whether your request has been cancelled or succeeded.

Step 3. Exchange the ticket

This option provides you with the opportunity to reschedule your ticket or booking in the event that the changes made by the airline are not to your satisfaction. It allows you the flexibility to adjust your travel plans according to your preferences, ensuring that your reservation aligns with your needs.

[Reference: Visit our Exchange for more details].

Congratulations! You have completed the OCN workflow.