Clients

Información sobre endpoints relacionados con la entidad Clientes Finales (Clients) de un Merchant

Consulta de un cliente final por ID o Internal reference.

GET /api-hub/v1/clients/{term}

Path Parameters

NameTypeDescription

term*

String

El valor puede ser el CLIENT_ID, el INTERNAL_REFERENCE del cliente o el DOCUMENT_NUMBER

Query Parameters

NameTypeDescription

timestamp*

String

El valor debe ser en formato UNIX, comprendido por 13 dígitos. En javascript se puede usar la función Date.now() = 1664568045547

Headers

NameTypeDescription

authorization-token*

String

Se envía el token generado luego del Login, y debe contar con el siguiente formato:

"Bearer JHgytHG67687JHG..."

signature*

String

La firma depende del timestamp y el secret-key.

status : El estado tiene que estar activo, si no es el caso hay un endpoint para reactivar al usuario

provider_reference : Es el código de Unibanca

internal_reference : Rastreo interno del cliente del negocio

{
	"code": "00000",
	"message": "Successful",
	"data": {
		"id": "f6d61675-fc97-341a-fe59-52fa38a508f2",
		"status": "ACTIVE",
		"created_at": "2022-09-22T18:34:24.561033+00:00",
		"updated_at": "2022-09-22T18:34:25.854273+00:00",
		"deleted_at": null,
		"is_deleted": false,
		"is_deleted_by": null,
		"document_type": "DNI",
		"document_number": "47461000",
		"first_name": "MARIA",
		"first_last_name": "PEREZ",
		"status_kyc": null,
		"birth_country": "PER",
		"birth_date": "1993-09-26",
		"residence_address": "CAL.CORONEL INCLÁN NRO",
		"residence_country": "PER",
		"residence_city": "LIMA",
		"residence_zip_code": "15074",
		"phone_country_code": "+51",
		"phone_number": "924027000",
		"email": "CLIENTE@GLOBALBRIDGECONNECTIONS.COM",
		"landline_country_code": null,
		"landline_number": null,
		"occupation": "ADMINISTRADOR DE EMPRESAS",
		"merchant_id": "a6764840-1626-b4c1-eb52-bedef14e6596",
		"provider_name": "ODYBANK",
		"provider_reference": "80",
		"internal_reference": "100200000001",
		"second_name": "ROSA",
		"second_last_name": "GONZALEZ",
		"gender": "F"
	},
	"metadata": {
		"term": "100200000001"
	}
}

En este endpoint detallamos cómo es la creación de un cliente final para un negocio

POST /api-hub/v1/clients

Headers

NameTypeDescription

authorization-token*

String

Se envía el token generado luego del Login, se debe enviar con el siguiente formato:

"Bearer JHgytHG67687JHG..."

signature*

String

La firma depende del timestamp y el secret-key.

Request Body

NameTypeDescription

document_type*

String

El tipo de documento debe de ser DNI, CE, PAS, RUC o PTP.

document_number*

String

Para el valor del número de documento está relacionado con el document_type, en la cantidad de dígitos.

first_name*

String

El primer nombre del cliente.

second_name

String

El segundo nombre del cliente.

first_last_name*

String

El apellido paterno o primer apellido del cliente.

second_last_name

String

El apellido materno o segundo apellido del cliente.

gender*

String

El género del cliente debe de ser F (Femenino) o M (Masculino).

birth_country*

Date

El país de nacimiento debe de ser en formato ISO 3.

birth_date*

String

La fecha de nacimiento debe de ser en formato (YYY-MM-DD).

residence_address*

String

La dirección de residencia del cliente.

residence_country*

String

El país de residencia debe de ser en formato ISO 3.

residence_city*

String

La ciudad de residencia del cliente.

residence_zip_code*

String

El código postal de residencia del cliente.

phone_country_code*

String

El código de país del teléfono del cliente.

phone_number*

String

El número de teléfono o celular del cliente.

email*

String

La dirección de correo electrónico del cliente.

occupation*

String

La ocupación o carrera profesional del cliente.

timestamp*

String

El valor debe ser en formato NOW comprendido por 13 dígitos, en javascript se puede usar la función Date.now() = 1664568045547

{
	"document_type": "DNI",
	"document_number": "400000",
	"first_name": "MARIA",
	"second_name":"JOSEFA",
	"first_last_name": "PEREZ",
	"second_last_name": "GOMEZ",
	"gender": "F",
  	"birth_country": "PER",
  	"birth_date": "1993-09-26",
	"residence_address": "CAL.CORONEL INCLÁN",
	"residence_country": "PER",
  	"residence_city": "LIMA",
	"residence_zip_code": "15074",
  	"phone_country_code": "+51",
  	"phone_number": "924020000",
  	"email": "CLIENTE@GLOBALBRIDGECONNECTIONS.COM",
	"occupation": "ADMINISTRADOR DE EMPRESAS",
	"timestamp": "1663876446257"
}

internal_reference Rastreo interno del cliente del negocio

provider_reference Es el código de Unibanca

status El estado tiene que estar activo, si no es el caso hay un endpoint para reactivar al usuario

Este endpoint detalla la reactivación de un cliente que tiene un status INACTIVE para poder sincronizar datos

POST /api-hub/v1/clients/reactive

Headers

NameTypeDescription

authorization-token*

String

Se envía el token generado luego del Login, se debe enviar con el siguiente formato:

"Bearer JHgytHG67687JHG..."

signature*

String

La firma depende del timestamp y el secret-key.

Request Body

NameTypeDescription

id*

UUID

El identificador de cliente, en formato UUID.

timestamp*

String

El valor debe ser en formato NOW comprendido por 13 dígitos, en javascript se puede usar la función Date.now() = 1664568045547

status : El estado tiene que estar activo, si no es el caso hay un endpoint para reactivar al usuario

provider_reference : Es el código de Unibanca

internal_reference : Rastreo interno del cliente del negocio

{
	"code": "00000",
	"message": "Successful",
	"data": {
		"id": "6e28b4dc-a81c-6464-8534-ec489c221a58",
		"status": "ACTIVE",
		"created_at": "2022-09-22T19:54:55.980016+00:00",
		"updated_at": "2022-09-22T19:54:58.284801+00:00",
		"deleted_at": null,
		"is_deleted": false,
		"is_deleted_by": null,
		"document_type": "DNI",
		"document_number": "4746000",
		"first_name": "MARIA",
		"first_last_name": "PEREZ",
		"status_kyc": null,
		"birth_country": "PER",
		"birth_date": "1993-09-26",
		"residence_address": "CAL.CORONEL INCLÁN",
		"residence_country": "PER",
		"residence_city": "LIMA",
		"residence_zip_code": "15074",
		"phone_country_code": "+51",
		"phone_number": "924027014",
		"email": "CLIENTE@GLOBALBRIDGECONNECTIONS.COM",
		"landline_country_code": null,
		"landline_number": null,
		"occupation": "ADMINISTRADOR DE EMPRESAS",
		"merchant_id": "a6764840-1626-b4c1-eb52-bedef14e6596",
		"provider_name": "ODYBANK",
		"provider_reference": "2432754",
		"internal_reference": "100200000001",
		"second_name": "ROSA",
		"second_last_name": "CASTRO",
		"gender": "F"
	}
}

Consultar todas las tarjetas de un cliente

GET /api-hub/v1/clients/{client_id}/cards

Path Parameters

NameTypeDescription

client_id*

UUID

El identificador del cliente.

Query Parameters

NameTypeDescription

page*

Number

El número de página del listado.

per_page

Number

El cantidad de elementos vistos en el listado.

status

ACTIVE | INACTIVE

Filtrar por el estado de las tarjetas.

timestamp*

String

El valor debe ser en formato NOW comprendido por 13 dígitos, en javascript se puede usar la función Date.now() = 1664568045547

Headers

NameTypeDescription

authorization-token*

String

Se envía el token generado luego del Login, se debe enviar con el siguiente formato:

"Bearer JHgytHG67687JHG..."

signature*

String

La firma depende de todos los campos enviados por el query, ordenados de forma alfabética y el secret-key.

{
	"code": "00000",
	"message": "Successful",
	"data": [
		{
			"id": "5a54a561-b82c-c440-1ac0-d62e4d57f55g",
			"status": "INACTIVE",
			"created_at": "2022-09-22T15:14:10.194442+00:00",
			"updated_at": "2022-09-22T16:47:34.454138+00:00",
			"deleted_at": null,
			"is_deleted": false,
			"is_deleted_by": null,
			"provider_name": "ODYBANK",
			"card_tracking_code": "2333",
			"merchant_product_id": "5d71b4b0-991f-90ad-c50f-178530f54546",
			"client_id": "854c8fd2-3b39-c232-2cfe-59d1aec654a2",
			"reason": null,
			"currencies": [
				{
					"account": "2333",
					"currency": "PEN"
				}
			],
			"blocked_at": null,
			"replacement_by": null
		},
		{
			"id": "708b7d77-f229-68f7-bbbc-27dbadbedudf",
			"status": "ACTIVE",
			"created_at": "2022-09-22T17:10:02.285965+00:00",
			"updated_at": "2022-09-22T17:10:02.285965+00:00",
			"deleted_at": null,
			"is_deleted": false,
			"is_deleted_by": null,
			"provider_name": "ODYBANK",
			"card_tracking_code": "2222",
			"merchant_product_id": "3f45b4b0-78jh-76fg-c50f-178530f54765",
			"client_id": "854c8fd2-3b39-c232-2cfe-59d1aec654a2",
			"reason": null,
			"currencies": [
				{
					"account": "2222",
					"currency": "PEN"
				}
			],
			"blocked_at": null,
			"replacement_by": null
		}
	],
	"metadata": {
		"query": {},
		"params": {
			"client_id": "854c8fd2-3b39-c232-2cfe-59d1aec654a2"
		},
		"pagination": {
			"page": 1,
			"total": 2,
			"per_page": 15,
			"last_page": 1,
			"next_page": null,
			"first_page": 1,
			"previous_page": null
		}
	}
}

Definiciones de campos

  • document_type DNI, CE, PAS, RUC, PTP

  • gender F ⇒ FEMENINO, M ⇒ MASCULINO

  • birth_country ISO 3

  • birth_date YYYY-MM-DD

  • residence_country ISO 3

Last updated