List requirements for a service
curl --request GET \
--url https://api.tilta.io/v1/invoices/{external_id}/services/{service_type}/requirements \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tilta.io/v1/invoices/{external_id}/services/{service_type}/requirements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tilta.io/v1/invoices/{external_id}/services/{service_type}/requirements"
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/invoices/{external_id}/services/{service_type}/requirements",
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;
}[
{
"code": "INVOICE_INELIGIBLE",
"description": "<string>"
}
]{
"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"
}Platform & Utilities
Check service requirements
Verify that an invoice meets every prerequisite for a service type before requesting the Service.
GET
/
v1
/
invoices
/
{external_id}
/
services
/
{service_type}
/
requirements
List requirements for a service
curl --request GET \
--url https://api.tilta.io/v1/invoices/{external_id}/services/{service_type}/requirements \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tilta.io/v1/invoices/{external_id}/services/{service_type}/requirements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tilta.io/v1/invoices/{external_id}/services/{service_type}/requirements"
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/invoices/{external_id}/services/{service_type}/requirements",
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;
}[
{
"code": "INVOICE_INELIGIBLE",
"description": "<string>"
}
]{
"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"
}A Service is a financial product – financing, insurance, or collection – applied to a captured invoice. Before requesting one, call this endpoint to confirm the invoice satisfies the prerequisites for that service type.
Check requirements first rather than requesting a Service and handling the rejection. The response tells you which
prerequisite is outstanding and what to resolve.
Authorizations
Your Tilta API key, sent as Bearer <key>.
Path Parameters
Unique identifier of an invoice.
Maximum string length:
100Pattern:
^[a-zA-Z0-9-_]+$Available options:
FINANCING, INSURANCE, COLLECTION Response
Available options:
INVOICE_INELIGIBLE, FACILITY_MISSING, MERCHANT_NOT_ENROLLED, FACILITY_CURRENCY_CONFLICT, FACILITY_EXCEEDED_AVAILABLE_AMOUNT, FACILITY_EXPIRED, INVOICE_DUE_DATE_BIGGER_FACILITY_EXP_DATE, FROZEN_FACILITY, NO_ACTIVE_MANDATE, INVOICE_CURRENCY_NOT_SUPPORTED, INVOICE_PAYMENT_TERM_EXCEEDED, INVOICE_ISSUE_DATE_TOO_OLD, NO_INVOICE_FILE_FOUND, BUYER_CONTACT_REQUIRED, INVOICE_FILE_DATA_MISMATCH