Get Port List

Lists all ports in details.

 

Input

Request Header

Name Description Type Required

clientCode

ClientCode information of clienta calling for service String Mandatory (Optional for WEBSDOM)

clientUsername

ClientUserName information of client calling for service String Mandatory

channel

Channel information calling for service String Mandatory (Optional for WEBSDOM)

airlineCode

Airline Code String Mandatory (Optional for WEBSDOM)

application

Application information calling for service String Optional

agent

Information on which device made the service call (Nokia E72, Browser) String Optional

clientTransactionId

Transaction information of the making service call String Mandatory

languageCode

The language in which the query was made. Such as TR, EN String Optional

agencyOfficeCode

The agency's triple code String Optional

userAgencyCode

The agency's triple code String Optional

agencyCode

The agency's triple code String Optional

dutyCode

The code that determines the sales authority of the agency. Like GS, SU String Optional

Ton

Ton of currency Integer Optional

Currency

Currency code String Optional

extraParameters

Extra parameters Model[] Optional

extraParameters

Name Description Type Required

Key

If there are extra parameters to be sent in the request, they are sent in this field String Optional

Value

The value of the extra parameters that must be sent in the request is sent in this field. String Optional

getPortsOTARequest

Name Description Type Required

AirlineCode

Defines domestic flights String No

languageCode

Defines international flights String No

Output

Port

Name Description Type

Code

3 Letter IATA airport code. String (IST,AYT)

validForAwardTicket

Determines whether port valid for award ticket. Boolean(true,false)

HasComfort

Determines whether port has comfort. Boolean(true,false)

IsSPA

Determines whether port is a TK port. Boolean(true,false)

IsDomestic

Determines whether port is domestic. Boolean(true,false)

Port.LanguageInfo.Language

Name Description Type

Code

2 Letter ISO 639-1 language code. String (EN,TR)

Name

Port Name in particular language. String

Port.PortTage.PortTagLanguage

Name Description Type

Code

2 Letter ISO 639-1 language code. String (EN,TR)

Name

Tag value. String

Port.Coordinate

Name Description Type

latitude

Latitude value of port coordinate. Double (60.949272)

longitude

Longitude value of port coordinate. Double (76.483617)

Port.Country

Name Description Type

Code

2 Letter ISO country code. String (EN,TR)

Port.Country.LanguageInfo.Language

Name Description Type

Code

2 Letter ISO 639-1 language code. String (EN,TR)

Name

Name of country in particular language. String

Port.Region.LanguageInfo.Language

Name Description Type

Code

2 Letter ISO 639-1 language code. String (EN,TR)

Name

Name of region in particular language. String

Port.Region.LanguageInfo.Language

Name Description Type

Code

2 Letter ISO 639-1 language code. String (EN,TR)

Name

Name of city in particular language. String

Request

			
{
	"requestHeader": {
		"clientUsername": "OPENAPI",
		"clientTransactionId": "CLIENT_TEST_1",
		"channel": "WEB",
		"languageCode":"TR",
		"airlineCode":"TK"
	}
}
			
        

Response

			
{
	  "status": "SUCCESS",
	  "message": {
		"code": "TK-0000",
		"description": "Request Processed Successfully."
	  },
	  "data": {
		"Port": [
			  {
				"IsDomestic": true,
				"IsSPA": false,
				"LanguageInfo": {"Language": [
					{
						"Code": "TR",
						"Name": "ATATÜRK "
					},
					{
						"Code": "EN",
						"Name": "ATATURK "
					},
					{
						"Code": "DE",
						"Name": "ATATÜRK "
					},
					{
						"Code": "TR",
						"Name": "ATATÜRK "
					}
				]},
				"PortTag": {"PortTagLanguage": [
					{
						"Code": "TR",
						"Name": null
					},
					{
						"Code": "EN",
						"Name": "ESTAMBUL"
					},
					{
						"Code": "EN",
						"Name": "STENBOL"
					},
					{
						"Code": "EN",
						"Name": "STAMBULAS"
					},
					{
						"Code": "DE",
						"Name": "ESTAMBUL"
					},
					{
						"Code": "DE",
						"Name": "STENBOL"
					},
					{
						"Code": "DE",
						"Name": "STAMBULAS"
					}
				]},
				"validForAwardTicket": true,
				"Coordinate": {
					"latitude": "40.976944",
					"longitude": "28.821111"
				},
				"Country": {
					"LanguageInfo": {"Language": [
						{
							"Code": "EN",
							"Name": "TURKEY"
						},
						{
							"Code": "DE",
							"Name": "TURKEI"
						},
						{
							"Code": "TR",
							"Name": "TÜRKİYE"
						}
					]},
					"Code": "TR"
				},
				"Region": {
					"LanguageInfo": {"Language": [
						{
							"Code": "TR",
							"Name": "AVRUPA"
						},
						{
							"Code": "EN",
							"Name": "EUROPE"
						},
						{
							"Code": "DE",
							"Name": "EUROPE"
						}
					]},
					"code": "EU"
				},
				"HasComfort": false,
				"City": {
					"LanguageInfo": {"Language": [
						{
							"Code": "TR",
							"Name": "İSTANBUL"
						},
						{
							"Code": "DE",
							"Name": "İSTANBUL"
						},
						{
							"Code": "TR",
							"Name": "İSTANBUL"
						},
						{
							"Code": "EN",
							"Name": "ISTANBUL"
						},
						{
							"Code": "DE",
							"Name": "İSTANBUL"
						},
						{
							"Code": "EN",
							"Name": "ISTANBUL"
						}
					]},
					"PortsInCity": {"Port": [
						{"Code": "IST"},
						{"Code": "SAW"}
					]},
					"Code": "IST"
				},
				"Code": "IST"
			}
		]
	  }
	}
			
		
			
{
"openapi": "3.0.2",
"info": {
     "title": "RESTful getPortList APIs",
     "description": " Lists all ports in details",
     "contact": {
         "name": "MWS Team",
         "email": "OKSM@thy.com"
        },
     "version": "1.0"
},
"servers": [
    {
     "url": " https://api.turkishairlines.com" 
   }
  ],
"tags": [
    {
     "name": "getPortList 1.0",
     "description": "Development environment"
    }
  ],
"paths": {
    "/test/getPortList": {
        "post": {
             "tags": [
                 "getPortList 1.0"
                ],  
             "summary": "Get API",
             "description": "Get list of lists all ports in details.",
             "operationId": "getUsingPOST",
             "parameters": [
             {
                 "name": "apikey",
                 "in": "header",
                 "description": "An active TK API Key for the Port List",
                 "required": true,
                 "schema": {
                     "type": "string" 
                 }
             },
             {
                 "name": "apisecret",
                 "in": "header",
                 "description": " An active TK API  for the Port List",
                 "required": true,
                 "schema": {
                     "type": "string"
                  }
             }
            ],
			 "requestBody":{
                 "description": "Lists all ports in details",
                 "content": {
                     "application/json": {
                         "schema": {
                             "$ref": "#/components/schemas/getPortListRequest"
                            },
                         "examples": {
                             "getPortListRequest" : {
                                 "summary": "getPortListRequest Example", 
                                 "externalValue": "https://developer.turkishairlines.com/documentation/getPortList"
                                } 
                            }
                        }
					}
				},
             "responses": {
                 "200": {
                     "description": "OK",
                     "content": {
                         "application/json": {
                             "schema": {
                                 "$ref": "#/components/schemas/ResponseInformation"
                                }
                            }
                        }
                    },
                 "400": {
                     "description": "BAD_REQUEST",
                     "content": {
                         "application/json": {
                             "schema": {
                                 "$ref": "#/components/schemas/ErrorResponseDetail"
                                }
                            } 
                        }
                    },
		         "401": {
                     "description": "UNAUTHORIZED",
                     "content": {
                         "application/json": {
                             "schema": {
                                 "$ref": "#/components/schemas/ErrorResponseDetail"
                                }
                            }
                        }
                    },
			     "403": {
                     "description": "FORBIDDEN",
                     "content": {
                         "application/json": {
                             "schema": {
                                 "$ref": "#/components/schemas/ErrorResponseDetail"
                                }
                            }
                        }
                    },
		         "404": {
                     "description": "NOT_FOUND",
                     "content": {
                         "application/json": {
                             "schema": {
                                 "$ref": "#/components/schemas/ErrorResponseDetail"
                                }
                            }
                        }
                    },
                 "500": {
                     "description": "INTERNAL_SERVER_ERROR",
                     "content": {
                         "application/json": {
                             "schema": {
                                 "$ref": "#/components/schemas/ErrorResponseDetail"
                                }
                            }
                        }
					}	
                 }
			}
		}
	},	
 
"components": {
     "schemas": {
         "getPortListRequest": {
			"type":"object",
			"properties":{
				"RequestHeader":{
					 "type": "object",
					 "properties":{
						 "clientUsername": {
							 "description": "Client Username",
							 "type": "string"
							},
						 "clientTransactionId": {
							 "description": "A unique id to identify transaction",
							 "type": "string"
							},
						 "channel": {
							 "description": "Channel info",
							 "type": "string"
							},
						 "languageCode": {
							 "description": "Language Code",
							 "type": "string"
							},
						 "airlineCode": {
							 "description": "Airline info",
							 "type": "string"
							}
						}
					}
	        }
		},
	     "ResponseInformation": {
		     "type": "object",
		     "required": [			
		         "Status",
		         "Message",
		         "Data"			
		        ],
	         "properties": {
		         "Status": {
			         "description" : "SUCCESS",
			         "type" : "string" 
			        }, 
			     "Message": {
			         "$ref": "#/components/schemas/MessageInformation"
				    },
		         "Data" : { 
			         "$ref": "#/components/schemas/DataInformation"
		            }
			    }	
		    },
	     "MessageInformation": {
	         "type": "object",
		     "required": [			
		         "Code",
		         "Description"			
		        ],
		     "properties": {
		         "Code": {
			         "description": "TK-OOOO",
			         "type": "string" 
			        }, 
			     "Description": {
			         "description": "Request Processed Successfully.",
			         "type": "string" 
		             }
			    }	
		    },
	     "DataInformation": {
	         "type": "object",
		     "required": [			
		 	     "Port" 
		        ],
	         "properties": {
		         "Port": {
			         "$ref": "#/components/schemas/PortInformation"
		            }
		        }
	        },
	     "PortInformation": {
	         "type": "object",
		     "required": [			
		         "IsDomestic",
		         "IsSPA",
		         "LanguageInfo" ,	
                 "PortTag" ,
                 "validForAwardTicket" ,
                 "Coordinate" ,			 
                 "Country" ,		
                 "Region" ,
			     "HasComfort" ,
			     "City" ,
			     "Code"
		        ],
		    "properties": {
		         "IsDomestic": {
			         "description": "TRUE-FALSE",
			         "type": "boolean" 
			        }, 
			     "IsSPA": {
			         "description": "TRUE-FALSE",
			         "type": "boolean" 
			        },
		         "LanguageInfo": { 
			         "$ref": "#/components/schemas/Language"
		            },
			     "PortTag": { 
			         "$ref": "#/components/schemas/PortTagLanguage"
			        }, 
                 "validForAwardTicket": {
			         "description": "TRUE-FALSE",
			         "type": "boolean" 
			        },	
			     "Coordinate": {
			         "$ref": "#/components/schemas/CoordinateInformation"
					 },
                 "Country": {
			         "$ref": "#/components/schemas/CountryInformation" 
			        },	
                 "Region": {
			         "$ref": "#/components/schemas/RegionInformation" 
			        },
                 "HasComfort": {
			         "description": "TRUE-FALSE",
			         "type": "boolean" 
			        },	
                 "City": {
			         "$ref": "#/components/schemas/CityInformation" 
			        },	
                 "Code": {
			         "description": "IST",
			         "type": "string" 
			        }			
		        }
	        },
	     "Language": {
	         "type": "object",
		     "required": [			
		         "Code",
		         "Name"			
		        ],
		     "properties": {
		         "Code": {
			         "description": "TR",
			         "type": "string" 
			        }, 
			     "Name": {
			         "description": "ATATÜRK",
			         "type": "string" 
		            }
			    }	
		    },
	     "PortTagLanguage": {
	         "type": "object",
		     "required": [			
		         "Code",
		         "Name"			
		        ],
		     "properties": {
		         "Code": {
			         "description": "TR",
			         "type": "string" 
			        }, 
			     "Name": {
			         "description": "İSTANBUL",
			         "type": "string" 
		            }
			    }	
		    },
	     "CoordinateInformation": {
	         "type": "object",
		     "required": [			
		         "Latitude",
		         "Longtitude"			
		        ],
		     "properties": {
		         "Latitude": {
			         "description": "40.976944",
			         "type": "number" 
			        }, 
			     "Longtitude": {
			         "description": "28.821111",
			         "type": "number" 
		            }
			    }	
		    },
	     "CountryInformation": {
	         "type": "object",
		     "required": [			
		         "LanguageInfo",
		         "Code"			
		        ],
		     "properties": {
		         "LanguageInfo": {
			         "$ref": "#/components/schemas/Language" 
			        }, 
			     "Code": {
			         "description": "TR",
			         "type": "string" 
		            }
			    }	
		    },
	     "RegionInformation": {
	         "type": "object",
		     "required": [			
		         "LanguageInfo",
		         "Code"			
		        ],
		     "properties": {
		         "LanguageInfo": {
			         "$ref": "#/components/schemas/Language" 
			        }, 
			     "Code": {
			         "description": "EU",
			         "type": "string" 
		            }
			    }	
		    },
	     "CityInformation": {
	         "type": "object",
		     "required": [			
		         "LanguageInfo",
		         "Code"	,
                 "PortsInCity"		 
		        ],
		     "properties": {
		         "LanguageInfo": {
			         "$ref": "#/components/schemas/Language" 
			        }, 
			     "Code": {
			         "description": "IST",
			         "type": "string" 
		            },
			     "PortsInCity": {
			         "$ref": "#/components/schemas/Port" 
			        }
                }				
		    },
	     "Port": {
	         "type": "object",
		     "required": [			
		         "Code"		 
		        ],
		     "properties": {
			     "Code": {
			         "description": "IST",
			         "type": "string" 
		            }	
		        }
		    },
	     "ErrorResponseDetail": {
             "type": "object",
             "properties": {
                 "Status": {
                     "type": "integer",
                     "description": "Status code"
                    },
                 "Message": {
                     "type": "string",
                     "description": "Error message"
                    }
                }
            }
        }
	}
}						
			
	

You can find how to test an API in documentation page.