OrderCancel API
POST
|
|
The Order Retrieve API is used to cancel an order.
Examples
Cancel an order by orderId
Cancel an order by orderId
HTTP Request
[show]
POST /retail/orders HTTP/1.1
Authorization: Basic dXNlcjp1RXpyUlFXeEZSdXQyVHBMd1RocHh4dFY=
Accept-Encoding:
Accept: application/vnd.nas.ndc.v17.2+xml;charset=UTF-8
Content-Type: application/vnd.nas.ndc.v17.2+xml;charset=UTF-8
Content-Length: 939
Host: services.norwegian.com.dev.nas.dev
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><OrderCancelRQ xmlns="http://www.iata.org/IATA/EDIST/2017.2" xmlns:ns2="http://services.norwegian.com/retail/ndc/extensions" TimeStamp="2024-11-22T16:02:05.158473+01:00" Target="Test" Version="17.2" TransactionIdentifier="ccntHRCGDI4zF5yZ9ETYfyrsgVUBrbj8" CorrelationID="testa83ef3d1030d43488d33fc597530837e"><PointOfSale><Location><CountryCode>NO</CountryCode></Location></PointOfSale><Document/><Party><Sender><TravelAgencySender><Name>Zeus Travel</Name><AgencyID>DYAPIZ9</AgencyID></TravelAgencySender></Sender><Participants><Participant><AggregatorParticipant SequenceNumber="1"><Name>JR TECHNOLOGIES</Name><AggregatorID>88888888</AggregatorID></AggregatorParticipant></Participant></Participants><Recipient xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/></Party><Query><Order OrderID="oe3d3046a754b4646ab3c9536c79142f7" Owner="DY"/></Query></OrderCancelRQ>
Success
HTTP Response
[show]
HTTP/1.1 200 OK
Content-Type: application/vnd.nas.ndc.v17.2+xml;charset=UTF-8
Content-Length: 520
Date: Fri, 22 Nov 2024 15:02:04 GMT
Keep-Alive: timeout=60
Connection: keep-alive
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OrderCancelRS xmlns="http://www.iata.org/IATA/EDIST/2017.2" xmlns:ns2="http://services.norwegian.com/retail/ndc/extensions" TimeStamp="2024-11-22T16:02:05.171304+01:00" Target="Test" Version="17.2" TransactionIdentifier="ccntHRCGDI4zF5yZ9ETYfyrsgVUBrbj8" CorrelationID="testa83ef3d1030d43488d33fc597530837e">
<Document/>
<Success/>
<Response>
<OrderReference>oe3d3046a754b4646ab3c9536c79142f7</OrderReference>
</Response>
</OrderCancelRS>
You can still retrieve cancelled orders, but the status of the order will be X which means that the order has been cancelled. See PADIS Codeset Directory code table 4405 or Code table 4405
HTTP Response
[show]
HTTP/1.1 200 OK
vary: accept-encoding
Content-Encoding: gzip
Content-Type: application/vnd.nas.ndc.v17.2+xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Fri, 22 Nov 2024 15:02:07 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 7041
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><OrderViewRS xmlns="http://www.iata.org/IATA/EDIST/2017.2" xmlns:ns2="http://services.norwegian.com/retail/ndc/extensions" TimeStamp="2024-11-22T16:02:07.39269+01:00" Target="Test" Version="17.2" TransactionIdentifier="bbbb-444a-85b7" CorrelationID="test7ec3246496044cbfbb3d8ac114082389"><Document/><Success/><Response><Order OrderID="o0db865e8635848118c9026c4c5300565" Owner="DY" WebAddressID="http://portal.dev.norwegian.com/en/start/booking/details?pnr=TB43PR&pnrName=UGJDJTEST"><BookingReferences><BookingReference><ID>TB43PR</ID><AirlineID>DY</AirlineID></BookingReference></BookingReferences><TotalOrderPrice><SimpleCurrencyPrice Code="EUR">485.5</SimpleCurrencyPrice></TotalOrderPrice><Status><StatusCode>X</StatusCode></Status><Payments><Payment><Type>CC</Type><Amount><SimpleCurrencyPrice Code="EUR">485.5</SimpleCurrencyPrice></Amount><Method><VoucherMethod><Number>60D6C14E3DB04AC69501FB5F2E87168F</Number></VoucherMethod></Method></Payment></Payments><OrderItems><OrderItem OrderItemID="oi125af2a734484f3a83cc58a60c9c40c7" Owner="DY"><PriceDetail><BaseAmount Code="EUR">424.2</BaseAmount><Taxes><Total Code="EUR">61.3</Total></Taxes></PriceDetail><Service ServiceID="SERVICE__PAX__ADT01-SD__BNDL_PLUS-LFPL-SGME9793B82B0A5C352543976169630DDF3"><PassengerRef>PAX__ADT01</PassengerRef><ServiceDefinitionRef>SD__BNDL_PLUS-LFPL-SGME9793B82B0A5C352543976169630DDF3</ServiceDefinitionRef></Service><Service ServiceID="SERVICE__PAX__ADT01-SGME9793B82B0A5C352543976169630DDF3"><PassengerRef>PAX__ADT01</PassengerRef><SegmentRef>SGME9793B82B0A5C352543976169630DDF3</SegmentRef></Service></OrderItem></OrderItems></Order><Commission><Amount Code="EUR">34.0</Amount></Commission><DataLists><PassengerList><Passenger PassengerID="PAX__ADT01"><PTC>ADT</PTC><Individual><Birthdate>1974-12-12</Birthdate><NameTitle>MR</NameTitle><GivenName>lvYcZ</GivenName><Surname>ugJdjTest</Surname></Individual><ContactInfoRef>CI__PAX__ADT01</ContactInfoRef></Passenger></PassengerList><ContactList><ContactInformation ContactID="CI__PAX__ADT01"><ContactProvided><EmailAddress><EmailAddressValue>[email protected]</EmailAddressValue></EmailAddress></ContactProvided><ContactProvided><Phone><CountryDialingCode>47</CountryDialingCode><PhoneNumber>99887766</PhoneNumber></Phone></ContactProvided></ContactInformation></ContactList><BaggageAllowanceList><BaggageAllowance BaggageAllowanceID="BAGGAGE_ALLOWANCE__CHECKED-OSL-JFK-LFPL"><BaggageCategory>Checked</BaggageCategory><PieceAllowance><ApplicableParty>Traveler</ApplicableParty><TotalQuantity>2</TotalQuantity><PieceMeasurements Quantity="1"><PieceWeightAllowance><MaximumWeight><Value>23.0</Value><UOM>K</UOM></MaximumWeight><ApplicableBag>YN1</ApplicableBag></PieceWeightAllowance></PieceMeasurements><PieceMeasurements Quantity="1"><PieceWeightAllowance><MaximumWeight><Value>23.0</Value><UOM>K</UOM></MaximumWeight><ApplicableBag>YN2</ApplicableBag></PieceWeightAllowance></PieceMeasurements></PieceAllowance></BaggageAllowance></BaggageAllowanceList><FlightSegmentList><FlightSegment SegmentKey="SGME9793B82B0A5C352543976169630DDF3"><Departure refs="COUNTRY-NO"><AirportCode>OSL</AirportCode><Date>2017-07-20</Date><Time>18:05</Time><AirportName>Oslo-Gardermoen</AirportName></Departure><Arrival refs="COUNTRY-US"><AirportCode>JFK</AirportCode><Date>2017-07-20</Date><Time>20:05</Time><AirportName>New York-JFK</AirportName></Arrival><MarketingCarrier><AirlineID>DY</AirlineID><Name>Norwegian Air Shuttle</Name><FlightNumber>7001</FlightNumber></MarketingCarrier><OperatingCarrier><AirlineID>DY</AirlineID><Name>Norwegian Air Shuttle</Name><FlightNumber>7001</FlightNumber></OperatingCarrier><Equipment><AircraftCode>789</AircraftCode></Equipment><FlightDetail><FlightDuration><Value>PT8H</Value></FlightDuration></FlightDetail></FlightSegment></FlightSegmentList><FlightList><Flight FlightKey="FJF1C558066F60616DF5C3B7B382D0392D"><Journey><Time>PT8H</Time></Journey><SegmentReferences>SGME9793B82B0A5C352543976169630DDF3</SegmentReferences></Flight></FlightList><OriginDestinationList><OriginDestination OriginDestinationKey="OD__OSL_JFK"><DepartureCode>OSL</DepartureCode><ArrivalCode>JFK</ArrivalCode><FlightReferences>FJF1C558066F60616DF5C3B7B382D0392D</FlightReferences></OriginDestination></OriginDestinationList><PriceClassList><PriceClass PriceClassID="PC__LFPL"><Name>LowFare+</Name><Code>LFPL</Code></PriceClass></PriceClassList><ServiceDefinitionList><ServiceDefinition ServiceDefinitionID="SD__BNDL_PLUS-LFPL-SGME9793B82B0A5C352543976169630DDF3"><Name>BNDL_PLUS</Name><ServiceBundle><ServiceDefinitionRef>SD__SPML_STANDARD-SGME9793B82B0A5C352543976169630DDF3</ServiceDefinitionRef><ServiceDefinitionRef>SD__XST-SGME9793B82B0A5C352543976169630DDF3</ServiceDefinitionRef><ServiceDefinitionRef>SD__YN-1-SGME9793B82B0A5C352543976169630DDF3</ServiceDefinitionRef></ServiceBundle><Encoding><Code>BNDL_PLUS</Code></Encoding><Descriptions><Description><Text>Checked baggage</Text></Description><Description><Text>Classic Menu</Text></Description><Description><Text>Seat reservation</Text></Description></Descriptions></ServiceDefinition><ServiceDefinition ServiceDefinitionID="SD__SPML_STANDARD-SGME9793B82B0A5C352543976169630DDF3"><Name>SPML_STANDARD</Name><Encoding><Code>SPML_STANDARD</Code></Encoding><Descriptions><Description><Text>Classic Menu</Text></Description></Descriptions></ServiceDefinition><ServiceDefinition ServiceDefinitionID="SD__XST-SGME9793B82B0A5C352543976169630DDF3"><Name>XST</Name><Encoding><Code>XST</Code></Encoding><Descriptions><Description><Text>Seat reservation</Text></Description></Descriptions></ServiceDefinition><ServiceDefinition ServiceDefinitionID="SD__YN-1-SGME9793B82B0A5C352543976169630DDF3"><Name>YN</Name><BaggageAllowanceRef>BAGGAGE_ALLOWANCE__CHECKED-OSL-JFK-LFPL</BaggageAllowanceRef><Encoding><Code>YN1</Code></Encoding><Descriptions><Description><Text>Checked baggage</Text></Description></Descriptions></ServiceDefinition></ServiceDefinitionList></DataLists><Metadata><Other><OtherMetadata><LanguageMetadatas><LanguageMetadata MetadataKey="LANG-9CFEFED8FB9497BAA5CD519D7D2BB5D7"><Code_ISO>en</Code_ISO><Code_NLS>en</Code_NLS><Name>English</Name></LanguageMetadata></LanguageMetadatas></OtherMetadata><OtherMetadata><CountryMetadatas><CountryMetadata MetadataKey="COUNTRY-NO"><ICAO_Code>NO</ICAO_Code><Name>Norway</Name></CountryMetadata><CountryMetadata MetadataKey="COUNTRY-US"><ICAO_Code>US</ICAO_Code><Name>USA</Name></CountryMetadata></CountryMetadatas></OtherMetadata><OtherMetadata><CityMetadatas><CityMetadata MetadataKey="CITY-NYCALL"><AugmentationPoint><AugPoint Key="NYCALL"><ns2:City><ns2:Code>NYCALL</ns2:Code><ns2:Name>New York</ns2:Name></ns2:City></AugPoint></AugmentationPoint></CityMetadata><CityMetadata MetadataKey="CITY-OSLALL"><AugmentationPoint><AugPoint Key="OSLALL"><ns2:City><ns2:Code>OSLALL</ns2:Code><ns2:Name>Oslo</ns2:Name></ns2:City></AugPoint></AugmentationPoint></CityMetadata></CityMetadatas></OtherMetadata></Other></Metadata></Response></OrderViewRS>
Failure
HTTP Response
[show]
HTTP/1.1 200 OK
Content-Type: application/vnd.nas.ndc.v17.2+xml;charset=UTF-8
Content-Length: 575
Date: Fri, 22 Nov 2024 15:02:04 GMT
Keep-Alive: timeout=60
Connection: keep-alive
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OrderCancelRS xmlns="http://www.iata.org/IATA/EDIST/2017.2" xmlns:ns2="http://services.norwegian.com/retail/ndc/extensions" TimeStamp="2024-11-22T16:02:04.359481+01:00" Target="Test" Version="17.2" TransactionIdentifier="WqQWevy8h3mZWu7sQJJ9mT94JUFcxlVq" CorrelationID="test2aac65ea9c344f3a82a9e05a7b3f046f">
<Document/>
<Errors>
<Error ShortText="Item/data not found or data not existing in processing host" Code="913" Status="Complete">Order could not be found</Error>
</Errors>
</OrderCancelRS>