Comprehensive guide for CRIF API integration with smart database caching and UUID tracking
The CRIF API endpoints feature intelligent database caching with UUID-based tracking that allows multiple clients to request the same tax_id independently while avoiding duplicate processing.
tax_id with optional uuid to create a new requestuuid to check the status of an existing request| Status Code | Meaning | Description |
|---|---|---|
| 200 | Completed | Existing completed report returned with PDF and JSON data |
| 202 | Processing | Report is being processed or new request created |
| 400 | Bad Request | Missing or invalid request data |
| 404 | Not Found | UUID not found in database |
| 500 | Server Error | Internal server error occurred |
http://localhost:5000
application/json
POST
Use UUIDs to track multiple requests for the same tax_id. This allows different clients to monitor their specific requests independently.
Retrieve credit reports for Italian companies using their VAT number (Partita IVA) with smart UUID-based tracking.
| Field | Type | Required | Description |
|---|---|---|---|
tax_id |
String | New Requests | Italian VAT number (Partita IVA) - 11 digits |
uuid |
String | Optional | Client-provided UUID for tracking multiple requests |
{
"tax_id": "11423251005",
"uuid": "my-unique-id-123"
}
Creates new request with optional UUID tracking
{
"uuid": "my-unique-id-123"
}
Check status of existing request using UUID only
{
"success": true,
"report_id": 18,
"uuid": "my-unique-id-123",
"status": "completed",
"message": "Report completed - returning data",
"data": {
"pdf_available": true,
"json_data": "...",
"pdf_url": "/serve_pdf/18",
"created_at": "2025-08-12T18:24:42.850040",
"completed_at": "2025-08-12T18:26:20.989681"
}
}
{
"success": true,
"report_id": 19,
"uuid": "my-unique-id-123",
"status": "processing",
"message": "Report is currently being processed",
"data": {
"pdf_available": false,
"external_request_id": "4983a0be-9e24-41d2-b2b3-f4d2b6ea14f4",
"created_at": "2025-08-13T12:21:28.394956"
}
}
{
"error": "No request found for provided UUID"
}
Retrieve credit reports for Italian individuals using their fiscal code (Codice Fiscale) with smart UUID-based tracking.
| Field | Type | Required | Description |
|---|---|---|---|
tax_id |
String | New Requests | Italian fiscal code (Codice Fiscale) - 16 characters |
uuid |
String | Optional | Client-provided UUID for tracking multiple requests |
{
"tax_id": "RSSMRA85M01H501Z",
"uuid": "client-tracking-456"
}
Creates new request with optional UUID tracking
{
"uuid": "client-tracking-456"
}
Check status of existing request using UUID only
{
"success": true,
"report_id": 15,
"uuid": "client-tracking-456",
"status": "completed",
"message": "Report completed - returning data",
"data": {
"pdf_available": true,
"json_data": "...",
"pdf_url": "/serve_pdf/15",
"created_at": "2025-08-12T15:30:15.123456",
"completed_at": "2025-08-12T15:31:20.789012"
}
}
{
"success": true,
"report_id": 20,
"uuid": "client-tracking-456",
"status": "processing",
"message": "Report is currently being processed",
"data": {
"pdf_available": false,
"external_request_id": "133ac7b4-83b5-458b-8f13-c8203abc04cf",
"created_at": "2025-08-13T12:36:15.360007"
}
}
{
"error": "No request found for provided UUID"
}
{
"error": "Fiscal code must be exactly 16 characters"
}
Retrieve comprehensive business reports for Italian companies through the A2A SOAP API with smart UUID-based tracking.
| Field | Type | Required | Description |
|---|---|---|---|
vat_number |
String | New Requests | Italian VAT number (Partita IVA) - 11 digits |
uuid |
String | Optional | Client-provided UUID for tracking multiple requests |
name |
String | New Requests | Company name or business name |
street |
String | New Requests | Street address of the business |
municipality |
String | New Requests | Municipality/City name |
province |
String | New Requests | Province code (2 letters, e.g., MI, RM) |
postal_code |
String | New Requests | 5-digit postal code (CAP) |
{
"vat_number": "01613510161",
"uuid": "a2a-biz-tracking-789",
"name": "Example Company SRL",
"street": "Via Roma 123",
"municipality": "Milano",
"province": "MI",
"postal_code": "20100"
}
Creates new A2A business request with UUID tracking
{
"uuid": "a2a-biz-tracking-789"
}
Check status of existing A2A business request using UUID only
{
"success": true,
"report_id": 25,
"uuid": "a2a-biz-tracking-789",
"status": "completed",
"message": "Report completed - returning data",
"data": {
"created_at": "2025-08-14T16:26:18.028560",
"external_request_id": "ir-code-456",
"jsonreport": {...}, // Full A2A JSON report data
"pdf": "base64encodedpdfstring...", // PDF in base64
"completed_at": "2025-08-14T16:30:45.123456"
}
}
{
"success": true,
"report_id": 26,
"uuid": "a2a-biz-tracking-789",
"status": "processing",
"message": "New A2A business report request created successfully",
"data": {
"pdf_available": false,
"external_request_id": "ir-code-456",
"created_at": "2025-08-14T16:26:18.028560"
}
}
{
"error": "No request found for provided UUID"
}
{
"error": "vat_number is required for new requests"
}
Retrieve comprehensive individual credit reports for Italian consumers through the A2A SOAP API with smart UUID-based tracking.
| Field | Type | Required | Description |
|---|---|---|---|
fiscal_code |
String | New Requests | Italian fiscal code (Codice Fiscale) - 16 characters |
uuid |
String | Optional | Client-provided UUID for tracking multiple requests |
first_name |
String | New Requests | Individual's first name |
last_name |
String | New Requests | Individual's last name |
gender |
String | New Requests | Gender (M for Male, F for Female) |
birth_date |
String | New Requests | Birth date in YYYY-MM-DD format |
street |
String | New Requests | Street address |
municipality |
String | New Requests | Municipality/City name |
province |
String | New Requests | Province code (2 letters, e.g., MI, RM) |
postal_code |
String | New Requests | 5-digit postal code (CAP) |
{
"fiscal_code": "FLRMTT96T23L746S",
"uuid": "a2a-consumer-101",
"first_name": "MATTEO",
"last_name": "FLORIDDIA",
"gender": "M",
"birth_date": "1996-12-23",
"street": "Via Roma 123",
"municipality": "Roma",
"province": "RM",
"postal_code": "00100"
}
Creates new A2A consumer request with UUID tracking
{
"uuid": "a2a-consumer-101"
}
Check status of existing A2A consumer request using UUID only
{
"success": true,
"report_id": 30,
"uuid": "a2a-consumer-101",
"status": "completed",
"message": "Report completed - returning data",
"data": {
"created_at": "2025-08-14T16:26:18.028560",
"external_request_id": "ir-code-789",
"jsonreport": {...}, // Full A2A JSON consumer report
"pdf": "base64encodedpdfstring...", // PDF in base64
"completed_at": "2025-08-14T16:30:45.123456"
}
}
{
"success": true,
"report_id": 31,
"uuid": "a2a-consumer-101",
"status": "processing",
"message": "New A2A consumer report request created successfully",
"data": {
"pdf_available": false,
"external_request_id": "ir-code-789",
"created_at": "2025-08-14T16:26:18.028560"
}
}
{
"error": "No request found for provided UUID"
}
{
"error": "gender must be M or F"
}
// Create new CRIF company report with UUID
const response = await fetch('/api/crif/company', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"tax_id": "01613510161",
"uuid": "my-unique-client-id-123"
})
});
const result = await response.json();
console.log(result);
// Response (202 - Processing):
// {
// "success": true,
// "report_id": 68,
// "uuid": "my-unique-client-id-123",
// "status": "processing",
// "message": "New company report request created successfully",
// "data": {
// "pdf_available": false,
// "external_request_id": "e2d8bd50-e3f6-4aff-99a7-5acd8ab88ff0",
// "created_at": "2025-08-14T16:26:18.028560"
// }
// }
// Check status using only UUID
const statusResponse = await fetch('/api/crif/company', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"uuid": "my-unique-client-id-123"
})
});
const statusResult = await statusResponse.json();
console.log(statusResult);
// Response when completed (200):
// {
// "success": true,
// "report_id": 68,
// "uuid": "my-unique-client-id-123",
// "status": "completed",
// "message": "Report completed - returning data",
// "data": {
// "created_at": "2025-08-14T16:26:18.028560",
// "external_request_id": "e2d8bd50-e3f6-4aff-99a7-5acd8ab88ff0",
// "jsonreport": {...}, // Full JSON report data
// "pdf": "base64encodedpdfstring...", // PDF in base64
// "completed_at": "2025-08-14T16:28:45.123456"
// }
// }
curl -X POST http://your-domain.com/api/crif/company \
-H "Content-Type: application/json" \
-d '{
"tax_id": "01613510161",
"uuid": "my-unique-client-id-123"
}'
curl -X POST http://your-domain.com/api/crif/company \
-H "Content-Type: application/json" \
-d '{
"uuid": "my-unique-client-id-123"
}'
import requests
import time
import json
# Create new request
response = requests.post('http://your-domain.com/api/crif/company',
json={
"tax_id": "01613510161",
"uuid": "my-unique-client-id-123"
})
result = response.json()
print("Initial Response:", result)
if result.get('success'):
uuid = result.get('uuid')
# Poll for completion
while True:
status_response = requests.post('http://your-domain.com/api/crif/company',
json={"uuid": uuid})
status_result = status_response.json()
if status_result.get('status') == 'completed':
print("Report completed!")
pdf_base64 = status_result['data']['pdf']
json_data = status_result['data']['jsonreport']
# Save PDF
import base64
with open(f'report_{uuid}.pdf', 'wb') as f:
f.write(base64.b64decode(pdf_base64))
# Save JSON
with open(f'report_{uuid}.json', 'w') as f:
json.dump(json_data, f, indent=2)
break
elif status_result.get('status') == 'processing':
print("Still processing, waiting...")
time.sleep(30)
else:
print("Error:", status_result)
break
// CRIF Individual Report - New Request
const response = await fetch('/api/crif/individual', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"tax_id": "FLRMTT96T23L746S",
"uuid": "individual-request-456"
})
});
// Check status later with UUID only
const statusResponse = await fetch('/api/crif/individual', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"uuid": "individual-request-456"
})
});
import requests
# Create individual report request
response = requests.post('http://your-domain.com/api/crif/individual',
json={
"tax_id": "FLRMTT96T23L746S",
"uuid": "individual-request-456"
})
print(response.json())
// Create new A2A business report
const response = await fetch('/api/a2a/business', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"vat_number": "01613510161",
"uuid": "a2a-business-uuid-789",
"name": "Example Company SRL",
"street": "Via Roma 123",
"municipality": "Milano",
"province": "MI",
"postal_code": "20100"
})
});
const result = await response.json();
console.log(result);
// Check status using only UUID
const statusResponse = await fetch('/api/a2a/business', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"uuid": "a2a-business-uuid-789"
})
});
const statusResult = await statusResponse.json();
console.log(statusResult);
// Create new A2A business report
const response = await fetch('/api/a2a/business', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"vat_number": "01613510161",
"uuid": "a2a-business-uuid-789",
"name": "Example Company SRL",
"street": "Via Roma 123",
"municipality": "Milano",
"province": "MI",
"postal_code": "20100"
})
});
const result = await response.json();
console.log(result);
// Check status using only UUID
const statusResponse = await fetch('/api/a2a/business', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"uuid": "a2a-business-uuid-789"
})
});
const statusResult = await statusResponse.json();
console.log(statusResult);
curl -X POST http://your-domain.com/api/a2a/business \
-H "Content-Type: application/json" \
-d '{
"vat_number": "01613510161",
"uuid": "a2a-business-uuid-789",
"name": "Example Company SRL",
"street": "Via Roma 123",
"municipality": "Milano",
"province": "MI",
"postal_code": "20100"
}'
curl -X POST http://your-domain.com/api/a2a/business \
-H "Content-Type: application/json" \
-d '{
"uuid": "a2a-business-uuid-789"
}'
{
"success": true,
"report_id": 26,
"uuid": "a2a-business-uuid-789",
"status": "processing",
"message": "New A2A business report request created successfully",
"data": {
"pdf_available": false,
"external_request_id": "ir-code-456",
"created_at": "2025-08-14T16:26:18.028560"
}
}
import requests
# Create new A2A business report
response = requests.post('http://your-domain.com/api/a2a/business',
json={
"vat_number": "01613510161",
"uuid": "a2a-business-uuid-789",
"name": "Example Company SRL",
"street": "Via Roma 123",
"municipality": "Milano",
"province": "MI",
"postal_code": "20100"
})
result = response.json()
print("Initial Response:", result)
# Check status later
status_response = requests.post('http://your-domain.com/api/a2a/business',
json={"uuid": "a2a-business-uuid-789"})
print("Status Response:", status_response.json())
// Create new A2A consumer report
const response = await fetch('/api/a2a/consumer', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"fiscal_code": "FLRMTT96T23L746S",
"uuid": "a2a-consumer-uuid-101",
"first_name": "MATTEO",
"last_name": "FLORIDDIA",
"gender": "M",
"birth_date": "1996-12-23",
"street": "Via Roma 123",
"municipality": "Roma",
"province": "RM",
"postal_code": "00100"
})
});
const result = await response.json();
console.log(result);
// Check status using only UUID
const statusResponse = await fetch('/api/a2a/consumer', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"uuid": "a2a-consumer-uuid-101"
})
});
const statusResult = await statusResponse.json();
console.log(statusResult);
curl -X POST http://your-domain.com/api/a2a/consumer \
-H "Content-Type: application/json" \
-d '{
"fiscal_code": "FLRMTT96T23L746S",
"uuid": "a2a-consumer-uuid-101",
"first_name": "MATTEO",
"last_name": "FLORIDDIA",
"gender": "M",
"birth_date": "1996-12-23",
"street": "Via Roma 123",
"municipality": "Roma",
"province": "RM",
"postal_code": "00100"
}'
curl -X POST http://your-domain.com/api/a2a/consumer \
-H "Content-Type: application/json" \
-d '{
"uuid": "a2a-consumer-uuid-101"
}'
{
"success": true,
"report_id": 31,
"uuid": "a2a-consumer-uuid-101",
"status": "processing",
"message": "New A2A consumer report request created successfully",
"data": {
"pdf_available": false,
"external_request_id": "ir-code-789",
"created_at": "2025-08-14T16:26:18.028560"
}
}
{
"success": true,
"report_id": 31,
"uuid": "a2a-consumer-uuid-101",
"status": "completed",
"message": "Report completed - returning data",
"data": {
"created_at": "2025-08-14T16:26:18.028560",
"external_request_id": "ir-code-789",
"jsonreport": {...},
"pdf": "base64encodedpdfstring...",
"completed_at": "2025-08-14T16:30:45.123456"
}
}
import requests
# Create new A2A consumer report
response = requests.post('http://your-domain.com/api/a2a/consumer',
json={
"fiscal_code": "FLRMTT96T23L746S",
"uuid": "a2a-consumer-uuid-101",
"first_name": "MATTEO",
"last_name": "FLORIDDIA",
"gender": "M",
"birth_date": "1996-12-23",
"street": "Via Roma 123",
"municipality": "Roma",
"province": "RM",
"postal_code": "00100"
})
result = response.json()
print("Initial Response:", result)
# Check status later
status_response = requests.post('http://your-domain.com/api/a2a/consumer',
json={"uuid": "a2a-consumer-uuid-101"})
print("Status Response:", status_response.json())
Recommended integration patterns and workflows for different use cases.
POST /api/crif/company
{
"tax_id": "11423251005",
"uuid": "client-session-123"
}
POST /api/crif/company
{
"uuid": "client-session-123"
}
{
"tax_id": "11423251005",
"uuid": "client-a-uuid"
}
{
"tax_id": "11423251005",
"uuid": "client-b-uuid"
}
requests = [
{"tax_id": "11111111111", "uuid": "batch-1"},
{"tax_id": "22222222222", "uuid": "batch-2"},
{"tax_id": "33333333333", "uuid": "batch-3"}
]
for request in requests:
submit_request(request)
uuids = ["batch-1", "batch-2", "batch-3"]
while pending_uuids:
for uuid in pending_uuids:
status = check_status(uuid)
if status == "completed":
pending_uuids.remove(uuid)
process_result(uuid)
def retry_with_backoff(func, max_retries=3):
for attempt in range(max_retries):
try:
return func()
except Exception as e:
if attempt == max_retries - 1:
raise e
time.sleep(2 ** attempt) # Exponential backoff