API Cajeros automáticos
Te permite recuperar información de los cajeros automáticos de Citibanamex como: la ubicación geográfica, la dirección, los servicios, la accesibilidad y los idiomas disponibles. Para acceder a esta API debes cumplir con lo indicado en la regulación aplicable.
Endpoints en esta página
GET
/v1/atms
Brinda información sobre la ubicación de los cajeros automáticos y sus servicios.
Brinda información sobre la ubicación de los cajeros automáticos y sus servicios.
GET
/v1/atms
Descripción
Brinda información sobre la ubicación de los cajeros automáticos y sus servicios.
Parametros del header
client_id
ID de cliente generado durante el registro de la aplicación.
Authorization
El token de autorización más reciente. Tendrá el formato Bearer +{space}+{accessToken}, Ejemplo: Bearer KGNsaWVudF9pZDpjbGllbnRfc2VjcmV0KQ==
uuid
UUID aleatorio de 128 bits generado de forma única para cada solicitud.
If-Modified-Since
Se usa en peticiones condicionadas para recuperar datos solo si se han modificado desde una fecha determinada.
If-None-Match
Se utiliza en una solicitud condicional para recuperar datos solo si el valor Etag no coincide.
Query params
page
Paginación y orden de los items.
curl --request get \
--url https://partner.citi.com/gcgapi/sandbox/prod/atm-branch-locator/v1/atms \
--header 'Authorization: REPLACE_THIS_VALUE' \
--header 'If-Modified-Since: REPLACE_THIS_VALUE' \
--header 'If-None-Match: REPLACE_THIS_VALUE' \
--header 'client_id: REPLACE_THIS_VALUE' \
--header 'uuid: REPLACE_THIS_VALUE'
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://partner.citi.com/gcgapi/sandbox/prod/atm-branch-locator/v1/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["Authorization"] = 'REPLACE_THIS_VALUE'
request["client_id"] = 'REPLACE_THIS_VALUE'
request["uuid"] = 'REPLACE_THIS_VALUE'
request["If-Modified-Since"] = 'REPLACE_THIS_VALUE'
request["If-None-Match"] = 'REPLACE_THIS_VALUE'
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("partner.citi.com")
headers = {
'Authorization': "REPLACE_THIS_VALUE",
'client_id': "REPLACE_THIS_VALUE",
'uuid': "REPLACE_THIS_VALUE",
'If-Modified-Since': "REPLACE_THIS_VALUE",
'If-None-Match': "REPLACE_THIS_VALUE"
}
conn.request("get", "/gcgapi/sandbox/prod/atm-branch-locator/v1/atms", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse<String> response = Unirest.get("https://partner.citi.com/gcgapi/sandbox/prod/atm-branch-locator/v1/atms")
.header("Authorization", "REPLACE_THIS_VALUE")
.header("client_id", "REPLACE_THIS_VALUE")
.header("uuid", "REPLACE_THIS_VALUE")
.header("If-Modified-Since", "REPLACE_THIS_VALUE")
.header("If-None-Match", "REPLACE_THIS_VALUE")
.asString();g();
const http = require("https");
const options = {
"method": "get",
"hostname": "partner.citi.com",
"port": null,
"path": "/gcgapi/sandbox/prod/atm-branch-locator/v1/atms",
"headers": {
"Authorization": "REPLACE_THIS_VALUE",
"client_id": "REPLACE_THIS_VALUE",
"uuid": "REPLACE_THIS_VALUE",
"If-Modified-Since": "REPLACE_THIS_VALUE",
"If-None-Match": "REPLACE_THIS_VALUE"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://partner.citi.com/gcgapi/sandbox/prod/atm-branch-locator/v1/atms"
req, _ := http.NewRequest("get", url, nil)
req.Header.Add("Authorization", "REPLACE_THIS_VALUE")
req.Header.Add("client_id", "REPLACE_THIS_VALUE")
req.Header.Add("uuid", "REPLACE_THIS_VALUE")
req.Header.Add("If-Modified-Since", "REPLACE_THIS_VALUE")
req.Header.Add("If-None-Match", "REPLACE_THIS_VALUE")
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 = [
"Authorization": "REPLACE_THIS_VALUE",
"client_id": "REPLACE_THIS_VALUE",
"uuid": "REPLACE_THIS_VALUE",
"If-Modified-Since": "REPLACE_THIS_VALUE",
"If-None-Match": "REPLACE_THIS_VALUE"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://partner.citi.com/gcgapi/sandbox/prod/atm-branch-locator/v1/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()
Respuestas de APIs
- 200
- 400
- 408
- 429
- 500
- 503
Ejemplo de solicitud
/v1/atms
Ejemplo de solicitud
/v1/atms
Ejemplo de respuesta
{
"meta": {
"description": "Meta data",
"example": "{"LastUpdated":{"type":"string","format":"date-time"},"TotalResults":{"type":"integer"},"Agreement":{"type":"string","enum":["To be confirmed"]}}",
"type": "object"
},
"data": {
"description": "Información detallada de ATMs",
"example": "{"BrandName":{"description":"Brand Name that an organisation uses to market its products or services to a consumer. `Spanish Definition:` Nombre o marca usada por una organizacion para identificar sus productos o servicios.","title":"BrandName / NombreMarca","type":"string","minLength":1,"maxLength":140,"minItems":1,"maxItems":1,"example":"MÉXICO"},"ATM":{"description":"ATM information.","type":"array","title":"ATM","items":{"$ref":"#/definitions/ATMInformationResponse"},"minItems":1}}",
"type": "array"
},
"link": {
"description": "Links para la paginación",
"example": "items: { "Self": {
"description": "link to get the actual page with the records requested",
"type": "string",
"format": "uri",
"example": "/api/v1/atms?page=1"
},
"First": {
"description": "link to get the first page with the records requested",
"type": "string",
"format": "uri",
"example": "/api/v1/atms?page=0"
}
)",
"type": "object"
}
}
200 OK
Respuesta exitosa con una lista de datos `Cajeros automáticos`
Definiciones
Meta data
type: object
Información detallada de ATMs
type: array
Links para la paginación
type: object
Meta data
type: object
Información detallada de ATMs
type: array
Links para la paginación
type: object
Estatus
400
Titulo
Bad request
Descripción
API Cajeros automáticos
Estatus
400
Titulo
Bad request
Descripción
API Cajeros automáticos
Ejemplo de solicitud
/v1/atms
Ejemplo de solicitud
/v1/atms
Ejemplo de respuesta
{
"status": {
"description": "null",
"example": "null",
"type": "string"
},
"title": {
"description": "null",
"example": "null",
"type": "string"
},
"description": {
"description": "null",
"example": "null",
"type": "string"
}
}
400 Bad request
Definiciones
type: string
type: string
type: string
type: string
type: string
type: string
Estatus
408
Titulo
Client timeout
Descripción
Your client has failed to submit a request, and a timeout has occurred.
Estatus
408
Titulo
Client timeout
Descripción
Your client has failed to submit a request, and a timeout has occurred.
Ejemplo de solicitud
/v1/atms
Ejemplo de solicitud
/v1/atms
Ejemplo de respuesta
{
"status": {
"type": "string",
},
"title": {
"type": "string",
},
"description": {
"type": "string",
},
}
408 Client timeout
Definiciones
type: string
type: string
type: string
Estatus
429
Titulo
Too many requests
Descripción
You have requested this resource too often.
Estatus
429
Titulo
Too many requests
Descripción
You have requested this resource too often.
Ejemplo de solicitud
/v1/atms
Ejemplo de solicitud
/v1/atms
Ejemplo de respuesta
{
"status": {
"type": "string",
},
"title": {
"type": "string",
},
"description": {
"type": "string",
},
}
429 Too many requests
Definiciones
type: string
type: string
type: string
Estatus
500
Titulo
Too many requests
Descripción
An error occurred on the server.
Estatus
500
Titulo
Too many requests
Descripción
An error occurred on the server.
Ejemplo de solicitud
/v1/atms
Ejemplo de solicitud
/v1/atms
Ejemplo de respuesta
{
"status": {
"type": "string",
},
"title": {
"type": "string",
},
"description": {
"type": "string",
},
}
500 Too many requests
Definiciones
type: string
type: string
type: string
Estatus
503
Titulo
Service temporarily unavailable
Descripción
The service is temporarily unavailable.
Estatus
503
Titulo
Service temporarily unavailable
Descripción
The service is temporarily unavailable.
Ejemplo de solicitud
/v1/atms
Ejemplo de solicitud
/v1/atms
Ejemplo de respuesta
{
"status": {
"type": "string",
},
"title": {
"type": "string",
},
"description": {
"type": "string",
},
}
503 Service temporarily unavailable
Definiciones
type: string
type: string
type: string