const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.betterez.com/inventory-trips/trips',
  qs: {
    departureDate: ':yyyy-mm-dd',
    fareIds: ':fare-id|:qty,:fare-id|:qty',
    destinationId: ':destinationId',
    originId: ':originId',
    providerId: ':providerId',
    productId: ':productId',
    channel: 'a-valid-channel',
    ignoreCutoffs: 'false',
    roundtripChangeset: 'false',
    changeTicketId: ':changeTicketId',
    ignoreFilterEarlierReturnTrips: 'false',
    minDeparturePrice: '0',
    minReturnPrice: '0',
    currency: 'USD',
    pathfinder: '',
    showSoldOutTrips: 'false',
    isChange: 'false',
    includeMoveToTrips: 'false',
    isMove: 'false',
    allowedManifestStatuses: 'published,paused',
    ignorePerFareCapacityLimits: 'false',
    replaceFaresOnLowAvailability: 'false'
  },
  headers: {'x-api-key': '{{x-api-key}}'}
};

request(options, function (error, response, body) {
	if (error) throw new Error(error);

	console.log(body);
});