Yoisho Banking Corp – Developer Portal

ATM Locator - REST/JSON

This API gives you a full CRUDL interface (Create, Read, Update, Delete, List) for ATM locations, using an in memory database.

Two versions:

Version 1

Open API Specification
Test the API
Sample Request

Version 2

Open API Specification
Test the API
Sample Request

Get the Swagger

curl https://backend.yoisho.dob.jp/banking/v2/swagger

{ "swagger": "2.0", "info": { "version": "", "title": "ATM Locations", "description": "List of ATM locations for Yoisho Banking Corporation" }, "basePath": "/banking/v2", "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/atm/{id}": { "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" } ], "get": { "operationId": "GET-atm-location", "summary": "Get ATM Location", "tags": [ "Atm locations" ], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/api-location-input" } } } }, "put": { "operationId": "PUT-atm-location", "summary": "Update ATM Location", "tags": [ "Atm locations" ], "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/api-location-input" } } ], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/api-location-input" } } } }, "delete": { "operationId": "DELETE-atm-location", "summary": "Delete ATM Location", "tags": [ "Atm locations" ], "responses": { "204": { "description": "" } } } }, "/atm": { "get": { "operationId": "LIST-atm-locations", "summary": "List Atm locations", "tags": [ "Atm locations" ], "responses": { "200": { "description": "", "schema": { "type": "object", "properties": { "result": { "type": "array", "items": { "type": "object", "properties": { "lat": { "type": "string" }, "lon": { "type": "string" }, "location": { "type": "string" }, "id": { "type": "string" } } } } } }, "examples": { "application/json": { "data": [ { "lat": "35.6684231", "lon": "139.6833085", "location": "Ebisu Station" }, { "lat": "35.6284713", "lon": "139.736571", "location": "Shinagawa Station" } ] } } } } }, "post": { "operationId": "POST-atm-location", "summary": "Create ATM Location", "tags": [ "Atm locations" ], "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/api-location-input" } } ], "responses": { "201": { "description": "", "schema": { "$ref": "#/definitions/api-location-input" } } } } } }, "definitions": { "atm-location-input": { "title": "ATM Location Input", "type": "object", "properties": { "location": { "type": "string" }, "lat": { "type": "string" }, "lon": { "type": "string" } }, "required": [ "location" ] } }

Get an ATM Location

The entries with id 1 and 2 are prepopulated when the container starts:

curl https://backend.yoisho.dob.jp/banking/v2/atm/1

{"lat": "35.6284713", "lon": "139.736571", "location": "Shinagawa Station"}

curl https://backend.yoisho.dob.jp/banking/v2/atm/2

{"lat": "35.6684231", "lon": "139.6833085", "location": "Ebisu Station"}

Create an ATM

curl -X POST https://backend.yoisho.dob.jp/banking/v2/atm -d '{ "lat": "35.4657858", "lon": "139.6201245,17", "location": "Yokohama Station" }'"

{"message": "created", "id": "565"}

Delete an ATM

curl -X DELETE https://backend.yoisho.dob.jp/banking/v2/atm/565

{"message": " 565 deleted"}

Update an ATM

curl -X PUT https://backend.yoisho.dob.jp/banking/v2/atm/105 -d '{"lat": "123", "lon": "982", "location": "some place"}'

{"message": "updated", "id": 105}

Get all ATMs

curl https://backend.yoisho.dob.jp/banking/v2/atm

{"result": [{"lat": "35.6684231", "lon": "139.6833085", "location": "Ebisu Station", "id": "2"}, {"lat": "35.6284713", "lon": "139.736571", "location": "Shinagawa Station", "id": "1"}]}