SDKs & Libraries
Code examples for VeroID integration
While VeroID has a simple REST API that works with any HTTP client, here are examples in popular languages.
cURL
curl -X POST https://api.veroid.com.au/v1/verify \
-H "Content-Type: application/json" \
-H "X-API-Key: $VEROID_API_KEY" \
-d '{
"documentType": "drivers_licence",
"givenName": "John",
"familyName": "Smith",
"dateOfBirth": "1990-01-15",
"licenceNumber": "12345678",
"stateOfIssue": "NSW"
}'JavaScript / TypeScript
async function verifyDocument(data) {
const response = await fetch('https://api.veroid.com.au/v1/verify', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': process.env.VEROID_API_KEY,
},
body: JSON.stringify(data),
});
return response.json();
}Python
import requests
import os
def verify_document(data):
response = requests.post(
'https://api.veroid.com.au/v1/verify',
headers={
'Content-Type': 'application/json',
'X-API-Key': os.environ['VEROID_API_KEY'],
},
json=data,
)
return response.json()Next.js API Route
// app/api/verify/route.ts
import { NextResponse } from 'next/server';
export async function POST(request) {
const data = await request.json();
const response = await fetch('https://api.veroid.com.au/v1/verify', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': process.env.VEROID_API_KEY,
},
body: JSON.stringify(data),
});
const result = await response.json();
return NextResponse.json(result);
}TypeScript Types
interface VerificationRequest {
documentType: 'drivers_licence' | 'passport' | 'medicare' |
'visa' | 'birth_certificate' | 'citizenship';
givenName: string;
familyName: string;
middleName?: string;
dateOfBirth: string; // YYYY-MM-DD
}
interface VerificationResponse {
success: boolean;
verificationId: string;
documentType: string;
status: 'success' | 'failed' | 'error';
match: boolean;
responseCode: string;
message: string;
timestamp: string;
environment: 'live' | 'sandbox';
}Need Help?
- Email: support@veroid.com.au
- Documentation: https://docs.veroid.com.au