CityProviderHibernateImpl Resource

An API to interact with cities, airports and train stations.

GET /city/countAirports

Count the airports using the provided query.

Request Parameters
name type description
search query The query to count airports with.
Response Body
media type data type description
application/json number (JSON) A long number of the total airports returned by the query.
application/xml long (XML)

Example

Request
GET /city/countAirports
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /city/countTrainStations

Count the train stations using the provided query.

Request Parameters
name type description
search query The query to count stations with.
Response Body
media type data type description
application/json number (JSON) A long number of the total stations returned.
application/xml long (XML)

Example

Request
GET /city/countTrainStations
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /city/getAllCountries

Get all countries.

Response Body
media type data type description
application/json array of Country (JSON) All countries.
application/xml list of country (XML)

Example

Request
GET /city/getAllCountries
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "name" : "...",
  "code" : "...",
  "codeAlt" : "...",
  "phoneCode" : 12345,
  "position" : 12345,
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
} ]
                
              

GET /city/getAllRegions

Response Body
media type data type description
application/json array of Region (JSON)
application/xml list of region (XML)

Example

Request
GET /city/getAllRegions
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "name" : "...",
  "code" : "...",
  "country" : {
    "name" : "...",
    "code" : "...",
    "codeAlt" : "...",
    "phoneCode" : 12345,
    "position" : 12345,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "position" : 12345,
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
} ]
                
              

GET /city/getAllTimeZones

Get a list of all time zones in the world.

Response Body
media type data type description
application/json array of TimeZone (JSON) A list of all time zones in the world.
application/xml list of timeZone (XML)

Example

Request
GET /city/getAllTimeZones
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "name" : "...",
  "offset" : 12345.0,
  "daylightSavingsOffset" : 12345.0,
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
} ]
                
              

GET /city/getTimeZoneByName

Get a time zone by its name.

Request Parameters
name type description
name query
Response Body
media type data type description
application/json TimeZone (JSON) The time zone with the given name.
application/xml timeZone (XML)

Example

Request
GET /city/getTimeZoneByName
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "name" : "...",
  "offset" : 12345.0,
  "daylightSavingsOffset" : 12345.0,
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
}
                
              

GET /city/searchAirports

Search for airports using the provided query.

Request Parameters
name type description
search query The query to search for airports with.
Response Body
media type data type description
application/json array of City (JSON) The airports found using the query.
application/xml list of city (XML)

Example

Request
GET /city/searchAirports
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "code" : "...",
  "countryCode" : "...",
  "latitude" : 12345.0,
  "longitude" : 12345.0,
  "name" : "...",
  "stateOrCountry" : "...",
  "airportName" : "...",
  "region" : {
    "name" : "...",
    "code" : "...",
    "country" : {
      "name" : "...",
      "code" : "...",
      "codeAlt" : "...",
      "phoneCode" : 12345,
      "position" : 12345,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "position" : 12345,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "timeZone" : {
    "name" : "...",
    "offset" : 12345.0,
    "daylightSavingsOffset" : 12345.0,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "retentionOnly" : true,
  "position" : 12345,
  "unique" : true,
  "alias" : true,
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
} ]
                
              

GET /city/searchTrainStations

Search for train stations using the provided query.

Request Parameters
name type description
search query The query to search for train stations with.
Response Body
media type data type description
application/json array of TrainStation (JSON) The train stations found using the query.
application/xml list of trainStation (XML)

Example

Request
GET /city/searchTrainStations
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "longitude" : 12345.0,
  "latitude" : 12345.0,
  "code" : "...",
  "city" : {
    "code" : "...",
    "countryCode" : "...",
    "latitude" : 12345.0,
    "longitude" : 12345.0,
    "name" : "...",
    "stateOrCountry" : "...",
    "airportName" : "...",
    "region" : {
      "name" : "...",
      "code" : "...",
      "country" : { },
      "position" : 12345,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "timeZone" : {
      "name" : "...",
      "offset" : 12345.0,
      "daylightSavingsOffset" : 12345.0,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "retentionOnly" : true,
    "position" : 12345,
    "unique" : true,
    "alias" : true,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "name" : "...",
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
} ]
                
              

POST /city/updateAirport

Update a city.

Request Body
media type data type description
application/json City (JSON) The city to update.
application/xml city (XML)
Response Body
media type data type description
application/json City (JSON) The updated city.
application/xml city (XML)

Example

Request
POST /city/updateAirport
Content-Type: application/json
Accept: application/json

                
{
  "code" : "...",
  "countryCode" : "...",
  "latitude" : 12345.0,
  "longitude" : 12345.0,
  "name" : "...",
  "stateOrCountry" : "...",
  "airportName" : "...",
  "region" : {
    "name" : "...",
    "code" : "...",
    "country" : {
      "name" : "...",
      "code" : "...",
      "codeAlt" : "...",
      "phoneCode" : 12345,
      "position" : 12345,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "position" : 12345,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "timeZone" : {
    "name" : "...",
    "offset" : 12345.0,
    "daylightSavingsOffset" : 12345.0,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "retentionOnly" : true,
  "position" : 12345,
  "unique" : true,
  "alias" : true,
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "code" : "...",
  "countryCode" : "...",
  "latitude" : 12345.0,
  "longitude" : 12345.0,
  "name" : "...",
  "stateOrCountry" : "...",
  "airportName" : "...",
  "region" : {
    "name" : "...",
    "code" : "...",
    "country" : {
      "name" : "...",
      "code" : "...",
      "codeAlt" : "...",
      "phoneCode" : 12345,
      "position" : 12345,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "position" : 12345,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "timeZone" : {
    "name" : "...",
    "offset" : 12345.0,
    "daylightSavingsOffset" : 12345.0,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "retentionOnly" : true,
  "position" : 12345,
  "unique" : true,
  "alias" : true,
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
}
                
              

POST /city/updateAlternativeAirports

Add/Remove alternative airports for a particular airport.

Request Parameters
name type description multivalued
alt query A list of cities that are alternatives for the provided airport. yes
Request Body
media type data type description
application/json number (JSON) The id of the airport to add or remove alternatives for.
application/xml long (XML)
Response Body
media type data type description
application/json array of City (JSON) The list of cities that were added as alternatives for the provided airport.
application/xml list of city (XML)

Example

Request
POST /city/updateAlternativeAirports
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
[ {
  "code" : "...",
  "countryCode" : "...",
  "latitude" : 12345.0,
  "longitude" : 12345.0,
  "name" : "...",
  "stateOrCountry" : "...",
  "airportName" : "...",
  "region" : {
    "name" : "...",
    "code" : "...",
    "country" : {
      "name" : "...",
      "code" : "...",
      "codeAlt" : "...",
      "phoneCode" : 12345,
      "position" : 12345,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "position" : 12345,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "timeZone" : {
    "name" : "...",
    "offset" : 12345.0,
    "daylightSavingsOffset" : 12345.0,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "retentionOnly" : true,
  "position" : 12345,
  "unique" : true,
  "alias" : true,
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
} ]
                
              

POST /city/updateTrainStation

Update a train station.

Request Body
media type data type description
application/json TrainStation (JSON) The station to update.
application/xml trainStation (XML)
Response Body
media type data type description
application/json TrainStation (JSON) The updated train station.
application/xml trainStation (XML)

Example

Request
POST /city/updateTrainStation
Content-Type: application/json
Accept: application/json

                
{
  "longitude" : 12345.0,
  "latitude" : 12345.0,
  "code" : "...",
  "city" : {
    "code" : "...",
    "countryCode" : "...",
    "latitude" : 12345.0,
    "longitude" : 12345.0,
    "name" : "...",
    "stateOrCountry" : "...",
    "airportName" : "...",
    "region" : {
      "name" : "...",
      "code" : "...",
      "country" : { },
      "position" : 12345,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "timeZone" : {
      "name" : "...",
      "offset" : 12345.0,
      "daylightSavingsOffset" : 12345.0,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "retentionOnly" : true,
    "position" : 12345,
    "unique" : true,
    "alias" : true,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "name" : "...",
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "longitude" : 12345.0,
  "latitude" : 12345.0,
  "code" : "...",
  "city" : {
    "code" : "...",
    "countryCode" : "...",
    "latitude" : 12345.0,
    "longitude" : 12345.0,
    "name" : "...",
    "stateOrCountry" : "...",
    "airportName" : "...",
    "region" : {
      "name" : "...",
      "code" : "...",
      "country" : { },
      "position" : 12345,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "timeZone" : {
      "name" : "...",
      "offset" : 12345.0,
      "daylightSavingsOffset" : 12345.0,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "retentionOnly" : true,
    "position" : 12345,
    "unique" : true,
    "alias" : true,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "name" : "...",
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
}
                
              

GET /city/getAirportByCityName/{cityName}

Get an airport using the name of the city it is in.

Request Parameters
name type description
cityName path The name of the city that the airport resides.
Response Body
media type data type description
application/json City (JSON) The city that the airport resides in.
application/xml city (XML)

Example

Request
GET /city/getAirportByCityName/{cityName}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "code" : "...",
  "countryCode" : "...",
  "latitude" : 12345.0,
  "longitude" : 12345.0,
  "name" : "...",
  "stateOrCountry" : "...",
  "airportName" : "...",
  "region" : {
    "name" : "...",
    "code" : "...",
    "country" : {
      "name" : "...",
      "code" : "...",
      "codeAlt" : "...",
      "phoneCode" : 12345,
      "position" : 12345,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "position" : 12345,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "timeZone" : {
    "name" : "...",
    "offset" : 12345.0,
    "daylightSavingsOffset" : 12345.0,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "retentionOnly" : true,
  "position" : 12345,
  "unique" : true,
  "alias" : true,
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
}
                
              

GET /city/getAirportByCode/{code}

Get an airport using its IATA code.

Request Parameters
name type description
code path The IATA code for the airport.
Response Body
media type data type description
application/json City (JSON) The City that the airport resides in.
application/xml city (XML)

Example

Request
GET /city/getAirportByCode/{code}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "code" : "...",
  "countryCode" : "...",
  "latitude" : 12345.0,
  "longitude" : 12345.0,
  "name" : "...",
  "stateOrCountry" : "...",
  "airportName" : "...",
  "region" : {
    "name" : "...",
    "code" : "...",
    "country" : {
      "name" : "...",
      "code" : "...",
      "codeAlt" : "...",
      "phoneCode" : 12345,
      "position" : 12345,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "position" : 12345,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "timeZone" : {
    "name" : "...",
    "offset" : 12345.0,
    "daylightSavingsOffset" : 12345.0,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "retentionOnly" : true,
  "position" : 12345,
  "unique" : true,
  "alias" : true,
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
}
                
              

GET /city/getAirportById/{id}

Get an airport by its ID.

Request Parameters
name type description constraints
id path The ID of the city/airport. long
Response Body
media type data type description
application/json City (JSON) The city/airport identified by the given ID.
application/xml city (XML)

Example

Request
GET /city/getAirportById/{id}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "code" : "...",
  "countryCode" : "...",
  "latitude" : 12345.0,
  "longitude" : 12345.0,
  "name" : "...",
  "stateOrCountry" : "...",
  "airportName" : "...",
  "region" : {
    "name" : "...",
    "code" : "...",
    "country" : {
      "name" : "...",
      "code" : "...",
      "codeAlt" : "...",
      "phoneCode" : 12345,
      "position" : 12345,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "position" : 12345,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "timeZone" : {
    "name" : "...",
    "offset" : 12345.0,
    "daylightSavingsOffset" : 12345.0,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "retentionOnly" : true,
  "position" : 12345,
  "unique" : true,
  "alias" : true,
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
}
                
              

GET /city/getAirportCountry/{code}

Request Parameters
name type description
code path
Response Body
media type data type description
application/json Country (JSON)
application/xml country (XML)

Example

Request
GET /city/getAirportCountry/{code}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "name" : "...",
  "code" : "...",
  "codeAlt" : "...",
  "phoneCode" : 12345,
  "position" : 12345,
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
}
                
              

GET /city/getAirportRegion/{code}

Request Parameters
name type description
code path
Response Body
media type data type description
application/json Region (JSON)
application/xml region (XML)

Example

Request
GET /city/getAirportRegion/{code}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "name" : "...",
  "code" : "...",
  "country" : {
    "name" : "...",
    "code" : "...",
    "codeAlt" : "...",
    "phoneCode" : 12345,
    "position" : 12345,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "position" : 12345,
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
}
                
              

GET /city/getAlternativeAirports/{id}

Get alternative airports for a particular airport.

Request Parameters
name type description constraints
id path The id of the airport to get alternatives for. long
Response Body
media type data type description
application/json array of City (JSON) A list of cities that are alternatives for the provided airport.
application/xml list of city (XML)

Example

Request
GET /city/getAlternativeAirports/{id}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "code" : "...",
  "countryCode" : "...",
  "latitude" : 12345.0,
  "longitude" : 12345.0,
  "name" : "...",
  "stateOrCountry" : "...",
  "airportName" : "...",
  "region" : {
    "name" : "...",
    "code" : "...",
    "country" : {
      "name" : "...",
      "code" : "...",
      "codeAlt" : "...",
      "phoneCode" : 12345,
      "position" : 12345,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "position" : 12345,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "timeZone" : {
    "name" : "...",
    "offset" : 12345.0,
    "daylightSavingsOffset" : 12345.0,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "retentionOnly" : true,
  "position" : 12345,
  "unique" : true,
  "alias" : true,
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
} ]
                
              

POST /city/getCityByCityId/{id}

Get a city by its id.

Request Parameters
name type description constraints
id path The ID of the city. long
Response Body
media type data type description
application/json City (JSON) The city identified by the given ID.
application/xml city (XML)

Example

Request
POST /city/getCityByCityId/{id}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "code" : "...",
  "countryCode" : "...",
  "latitude" : 12345.0,
  "longitude" : 12345.0,
  "name" : "...",
  "stateOrCountry" : "...",
  "airportName" : "...",
  "region" : {
    "name" : "...",
    "code" : "...",
    "country" : {
      "name" : "...",
      "code" : "...",
      "codeAlt" : "...",
      "phoneCode" : 12345,
      "position" : 12345,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "position" : 12345,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "timeZone" : {
    "name" : "...",
    "offset" : 12345.0,
    "daylightSavingsOffset" : 12345.0,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "retentionOnly" : true,
  "position" : 12345,
  "unique" : true,
  "alias" : true,
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
}
                
              

GET /city/getTrainStationByAirportCode/{code}

Get a list of train stations by their nearest airport code.

Request Parameters
name type description
code path The airport code nearest to the train station.
Response Body
media type data type description
application/json array of TrainStation (JSON) The train station closes to the airport.
application/xml list of trainStation (XML)

Example

Request
GET /city/getTrainStationByAirportCode/{code}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "longitude" : 12345.0,
  "latitude" : 12345.0,
  "code" : "...",
  "city" : {
    "code" : "...",
    "countryCode" : "...",
    "latitude" : 12345.0,
    "longitude" : 12345.0,
    "name" : "...",
    "stateOrCountry" : "...",
    "airportName" : "...",
    "region" : {
      "name" : "...",
      "code" : "...",
      "country" : { },
      "position" : 12345,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "timeZone" : {
      "name" : "...",
      "offset" : 12345.0,
      "daylightSavingsOffset" : 12345.0,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "retentionOnly" : true,
    "position" : 12345,
    "unique" : true,
    "alias" : true,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "name" : "...",
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
} ]
                
              

GET /city/getTrainStationByCode/{code}

Get a train station using its IATA code.

Request Parameters
name type description
code path The IATA code for the train station.
Response Body
media type data type description
application/json TrainStation (JSON) The TrainStation that the code identifies.
application/xml trainStation (XML)

Example

Request
GET /city/getTrainStationByCode/{code}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "longitude" : 12345.0,
  "latitude" : 12345.0,
  "code" : "...",
  "city" : {
    "code" : "...",
    "countryCode" : "...",
    "latitude" : 12345.0,
    "longitude" : 12345.0,
    "name" : "...",
    "stateOrCountry" : "...",
    "airportName" : "...",
    "region" : {
      "name" : "...",
      "code" : "...",
      "country" : { },
      "position" : 12345,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "timeZone" : {
      "name" : "...",
      "offset" : 12345.0,
      "daylightSavingsOffset" : 12345.0,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "retentionOnly" : true,
    "position" : 12345,
    "unique" : true,
    "alias" : true,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "name" : "...",
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
}
                
              

GET /city/getTrainStationById/{id}

Get a train station using its ID.

Request Parameters
name type description constraints
id path The id of the train station. long
Response Body
media type data type description
application/json TrainStation (JSON) The TrainStation that the id identifies.
application/xml trainStation (XML)

Example

Request
GET /city/getTrainStationById/{id}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "longitude" : 12345.0,
  "latitude" : 12345.0,
  "code" : "...",
  "city" : {
    "code" : "...",
    "countryCode" : "...",
    "latitude" : 12345.0,
    "longitude" : 12345.0,
    "name" : "...",
    "stateOrCountry" : "...",
    "airportName" : "...",
    "region" : {
      "name" : "...",
      "code" : "...",
      "country" : { },
      "position" : 12345,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "timeZone" : {
      "name" : "...",
      "offset" : 12345.0,
      "daylightSavingsOffset" : 12345.0,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "retentionOnly" : true,
    "position" : 12345,
    "unique" : true,
    "alias" : true,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "name" : "...",
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
}
                
              

GET /city/getAirportByCityNameAndState/{cityName}/{state}

Request Parameters
name type description
cityName path
state path
Response Body
media type data type description
application/json City (JSON)
application/xml city (XML)

Example

Request
GET /city/getAirportByCityNameAndState/{cityName}/{state}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "code" : "...",
  "countryCode" : "...",
  "latitude" : 12345.0,
  "longitude" : 12345.0,
  "name" : "...",
  "stateOrCountry" : "...",
  "airportName" : "...",
  "region" : {
    "name" : "...",
    "code" : "...",
    "country" : {
      "name" : "...",
      "code" : "...",
      "codeAlt" : "...",
      "phoneCode" : 12345,
      "position" : 12345,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "position" : 12345,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "timeZone" : {
    "name" : "...",
    "offset" : 12345.0,
    "daylightSavingsOffset" : 12345.0,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "retentionOnly" : true,
  "position" : 12345,
  "unique" : true,
  "alias" : true,
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
}
                
              

GET /city/getHotelByCode/{code}/{gds}

Get a hotel location using it's property code.

Request Parameters
name type description constraints
code path The unique code for the property.  
gds path The GDS that the code is for. long
Response Body
media type data type description
application/json HotelLocation (JSON) The property that the code belongs to.
application/xml hotelLocation (XML)

Example

Request
GET /city/getHotelByCode/{code}/{gds}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "address1" : "...",
  "address2" : "...",
  "phone1" : "...",
  "phone2" : "...",
  "fax" : "...",
  "zip" : "...",
  "city" : {
    "code" : "...",
    "countryCode" : "...",
    "latitude" : 12345.0,
    "longitude" : 12345.0,
    "name" : "...",
    "stateOrCountry" : "...",
    "airportName" : "...",
    "region" : {
      "name" : "...",
      "code" : "...",
      "country" : { },
      "position" : 12345,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "timeZone" : {
      "name" : "...",
      "offset" : 12345.0,
      "daylightSavingsOffset" : 12345.0,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "retentionOnly" : true,
    "position" : 12345,
    "unique" : true,
    "alias" : true,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "vendor" : {
    "longCode" : "...",
    "commissionRate" : 12345.0,
    "family" : {
      "name" : "...",
      "code" : "...",
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "position" : 12345,
    "code" : "...",
    "name" : "...",
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "latitude" : 12345.0,
  "sertifiCode" : "...",
  "longitude" : 12345.0,
  "propertyName" : "...",
  "propertyCodes" : [ {
    "gds" : {
      "code" : "...",
      "name" : "...",
      "enabled" : true,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "code" : "...",
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  }, {
    "gds" : {
      "code" : "...",
      "name" : "...",
      "enabled" : true,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "code" : "...",
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  } ],
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
}
                
              

GET /city/getHotelLocationByAddressAndPhone/{address}/{phone}

Get a hotel location using it's phone number.

Request Parameters
name type description
address path The address of the hotel location.
phone path The phone number to search by.
Response Body
media type data type description
application/json HotelLocation (JSON) The hotel location with this matching phone number.
application/xml hotelLocation (XML)

Example

Request
GET /city/getHotelLocationByAddressAndPhone/{address}/{phone}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "address1" : "...",
  "address2" : "...",
  "phone1" : "...",
  "phone2" : "...",
  "fax" : "...",
  "zip" : "...",
  "city" : {
    "code" : "...",
    "countryCode" : "...",
    "latitude" : 12345.0,
    "longitude" : 12345.0,
    "name" : "...",
    "stateOrCountry" : "...",
    "airportName" : "...",
    "region" : {
      "name" : "...",
      "code" : "...",
      "country" : { },
      "position" : 12345,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "timeZone" : {
      "name" : "...",
      "offset" : 12345.0,
      "daylightSavingsOffset" : 12345.0,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "retentionOnly" : true,
    "position" : 12345,
    "unique" : true,
    "alias" : true,
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "vendor" : {
    "longCode" : "...",
    "commissionRate" : 12345.0,
    "family" : {
      "name" : "...",
      "code" : "...",
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "position" : 12345,
    "code" : "...",
    "name" : "...",
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "latitude" : 12345.0,
  "sertifiCode" : "...",
  "longitude" : 12345.0,
  "propertyName" : "...",
  "propertyCodes" : [ {
    "gds" : {
      "code" : "...",
      "name" : "...",
      "enabled" : true,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "code" : "...",
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  }, {
    "gds" : {
      "code" : "...",
      "name" : "...",
      "enabled" : true,
      "id" : 12345,
      "version" : 12345,
      "violations" : [ { }, { } ]
    },
    "code" : "...",
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  } ],
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
}