Previred
This API allows to perform the integration flow with Previred.
Supported operations are:
- Create transaction: performs the whole flow and returns the corresponding identifier.
- 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:
| Field | Required | Description |
|---|---|---|
CUSTOMER_ID | Yes | Client ID assigned to the querying institution |
IDENTITY_TRANSACTION_ID | Yes | Identifier resulting from calling /v2/identity |
DOCUMENT_VALIDATION_SCAN_REFERENCE | Yes | Identifier resulting from calling /verify/documentValidation/v2/start |
IP_VERIFIED | Yes | IP address of the identity verification point |
CALLBACK_URL | No | Optional callback URL |
Example response:
200 OK
Content-Type: application/json
{
"timestamp": 1709708084,
"transactionId": "0fec0e8d-3ef3-477f-ae9e-e350cda74b33",
"hash": "61cf9b68412783c57dd5a9b0ca702a0902d81054"
}
Response fields:
| Field | Description |
|---|---|
timestamp | Unix time of the response in seconds |
transactionId | Transaction ID linked to the process of evidence generation |
hash | Informative 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:
| Field | Description |
|---|---|
timestamp | Unix time of the response in seconds |
transactionId | Transaction ID linked to the process of evidence generation |
statusCode | HTTP status code |
status | Final 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:
| Field | Required | Description |
|---|---|---|
TRANSACTION_ID | Yes | Transaction 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:
| Field | Description |
|---|---|
timestamp | Unix time of the response in seconds |
transactionId | Transaction ID linked to the process of evidence generation |
token | TVI authentication token |
url | URL to download the PDF of verification evidences |