Bank of Scotland APIs
Use our apis to create a new customer experiences and help shape the way we bank in the future.
ATM
Description
Find any Bank of Scotland Bank ATM across the UK and utilise the facilities it offers. This API will allow users to locate all Bank of Scotland Bank Automated Teller Machines across the UK.
Benefits
- Full list of Bank of Scotland ATMs
- Town, street name and postcode ATM is located on
- Services available
Version - 2.2
Interface
/atms
Type:: GET
Description
This resource returns all the ATM locations
/atms
Type:: HEAD
Description
This resource returns the header information alone without sending the entire content
curl --request GET \
--url https://api.bankofscotland.co.uk/open-banking/v2.2/atms \
--header 'If-Modified-Since: REPLACE_THIS_VALUE' \
--header 'If-None-Match: REPLACE_THIS_VALUE' \
--header 'accept: application/prs.openbanking.opendata.v2.2+json'
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.bankofscotland.co.uk/open-banking/v2.2/atms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["If-Modified-Since"] = 'REPLACE_THIS_VALUE'
request["If-None-Match"] = 'REPLACE_THIS_VALUE'
request["accept"] = 'application/prs.openbanking.opendata.v2.2+json'
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("api.bankofscotland.co.uk")
headers = {
'If-Modified-Since': "REPLACE_THIS_VALUE",
'If-None-Match': "REPLACE_THIS_VALUE",
'accept': "application/prs.openbanking.opendata.v2.2+json"
}
conn.request("GET", "/open-banking/v2.2/atms", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL =>"https://api.bankofscotland.co.uk/open-banking/v2.2/atms",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"If-Modified-Since: REPLACE_THIS_VALUE",
"If-None-Match: REPLACE_THIS_VALUE",
"accept: application/prs.openbanking.opendata.v2.2+json",
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.bankofscotland.co.uk/open-banking/v2.2/atms")
.get()
.addHeader("If-Modified-Since", "REPLACE_THIS_VALUE")
.addHeader("If-None-Match", "REPLACE_THIS_VALUE")
.addHeader("accept", "application/prs.openbanking.opendata.v2.2+json")
.build();
Response response = client.newCall(request).execute();
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.bankofscotland.co.uk/open-banking/v2.2/atms',
headers: {
'If-Modified-Since': 'REPLACE_THIS_VALUE',
'If-None-Match': 'REPLACE_THIS_VALUE',
'accept': 'application/prs.openbanking.opendata.v2.2+json'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.bankofscotland.co.uk/open-banking/v2.2/atms"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("If-Modified-Since", "REPLACE_THIS_VALUE")
req.Header.Add("If-None-Match", "REPLACE_THIS_VALUE")
req.Header.Add("accept", "application/prs.openbanking.opendata.v2.2+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import Foundation
let headers = [
"If-Modified-Since": "REPLACE_THIS_VALUE",
"If-None-Match": "REPLACE_THIS_VALUE",
"accept": "application/prs.openbanking.opendata.v2.2+json"
]
let request = NSMutableURLRequest(
url: NSURL(string: "https://api.bankofscotland.co.uk/open-banking/v2.2/atms")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(
with: request as URLRequest,
completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()