Developer Guide
API Resource
Send Itinerary
Send Itinerary API endpoint must be used by the partner to POST the itinerary data in XML format. The partner_code and partner_password must be included as Basic authentication in Authorization headers of the API request.
URL | https://vaapi.cibtvisas.com/partner/senditinerary |
HTTP Request Method | POST |
Require Basic Authentication | Yes |
Request Content-Type | application/json |
Response Content-Type | application/json |
Request Parameters
Field | Data Type | Requirement | Description |
---|---|---|---|
Request Headers | |||
Authorization |
string | Required | Authorization request header must include the authentication type “Basic” and the credentials, base64 encoded partner_code and partner_password |
Content-Type
|
string | Required | The Content-Type entity header is used to indicate the media type of the resource.
Must be set to: application/xml; charset=utf-8
|
Authorization |
string | Required | Authorization request header must include the authentication type “Basic” and the credentials, base64 encoded partner_code and partner_password |
Request Body | application/json | Required | Itinerary XML data must be posted in body of the request |
Response
Field | Data Type | Description |
---|---|---|
HTTP Response Status | ||
Status Code |
string | HTTP Status code returned. For example:
202 |
Status Message |
string | HTTP Status message returned. For example:
Accepted |
JSON Object | ||
Success |
string | true/false |
ReferenceID |
string |
UUID can be used as reference for troubleshooting. Partner can pass this information to CIBT to report an issue. |
FailureDescription |
string | Failure code and description will be included in the response when the request has failed. For example: If requests fail due to invalid credentials, it would be “INVALID: Incorrect Credentials“. |
Partner |
string | Will be a constant value “CIBT” |
Sample API Request and Response
Sample CURL POST Request
curl -X POST \
-H “Authorization: Basic MTAwMDAxOkFwaUBUZXN0MTIzIQ==” \
-H “Content-Type: application/json; charset=utf-8” \
–d ‘ { “ItineraryList”:[{“requiredData”:{“RecordType”: “VisaPNR1”, “AccountCode”: 12345,”ApplicationDomain”: “USA”,”State”: “VA”, “FirstName”: “John”,”LastName”: “Doe”,”Email”: “JohnTraveler@cibt.com”,
“Nationality”: “USA”,”DepartureDate”: “12/31/2020″,”Destination1″:”CHN”,
“Purpose1”: “B”,”Destination2″: “IND”,”Purpose2″: “T”,”Destination3″: “AUS”,
“Purpose3”: “T”}, “optionalData”:{“ExternalReference”: “PNR12345”, “PassportExpiryDate”: “12/31/2020”, “CountryOfResidence”: “USA”, “AgentEmail”: “agentsally@cibttravel.com”,”AgentName”: “SallyField”}}]}‘ \
https://vaapi.cibtvisas.com/partner/senditinerary
Sample JSON POST Request
POST https://vaapi.cibtvisas.com/partner/senditinerary HTTPS/1.1
Host: vaapi.cibtvisas.com
Authorization: Basic MTAwMDAxOkFwaUBUZXN0MTIzIQ==
Content-Type: application/json; charset=utf-8
{
“ItineraryList “: [
{
“RequiredData”: {
“AccountCode”: 04345,
“ApplicationDomain”: “USA”,
“FirstName”: “John”,
“LastName”: “Doe”,
“Email”: “JohnTraveler@SomeDomain.com”,
“Nationality”: “USA”,
“State”: “VA”,
“Destination1”: “CHN”,
“EntryDate1”: “2024-03-01T00:00:00”,
“ExitDate1”: “2024-03-10T00:00:00”,
“Purpose1”: “B”,
“Destination2”: “IND”,
“Purpose2”: “T”,
“EntryDate2”: “2024-03-11T00:00:00”,
“ExitDate2”: “2024-03-21T00:00:00”,
“Destination3”: “SRL”,
“Purpose3”: “T”,
“EntryDate3”: “2024-03-22T00:00:00”,
“ExitDate3”: “2024-03-25T00:00:00”
},
“OptionalData”: {
“ExternalReference”: “XJ4230”,
“CountryOfResidence”: “USA”,
“AgentEmail”: “agentsally@cibttravel.com”,
“AgentName”: “Sally Field”
}
}
]
}
Sample Success Response
HTTP/1.1 202 ACCEPTED
Content-Type: application/json
…
{
“PostItineraryResponse”: {
“Success”: true,
“ReferenceID”: “967fd873-f857-4b87-bfe1-a9dfdee5ffb6”,
“Partner”: “CIBT”
}
}
Sample Failure Responses
HTTP/1.1 401 UNAUTHORIZED
Content-Type: application/json
…
{
“PostItineraryResponse”: {
“Success”: false,
“ReferenceID”: “967fd873-f857-4b87-bfe1-a9dfdee5ffb6”,
“FailureDescription”: “INVALID: Incorrect Credentials”,
“Partner”: “CIBT”
}
}
HTTP/1.1 400 BAD REQUEST
Content-Type: application/json
{
“PostItineraryResponse”: {
“Success”: “False”,
“ReferenceID”: “56846dc-0b45-4f79-abe5-ddd8a8f6a0ce”,
“FailureDescription”: “Bad Request. Parameters incorrect”,
“Partner”: “CIBT”
}
}
HTTP Status Codes and Failure Codes
Status Code | Status Description | Failure Type | Failure Code | Failure Description |
---|---|---|---|---|
200 | OK. Successful call. | Not Applicable | Not Applicable | Not Applicable |
202 | Accepted. Successful call. | Not Applicable | Not Applicable | Not Applicable |
400 | Bad Request. Incorrect Parameters. | Bad Request | BAD_REQUEST | Request cannot be fulfilled due to bad syntax |
401 | Unauthorized. The request requires user authentication. | Unauthorized | INVALID | Incorrect Credentials |
403 | Forbidden. The server understood the request, but is refusing to fulfill it. | Forbidden | FORBIDDEN | Missing Credentials |
500 | Internal Server Error. The server encountered an unexpected condition which prevented it from fulfilling the request. | Internal Server Error | Not Applicable | Not Applicable |
503 | Service Unavailable. The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. | Service Unavailable | Not Applicable | Not Applicable |
4xx class status codes will have the FailureDescription field included in XML response.