Tarjetas emitidas a un cliente
curl --request GET \
--url https://api.onepay.la/v1/customers/{customer_id}/issuing-cards \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.onepay.la/v1/customers/{customer_id}/issuing-cards"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.onepay.la/v1/customers/{customer_id}/issuing-cards', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onepay.la/v1/customers/{customer_id}/issuing-cards",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.onepay.la/v1/customers/{customer_id}/issuing-cards"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.onepay.la/v1/customers/{customer_id}/issuing-cards")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onepay.la/v1/customers/{customer_id}/issuing-cards")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "9e41fe85-a21b-4145-b127-b9ddd593be5b",
"status": "created",
"last_4": null,
"nickname": null,
"type": "physical",
"customer_id": "9e41fe85-a058-4afc-9940-09764468aa5c",
"wallet_id": "019523d3-419c-7097-a343-b39a8eb7a50c"
}
],
"current_page": 1,
"from": 1,
"last_page": 1,
"per_page": 15,
"to": 1,
"total": 1
}
{
"message": "Registro no encontrado, Cliente no existe",
"code": 10002,
"code_name": "record_not_found"
}
Tarjetas emitidas a un cliente
GET
/
customers
/
{customer_id}
/
issuing-cards
Tarjetas emitidas a un cliente
curl --request GET \
--url https://api.onepay.la/v1/customers/{customer_id}/issuing-cards \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.onepay.la/v1/customers/{customer_id}/issuing-cards"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.onepay.la/v1/customers/{customer_id}/issuing-cards', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.onepay.la/v1/customers/{customer_id}/issuing-cards",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.onepay.la/v1/customers/{customer_id}/issuing-cards"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.onepay.la/v1/customers/{customer_id}/issuing-cards")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onepay.la/v1/customers/{customer_id}/issuing-cards")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "9e41fe85-a21b-4145-b127-b9ddd593be5b",
"status": "created",
"last_4": null,
"nickname": null,
"type": "physical",
"customer_id": "9e41fe85-a058-4afc-9940-09764468aa5c",
"wallet_id": "019523d3-419c-7097-a343-b39a8eb7a50c"
}
],
"current_page": 1,
"from": 1,
"last_page": 1,
"per_page": 15,
"to": 1,
"total": 1
}
{
"message": "Registro no encontrado, Cliente no existe",
"code": 10002,
"code_name": "record_not_found"
}
Obtiene las tarjetas emitidas a un cliente específico.
Parámetros de Ruta
string
required
ID del cliente dueño de las tarjetas emitidas. Crear cliente.
Response
number
Número de la página actual
string
URL para acceder a la primera página de resultados
number
Índice inicial del primer elemento en la página actual
string
URL para acceder a la siguiente página de resultados. Será
null si es la última páginastring
URL base de la API sin los parámetros de paginación
number
Cantidad de elementos por página
string
URL para acceder a la página anterior. Será
null si es la primera páginanumber
Índice final del último elemento en la página actual
array
Datos de la página actual
Hide data
Hide data
string
Identificador único de la tarjeta en formato UUID
string
Marca de la tarjeta
string
Etiqueta de la tarjeta
string
Últimos cuatro dígitos de la tarjeta
string
Fecha de expiración de la tarjeta
string
Identificador único del cliente en formato UUID
date
Fecha y hora de creación de la tarjeta
string
País de la tarjeta
Ejemplo de petición
{
"data": [
{
"id": "9e41fe85-a21b-4145-b127-b9ddd593be5b",
"status": "created",
"last_4": null,
"nickname": null,
"type": "physical",
"customer_id": "9e41fe85-a058-4afc-9940-09764468aa5c",
"wallet_id": "019523d3-419c-7097-a343-b39a8eb7a50c"
}
],
"current_page": 1,
"from": 1,
"last_page": 1,
"per_page": 15,
"to": 1,
"total": 1
}
{
"message": "Registro no encontrado, Cliente no existe",
"code": 10002,
"code_name": "record_not_found"
}
Was this page helpful?
⌘I