Skip to main content

Fraud

fraud-analyze

POST /fraud/analyze

Analyze a transaction for fraud

Send object with transaction parameters to the fraud endpoint

Parameters

NameInTypeRequiredDescription
x-api-keyheaderstringfalseAPI Authentication Key
bodybodyFraudAnalysisRequestfalseTransaction details object

Body parameter

{
"sessionToken": "string",
"productToken": "string",
"email": "user@example.com",
"phoneNumber": "string",
"phoneCountry": "string",
"ipAddress": "string",
"billingCountry": "string",
"billingZip": "string"
}

Example responses

200 Response

{
"score": 0,
"status": "pass",
"cacheKey": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKFraud analysis results objectFraudAnalysisResponse
500Internal Server ErrorAn error messageErrorResponse

Code samples

"""
Python Code Snippet
"""
import requests

headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-api-key': 'string'
}

r = requests.post('https://data.autohost.ai/v1/fraud/analyze', headers=headers)

print(r.json())

/*
TypeScript Code Snippet
*/

import fetch from 'node-fetch';
const inputBody = {
"sessionToken": "string",
"productToken": "string",
"email": "user@example.com",
"phoneNumber": "string",
"phoneCountry": "string",
"ipAddress": "string",
"billingCountry": "string",
"billingZip": "string"
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'x-api-key':'string'
};

const response = await fetch('https://data.autohost.ai/v1/fraud/analyze', {
method: 'post',
body: JSON.stringify(inputBody),
headers,
});
const responseJson = await response.json();
console.log(responseJson);