curl --request GET \
--url https://api.tilta.io/v1/buyers/{external_id}/facility \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, 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 => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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"
}Retrieve a credit facility
Fetch the active credit facility for a buyer, including total credit limit, available balance, current usage amount, currency, and expiration date.
curl --request GET \
--url https://api.tilta.io/v1/buyers/{external_id}/facility \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, 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 => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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"
}available_amount. This prevents order authorization
failures caused by insufficient credit. Amounts are in the smallest currency unit – divide by 100 to convert cents to euros.404 if the buyer has no credit facility – either because one was never requested, or because the
request was rejected. Use Create facility to request one.Authorizations
Your Tilta API key, sent as Bearer <key>.
Path Parameters
Unique identifier of a buyer.
100^[a-zA-Z0-9-_]+$Response
Active facility of the 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