Skip to content

The basics

JSON or XML?

In this section, we will review the differences between JSON and XML responses. Both formats return the same ATM information, but some fields are written differently.

Example: One ATM in JSON and XML

JSON

{  "index": 0,  "id": 2021,  "atmIdentifier": "VSCU5972",  "address": {    "postalCode": "V7M2J3"  },  "features": {    "hours": 2,    "driveThru": 0  },  "languages": ["en", "fr"]}

XML

<location index="1" id="2021" atmCount="1">  <atmIds>    <atmId>VSCU5972</atmId>  </atmIds>  <address>    <postalCode>V7M 2J3</postalCode>  </address>  <features>    <hours value="2">24 Hours a Day</hours>    <driveThru value="2">No</driveThru>  </features>  <languages>    <language id="en">English</language>    <language id="fr">French</language>  </languages></location>

Difference between JSON and XML

Position in the responseJSONindex starts at 0XMLindex starts at 1
Drive-thru ATMsJSON1 for yes, 0 for noXML1 for Yes, 2 for No
Yes/No fieldsJSON1 or 0XML1 or 0, plus the word true or false
HoursJSONthe code only, such as 2XMLthe code and its label, such as 24 Hours a Day
LanguagesJSONcodes only, such as enXMLthe code and the name, such as English
Postal codeJSONno space, such as V7M2J3XMLwith a space, such as V7M 2J3
ATM IDJSONatmIdentifierXMLatmIds, containing one atmId, and atmCount, which is always 1

Requesting JSON or XML

The request name and parameters are the same for both. Only the address changes.

https://api.ficanex.ca/service/json/ReturnAtmSearchByPostalCodehttps://api.ficanex.ca/service/service.asmx/ReturnAtmSearchByPostalCode

The first address returns JSON and the second returns XML. Every request page also shows the SOAP version of the request. The ReturnAtm request is the only request with no XML or SOAP version.

SOAP Systems

SOAP tools build requests from the service’s description file, called the WSDL (Web Services Description Language), at /service/service.wsdl. The WSDL does not list bShowDuplicateAddresses. The service still accepts this parameter, but tools that build requests from the WSDL will not include it automatically.