Swift Identity API
Swift Identity API
A RESTful API enables a seamless integration of our services. Your computer systems can communicate securely to our application data via the Swift Identity API. Developers can perform dedicated operations and access authorized data.
Here are some key operations you can perform with Swift Identity API:
- Register new applicants
- Add Media
- ID Verification
- AML Verification
- Perform KYC verifications using various methods
- Check KYC and applicants data
Authorization is essential to every request made to the Swift Identity API. In the authorization header of each request you should include a bearer token. This is the API key that has been provided to you.
AUTHORIZATION Bearer Token
Token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The Swift Identity API simplifies managing new applicants and Know Your Customer (KYC) verification processes. The first step in this process is to register the new applicant thanks to the dedicated API endpoint:
POST Register Applicant
https://sandbox.swiftidentity.com/api/client/
Sample request:
curl --location 'https://sandbox.swiftidentity.com/api/client/' \
--data-raw '{
"verification_type": "KYC",
"first_name": "Swift",
"last_name": "Identity",
"email": "email@konnadu.com",
"date_of_birth": "1999-04-13"
}'
In the sample request, we can observe that a new applicant has data entries for the full name, email address, and date of birth. Moreover we can see that each applicant needs a verification type. Here are the possible verification types, essential later on to create KYC:
KYC for basic KYC verifications
BGC_PREMIUM for premium background check verifications including national data, date of birth and employment history verifications
- BGC_PRO for BGC_PREMIUM verification offerings and SSN verification
The Swift Identity API provides reliable endpoints for verifying the IDs of your new customers. A dedicated endpoint allows you to send relevant data, and await a verification response from Swift Identity.
POST Verify ID Card Number
https://sandbox.swiftidentity.com/api/verify-national-id/
Sample request:
curl --location 'https://sandbox.swiftidentity.com/api/verify-national-id/' \
--data '{
"id": "P0012345678",
"card_type": "passport",
"include_picture": false
}'
Swift Identity API allows to verify different types of ID, which type needs to be indicated in the API request. Here are the 4 types of ID types with their corresponding API parameters:
- Drivers License = drivers license
- Passport = passport
- Voters Card = voters card
- SSNIT = ssnit card
The response of this API endpoint contains two essential elements. First, the is_valid parameter indicates whether the ID verification was successful or not. Secondly, the meta parameter includes the information about the document ID under verification
Sample response:
{
"is_valid": false,
"meta": {
"Message": "No person found",
"ResponseCode": "201",
"valid": false
}
}
Bulk Verify ID Card Number allows bulk verify IDs. In fact, the API request will consist of a list of ID verification requests, a collection of entries similar to the above.
POST Bulk Verify ID Card Number
https://sandbox.swiftidentity.com/api/bulk-id-verifications/
Sample request:
curl --location 'https://sandbox.swiftidentity.com/api/bulk-id-verifications/' \
--data '{
"verifications": [
{
"id_number": "P0012345678",
"subscription": 2,
"first_name": "Swift",
"last_name": "Identity"
},
{
"id_number": "P0012345679",
"subscription": 2,
"first_name": "SwiftIdentity",
"last_name": "Identity"}]}'
You can also check the status of the ID verifications you have requested thanks to the dedicated endpoint:
GET Get ID Verifications
https://sandbox.swiftidentity.com/api/id-verification-applicants/
Sample request:
curl --location 'https://sandbox.swiftidentity.com/api/id-verification-applicants/' \
--header 'apptype: BGC'
An API endpoint is dedicated in Swift Identity API to create new AML verification for our customers. Depending on the AML plan, the API allows a single or multiple-country verification, with the aml_single_country or aml_multi_country , correspondingly.
POST Create AML Verifications
https://sandbox.swiftidentity.com/api/aml-verifications/
Sample request:
curl --location 'https://sandbox.swiftidentity.com/api/aml-verifications/' \
--data '{
"verifications": [
{
"first_name": "Swift",
"last_name": "Identity",
"country": "Ghana",
"plan": 54},]}'
This API endpoints generates a response with status_display key that indicates whether or not the verification.
Alternatively, you can check the list of AML verifications requested thanks to the following endpoint:
GET Get AML Verifications
https://sandbox.swiftidentity.com/api/aml-verification-applicants/
Sample response:
{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"id": 12345,
"first_name": "Swift",
"last_name": "Identity",
"email": null,
"date_of_birth": null,
"plan": 54,
"plan_verbose": {
"id": 123,
"plan_type": 6,
"plan_type_verbose": "AML Verification",
"name": "AML Basic"
},...
This endpoint will respond with a collection of past AML verifications. status_verbose and status are essential keys to determine the status of the verification.
Once we have successfully registered a new applicant, we obtain a user ID that we can use to create a KYC. A dedicated endpoint is reserved for this purpose:
POST Create KYC
https://sandbox.swiftidentity.com/api/kyc/
Sample request:
curl --location 'https://sandbox.swiftidentity.com/api/kyc/' \
--header 'apptype: KYC' \
--data '{
"user": 1234,
"citizenship_country": "533",
"doc_type": 0,
"official_doc": 211,
"live_photo": 210,
"status": 5
}'
In the data payload of this sample request, we can observe that we are creating a KYC for the user whose ID is 50. Other information, including the citizenship country, official documents, and a live photo are also included in the data payload.
We can also note the status parameter that indicates the status of the KYC processes.
Thanks to the following endpoint, you can attach a media file to a KYC process, for which you will obtain a media ID.
POST Create Media
https://sandbox.swiftidentity.com/api/media/
If you would like to update the media for a KYC processes, you can do that with the following endpoint, by attaching the media ID directly in the URL:
PATCH Update KYC Media
https://sandbox.swiftidentity.com/api/kyc/update-media/48/
In the previous section we have seen how to send requests to Swift Identity API and create new applicants for the KYC process. In this section, we will explore other types of requests dedicated to obtain authorized data from Swift Identity.
A specialized endpoint is designed to obtain applicants data. Let’s have a closer look at this endpoint:
By simply attaching your authorization token to the header, this request will return the list of applicants that you have previously requested.
GET Get Applicants
https://sandbox.swiftidentity.com/api/client/
There are two ways to obtain the KYC processes you have started. You obtain individual KYC data, or you can alternatively obtain all KYC that you have previously initiated.
We observe in this endpoint, the number “35”, that is attached to the URL to refer to the user ID from which to retrieve active KYC.
GET Get KYC
https://sandbox.swiftidentity.com/api/kyc/35/
Similarly, if you would like to retrieve all KYC processes in your account, you can make a more general request, excluding the user ID. Please note the plural used in KYCs.
GET Get KYCs
https://sandbox.swiftidentity.com/api/kyc/
NOTE: As we have explored in previous sections, you can also obtain ID and AML verification data from the dedicated endpoints explained above.