const { result, error } = await unprice.analytics.getVerifications({
projectId: "project_1234567890",
range: "24h",
customerId: "cus_1234567890" // optional
});
if (error) {
// handle potential network or bad request error
// a link to our docs will be in the `error.docs` field
console.error(error.message);
return;
}
console.log(result);
{
"verifications": [
{
"projectId": "project_1234567890",
"customerId": "cus_1234567890",
"featureSlug": "feature_1",
"count": 100,
"success": 90,
"failure": 10
}
]
}
Request
The ID of the project to get verifications for
The time range to get verifications for (last hour, day, week, month, or 3 months)
The ID of the customer to get verifications for (optional)
Response
Array of verification data points
verifications[].projectId
The ID of the project
verifications[].customerId
The ID of the customer
verifications[].featureSlug
The slug of the feature
The total number of verifications
The number of successful verifications
The number of failed verifications