NDC client
A Node.js client wrapper for IATA's NDC API.
Installation
Use npm to install:
npm install ndc-client
Or install from repo:
npm install iata-ndc/ndc-js-sdk
Or just clone with git:
git clone https://github.com/iata-ndc/ndc-js-sdk.git
Usage
Have a config ready:
And then make a request.
var NDC = ;var ndc = ; /* OneWay with multiple pax */var reqData = pointOfSaleEvent: code: 9 definition: 'Shop' onds: flights: departure: date: '2016-01-01' airportCode: 'MUC' arrival: airportCode: 'LHR' airline: configsender cabin: 'C' travelers: /* two anonymous adults */ anonymous: true count: 2 type: 'ADT' /* 1 anonymous children */ anonymous: true count: 1 type: 'CNN' /* 1 anonymous infant */ anonymous: true count: 1 type: 'INF' ; // Direct requestndc; //Or if you need to work with message body:var message = ndcmessages; // print JSON message.console;// print pretty XML code.console;// forced XML bodymessage// make requestmessage;
For further details on each message parameters, have a look to the test folder in the test-data.js
file, with examples.