Skip to content
Last updated

The Registration Authority API can send event notifications to a URL when request status changes. Each change triggers an HTTP POST to that URL with a JSON body. This is especially useful for VideoID flows (eIDAS and External) so your application is notified when the status moves from VIDEOPENDING to VIDEOREVIEW (or VIDEOINCOMPLETE, VIDEOERROR).

The webhook URL passed as a parameter in the API is for demo purposes. For production, contact your Uanataca officer to set the webhook URL in your RA configuration.

Callback payload

Each status change sends a JSON object. Example:

{
  "status": "VIDEOINCOMPLETE",
  "date": "2021-07-20T08:08:21.132394",
  "previous_status": "VIDEOPENDING",
  "request": 46760,
  "registration_authority": 455
}
FieldDescription
statusThe status that triggered the notification (most recent).
dateDate and time of the status change (datetime format).
previous_statusThe status immediately before the change.
requestRequest unique id.
registration_authorityRegistration Authority id the request is associated with.

Your endpoint should accept HTTP POST, read the JSON body, and return a successful HTTP status (e.g. 200).

Webhook URL format

The callback URL is the full address where your server receives POST requests, for example:

https://{host}/videoid

where {host} is the IP or domain of the server exposing the webhook.

Sample implementation (Python)

This example appends each received JSON to a file named status.json:

import web

urls = ('/videoid', 'videoid')
app = web.application(urls, globals())

class videoid:
    def POST(self):
        data = web.data()
        f = open("status.json", 'a+')
        f.write(data)
        f.close()
        return ''

if __name__ == "__main__":
    app.run()

Sample implementation (PHP)

<?php
$post = file_get_contents('php://input', true);
$file_handle = fopen('/videoid/status.json', 'w');
fwrite($file_handle, $post);
fclose($file_handle);
?>