Welcome to the developer documentation for our Terminals.
The retail experience is all about customer personalisation and independence. With Yoti, customers can prove their age on their own - both online and in person. This means reduced wait times and a frictionless shopping experience.
This documentation is targeted towards integrations relating to non-browser-based clients and ePOS terminals. It includes the following:
- Age estimation
- Anti-spoofing
- Face capture module
You can integrate the service by using:
- Our SDK's
- API. Please see the API reference section.
Please contact us if you need any guidance or information on Terminal Integrations generally.
Install the SDK
To simplify the integration process, Yoti provides SDKs to integrate with our API. These are available via popular dependency management systems.
npm install -S -E yotiCreate a request
Once you have added the Yoti SDK dependency to your project, you can use it to build and send your request. See the code snippets below for examples.
const PATHS = { AGE_LIVENESS: '/age-antispoofing',};const data = { img: 'base64img',};const request = new RequestBuilder() .withBaseUrl('https://api.yoti.com/ai/v1/self-checkout') .withPemFilePath('<YOTI_KEY_FILE_PATH>') .withEndpoint(PATHS.AGE_LIVENESS) .withPayload(new Payload(data)) .withMethod('POST') .withHeader('X-Yoti-Auth-Id', '<YOTI_CLIENT_SDK_ID>') .withHeader('Terminal-Id', '<TERMINAL_ID>') .withHeader('Session-Id', '<SESSION_ID>') // Optional .build();const response = request.execute();Headers are provided to the request to allow Yoti to track error responses coming from a particular machine. In order to do this, the following headers should be applied:
| Header | Description |
|---|---|
| Terminal-Id | Unique ID per machine. Mandatory for non-browser integrations. |
| Session-Id | May be provided to demonstrate multiple attempts are from a single user transaction. |
Retrieve Results
The endpoint will return the Anti-spoofing result alongside Age estimation.
{ "antispoofing": { "prediction": "real | fake" }, "age": { "st_dev": float, "age": float }}