Mehrere Einblicke verwenden
Bei der Verwendung der Identity Insights API können Benutzer mit einem einzigen API-Aufruf eine beliebige Kombination verschiedener Datensätze, die so genannten Insights, abrufen.
Die Identity Insights API ist über mehrere regionale Endpunkte verfügbar. Die Beispiele in diesem Leitfaden verwenden den EU-Endpunkt, aber Sie finden die vollständige Liste unter Technische Details.
Zum Beispiel gibt diese cURL-Anfrage sowohl die SIM-Swap- als auch die Subscriber-Match-Erkenntnisse zurück:
curl -X POST https://api-eu.vonage.com/v0.1/identity-insights \
-H "Authorization: Bearer $JWT" \
-H "Content-Type: application/json" \
-d '{
"phone_number": "3932462384260",
"purpose": "FraudPreventionAndDetection",
"insights": {
"sim_swap": {
"period": 240
},
"subscriber_match": {
"id_document": "66666666q",
"name": "Federica Sanchez Arjona",
"given_name": "Federica",
"family_name": "Sanchez Arjona",
"address": "101 Crawfords Corner Road Ste 2416",
"street_name": "Crawfords Corner Road",
"street_number": "101",
"postal_code": "07733",
"country": "US",
"house_number_extension": "Suite 2416",
"birthdate": "1978-08-22",
}
}
}'
Die Antwort enthält dann die Ergebnisse der beiden Einsichtsanträge in der insights Objekt:
{
"request_id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab",
"insights": {
"sim_swap": {
"latest_sim_swap_at": "2024-07-08T09:30:27.504Z",
"is_swapped": true,
"status": {
"code": "NO_COVERAGE",
"message": "Success"
}
},
"subscriber_match": {
"id_document_match": "EXACT",
"name_match": "HIGH",
"given_name_match": "DATA_UNAVAILABLE",
"family_name_match": "DATA_UNAVAILABLE",
"address_match": "EXACT",
"street_name_match": "EXACT",
"street_number_match": "EXACT",
"postal_code_match": "EXACT",
"country_match": "EXACT",
"birthdate_match": "NONE",
"status": {
"code": "PARTIAL_SUCCESS",
"message": "Unable to retrieve data for some fields."
}
}
}
}
In ähnlicher Weise gibt dieser API-Aufruf die Erkenntnisse über das Format, den aktuellen Anbieter und die Standortüberprüfung zurück:
curl -X POST https://api-eu.vonage.com/v0.1/identity-insights \
-H "Authorization: Bearer $JWT" \
-H "Content-Type: application/json" \
-d '{
"phone_number": "3932462384260",
"purpose": "FraudPreventionAndDetection",
"insights": {
"format": {},
"current_carrier": {},
"location_verification": {
"location": {
"type": "CIRCLE",
"radius": 3000,
"center": {
"latitude": -90,
"longitude": -180
}
}
}
}
}'
Die Antwort enthält dann die Ergebnisse aller Einblicke in die insights Objekt:
{
"request_id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab",
"insights": {
"format": {
"country_code": "US",
"country_name": "United States",
"country_prefix": "1",
"offline_location": "Georgia",
"time_zones": [
"America/New_York"
],
"number_international": "+14040000000",
"number_national": "(404) 000-0000",
"is_format_valid": true,
"status": {
"code": "NO_COVERAGE",
"message": "Success"
}
},
"current_carrier": {
"name": "Orange Espana, S.A. Unipersonal",
"network_type": "MOBILE",
"country_code": "ES",
"network_code": "21403",
"status": {
"code": "NO_COVERAGE",
"message": "Success"
}
},
"location_verification": {
"is_verified": "TRUE",
"latest_location_at": "2024-07-08T09:30:27.504Z",
"match_rate": 1,
"status": {
"code": "NO_COVERAGE",
"message": "Success"
}
}
}
}