Responses
When utilizing the Facia Verification API, anticipate receiving two distinct types of responses subsequent to a verification request. Initially, you'll receive an HTTP response tailored to your request, followed by a callback response. Both responses will be formatted in JSON and will include the header "application/json."
HTTP Status Codes:
Facia Verification API relies on traditional HTTP response codes to signify the outcome of an API request—whether it was successful or encountered an error. Each response is structured in JSON format alongside a corresponding HTTP status code.
Following is a list of HTTP codes that are generated in responses by Facia.
HTTP Code | HTTP Message | Message |
---|---|---|
200 | OK | Success |
201 | Created | Created |
400 | Bad Request | Bad Request: One or more parameters are invalid or missing |
401 | Unauthorized | Unauthorized: Invalid signature key provided in the request |
402 | Request Failed | Invalid request data: missing required parameters |
403 | Forbidden | Forbidden: Service not allowed |
404 | Not Found | Resource not found |
429 | Too Many Requests | Too Many Attempts |
500 | Server Error | Internal Server Error |
504 | Gateway Timeout | Server error |
524 | Timeout from Cloudflare | Unofficial Server Error |
Callback Events:
Multiple server-to-server calls are initiated to communicate updates on verification status to Facia’s clients. This functionality ensures that clients can maintain real-time updates on their end, even if the end-user's session is interrupted during the process.
Following are the events that are sent from our side to clients servers via their callback URL.
Event | Description |
---|---|
request.initiated | This event is returned when a verification is inititated. |
liveness.accepted | This event is returned when a verification is accepted. |
liveness.rejected | This event is returned when a verification is rejected. |