API tiempo de espera en sucursales
Proporciona datos en tiempo real sobre nivel de ocupación en las sucursales Citibanamex y tiempos promedio de atención.
Endpoints en esta página
POST
/v1/open-banking/channels/branch/waittime/retrieve
Esta API se utiliza para obtener el Tiempo Estimado de Espera mediante los ID de las sucursales
Esta API se utiliza para obtener el Tiempo Estimado de Espera mediante los ID de las sucursales
POST
/v1/open-banking/channels/branch/waittime/retrieve
Descripción
Esta API se utiliza para obtener el Tiempo Estimado de Espera mediante los ID de las sucursales
Parametros del header
client_id
ID de cliente generado durante el registro de la aplicación
Authorization
El token de autorización recibido durante el inicio de sesión
Accept
Tipos de contenido que son aceptables para la respuesta
uuid
UUID de 128 bits que generas para cada solicitud
Content-Type
Tipos de contenido que se envían en la solicitud
Parametros del body
retrieveBranchWaitTimeRequest
Solicitud de tiempo de espera estimado
curl --location --request POST 'https://sit.api.banamex.com/pbwm-mex-extsandbox/sit/api/v1/open-banking/channels/branch/waittime/retrieve'
--header 'Accept: application/json'
--header 'response_type: token'
--header 'client_id: RgpY07T7VeDb2sbmkuJFacFeGX7ugiYN'
--header 'Authorization: Bearer 952df90b-a3ca-432e-a244-f93efa518fdf'
--header 'uuid: 8efe19b4-7afb-4c86-ab51-ed0f54538bb7'
--header 'Content-Type: application/json'
--header 'countryCode: MX'
--header 'businessCode: GCB'
--data-raw '{
"branch" : [
{"branchId":"00015"}
]}'
require "uri"
require "json"
require "net/http"
url = URI("https://sit.api.banamex.com/pbwm-mex-extsandbox/sit/api/v1/open-banking/channels/branch/waittime/retrieve")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = "application/json"
request["response_type"] = "token"
request["client_id"] = "RgpY07T7VeDb2sbmkuJFacFeGX7ugiYN"
request["Authorization"] = "Bearer 952df90b-a3ca-432e-a244-f93efa518fdf"
request["uuid"] = "d17e3edc-a7a7-44d3-8c94-dc885a337f77"
request["Content-Type"] = "application/json"
request["countryCode"] = "MX"
request["businessCode"] = "GCB"
request.body = JSON.dump({
"branch": [
{
"branchId": "00015"
}
]
})
response = https.request(request)
puts response.read_body
import http.client
import json
conn = http.client.HTTPSConnection("sit.api.banamex.com")
payload = json.dumps({
"branch": [
{
"branchId": "00015"
}
]
})
headers = {
'Accept': 'application/json',
'response_type': 'token',
'client_id': 'RgpY07T7VeDb2sbmkuJFacFeGX7ugiYN',
'Authorization': 'Bearer 952df90b-a3ca-432e-a244-f93efa518fdf',
'uuid': 'a786bbf8-e6a6-4e3a-a9b7-27a7322d4351',
'Content-Type': 'application/json',
'countryCode': 'MX',
'businessCode': 'GCB'
}
conn.request("POST", "/pbwm-mex-extsandbox/sit/api/v1/open-banking/channels/branch/waittime/retrieve", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse<String> response = Unirest.post("https://sit.api.banamex.com/pbwm-mex-extsandbox/sit/api/v1/open-banking/channels/branch/waittime/retrieve")
.header("Accept", "application/json")
.header("response_type", "token")
.header("client_id", "RgpY07T7VeDb2sbmkuJFacFeGX7ugiYN")
.header("Authorization", "Bearer 952df90b-a3ca-432e-a244-f93efa518fdf")
.header("uuid", "98f20545-266c-478d-8ed7-0da064a2c687")
.header("Content-Type", "application/json")
.header("countryCode", "MX")
.header("businessCode", "GCB")
.body("{\r\n \"branch\" : [\r\n {\"branchId\":\"00015\"}\r\n ]\r\n}")
.asString();
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': 'sit.api.banamex.com',
'path': '/pbwm-mex-extsandbox/sit/api/v1/open-banking/channels/branch/waittime/retrieve',
'headers': {
'Accept': 'application/json',
'response_type': 'token',
'client_id': 'RgpY07T7VeDb2sbmkuJFacFeGX7ugiYN',
'Authorization': 'Bearer 952df90b-a3ca-432e-a244-f93efa518fdf',
'uuid': '2f5d1051-8690-40e7-890f-b495984aebc5',
'Content-Type': 'application/json',
'countryCode': 'MX',
'businessCode': 'GCB'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({
"branch": [
{
"branchId": "00015"
}
]
});
req.write(postData);
req.end();
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://sit.api.banamex.com/pbwm-mex-extsandbox/sit/api/v1/open-banking/channels/branch/waittime/retrieve"
method := "POST"
payload := strings.NewReader(`{`+"
"+`
"branch" : [`+"
"+`
{"branchId":"00015"}`+"
"+`
]`+"
"+`
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Accept", "application/json")
req.Header.Add("response_type", "token")
req.Header.Add("client_id", "RgpY07T7VeDb2sbmkuJFacFeGX7ugiYN")
req.Header.Add("Authorization", "Bearer 952df90b-a3ca-432e-a244-f93efa518fdf")
req.Header.Add("uuid", "661b63eb-3df9-4c74-9a9b-1866b5235134")
req.Header.Add("Content-Type", "application/json")
req.Header.Add("countryCode", "MX")
req.Header.Add("businessCode", "GCB")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
var semaphore = DispatchSemaphore (value: 0)
let parameters = "{\r\n \"branch\" : [\r\n {\"branchId\":\"00015\"}\r\n ]\r\n}"
let postData = parameters.data(using: .utf8)
var request = URLRequest(url: URL(string: "https://sit.api.banamex.com/pbwm-mex-extsandbox/sit/api/v1/open-banking/channels/branch/waittime/retrieve")!,timeoutInterval: Double.infinity)
request.addValue("application/json", forHTTPHeaderField: "Accept")
request.addValue("token", forHTTPHeaderField: "response_type")
request.addValue("RgpY07T7VeDb2sbmkuJFacFeGX7ugiYN", forHTTPHeaderField: "client_id")
request.addValue("Bearer 952df90b-a3ca-432e-a244-f93efa518fdf", forHTTPHeaderField: "Authorization")
request.addValue("8cb0a9b5-73cf-468d-a470-0ef55125832c", forHTTPHeaderField: "uuid")
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
request.addValue("MX", forHTTPHeaderField: "countryCode")
request.addValue("GCB", forHTTPHeaderField: "businessCode")
request.httpMethod = "POST"
request.httpBody = postData
let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
semaphore.signal()
return
}
print(String(data: data, encoding: .utf8)!)
semaphore.signal()
}
task.resume()
semaphore.wait()
has context menu
Respuestas de APIs
- 200
- 400
- 401
- 403
- 404
- 422
- 500
Ejemplo de solicitud
/v1/open-banking/channels/branch/waittime/retrieve
Ejemplo de solicitud
/v1/open-banking/channels/branch/waittime/retrieve
Ejemplo de respuesta
{
"branchId": {
"description": "5 numeric digit branch id. Unique identifier for the branch",
"example": "00001",
"type": "string"
},
"timeTaken": {
"description": "Numeric digit estimated waiting time of the branch. Response in minutes",
"example": "3",
"type": "string"
}
}
200 OK
OK
Definiciones
5 numeric digit branch id. Unique identifier for the branch
type: string
Numeric digit estimated waiting time of the branch. Response in minutes
type: string
Estatus
400
Titulo
Bad request
Descripción
API tiempo de espera en sucursales
Estatus
400
Titulo
Bad request
Descripción
API tiempo de espera en sucursales
Ejemplo de solicitud
/v1/open-banking/channels/branch/waittime/retrieve
Ejemplo de solicitud
/v1/open-banking/channels/branch/waittime/retrieve
Ejemplo de respuesta
{
"code": {
"description": "Error code which qualifies the error",
"example": "00001",
"type": "string"
},
"details": {
"description": "Human readable explanation specific to the occurrence of the problem",
"example": "00001",
"type": "string"
},
"location": {
"description": "The name of the field that resulted in the error",
"example": "00001",
"type": "string"
}
}
400 Bad request
Definiciones
Error code which qualifies the error
type: string
Human readable explanation specific to the occurrence of the problem
type: string
The name of the field that resulted in the error
type: string
Estatus
401
Titulo
unAuthorized
Descripción
Authorization credentials are missing or invalid
Estatus
401
Titulo
unAuthorized
Descripción
Authorization credentials are missing or invalid
Ejemplo de solicitud
/v1/open-banking/channels/branch/waittime/retrieve
Ejemplo de solicitud
/v1/open-banking/channels/branch/waittime/retrieve
Ejemplo de respuesta
401 unAuthorized
Definiciones
Estatus
403
Titulo
accessNotConfigured
Descripción
The request operation is not configured to access this resource
Estatus
403
Titulo
accessNotConfigured
Descripción
The request operation is not configured to access this resource
Ejemplo de solicitud
/v1/open-banking/channels/branch/waittime/retrieve
Ejemplo de solicitud
/v1/open-banking/channels/branch/waittime/retrieve
Ejemplo de respuesta
403 accessNotConfigured
Definiciones
Estatus
404
Titulo
resourceNotFound
Descripción
The requested resource was not found
Estatus
404
Titulo
resourceNotFound
Descripción
The requested resource was not found
Ejemplo de solicitud
/v1/open-banking/channels/branch/waittime/retrieve
Ejemplo de solicitud
/v1/open-banking/channels/branch/waittime/retrieve
Ejemplo de respuesta
404 resourceNotFound
Definiciones
Estatus
422
Titulo
businessValidationFailed
Descripción
Business validation error occured on one or more parameters
Estatus
422
Titulo
businessValidationFailed
Descripción
Business validation error occured on one or more parameters
Ejemplo de solicitud
/v1/open-banking/channels/branch/waittime/retrieve
Ejemplo de solicitud
/v1/open-banking/channels/branch/waittime/retrieve
Ejemplo de respuesta
422 businessValidationFailed
Definiciones
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/open-banking/channels/branch/waittime/retrieve
Ejemplo de solicitud
/v1/open-banking/channels/branch/waittime/retrieve
Ejemplo de respuesta