OCN

This guide will help you understand the NDC API workflow of OCN (Order Change Notification) workflow. You can use this service to either accept or cancel the booking due to airline changes such as flight cancellations, delays, and rescheduling.

What do you need to start?

You need various payload data that you can obtain from the responses you receive during the booking process.

Visit our Ticket API workflow to learn how to get tickets against your booking.

After you have completed the ticketing process, then only you may come across OCN workflow.

curl --location --request POST 'customer_ocn_listner_url' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic EncryptionKey' \
--data-raw '{
	"OrderChangeNotif": {
		"Query": {
			"OrderID": "57BY7DND",
            "GdsBookingReference": ["ECVC5E"],
			"Order": {
				"OrderItem": [
					{
                        "OfferItemID": "OFFERITEMID1",
                        "PassengerType": "ADT",
                        "TotalPriceDetail": {
                            "TotalAmount": {
                                "BookingCurrencyPrice": 43.1,
                                "EquivCurrencyPrice": 43.1
                            }
                        },
                        "Service": [
                            {
                                "ServiceID": "SV1",
                                "PassengerRefs": "ADT1",
                                "SegmentRefs": "Segment2"
                            }
                        ]
                    }
				]
			},
			"Amendments": {
				"Amendment": {
					"ActionType": {
						"Context": "2", 
						"Text": "ASC"
					}
				}
			}
		},
		"DataLists": {
			"PassengerList": {
				"Passenger": {
					"PassengerID": "T1"
				}
			},
			"FlightSegmentList": {
				"FlightSegment": [
					{
                        "SegmentKey": "Segment1",
                        "Departure": {
                            "AirportCode": "LAX",
                            "Date": "2021-10-25",
                            "Time": "22:45:00",
                            "AirportName": "Los Angeles International Airport",
                            "Terminal": {
                                "Name": "7"
                            }
                        },
                        "Arrival": {
                            "AirportCode": "SFO",
                            "Date": "2021-10-26",
                            "Time": "00:11:00",
                            "AirportName": "San Francisco International Airport",
                            "Terminal": {
                                "Name": "3"
                            }
                        },
                        "MarketingCarrier": {
                            "AirlineID": "UA",
                            "Name": "United Airlines",
                            "FlightNumber": "1597"
                        },
                        "OperatingCarrier": {
                            "AirlineID": "UA",
                            "Name": "United Airlines",
                            "FlightNumber": "1597"
                        },
                        "Equipment": {
                            "AircraftCode": "",
                            "Name": ""
                        },
                        "Code": {
                            "MarriageGroup": ""
                        },
                        "FlightDetail": {
                            "FlightDuration": {
                                "Value": "1 Hrs 26 Min"
                            },
                            "Stops": {
                                "Value": 0
                            },
                            "InterMediate": [],
                            "AirMilesFlown": "0"
                        },
                        "BrandId": "Basic Economy"
                    },
                    {
                        "SegmentKey": "Segment2",
                        "Departure": {
                            "AirportCode": "LAX",
                            "Date": "2021-10-25",
                            "Time": "23:45:00",
                            "AirportName": "Los Angeles International Airport",
                            "Terminal": {
                                "Name": "7"
                            }
                        },
                        "Arrival": {
                            "AirportCode": "SFO",
                            "Date": "2021-10-26",
                            "Time": "01:11:00",
                            "AirportName": "San Francisco International Airport",
                            "Terminal": {
                                "Name": "3"
                            }
                        },
                        "MarketingCarrier": {
                            "AirlineID": "UA",
                            "Name": "United Airlines",
                            "FlightNumber": "1597"
                        },
                        "OperatingCarrier": {
                            "AirlineID": "UA",
                            "Name": "United Airlines",
                            "FlightNumber": "1597"
                        },
                        "Equipment": {
                            "AircraftCode": "",
                            "Name": ""
                        },
                        "Code": {
                            "MarriageGroup": ""
                        },
                        "FlightDetail": {
                            "FlightDuration": {
                                "Value": "1 Hrs 26 Min"
                            },
                            "Stops": {
                                "Value": 0
                            },
                            "InterMediate": [],
                            "AirMilesFlown": "0"
                        },
                        "BrandId": "Basic Economy"
                    }
				]
			}
		}
	}
}'

At this stage, you will have two options to choose from for responding to these OCN’s:

  1. AirOrderInvoluntaryAccept
  2. AirOrderInvoluntaryCancel

Step 1. Air Order Involuntary Accept

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

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

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 flight cancellations, delays, and rescheduling.

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.

Congratulations! You have completed the OCN workflow.