Skip to content

Request 4

ReturnCities

List the cities

GEThttps://api.ficanex.ca/service/json/ReturnCitiesRetrieves information. No data is changed.

Description

Returns every city in THE EXCHANGE database, each with an ID. The ID is required by ReturnAtmSearchByCity.

Use Case

Use this request to populate a city drop-down list on your ATM search form. The ID of the city a member selects can then be passed to ReturnAtmSearchByCity.

The Request

GETReturnCities

https://api.ficanex.ca/service/json/ReturnCities?strAtmServiceKey=YOUR_KEY

operationparametervalueYOUR_KEY replace with your keyThe first parameter follows ?, and each additional parameter follows &.

The Response

Full List

Every city, each with its province ID.

{  "cities": [    { "id": 8857, "name": "Cheticamp", "provId": 150 },    { "id": 8858, "name": "Moncton", "provId": 151 },    { "id": 8862, "name": "Mississauga", "provId": 152 }  ]}

The Request

The parameters sent with the request. Parameters marked Required must be included. The Example tab shows the complete request.

Parameters

Each parameter is added to the end of the request address.

strAtmServiceKeystringRequired

The Web Service Key assigned to your Financial Institution. Required for every request.

Example YOUR_KEY

The Response

The information returned by the request. The Example tab shows each response in full.

Successful Response Fields

citiesarray

Every city.

Example [ ... ]

cities[].idnumber

The city's ID. Use it as intCityID.

Example 8862

cities[].namestring

The city's name.

Example Mississauga

cities[].provIdnumber

The ID of the province the city is in, as returned by ReturnProvinces.

Example 152

Possible Responses

Each response includes a Status CodeA standard code returned with every response to indicate the result of your request:200: Indicates success.400 & 404: Indicate a problem with the request format or a missing resource.500 & 502: Indicate an issue occurred on THE EXCHANGE server.. These match the tabs in The Response panel.

  • 200Full List

    Every city, each with its province ID.

  • 400Missing Web Service Key

    The request did not include strAtmServiceKey.

    What to do: Add strAtmServiceKey to the request address.

  • 400Invalid Web Service Key

    A key was sent, but it does not match any Financial Institution.

    What to do: Check the key for typing errors. Your current key is in the Overview section of your Financial Institution's page on the FI Portal.