API documentation

1. Introduction - what is API, when you should use it and requirements

API is server2server connection between you and Volsor. It is used when you have your own system with your own form and you want to send data from your system to Volsor. It allows you to send loan applications with user data directly to Volsor system through HTTP request.

Let's say you have a form for loan applications on your website. When anyone fills in the form, the data is saved on your server. The API is a bridge between your system and ours. It defines, how to send this data to our system. It defines name of the fields (keys), the content of the fields (values), the rules and formats in which the data should be received (validation) and URL where you should send this data (read more in 2.4. Set up format of data sending). It also defines our response format. When data is sent to us via API, we reply whether we accepted the lead successfully (together with URL of the page where you should redirect the client) or whether data failed (either because you missed something or did not use the proper data format). (read more in 2.2.5. Set up response handling).

1.1. Business-cases when you should consider using Volsor API

  1. Proprietary website with online form for Loan applications
    • For example, you are running a financial website where users can apply for Payday loan or Consumer loans via online form that was NOT developed by Volsor.
  2. Software managed by sales team for offline loan requests
    • For example, if in your business model people are asking for a loan offline, such as a call center, where application for a loan is created by your sales team and not by the customers themselves. Make sure the software you use is capable to send HTTP request via POST method in proper JSON format and you are able to send data in real-time to Volsor. (Volsor will NOT pay for the leads that are NOT interested in the loan at the moment when you send their data to Volsor Lead API).

1.2. When you should NOT consider using Volsor API (and use other marketing tools instead)

  • You have neither proprietary website with a user form nor using any software for managing loan applications
  • You want to monetize your existing database of customers who are NOT actively seeking for a loan
  • You don't have development team capable to adapt your software according to this documentation requirements (See Chapter 2.2.How to integrate your system with Volsor Lead API). In this case we recommend you to consider alternative marketing tools that are easier and faster to set up, such as Landing Pages, Links, Banners or Iframe forms.
  • When you cannot comply with Volsor requirements (see the next section).

1.3. Volsor requirements

In order to send traffic to Volsor, you need:

  1. To have a proprietary GDPR-compliant website that targets users interested in Payday or Consumer loan products.
  2. In accordance with GDPR, it's necessary that you include Volsor s.r.o. as one of the Data controllers in your Privacy terms.

In the following table you will find the links to all necessary legal documents per country that MUST be agreed by users whose lead data you send to Volsor via API:

Required document Czech Republic Spain Poland
Personal data processing terms https://financecdn.com/cms/release/landings/cs/conditions/terms-gdpr.html https://financecdn.com/cms/release/landings/es/conditions/terms-gdpr.html https://financecdn.com/cms/release/landings/pl/conditions/terms-gdpr.html
Persona data processing agreement https://financecdn.com/cms/release/landings/cs/conditions/privacy-gdpr.html https://financecdn.com/cms/release/landings/es/conditions/privacy-gdpr.html https://financecdn.com/cms/release/landings/pl/conditions/privacy-gdpr.html
Remarketing agreement https://financecdn.com/cms/release/landings/cs/conditions/remarketing-gdpr.html https://financecdn.com/cms/release/landings/es/conditions/remarketing-gdpr.html https://financecdn.com/cms/release/landings/pl/conditions/remarketing-gdpr.html

Leads sent to us from your system should be real people that are actively seeking for a loan at the moment when you send their data to us. We will NOT buy leads sent to us directly from database, if these people are NOT interested in getting a loan at the moment when your send their data to us.

2. How to start using Volsor's API?

  1. Apply for using Volsor's Lead API
  2. Integrate with our API
  3. Test it together with affiliate manager
  4. Send traffic

It's necessary that you:

  • First contact Volsor Manager before setting API and then before testing it
  • Send all required data
  • Redirect customers to URL that we returned to you in response (redirect_url)
  • Send the leads exclusively to Volsor (if Volsor accepts the lead) and nowhere else
  • Comply with Volsor requirements (see chapter 1.3)

2.1. Apply for using Volsor's Lead API

  • Re-check that you website and software complies with all Volsor requirements and make necessary changes before contacting Volsor.
  • Contact Volsor Affiliate manager affiliate@volsor.com and provide the following information:
    • Explain your business case.
    • If you have a website, send its URL for revision.
    • Inform the IP address that you will use for sending traffic via API.
  • Wait for Volsor's approval. We reserve up to 2 working days for the revision but in most cases we will reply to you on the same working day. If your application is approved we will provide you the valid API token that will enable you to send traffic directly via API.

2.2. How to integrate your system with Volsor Lead API

Under integration we mean that your software flawlessly sends us JSON-encoded data via POST and handles all Volsor's JSON-encoded responses without any problem.

The following steps are step-by-step instruction how to integrate your system with Volsor Lead API.

2.2.1. Select the target market and the product of promotion

Select the target country (CZ for Czech Republic, ES for Spain or PL for Poland) and the product of promotion (Payday or Consumer loan) to see the required and optional fields for the selected country / product combination.

2.2.2. Analyze which fields are needed

Analyze if you can send us all required fields for the selected country / product combination.

ATTENTION:

Although we will accept leads with less data, it's in our mutual interest that you send us as much user data as possible. The more information about the customer, the higher probability that your lead will be successfully sold.

Field name Type Description Example
country Choice Country of the lead. Should be "CZ" for this country. CZ
product Choice Product of the lead. Should be "payday" for this product.
Possible choices for "CZ" country: payday, consumer_loan
payday
agree Boolean Loan applicant agree with Terms and Conditions 1
birth_number String Personal identification number of the loan applicant. 9 or 10 digits without separators. Validation is described in https://en.wikipedia.org/wiki/National_identification_number#Czech_Republic_and_Slovakia
Max length: 10
Min length: 9
8802112627
cell_phone String Phone number of the loan applicant. Only 9 digits of valid CZ phone. Using this library for validation.
Max length: 9
Min length: 9
736276290
email String Email address of the loan applicant admin@volsor.com
requested_amount Decimal Requested Loan amount in CZK
Max value: 20000
Min value: 500
2700
Field name Type Description Example
account_number String Applicant's bank account number (without bank code in this field). Validation rules described on http://www.cnb.cz/.../TR201.pdf, page 49. 000000-6000374923
bank_account_prefix String Applicant's bank account prefix number 000000
bank_code Choice Bank code at the end of the applicant's bank account number
Valid choices: 0800; 0600; 0300; 0100; 2010; 3030; 6210; 5500; 2700; 0710; 2060; 2070; 2100; 2200; 2220; 2250; 2260; 2275; 2600; 3060; 3500; 4000; 4300; 5800; 6000; 6200; 6300; 6363; 6700; 6800; 7910; 7950; 7960; 7970; 7990; 8030; 8040; 8060; 8090; 8150; 8190; 8198; 8220; 8250; 8255; 8265; 8280; 8500
5500
city String City of the applicant's permanent residence
Max length: 64
Test city
click_id String test-click-id
company_number String Company ID. Only 8 digits. Validation is described in https://cs.wikipedia.org/wiki/Identifikační_číslo_osoby
Max length: 8
Min length: 8
87844028
employed_time Choice Duration of employment of the loan applicant
Valid choices: "0" - 0 měsíců; "3" - 1-3 měsíce; "5" - 4-7 měsíců; "10" - 7-12 měsíců; "24" - 2 roky; "36" - 3 roky; "48" - 4 roky; "60" - 5 let; "66" - více než 5 let
3
employer String Name of the employer of the loan applicant
Max length: 128
Google Inc.
employer_address String Address of the employer of the loan applicant
Max length: 255
test employer address
employer_phone String Phone number of the employer of the loan applicant. Only 9 digits of valid CZ phone.
Max length: 9
Min length: 9
736276290
expenses Decimal Monthly expenses of the loan applicant (in CZK)
Max value: 9999999999
Min value: 0
3750
first_name String First name of the loan applicant. Should only contain letters "a-z", "-" and space.
Max length: 128
John
fullloan_checkbox Boolean 0
has_guarantee Boolean Whether the client has property for a guarantee on the loan. 1
home_status Choice Permanent residence - type of residence of the loan applicant
Valid choices: HOME_OWNER; TENANT; DORMITORY; HOSTEL; MINISTRY; EMPLOYEE_BENEFIT; CO_OWNED
HOME_OWNER
house_number String House number of the applicant's permanent residence. Some digits and optional one letter "a-z".
Max length: 30
123/456
identity_card_number String Identity card number of the loan applicant. Only 9 digits.
Max length: 9
Min length: 9
123123123
income_type Choice Source of income of the loan applicant
Valid choices: EMPLOYED; PART_TIME_EMPLOYMENT; SELF_EMPLOYED; PENSION; MATERNITY_LEAVE; BENEFITS; SAVINGS; STUDENT; UNEMPLOYED; OTHER
EMPLOYED
ip_address String Customer IP address 127.0.0.1
job_title String Job title of the loan applicant
Max length: 128
Engineer
keyword String Keyword parameter
Max length: 255
test_keyword
last_name String Second name of the loan applicant. Should only contain letters "a-z", "-" and space.
Max length: 128
Min length: 2
Doe
monthly_income Decimal Monthly income of the loan applicant
Max value: 99999
Min value: 0
27000
period Integer Loan period from 1 to 30 days
Max value: 30
Min value: 1
16
referrer String Referrer url https://www.volsor.com
remarketing_agree Boolean 1
street String Street name of the applicant's permanent residence
Max length: 100
Test street
subaccounts String Subaccount identifiers {'sub': 'my-subaccount'}
third_party_agree Boolean 1
url String
Max length: 4096
https://onpujcka.cz/form.html
user_agent String User agent string
Max length: 512
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0
zip String Zip code of the applicant's permanent residence. Only 5 digits. 11000
Field name Type Description Example
address_time Choice How long applicant live at current address?
Valid choices: "1" - 1 year and less; "2" - 2 years; "3" - 3 years; "4" - 4 years; "5" - 5 years; "6" - 6 years; "7" - 7 years; "8" - 8 years; "9" - 9 years; "10" - 10 years; "10+" - 10+ years
10
car Choice Car ownership of the loan applicant
Valid choices: YES; NO
YES
contact_city String City name of the applicant's contact address
Max length: 64
Test contact city
contact_home_status Choice Contact address - type of residence of the loan applicant
Valid choices: HOME_OWNER; TENANT; DORMITORY; HOSTEL; MINISTRY; EMPLOYEE_BENEFIT; CO_OWNED
HOME_OWNER
contact_house_number String House number of the applicant's contact address. Some digits and optional one letter "a-z".
Max length: 30
234/567
contact_street String Street name of the applicant's contact address
Max length: 100
Test contact street
contact_zip String Zip code of the applicant's contact address. Only 5 digits. 22000
contract_duration Choice Type of employment contract of the loan applicant
Valid choices: "0" - Smlouva na dobu neurčitou; "1" - Smlouva na dobu určitou
0
dependent_children Choice The number of children (with age < 18) of the loan applicant
Valid choices: 0; 1; 2; 3; 4; 5; 5+
1
distraint Choice Is the loan applicant in distraint?
Valid choices: "NO" - I have no executions; "IN_PROGRESS" - Executions are in progress; "YES" - I have execution order
NO
education Choice Level of education of the loan applicant
Valid choices: PRIMARY; SECONDARY_PROFESSIONAL; SECONDARY_HIGH_SCHOOL; UNIVERSITY_BACHELOR; UNIVERSITY_MASTER; UNIVERSITY_PHD; OTHER
PRIMARY
gender Choice Gender of the loan applicant
Valid choices: "F" - Female; "M" - Male
M
insolvency Choice Is the loan applicant in insolvency?
Valid choices: "NO" - Not intend to insolvency; "IN_PROGRESS" - Intent to insolvency; "YES" - Yes, insolvent
NO
marital_status Choice Marital status of the loan applicant
Valid choices: SINGLE; MARRIED; PARTNERSHIP; DIVORCED; WIDOWED; SEPARATED; OTHER
SINGLE

2.2.3. Translate fields in your system according to Volsor validation rules

When you send us lead, we validate it according to validation described in every field. If any field does not pass the validation, we will not buy the lead. Therefore, please pay close attention to proper validation of the fields.

2.2.4. Set up authentication and endpoints

Include the API-token provided to you by Volsor manager in the Authorization HTTP header. Make sure that the header is sent exactly as follows:

Authorization: Token <your_api_token>

Otherwise, you will either get HTTP 401 Unauthorized response (See chapter 2.2.5 a. for details) or your leads will NOT be recognized by our system as yours.

API endpoints for lead registration. Every request from your server must be in valid JSON format and have valid Content-Type (application/json) and authorization (described above) headers.

Endpoint URL Method
Production https://api.volsor.com/leads/ POST
Test https://api-test.volsor.com/leads/ POST

If sent data is valid you will get a JSON response that has a key status with OK value and key redirect_url with link where you need to redirect a lead for further processing. Also response will contain an id, which can be used to check lead status. (See chapter 2.2.5 for details)

2.2.5. Set up response handling

When you are sending lead data (name, amount, period etc.) to the address: https://api.volsor.com/leads/ by using POST method, the most relevant types of responses for you are:

  1. Something is wrong with the token (authentication problem)
  2. Something is wrong with the lead data (validation problem)
  3. Everything is fine. The lead is accepted by the system.
a) Something is wrong with the token (authentication problem)

Example responses, its explanations and recommended actions:

Status code Response Explanation To do for the Affiliate
401 {"detail":"Invalid token"} API-token that affiliate used for authentication is not valid Re-check if token is properly spelled in HTTP header while sending leads
401 {"detail":"Token inactive"} Affiliate is not allowed to send traffic to Volsor Contact Volsor manager to find out and negotiate conditions to allow sending traffic
401 {"detail":"Authentication credentials were not provided."} The token is either missing or is not properly set-up Re-check if correct token is properly placed in HTTP header according to the documentation:
Authorization: Token <your_api_token>

All these error responses are returned as HTTP Error.

b) Something is wrong with the lead data (validation problem)

Example responses, their explanations and recommended actions:

Status code Response Explanation To do for the Affiliate
400 {"status": "FAIL", "errors":{"email":["This field is required."]}} The required field "email" was not sent. Lead is rejected by Volsor Make sure you send leads that have all "Paid required fields"
400 {"status":"FAIL", "errors":{"identity_card_number":["Valor incorrecto"]}} The field "identity_card_number" failed Volsor's validation. Lead is rejected Send data according to Volsor's validation rules in Lead API documentation

In all these cases JSON response will contain the field "status" with "FAIL" value, compare to 1.1. value.

In case of wrong input from the end user (if you are using your own form) - you could display Volsor's error messages to the end users (which are in most cases are already translated into the language of the target country).

In case of data format problems, for example {"errors":{"birth_date":["Date has wrong format. Use one of these formats instead: DDMMYYYY."]... you should make changes in your software to send us data in the proper format according to the documentation. Error messages are localized according to your target country.

c) Everything is fine. The Lead was accepted.

In case of successfully accepted lead, the response will be the following:

Status code Response Explanation
201 {"redirect_url":"...", "id":"...", "status":"OK"} redirect_url - URL of our resource, where the user MUST be redirected so that he could see Thank You Page after sell.
id - Unique lead ID in Volsor's system; you should use it for checking lead status (See 2.2.6.)
status - Status of the lead in this case will always be ok.
d) Other responses

In some rare cases, you can get the following response:

Status code Response Explanation To do for the Affiliate
500 {"detail":"Internal service error"} This might indicate one of the following:
1. Volsor is undergoing some routine maintenance on its servers
2. Volsor has some system issues (which in 99,9% cases are already known and being already worked upon)
Repeat your request in several minutes. If the problem persists longer than 60 minutes, you should inform your affiliate manager about the problem.

2.2.6. Set up conversion tracking via API UPDATED 06.02.2020

Please check Conversion tracking section

2.2.7. Set up redirect to thank you page

When Volsor successfully receives your lead and replies with the status OK (see chapter 2.2.5.c Everything is fine. The Lead was accepted) you should redirect the user to the redirect_url that you will find in the response.

2.3. Integration testing

Before sending leads to our production we recommend you to send dummy data to our test endpoint (see chapter 2.2.4)

Please, inform Volsor manager that you have started the test. The test can be considered successful if you:

  1. Receive positive response status OK for your lead (see chapter 2.2.5.c)
  2. status SOLD when you check the lead status (see chapter 2.2.6)

2.4. Traffic launch

Before launching the traffic, please contact your manager and launch the traffic together with him. In the beginning, it is needed to limit the leads and thoroughly control them. Make sure you change the endpoint to production (see chapter 2.2.4)

2.5. Measure your performance

As soon as your traffic is launched to production endpoint, you can see the performance of your leads in Reports. You can filter the traffic generated from form or API and compare the performance.

3. Troubleshooting

If you experience any problems with API integration, please inform Volsor affiliate manager affiliate@volsor.com by email. In order we could solve your problem as soon as possible, please provide:

  1. Description of the problem: what is wrong, when it happens and what behavior would you expect instead.
  2. The log of your request and our response as an example of the problem.

Examples:

cURL


curl -H "Content-Type: application/json; charset=utf-8" -H "Authorization: Token <your_api_token>" -X POST -d '{ "agree": "1",  "cell_phone": "736276290",  "country": "CZ",  "email": "admin@volsor.com",  "period": "16",  "product": "payday",  "requested_amount": "2700",  "subaccounts": {"sub1": "FB23095", "sub2": "GGL_22", "sub3": "REF5"},"country": "CZ", "product": "payday"}' https://api-test.volsor.com/leads/

    

Response:

{"status":"OK","url":"https://api-test.volsor.com/v2/leads/get_lead_info/94490374-a4a1-48eb-84ae-2f2500671a31/","redirect_url":"https://onpujcka.cz/form.html?key=94490374-a4a1-48eb-84ae-2f2500671a31","id":"94490374-a4a1-48eb-84ae-2f2500671a31"}

PHP


$url = "https://api-test.volsor.com/leads/";

$fields = json_encode(array(
    "agree" => "1",
    "cell_phone" => "736276290",
    "country" => "CZ",
    "email" => "admin@volsor.com",
    "period" => "16",
    "product" => "payday",
    "requested_amount" => "2700",
    "subaccounts" => array(
        "sub1" => "FB23095",
        "sub2" => "GGL_22",
        "sub3" => "REF5",
),
));

$curl = curl_init();
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
    'Authorization: Token <your_api_token>',
    'Content-Type: application/json; charset=utf-8'
));
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $fields);

$return = curl_exec($curl);
curl_close($curl);

$response = json_decode($return);

print_r($response);

    

Response:

{"status":"OK","url":"https://api-test.volsor.com/v2/leads/get_lead_info/94490374-a4a1-48eb-84ae-2f2500671a31/","redirect_url":"https://onpujcka.cz/form.html?key=94490374-a4a1-48eb-84ae-2f2500671a31","id":"94490374-a4a1-48eb-84ae-2f2500671a31"}

Python


# coding: utf-8
import json
from urllib.request import Request, urlopen


url = 'https://api-test.volsor.com/leads/'

data = json.dumps({
     'agree': '1',
     'cell_phone': '736276290',
     'country': 'CZ',
     'email': 'admin@volsor.com',
     'period': '16',
     'product': 'payday',
     'requested_amount': '2700',
    'subaccounts': {
        'sub1': 'FB23095',
        'sub2': 'GGL_22',
        'sub3': 'REF5',
},
})
data = data.encode('utf-8')

request = Request(url, data, {'Authorization': 'Token <your_api_token>', 'Content-Type': 'application/json'})
response = urlopen(request)

print(response.read())

    

Response:

{"status":"OK","url":"https://api-test.volsor.com/v2/leads/get_lead_info/94490374-a4a1-48eb-84ae-2f2500671a31/","redirect_url":"https://onpujcka.cz/form.html?key=94490374-a4a1-48eb-84ae-2f2500671a31","id":"94490374-a4a1-48eb-84ae-2f2500671a31"}