curl --request POST \
--url https://api.tilta.io/v1/buyers/{external_id}/facility \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requested_amount": 2,
"is_existing_buyer": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({requested_amount: 2, is_existing_buyer: true})
};
fetch('https://api.tilta.io/v1/buyers/{external_id}/facility', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tilta.io/v1/buyers/{external_id}/facility"
payload = {
"requested_amount": 2,
"is_existing_buyer": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tilta.io/v1/buyers/{external_id}/facility",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'requested_amount' => 2,
'is_existing_buyer' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"buyer_external_id": "5f6374a46a5e8e0104aa5cd4",
"pending_orders_amount": 2500,
"risk_band": "REJECT",
"created_at": 1582896122,
"updated_at": 1582896122,
"pending_actions": [
{
"type": "CREATION",
"created_at": 1582896122
}
],
"status": "ACTIVE",
"reviewed_at": 123,
"currency": "EUR",
"total_amount": 10000,
"available_amount": 5200,
"used_amount": 4800
}{
"buyer_external_id": "5f6374a46a5e8e0104aa5cd4",
"status": "PENDING"
}{
"code": "BAD_REQUEST",
"error": "Request validation failed. 1 issue found.",
"issues": [
{
"code": "INVALID_TYPE",
"path": "body.registered_at",
"message": "Invalid type"
}
]
}{
"error": "Unauthorized",
"code": "UNAUTHORIZED"
}{
"error": "No Entity found",
"code": "NOT_FOUND"
}{
"error": "Buyer already has an active Facility",
"code": "CONFLICT"
}{
"error": "Facility could not be created",
"code": "RISK_DECISION_ERROR"
}Request a credit facility
Trigger Tilta automated underwriting to request a credit facility for a buyer. Approval is based on credit bureau data and delivered via webhook event.
curl --request POST \
--url https://api.tilta.io/v1/buyers/{external_id}/facility \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requested_amount": 2,
"is_existing_buyer": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({requested_amount: 2, is_existing_buyer: true})
};
fetch('https://api.tilta.io/v1/buyers/{external_id}/facility', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tilta.io/v1/buyers/{external_id}/facility"
payload = {
"requested_amount": 2,
"is_existing_buyer": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tilta.io/v1/buyers/{external_id}/facility",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'requested_amount' => 2,
'is_existing_buyer' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"buyer_external_id": "5f6374a46a5e8e0104aa5cd4",
"pending_orders_amount": 2500,
"risk_band": "REJECT",
"created_at": 1582896122,
"updated_at": 1582896122,
"pending_actions": [
{
"type": "CREATION",
"created_at": 1582896122
}
],
"status": "ACTIVE",
"reviewed_at": 123,
"currency": "EUR",
"total_amount": 10000,
"available_amount": 5200,
"used_amount": 4800
}{
"buyer_external_id": "5f6374a46a5e8e0104aa5cd4",
"status": "PENDING"
}{
"code": "BAD_REQUEST",
"error": "Request validation failed. 1 issue found.",
"issues": [
{
"code": "INVALID_TYPE",
"path": "body.registered_at",
"message": "Invalid type"
}
]
}{
"error": "Unauthorized",
"code": "UNAUTHORIZED"
}{
"error": "No Entity found",
"code": "NOT_FOUND"
}{
"error": "Buyer already has an active Facility",
"code": "CONFLICT"
}{
"error": "Facility could not be created",
"code": "RISK_DECISION_ERROR"
}202 response means the decision is still pending and arrives via webhook.
Webhook events
When underwriting cannot complete synchronously, Tilta delivers the result via webhook. Subscribe to the following events in your webhook configuration:| Event | Description |
|---|---|
FACILITY.CREATION.ACCEPTED | The credit facility was approved and is ready to use. |
FACILITY.CREATION.REJECTED | The credit facility request was rejected. |
FACILITY.CREATION.IN_REVIEW | Underwriting requires additional review and is not yet complete. |
409 Conflict. To raise an existing limit, use Request Increase
instead.Authorizations
Your Tilta API key, sent as Bearer <key>.
Headers
Indicates if the operation should be performed asynchronously.
true, false Path Parameters
Unique identifier of a buyer.
100^[a-zA-Z0-9-_]+$Body
Requested amount. As minimum currency unit (e.g cents/pence).
x >= 1Indicates that the platform has at least two closed orders with this buyer.
EUR, GBP, USD, CHF, PLN, CZK, RON, BGN, DKK, HUF, SEK, NOK, JPY, AUD, NZD, CAD Response
A credit facility has been successfully created for a buyer.
Unique identifier for buyer.
100^[a-zA-Z0-9-_]+$"5f6374a46a5e8e0104aa5cd4"
Blocked by pending deferred orders portion of the Credit Limit. As minimum currency unit (e.g cents/pence).
2500
REJECT, A1, A2, B1, B2, C1, C2, D1, D2 Timestamp indicating when the facility was created (unix time in seconds).
1582896122
Timestamp indicating the last time the facility was updated (unix time in seconds).
1582896122
List of pending actions for the facility.
Show child attributes
Show child attributes
Status of the Active facility
ACTIVE, PENDING, FROZEN, EXPIRED "ACTIVE"
Review Date of the Active facility
ISO 4217 three-letter currency code.
EUR, GBP, USD, CHF, PLN, CZK, RON, BGN, DKK, HUF, SEK, NOK, JPY, AUD, NZD, CAD Total credit limit available to the Buyer. As minimum currency unit (e.g cents/pence).
10000
Available portion of the Credit Limit. As minimum currency unit (e.g cents/pence).
5200
Credit Limit portion currently in use (not repaid). As minimum currency unit (e.g cents/pence).
4800