Skip to content

Request 6

ReturnProvinces

List the provinces

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

Description

Returns every province in THE EXCHANGE database, each with an ID. Each city's provId refers to one of these IDs.

Use Case

Use this request to populate a province drop-down list on your ATM search form, or to group the list of cities by province.

The Request

GETReturnProvinces

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

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

The Response

Full List

Every province.

{  "provinces": [    { "id": 156, "name": "Alberta" },    { "id": 153, "name": "BC" },    { "id": 152, "name": "Ontario" },    { "id": 154, "name": "Quebec" }  ]}

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

provincesarray

Every province.

Example [ ... ]

provinces[].idnumber

The province's ID. Each city's provId refers to this ID.

Example 152

provinces[].namestring

The province's name.

Example Ontario

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 province.

  • 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.