Validación de DTOs - Card Aggregation service

En esta sección se encuentran los campos mandatorios y el formato a validar en el Card Aggregation Service, en cada request por cada endpoint.


Template para mensajes de validación:

Campo requerido

{fieldName} is required

Longitud del campo

{fieldName} must be between {min} and {max} characters long {fieldName} must be {n} characters long
{fieldName} must be 1 character long

Rangos enteros permitidos

{fieldName} must be at least {value} {fieldName} must be at most {value}

Expresión regular (fechas, email)

{fieldName} must be valid, expected format: {regular expression or suggested format}

Ejemplo de respuesta con error en validación REST Controller

{ "message": "Invalid requests", "code": "INVALID_PARAMETERS", "description": "Invalid requests", "args": [ { "arg": "REASON", "value": "accountNumber must be 19 characters long" } ], "status": "400 BAD_REQUEST" }

 

{ "message": "Invalid requests", "code": "INVALID_PARAMETERS", "description": "Invalid requests", "args": [ { "arg": "REASON", "value": "blockCodeIndicator is required|foreignUse must be at most 1|functionCode must be 1 charac } ], "status": "400 BAD_REQUEST" }

gRPC

 

page2image42610880

Endpoints

CARD ACTIVATION

Endpoint

PUT /cards/activation

Fiserv Endpoint

PUT /cards/activation

Request Schema

Campo

Descripción

Formato

Campo

Descripción

Formato

cardNumber

Número de tarjeta

string

mandatory

minLength: 19

maxLength: 19

example: 123456789123456789

serviceType

Tipo de servicio

string

Min Length: 1

Max Length: 1

enum (A, T, I, U)

example: A

userData

Datos de usuario

string

Max Length: 40

 

CARD INFORMATION

Endpoint

/v1/cards/embosser/details

Fiserv Endpoint

POST /cards/embosser/details

Request Schema

Campo

Descripción

Formato

Campo

Descripción

Formato

panToken

Número de tarjeta

string

mandatory

minLength: 12

maxLength: 19

example: 000123456ID5IXX1234

cardSequence

Secuencia de tarjeta

string

example: 0001

Max Length: 4

foreignUse

Uso en el extranjero

string

enum: (" ", 0, 1)

Min Length: 1

Max Length: 1

PREPAID ACCOUNT ASSIGNMENT

Endpoint

PUT /v1/cards/account

Fiserv Endpoint

PUT /account/prepaid

[Fuente]

Request Schema

Campo

Descripción

Formato

Campo

Descripción

Formato

cardNumber

Número de tarjeta

string

mandatory

minLength: 12

maxLength: 19

example: 000123456ID5IXX1234

cardholderType

Tipo de titular de la tarjeta

integer example: 1

Min Length: 1

Max Length: 1

customerOrAccountNumber

Número de cliente o cuenta

string

minLength: 19

maxLength: 19

example: 123456789012345680

GET ACCOUNT BY PHYSICAL CARD NUMBER

Endpoint

POST /v1/cards/account

Fiserv Endpoint

POST /account/balance/details

Request Schema

Campo

Descripción

Formato

Campo

Descripción

Formato

cardNumber

Número de tarjeta

string

mandatory

minLength: 19

maxLength: 19

example: 123456789123456789

APPLY / REMOVE CARD BLOCK

Endpoint

POST /v1/cards/embosser/block

Fiserv Endpoint

POST /cards/embosser/block

Request Schema

Campo

Descripción

Formato

Campo

Descripción

Formato

panToken

Número de tarjeta

string

mandatory

minLength: 12

maxLength: 19

example: 000123456ID5IXX1234

cardSequence

Secuencia de tarjeta

string

example: 0001

Max Length: 4

foreignUse

Uso en el extranjero

string

enum: (" ", 0, 1)

Min Length: 1

Max Length: 1

blockCode

Razón de bloqueo

string

example: Z

Min Length = 1

Max Length = 1

enum = (FROZEN, GUARDIAN, DECEASED, VOLUNTARY_CANCELLATION, LOST, STOLEN, DAMAGED, FRAUD, MISHANDLING, ACCOUNT_WITHOUT_CARD, PREVENTIVE)

functionCode

Código de función

string
enum (B, U) example B