ATM Locator

Service Description

ATM Locator Service is used to find out nearest branches and ATMs. User can find nearest ATMs or branches around the given location. This API is in the branch category;

/branch/v1/getunitinfo?latitude={latitude}&longitude={longitude}&unitType={unitType}&distance={distance}

API Profile

Attribute

Value

Name ATM Locator
Version V1
Synopsis Branch and ATM Location Service
Description Find Branch and ATM Locations
Pre-Conditions HTTP GET method  is allowed only in ATM Locator service.
Authentication OAuth 2.0 with Client Credentials

Before your application can access the API, it must obtain a new access token for each request. The access token can be used only one time

Endpoint Definition

ATM Locator API’s development live and mock environments routing data 

EndPoint SERVICE

URI https://apis.garanti.com.tr/branch/v1/getunitinfo
Base URL https://apis.garanti.com.tr

Technology

Technology Stack / DESIGN TIME

Property Value Note (if exist)
HTTP Call Method GET  
Response Content Type application/json  

 Request

HTTP GET method  is allowed only in ATM Locator service.

https://{baseURL}/branch/v1/getunitinfo?latitude=41.0333187&longitude=28.818883399999997&unitType=C&distance=2

Arguments

The list of arguments by the ATM Locator service to be invoked

Name Type Description Obligation
latitude String Latitude of the reference location Mandatory
longitude String Longitude of the reference location Mandatory
unitType String A:ATM, B:Branch, C:Both Mandatory
distance String Search distance Optional

Sample Arguments

Sample data which can be used to call the API

Argument

Value

latitude 41.0333187
longitude 28.818883399999997
unitType C
distance 2

Response  

The ATM Locator service is return the branches and ATMs address info

Sample Response

{
   "unitList":    [
            {
         "gmaticOutput":          {
            "densityColor": 0,
            "densityValue": null
         },
         "code": 1590,
         "name": "GÜNEŞLİ A",
         "type": "T",
         "address1": "Güneşli Mahallesi Koçman Caddesi No: 12U 34209",
         "address2": "",
         "address3": "",
         "zipCode": 34209,
         "areaCode": 212,
         "telephone": "4106900",
         "fax": "4106920",
         "cityCode": "035",
         "townCode": "00027",
         "cityName": "İZMİR          ",
         "townName": "NARLIDERE",
         "latitude": "41.031723266211",
         "longitude": "28.824132913794",
         "openAfternoon": "E",
         "afternoonHours": "(12:30-13:30)",
         "unitType": "branch",
         "distance": 0.47
      },
            {
         "gmaticOutput":          {
            "densityColor": 0,
            "densityValue": null
         },
         "code": 1592,
         "name": "GÜNEŞLİ C",
         "type": "T",
         "address1": "Güneşli Mahallesi Koçman Caddesi No: 12U 34209",
         "address2": "",
         "address3": "",
         "zipCode": 34209,
         "areaCode": 212,
         "telephone": "4106900",
         "fax": "4106920",
         "cityCode": "035",
         "townCode": "00027",
         "cityName": "İZMİR          ",
         "townName": "NARLIDERE",
         "latitude": "41.031723266211",
         "longitude": "28.824132913794",
         "openAfternoon": "E",
         "afternoonHours": "(12:30-13:30)",
         "unitType": "branch",
         "distance": 0.47
      }
  ],
   "returnMessage": "OK",
   "returnCode": 0
}

Return Codes & Error Handling

Response codes from ATM Locator request

Code

Description

Type

200 OK SUCCESS
405 {http.method} Method Not Allowed CALL METHOD ERROR
400 Invalid Request MISSING PARAMETERS
401 Invalid Credentials UNAUTHORIZED
429 API plan limit exceeded RATE LIMITING
500 Internal Server Error SYSTEM ERROR

Return Messages 

CODE

RETURN RESPONSE

405
{
 "result": {
   "code": 405,
   "info": "POST Method Not Allowed"
  }
}
400
{
 "result": {
   "code": 400,
   "info": "Invalid Request"
  }
}
401
{
 "result": {
   "code": 401,
   "info": "Invalid Credentials"
  }
}
429
{
 "result": {
   "code": 429,
   "info": "API plan limit exceeded"
  }
}
500
{
 "result": {
   "code": 500,
   "info": "Internal Server Error"
  }
}