This API is documented in OpenAPI v3.1 format. In addition to standard OpenAPI syntax few vendor extensions have been used.
Early Preview - Coming Soon!
NOTICE: This is still a DRAFT API Spec and subject to changes before going live.
prod
The digest is obtained by computing the SHA-256 digest of the request data arranged like so:
{method}&{path}?{query}&nonce=${nonce}×tamp=${timestamp}&{base64(body)}
If the request doesn't have any one particular element (e.g. no request body) then it is omitted, (including the preceding &
).
A request with no query
part would be {method}&{path}?nonce=${nonce}×tamp=${timestamp}&{base64(body)}
Depending on the endpoint, some of the initial path
segments must be dropped from the message (see this endpoint RSA Signed Requests note).
The signature is then obtained by signing the digest with the application RSA private key (using PKCS#1 v1.5).
The value of the header is the base64 encoded signature.
Responses
401 UnauthorizedResponse Schema: application/json
id | string | The request ID |
status | integer <int32> | The HTTP status code |
error | string [A-Z_]+ | The (application level) error code |
message | string | Human-readable error message |
The possible error
codes and their meaning:
INVALID_APP_ID |
The application with the specified ID does not exist |
INVALID_DIGEST |
The request signature is not valid |
MISSING_APP_ID |
The application ID was not included in the request |
MISSING_DIGEST |
The X-Yoti-Auth-Digest header was not included in the request |
MISSING_NONCE |
The nonce query parameter was not included in the request |
MISSING_TIMESTAMP |
The timestamp query parameter was not included in the request |
Response Schema: application/json
id | string | The request ID |
status | integer <int32> | The HTTP status code |
error | string [A-Z_]+ | The (application level) error code |
message | string | Human-readable error message |
The possible error
codes and their meaning:
DISABLED_APP |
The application is disabled |
SUSPENDED_ORG |
The organisation to which the application belongs is suspended |
Key | In | |
---|---|---|
X | Header |
The system uses API tokens which may either be acquired through an OAuth-compatible endpoint (using a JWT signed by the application's private key), or manually provisioned through Hub.
A simplified example of a request would look like:
POST /path/to/resource HTTP/2.0
Host: api.yoti.com
Authorisation: Bearer yta_UJCxUATErS890kAUaOMI7QA_IdESeScy2WKH
{ ... JSON request data here ... }
Key | In | |
---|---|---|
Authorization | Header |
Poa-v1
Endpoints for Proof of Age (PoA)
Verify Proof of Age
OK
Accepted
Bad Request
Server Error
Verify Proof of Age Result
OK
Not Found
Server Error
Webhooks
Verify Proof of Age Result Notification
This notification will be triggered when the result for Verify Proof of
Age is available and the original request included a notification
config
No Content
Your server implementation should return this HTTP status code if the data was received successfully (although any 2xx code will do)