Skip to main content
For engineers and analysts. Once baselayer.js is running, the acceptance API answers what agents did at your site: every visit, each visit’s timeline and decisions, and every decision across visits.

What You Can Learn

Your developer can pull these into your analytics tool.

Authenticating

Send your API key in the X-API-Key header, as for every Baselayer request. See Authentication. The visits reads need the acceptance_visits:read permission, and the decisions reads need acceptance_decisions:read. Every read answers for the application your key belongs to: a sandbox key reads your sandbox application, and a production key reads your production application. You never pass an application ID.

Lists and Pages

Every list returns a bare JSON array, a page at a time. Each page carries these headers: Use cursor to walk a long list: a page never skips or repeats a record when new visits arrive.

Dates and Time Zones

The visits list and the decisions list take a date range: A visit is read on the day it started, and a decision on the day it was decided.

Freshness and Retries

Visits are rebuilt about once a minute, so a visit, its timeline and its decisions show a record about a minute after it is reported. When the acceptance data cannot be read for a moment, a read answers 503 with a Retry-After header and this body. Wait that many seconds and send the request again.
Branch your code on type. message is for people to read.

List Your Visits

A visit is one visitor’s run of records at your site, until 30 minutes pass without one. Visits are newest first by default (sort=started_at, or sort=last_seen_at). Filters take one value or several (identity_level=L2&identity_level=L3): visitor_type, trust_level, claim, agent_platform, agent_name, identity_level, active_key, key_thumbprint, credential_id, subject, attestation_type, state and transport, as well as the date range. Values of one filter match any of them, and different filters must all match. identity_level, active_key, credential_id and subject look at KYA credentials the visit presented that Baselayer verified: active_key finds visits whose credentials hold a key such as email_possession.
identity is who the visitor is, as far as the evidence goes: journey lists the pages a visit viewed and the requests it made, up to the first 20 templates, and is null for a visit with neither. detection is what browser detection made of the visit, and is null before any detection result.

Get One Visit

GET /acceptance/visits/{visit_id} returns the visit with each attestation in full, including the consumer a Visa TAP signature named, and detection’s whole read: its score history, the behaviours it observed, the network and device it saw and how it recognized the visitor across visits.

Attestations

An attestation is one proof a visitor presented, and each has a type: All three carry status, checked_at and key_thumbprint. status is verified, invalid or unverified, and key_thumbprint is the key it was checked with, null unless it verified. An invalid attestation carries a failure_reason that says why it was refused. A baselayer attestation adds the credential’s credential_id, subject, identity_level, credential_type, scope, active_keys and disclosed fields. subject is the credential’s sub: the same site-specific customer ID your credential check sees, so you can match a visit to your customer. See Matching Customers. A web_bot_auth attestation adds the signer, and a visa_tap one its intent.

Read a Visit’s Timeline

GET /acceptance/visits/{visit_id}/timeline lists what happened, oldest first (sort=occurred_at, sort_direction=asc; ties break on record_id). Each item’s type says what it is. Filter with type, which you can repeat.
A decision on a timeline item is brief: its decision_id, outcome, enforcement_mode, merchant_outcome, step, rule and reasons. rule is null when the step’s fallback decided. merchant_outcome is null for a browser check.

Read a Visit’s Decisions

GET /acceptance/visits/{visit_id}/decisions lists every decision made during the visit, newest first (sort=decided_at, sort_direction=desc; ties break on the decision’s ID), in full. Filter with step and outcome. This read needs the acceptance_decisions:read permission.
outcome is what the policy recommended: allow, step_up or block. enforcement_mode is monitor or enforce. merchant_outcome is what your site then did, and null for a browser check. policy names the version and rule that decided: rule is null when the step’s fallback did. On a step_up, requirement is what the rule asked for and missing_keys the keys the credential lacked. On an allow, requirement is what the visitor’s credential met. evidence has one entry for each reader that contributed, such as the credential check or the network ranges, with what it saw. sdk is null for a browser check.

List All Decisions

GET /acceptance/decisions lists every decision at your application across visits, in the same shape and order as a visit’s decisions, and needs acceptance_decisions:read. Filter with step, outcome, visitor_type, trust_level, visit_id and the date range. GET /acceptance/decisions/{decision_id} returns one.

Reading Identity Levels

A baselayer attestation’s identity_level, and the identity_level filter, run from L1 to L3: A KYA credential’s level comes from the keys it holds, as Set Your Rules shows. identity_level is null on an attestation whose credential meets no level.