Saltar al contenido principal

Previred

This API allows to perform the integration flow with Previred.

Supported operations are:

  1. Create transaction: performs the whole flow and returns the corresponding identifier.
  2. Get Token: returns the token associated with an identifier.

Create

Create transaction start request:

curl --location '{IDENTITY_API_BASE_URL}/services/previred' \
--header 'x-api-key: {API_KEY}' \
--header 'Content-Type: application/json' \
--data '{
"customerId": "{CUSTOMER_ID}",
"identityTransactionId": "{IDENTITY_TRANSACTION_ID}",
"documentValidationScanReference": "{DOCUMENT_VALIDATION_SCAN_REFERENCE}",
"ipVerified": "{IP_VERIFIED}",
"callbackUrl": "{CALLBACK_URL}"
}'

Request parameters:

FieldRequiredDescription
CUSTOMER_IDYesClient ID assigned to the querying institution
IDENTITY_TRANSACTION_IDYesIdentifier resulting from calling /v2/identity
DOCUMENT_VALIDATION_SCAN_REFERENCEYesIdentifier resulting from calling /verify/documentValidation/v2/start
IP_VERIFIEDYesIP address of the identity verification point
CALLBACK_URLNoOptional callback URL

Example response:

200 OK

Content-Type: application/json

{
"timestamp": 1709708084,
"transactionId": "0fec0e8d-3ef3-477f-ae9e-e350cda74b33",
"hash": "61cf9b68412783c57dd5a9b0ca702a0902d81054"
}

Response fields:

FieldDescription
timestampUnix time of the response in seconds
transactionIdTransaction ID linked to the process of evidence generation
hashInformative data. Control string for message received by the service

Callback event

If a callback URL has been specified, a request with the result will be sent at the end of the process.

Content-Type: application/json

{
"timestamp": 1709708084,
"transactionId": "0fec0e8d-3ef3-477f-ae9e-e350cda74b33",
"statusCode": 200,
"status": "succeeded"
}

Response fields:

FieldDescription
timestampUnix time of the response in seconds
transactionIdTransaction ID linked to the process of evidence generation
statusCodeHTTP status code
statusFinal transaction status (succeeded or failed)

Token

Get token request:

curl --location '{IDENTITY_API_BASE_URL}/services/previred/{TRANSACTION_ID}' \
--header 'x-api-key: {API_KEY}'

Request parameters:

FieldRequiredDescription
TRANSACTION_IDYesTransaction ID returned from /services/previred after a successful call

Example response:

200 OK

Content-Type: application/json

{
"timestamp": 1709708084,
"transactionId": "0fec0e8d-3ef3-477f-ae9e-e350cda74b33",
"token": "VI19:yCQAnOEPolfgPg5rSG8Px1Ism2DMKgyaWc1pqvYsz5vTx1E7nEAfh1oOrOa59...",
"url": "https://api.identity-platform.io/services/custody/download?token=eyJhbG..."
}

Response fields:

FieldDescription
timestampUnix time of the response in seconds
transactionIdTransaction ID linked to the process of evidence generation
tokenTVI authentication token
urlURL to download the PDF of verification evidences