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
    }
  ]
}
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

projectId
string
required
The ID of the project to get verifications for
range
string
required
The time range to get verifications for (last hour, day, week, month, or 3 months)
customerId
string
The ID of the customer to get verifications for (optional)

Response

verifications
array
required
Array of verification data points
verifications[].projectId
string
required
The ID of the project
verifications[].customerId
string
The ID of the customer
verifications[].featureSlug
string
required
The slug of the feature
verifications[].count
number
required
The total number of verifications
verifications[].success
number
required
The number of successful verifications
verifications[].failure
number
required
The number of failed verifications