Skip to main content

Applications

With the Application API, you are able to retrieve applications that you have delivered to the AVICA platform. The access level depends on whether you have a whitelabel setup (recommended) or if you are sending traffic directly to our campaign pages. In the case of delivering conversions through a whitelabel brand, the information available for each application depends further on whether the user has given marketing consent to the whitelabel.

Basics

This page assumes that you have read the basics on how to use our API.

Endpoint: /applications

Methods: GET|POST

Filtering options

Click here to learn more about our filtering query format.

The available fields for filtering are. Remmember you can use the equality and in-equality operators on date-time fields as well.

FieldType
application_idnumeric
form_idnumeric
brand_idnumeric  
session_idnumeric 
market_idnumeric
datetime_addedtimestamp (Y-m-d H:i:s)
datetime_submittedtimestamp (Y-m-d H:i:s)
tokenstring (UUID)
submit_statusstring

Response

See explanation on the general response format here. The response format can vary depending on your account permissions.

{
"items": 1,
"success": true,
"page": 1,
"last_page": false,
"data": [
{
"token": "4694e466-7277-11ee-8b6c-065f6b5d48e5",
"url": "https://myloan.co.za/application",
"submit_status": "duplicate",
"datetime_submitted": "2023-10-24 14:11:50",
"datetime_updated": "2023-10-24 14:11:50",
"datetime_added": "2023-10-24 14:11:50",
"session_id": 2455,
"form_id": 4545,
"account_id": 416659,
"application_id": 1,
"session": {
"id": 1,
"screen_width": 412,
"screen_height": 846,
"brand_id": 1,
"publisher_id": 26,
"tracking": {
"pubidsub1": "tracking-value-1",
"pubidsub2": "tracking-value-2",
"pubidsub3": "tracking-value-3",
"utm_content": "email",
"utm_campaign": "fall-campaign-23"
}
},
"primaryApplicant": {
"email": "jane.doe@example.com",
"phone": "123456789",
"postalcode": "1000",
"city": "cape town",
"suburb": "cape",
"birthdate": "2000-01-01",
"gender": "female",
"subscriptions": [
{
"email_optin": "2023-11-06 16:06:23",
"email_optout": null,
"sms_optin": "2023-11-06 16:06:23",
"sms_optout": null,
"postal_optin": "2023-11-06 16:06:23",
"postal_optout": null,
"datetime_added": "2023-11-06 16:05:55",
"datetime_updated": "2023-11-06 16:06:23"
}
]
},
"transactions": [
{
"datetime_added": "2023-10-24 14:11:50",
"datetime_updated": "2023-10-24 14:11:50",
"transaction_id": 1,
"currency_id": 40,
"amount_transformed": 34,
"amount_transformed_eur": 1.72856,
"currency": {
"id": 40,
"name": "south african rand",
"alpha3": "zar",
"symbol": "R",
"datetime_added": "2023-11-06 15:51:46",
"datetime_updated": "2023-11-06 15:51:46"
}
}
],
"creditscores": [
{
"scorecard": "creditscore_v1.0",
"score_numeric": 0.12366,
"score_class": "A",
"datetime_added": "2023-10-24 14:11:50",
"datetime_updated": "2023-10-24 14:11:50",
"creditscore_id": 30,
"application_id": 1
},
{
"scorecard": "iq_v1.0",
"score_numeric": 2.72447,
"score_class": "A",
"datetime_added": "2023-10-24 14:11:50",
"datetime_updated": "2023-10-24 14:11:50",
"creditscore_id": 28,
"application_id": 1
},
{
"scorecard": "iq_v2.0",
"score_numeric": null,
"score_class": "B",
"datetime_added": "2023-10-24 14:11:50",
"datetime_updated": "2023-10-24 14:11:50",
"creditscore_id": 29,
"application_id": 1
}
]
}, {
...
},
.
.
.
]
}

Examples

NodeJs + Axios

Fetching approved applications submitted on the 1st October 2023

import axios from "axios"

const requestOptions = {
method: 'POST',
url: 'https://api.financeservice.io/v1/applications',
params: {
page: 1,
page_size: 10000
},
headers: {
'Content-Type': 'application/json',
'Authorization' : 'Bearer YOUR API KER HERE',
},
data: [
[
["datetime_submitted", "greaterThanEqual", '2023-10-01 00:00:00'],
["datetime_submitted", "lessThanEqual", '2023-10-01 23:59:59'],
["submit_status", "equal", "approved"],
]
]
};

// Now we are ready to send the request asynchronously. Axios support promises to
// this could be converted into a async/await syntax.
axios.request(requestOptions).then(resp => {
console.log(resp.data);
}).catch(error => {
console.error(error);
});

PHP + cUrl

Scrolling through all pages to get all applications without filtering.


$lastPage = false;

$page = 1;

while( $lastPage == false ) {

$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://api.financeservice.io/v1/applications?page_size=1000&page={$page}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR API KEY HERE'
]
]);
$response = curl_exec($ch);

$body = json_decode($response, true);

// Process your applications here before continuing to next page.
$applications = $body['data'];

$lastPage = $body['last_page'];

$page += 1;

}