OPERA Cloud ID document scanning, explained
OPERA Cloud runs in a browser and can’t drive a front-desk scanner directly. Oracle’s spec reverses the usual direction: the third party provides a scanning service, OPERA Cloud calls it, and the extracted ID data goes into the profile or reservation. The spec has a desktop path and a mobile path.
- OPERA version
- OPERA Cloud 20.2 and later
- Direction
- OPERA Cloud → third-party service
- Format
- JSON (UTF-8)
- Spec revision
- September 2023
- Lab status
- Spec research
Lab status
This page is spec research on Oracle’s published specification; we have not yet verified it end to end on an OPERA Cloud instance. The specification is Oracle’s copyright; this is our interpretation.
Two paths
| Desktop scanning | Mobile scanning | |
|---|---|---|
| Hardware | Scanner attached to the front-desk PC | The device’s own camera |
| Vendor provides | A local micro web service on the PC | A cloud (or on-premise) REST API |
| How OPERA Cloud calls it | Browser sends GET /scan to the local service | POST /client-register for a token, then POST /scan with a Base64 image |
| Authentication | None of its own; relies on local domain and certificate | Account + secret + ApiKey exchanged for an access token valid for at most one year |
Desktop: three jobs for the local service
- Domain and certificate: the installer appends a domain pointing to the local machine to the hosts file (IPv4 and IPv6) with a matching SSL certificate. It must not overwrite the whole hosts file.
- CORS: responses must carry CORS headers allowing the OPERA Cloud domain, or the browser blocks them.
- Response format: JSON per the spec, including document type, names (including native-script names), gender, birth date, nationality, document number, issue and expiry dates, portrait and full document images (Base64 JPEG), result code and so on.
Mobile: two cloud APIs
- Client registration: OPERA Cloud calls it with the account, secret and ApiKey issued by the vendor and receives an access token.
- Scan: OPERA Cloud photographs the document, sends the Base64 image with the token, and the API extracts data from the machine-readable zone and returns the same JSON. An expired token must get
401.
The spec is explicit that security, privacy and local regulatory compliance for ID data are the vendor’s responsibility.
Practical notes
- Local IDs: Chinese ID cards and travel permits have no standard MRZ; they need a card reader or a dedicated OCR model.
- Self-hosted OCR: the mobile scan API can be deployed on-premise, which suits open-source document recognition models running inside the hotel network so ID images never leave it.
- Police registration: scanning is only step one; hotels in China must also upload guest data to the police registration system, which is outside Oracle’s spec.
FAQ
Is this an OHIP REST API?
Not exactly. With OHIP a third party calls OPERA Cloud; ID scanning is the other way round. OPERA Cloud calls a service the vendor provides, and the spec only defines its shape. It sits in the OHIP section because it is also an OPERA Cloud integration.
Does it work with Chinese national ID cards?
The spec has a generic
ID document type and the response fields can carry the data. But the spec assumes MRZ-based extraction; national ID cards need a card reader or OCR on the vendor side, returning the result in the spec’s format.