pnrEvaluate
The api returns commission and remarks info based on valid input.
Returns Commission/Markup Info Based on Itinerary Input
/pnr-evaluate
Usage and SDK Samples
curl -X POST "https://api.cmtnexus.com/cmtq/api/pnr-evaluate"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String xPosId = xPosId_example; // String | POS ID assigned
String xAuthToken = xAuthToken_example; // String | Authentication token assigned
MarkupRequest markupRequest = ; // MarkupRequest | Markup Request Model with itinerary Info
try {
MarkupResponse result = apiInstance.pnrEvaluate(xPosId, xAuthToken, markupRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#pnrEvaluate");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String xPosId = xPosId_example; // String | POS ID assigned
String xAuthToken = xAuthToken_example; // String | Authentication token assigned
MarkupRequest markupRequest = ; // MarkupRequest | Markup Request Model with itinerary Info
try {
MarkupResponse result = apiInstance.pnrEvaluate(xPosId, xAuthToken, markupRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#pnrEvaluate");
e.printStackTrace();
}
}
}
String *xPosId = xPosId_example; // POS ID assigned
String *xAuthToken = xAuthToken_example; // Authentication token assigned
MarkupRequest *markupRequest = ; // Markup Request Model with itinerary Info (optional)
DefaultApi *apiInstance = [[DefaultApi alloc] init];
// The api returns commission and remarks info based on valid input.
[apiInstance pnrEvaluateWith:xPosId
xAuthToken:xAuthToken
markupRequest:markupRequest
completionHandler: ^(MarkupResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var QApi = require('q_api');
var api = new QApi.DefaultApi()
var xPosId = xPosId_example; // {String} POS ID assigned
var xAuthToken = xAuthToken_example; // {String} Authentication token assigned
var opts = {
'markupRequest': // {MarkupRequest} Markup Request Model with itinerary Info
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.pnrEvaluate(xPosId, xAuthToken, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class pnrEvaluateExample
{
public void main()
{
var apiInstance = new DefaultApi();
var xPosId = xPosId_example; // String | POS ID assigned
var xAuthToken = xAuthToken_example; // String | Authentication token assigned
var markupRequest = new MarkupRequest(); // MarkupRequest | Markup Request Model with itinerary Info (optional)
try
{
// The api returns commission and remarks info based on valid input.
MarkupResponse result = apiInstance.pnrEvaluate(xPosId, xAuthToken, markupRequest);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.pnrEvaluate: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\DefaultApi();
$xPosId = xPosId_example; // String | POS ID assigned
$xAuthToken = xAuthToken_example; // String | Authentication token assigned
$markupRequest = ; // MarkupRequest | Markup Request Model with itinerary Info
try {
$result = $api_instance->pnrEvaluate($xPosId, $xAuthToken, $markupRequest);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->pnrEvaluate: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $xPosId = xPosId_example; # String | POS ID assigned
my $xAuthToken = xAuthToken_example; # String | Authentication token assigned
my $markupRequest = WWW::SwaggerClient::Object::MarkupRequest->new(); # MarkupRequest | Markup Request Model with itinerary Info
eval {
my $result = $api_instance->pnrEvaluate(xPosId => $xPosId, xAuthToken => $xAuthToken, markupRequest => $markupRequest);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->pnrEvaluate: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.DefaultApi()
xPosId = xPosId_example # String | POS ID assigned
xAuthToken = xAuthToken_example # String | Authentication token assigned
markupRequest = # MarkupRequest | Markup Request Model with itinerary Info (optional)
try:
# The api returns commission and remarks info based on valid input.
api_response = api_instance.pnr_evaluate(xPosId, xAuthToken, markupRequest=markupRequest)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->pnrEvaluate: %s\n" % e)
Parameters
Header parameters
| Name | Description |
|---|---|
| x-pos-id* |
String
POS ID assigned
Required
|
| x-auth-token* |
String
Authentication token assigned
Required
|
Body parameters
| Name | Description |
|---|---|
| markupRequest |
Responses
Status: 200 - Success Response
{status={responseCode=200, errorCode=200, message=SUCCESS}, itineraries=[{status={responseCode=200, errorCode=200, message=SUCCESS}, seq=0, domain=LIVE, pnr=A1B2CE, fareCalc=LAX UA X/EWR 258.00POPKKJ0 USD258.00, passengerType=ADT, validatingCarrier=UA, fareType=ADT, originDestinations=[{baseFare={value=115.5, currencyCode=CAD}}, {flightSegments=[{departureAirport=LAX, arrivalAirport=EWR, flightNumber=1990, marketingAirline=UA, operatingAirline=UA, resBookDesigCode=Q, departureDateTime=2022-08-27T08:20:00.000Z, arrivalDateTime=2022-08-27T16:36:00.000Z, fareAvailable=0, fareBasis=QAA3OHEN/8D02, ticketDesignator=8D02, tourCode=, ticketEndorsement=, ssrRemark=, osiRemark=, baseFare={value=115.5, currencyCode=CAD}}]}, {flightSegments=[{departureAirport=EWR, arrivalAirport=LAX, flightNumber=1990, marketingAirline=UA, operatingAirline=UA, resBookDesigCode=T, departureDateTime=2022-08-27T08:20:00.000Z, arrivalDateTime=2022-08-27T16:36:00.000Z, fareAvailable=0, fareBasis=QAA3OHEN/8D02, ticketDesignator=8D02, tourCode=, ticketEndorsement=, ssrRemark=, osiRemark=, baseFare={value=115.5, currencyCode=CAD}}]}], pricingInfo={cabins=[Q, T], totalBaseFare={value=117.5, currencyCode=CAD}}, commission={rule=TRIPACTION_US/CONTRACT_UA_1/Rule_3, description=Tripaction USA/United Airlines/Domestic, ticketEndorsement=TZ11, ssrRemark=SSR VALUE TEST, osiRemark=OSI - UA NOTVALID, appliedCommission={mode=PERC, valueAdt=5}}, remarks=[CMT/Date/Time/2022-08-18T04-08-20.510Z, CMT/TRIPACTION-US/CONTRACT-UA-1/Rule-3/PQ1, CMT/BF/CAD117.5/PQ1, CMT/PQ1 COM 5PERC/ED-TZ11]}]}