Skip to main content

Responses

The Shufti Pro Verification API will send you two types of responses if a request for verification is made. First is the HTTP response sent against your request, and the second is the callback response. Both HTTP and callback responses will be in JSON format with a header. application/json The response header also includes a Key Signature. This key is used for validating the source of the response. Be sure to validate the request by generating signature and matching it with the Signature value from the response header.


HTTP Status Codes

Shufti Pro Verification API uses conventional HTTP response codes to indicate the success or failure of an API request. Every response is generated in JSON with a specific HTTP code.

Following is a list of HTTP codes that are generated in responses by Shufti Pro Verification API.


HTTP codeHTTP messageMessage
200OKsuccess
400Bad RequestBad Request: one or more parameter is invalid or missing
401UnauthorizedUnauthorized: invalid signature key provided in the request
402Request FailedInvalid request data: missing required parameters
403ForbiddenForbidden: service not allowed
404Not FoundResource not found
409ConflictConflicting data: already exists
429Too Many RequestsToo Many Attempts.
500Server ErrorInternal Server Error
504Gateway TimeoutServer error
524Timeout from CloudflareUnofficial Server Error

Response Events

Events are sent in responses that show the status of the request. These events are sent in both HTTP and callback responses.


EventdescriptionHTTP ResponseCallback Response
request.invalidRequest parameters provided in request are invalid.YesNo
request.unauthorizedRequest is unauthorized. The information provided in authorization header is invalid.YesNo
verification.acceptedRequest was valid and accepted after verification.YesYes
verification.declinedRequest was valid and declined after verification.YesYes
request.deletedRequest has been deleted.YesYes
verification.status.changedRequest status has been updated.NoYes

verification.accepted
{
"reference": "17374217",
"event": "verification.accepted",
"verification_data": {
"background_checks": {
"dob": "1990-01-01",
"name": {
"first_name": "Don",
"last_name": "Joe"
},
"aml_data": {
"filters": [
"sanction",
"warning",
"fitness-probity",
"pep-class-1",
"pep-class-4",
"pep-class-3",
"pep-class-2",
"pep"
],
"hits": []
}
}
},
"verification_result": {
"background_checks": 1
},
"info": {
"agent": {
"is_desktop": true,
"is_phone": false,
"useragent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36",
"device_name": "Macintosh",
"browser_name": "",
"platform_name": "OS X - 10_14_0"
},
"geolocation": {
"host": "212.103.50.243",
"ip": "212.103.50.243",
"rdns": "212.103.50.243",
"asn": "9009",
"isp": "M247 Ltd",
"country_name": "Germany",
"country_code": "DE",
"region_name": "Hesse",
"region_code": "HE",
"city": "Frankfurt am Main",
"postal_code": "60326",
"continent_name": "Europe",
"continent_code": "EU",
"latitude": "50.1049",
"longitude": "8.6295",
"metro_code": "",
"timezone": "Europe/Berlin"
}
}
}

Verification Response

Responses will contain the following parameters:


ParametersDescription
referenceYour unique request reference, which you provided us at the time of request, so that you can identify the response in relation to the request made.
eventsThis is the request event which shows status of request. Event is changed in every response. Please consult Events for more information.
errorWhenever there is an error in your request, this parameter will have the details of that error.
tokenThis is the unique request token of the request.
verification_resultIt is only returned in case of a valid verification. This includes results of each verification.
1 means accepted
0 means declined
null means not processed
Check verification.accepted and verification.declined responses in Events section for a sample response.
verification_dataIt is only returned in case of a valid verification. This object will include the all the gathered data in a request process. Check verification.accepted and verification.declined responses in Events section for a sample response.
infoThis object will be returned in case of verification.accepted or verification.declined. It contains the following keys:
Agent provides information about the device and browser of the end-user.
Geolocation provides information about the geographical location of the end-user.
For Details on info object go to Info
declined_reasonThis parameter will have the reason due to which a verification has been declined, and is only returned in this case in the callback URL.
For more info click here
declined_codesThis array contains status codes of all declined verification reasons. It will return only for verification.declined.
For more info click here
services_declined_codesThis object contains status codes of declined reasons for each service separately. Each service object will contain an array of status codes for declined reasons specific to that service. It will return only for verification. declined.
For more info click here

tip

Callback response will be sent on the callback_url provided in the request callback_url parameter.


Status Response

The Shufti Pro Verification API will send a JSON response if a status request is made. Make sure to validate the request by generating signature and matching it with the Signature value from the response header.

ParametersDescription
referenceYour unique request reference, which you provided us at the time of request, so that you can identify the response in relation to the request made.
eventThis is the request event which shows status of request. Event is changed in every response.
Please consult Events for more information.
countryThis contains country code sent by the merchant at the time of request. Country code in the format of ISO 3166-1 alpha-2. Please consult Supported Countries for country codes.
Type: string
Example: DE
null if not provided by merchant.
verification_dataThis contains all the data used for verification. This will only be returned in case of verification.accepted or verification.declined.
verification_resultThis is the complete result of the verification. 1 stands for verified, 0 for not verified and null for no verification performed. This will only be returned in case of verification.accepted or verification.declined.
infoThis object will be returned in case of verification.accepted or verification.declined. It contains the following keys:
Agent provides information about the device and browser of the end-user.
Geolocation provides information about the geographical location of the end-user.
For Details on info object go to Info
declined_reasonThis key will only be returned when event is verification.declined. This will contain the reason why verification was declined.
declined_codesThis array contains status codes of all declined verification reasons. It will return only for verification.declined.
services_declined_codesThis object contains status codes of declined reasons for each service separately. Each service object will contain an array of status codes for declined reasons specific to that service. It will return only for verification. declined.

caution

request.invalid response with HTTP status code 400 means the request is invalid.

Delete Request Response

The Shufti Pro Verification API will send a JSON response if a delete request is made. Make sure to validate the request by generating signature and matching it with the Signature value from the response header

ParametersDescription
referenceYour unique request reference, which you provided us at the time of request, so that you can identify the response in relation to the request made.
eventThis is the request event which shows status of request. Event is changed in every response.

Please consult Events for more information.


caution

request.invalid will be returned in case of invalid reference provided or the request is already deleted.


sample-response
//Content-Type: application/json
//Signature: NmI4NmIyNzNmZjM0ZmNl

{
"reference": "17374217",
"event": "request.deleted"
}

Response Signature

Every HTTP and Callback response will be in application/JSON with a key Signature in the header. It can be used to validate the source of the request. Make a signature using the following procedure:

  1. Concatenate Secret Key at the end of the raw response string. (i.e. response + secret_key).
  2. Take SHA256 of concatenated string.
  3. Match the SHA256 string with Signature value from the header of the response.

In short, make signature as mentioned format and match it with the signature provided in the header in Signature key.

hash('sha256', response . your_secret_key)

The clients who are registered with shuftipro after 15th March, 2023. They need to make the signature using the following procedure.

  1. Take SHA256 of Secret Key string.
  2. Concatenate hashed Secret Key at the end of the raw response string. (i.e. response + hash('sha256', secret_key)).
  3. Take SHA256 of concatenated string.
  4. Match the SHA256 string with Signature value from the header of the response.
hash('sha256', response . hash('sha256', secret_key))