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 code | HTTP message | Message |
---|---|---|
200 | OK | success |
400 | Bad Request | Bad Request: one or more parameter is invalid or missing |
401 | Unauthorized | Unauthorized: invalid signature key provided in the request |
402 | Request Failed | Invalid request data: missing required parameters |
403 | Forbidden | Forbidden: service not allowed |
404 | Not Found | Resource not found |
409 | Conflict | Conflicting data: already exists |
429 | Too Many Requests | Too Many Attempts. |
500 | Server Error | Internal Server Error |
504 | Gateway Timeout | Server error |
524 | Timeout from Cloudflare | Unofficial 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.
Event | description | HTTP Response | Callback Response |
---|---|---|---|
request.invalid | Request parameters provided in request are invalid. | Yes | No |
request.unauthorized | Request is unauthorized. The information provided in authorization header is invalid. | Yes | No |
verification.accepted | Request was valid and accepted after verification. | Yes | Yes |
verification.declined | Request was valid and declined after verification. | Yes | Yes |
request.deleted | Request has been deleted. | Yes | Yes |
verification.status.changed | Request status has been updated. | No | Yes |
Verification Response
Responses will contain the following parameters:
Parameters | Description |
---|---|
reference | Your 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. |
events | This is the request event which shows status of request. Event is changed in every response. Please consult Events for more information. |
error | Whenever there is an error in your request, this parameter will have the details of that error. |
token | This is the unique request token of the request. |
verification_result | It 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_data | It 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. |
info | This 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 |
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.
Parameters | Description |
---|---|
reference | Your 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. |
event | This is the request event which shows status of request. Event is changed in every response. Please consult Events for more information. |
country | This 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_data | This contains all the data used for verification. This will only be returned in case of verification.accepted or verification.declined. |
verification_result | This 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. |
info | This 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 |
request.invalid response with HTTP status code 400 means the request is invalid.
{
"reference": "sp-bc-demo-U3cl95qO",
"event": "verification.accepted",
"email": null,
"country": null,
"verification_data": {
"kyb":
{
"company_number": "11039567",
"company_type": "Private Limited Company",
"company_source": {
"publisher": "UK Companies House",
"url": "http://xmlgw.companieshouse.gov.uk/",
"terms": "UK Crown Copyright",
"retrieved_at": "2019-10-31T08:50:01+00:00"
},
"native_company_number": null,
"company_industry_codes": [
{
"code": "62.01/2",
"description": "Business and domestic software development",
"code_scheme_id": "uk_sic_2007",
"code_scheme_name": "UK SIC Classification 2007"
},
{
"code": "63.11",
"description": "Data processing, hosting and related activities",
"code_scheme_id": "uk_sic_2007",
"code_scheme_name": "UK SIC Classification 2007"
},
{
"code": "62.01",
"description": "Computer programming activities",
"code_scheme_id": "eu_nace_2",
"code_scheme_name": "European Community NACE Rev 2"
},
{
"code": "6201",
"description": "Computer programming activities",
"code_scheme_id": "isic_4",
"code_scheme_name": "UN ISIC Rev 4"
},
{
"code": "63.11",
"description": "Data processing, hosting and related activities",
"code_scheme_id": "eu_nace_2",
"code_scheme_name": "European Community NACE Rev 2"
},
{
"code": "6311",
"description": "Data processing, hosting and related activities",
"code_scheme_id": "isic_4",
"code_scheme_name": "UN ISIC Rev 4"
}
],
"company_trademark_registrations": [],
"company_corporate_groupings": [],
"company_data": [],
"home_company": null,
"company_ultimate_beneficial_owners": [
{
"name": "Mr. Carl Victor Gregor Fredung Neschko"
}
],
"company_filings": [
{
"title": "Confirmation Statement",
"date": "2019-10-30",
"reference_url": "https://opencorporates.com/statements/705738001"
},
{
"title": "Annual Accounts",
"date": "2019-07-19",
"reference_url": "https://opencorporates.com/statements/656789159"
},
{
"title": "Change of registered office address",
"date": "2019-06-04",
"reference_url": "https://opencorporates.com/statements/635021777"
},
{
"title": "Change of registered office address",
"date": "2019-04-02",
"reference_url": "https://opencorporates.com/statements/610263028"
},
{
"title": "Change of secretary's details",
"date": "2018-11-26",
"reference_url": "https://opencorporates.com/statements/593461364"
},
{
"title": "Give notice of individual person with significant control",
"date": "2018-11-13",
"reference_url": "https://opencorporates.com/statements/579687687"
},
{
"title": "Give notice of update to PSC statements",
"date": "2018-11-13",
"reference_url": "https://opencorporates.com/statements/579687688"
},
{
"title": "Confirmation Statement",
"date": "2018-11-12",
"reference_url": "https://opencorporates.com/statements/579687689"
},
{
"title": "Termination of appointment of director ",
"date": "2018-11-12",
"reference_url": "https://opencorporates.com/statements/579687690"
},
{
"title": "Appointment of director",
"date": "2018-11-12",
"reference_url": "https://opencorporates.com/statements/579687691"
},
{
"title": "Return of allotment of shares",
"date": "2018-11-03",
"reference_url": "https://opencorporates.com/statements/579336389"
},
{
"title": "Appointment of secretary",
"date": "2018-10-26",
"reference_url": "https://opencorporates.com/statements/579336390"
},
{
"title": "New incorporation documents",
"date": "2017-10-31",
"reference_url": "https://opencorporates.com/statements/512335712"
}
],
"company_officers": [
{
"name": "RICHARD MARLEY FISHER",
"position": "director",
"start_date": "2017-10-31",
"end_date": "2018-11-02",
"occupation": "COMPANY DIRECTOR",
"inactive": true,
"current_status": null,
"address": null
},
{
"name": "MUAZ AHMAD JABAL",
"position": "secretary",
"start_date": "2018-10-25",
"end_date": null,
"occupation": null,
"inactive": false,
"current_status": null,
"address": null
},
{
"name": "CARL VICTOR GREGOR FREDUNG NESCHKO",
"position": "director",
"start_date": "2018-10-30",
"end_date": null,
"occupation": "BUSINESSMAN",
"inactive": false,
"current_status": null,
"address": null
}
],
"company_name": "SHUFTI PRO LIMITED",
"company_jurisdiction_code": "gb",
"company_incorporation_date": "2017-10-31",
"company_dissolution_date": null,
"company_registry_url": "https://beta.companieshouse.gov.uk/company/11039567",
"company_branch": null,
"company_branch_status": null,
"company_registered_address_in_full": "35 Little Russell Street, Holborn, London, WC1A 2HH",
"company_inactive": false,
"company_current_status": "Active",
"company_agent_name": null,
"company_agent_address": null,
"company_alternative_names": [],
"company_previous_names": [],
"company_number_of_employees": null,
"company_alternate_registration_entities": [],
"company_previous_registration_entities": [],
"company_subsequent_registration_entities": [],
"company_identifiers": [],
"company_registered_address": {
"street_address": "35 Little Russell Street, Holborn",
"locality": "London",
"region": null,
"postal_code": "WC1A 2HH",
"country": "England"
},
"company_financial_summary": null,
"company_controlling_entity": null
}
},
"verification_result": {
"kyb_service": 1
},
"info": {
"agent": {
"is_desktop": true,
"is_phone": false,
"useragent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36",
"device_name": "Macintosh",
"browser_name": "",
"platform_name": "OS X - 10_14_4"
},
"geolocation": {
"host": "172.18.0.1",
"ip": "172.18.0.1",
"rdns": "172.18.0.1",
"asn": "",
"isp": "",
"country_name": "",
"country_code": "",
"region_name": "",
"region_code": "",
"city": "",
"postal_code": "",
"continent_name": "",
"continent_code": "",
"latitude": "",
"longitude": "",
"metro_code": "",
"timezone": ""
}
}
}
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
Parameters | Description |
---|---|
reference | Your 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. |
event | This is the request event which shows status of request. Event is changed in every response. |
Please consult Events for more information.
request.invalid will be returned in case of invalid reference provided or the request is already deleted.
//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:
- Concatenate Secret Key at the end of the raw response string. (i.e. response + secret_key).
- Take SHA256 of concatenated string.
- 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.
- Take SHA256 of Secret Key string.
- Concatenate hashed Secret Key at the end of the raw response string. (i.e. response + hash('sha256', secret_key)).
- Take SHA256 of concatenated string.
- Match the SHA256 string with Signature value from the header of the response.
hash('sha256', response . hash('sha256', secret_key))