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",
"cardNumber": "1234567890",
"consentAttestedAt": "2026-05-19T10:30:00Z",
"consentVersion": "1.0"
}'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
Fields vary by document type. Most types use givenName + familyName, but Medicare uses fullName, Centrelink uses name, and ASIC/MSIC uses nameOnCard. All requests require consentAttestedAt and consentVersion. See Document Types for full per-document schemas.
// Fields required on every request regardless of document type
interface ConsentFields {
consentAttestedAt: string; // ISO 8601 datetime — when subject gave consent
consentVersion: string; // Version of privacy disclosure shown to subject (e.g. "1.0")
}
// Driver's Licence
interface DriversLicenceRequest extends ConsentFields {
documentType: 'drivers_licence';
givenName: string; // max 20 chars
familyName: string; // max 40 chars
middleName?: string; // optional, max 20 chars
dateOfBirth: string; // YYYY-MM-DD
licenceNumber: string; // max 10 chars
stateOfIssue: 'NSW' | 'VIC' | 'QLD' | 'WA' | 'SA' | 'TAS' | 'ACT' | 'NT';
cardNumber: string; // required for all states, max 10 chars
}
// Passport
interface PassportRequest extends ConsentFields {
documentType: 'passport';
givenName?: string; // optional (single-name passports), max 31 chars
familyName: string; // max 31 chars
dateOfBirth: string; // YYYY, YYYY-MM, or YYYY-MM-DD
passportNumber: string; // 1-2 letters + 7 digits (e.g. PA1234567)
gender?: 'M' | 'F' | 'X';
}
// Medicare Card
interface MedicareRequest extends ConsentFields {
documentType: 'medicare';
fullName: string; // Name on card line 1, max 27 chars
fullName2?: string; // Name on card line 2, max 25 chars
fullName3?: string; // Name on card line 3, max 23 chars
fullName4?: string; // Name on card line 4, max 21 chars
medicareNumber: string; // 10 digits
individualReferenceNumber: number; // 1-9
cardColour: 'G' | 'B' | 'Y';
expiryDate: string; // YYYY-MM (Green) or YYYY-MM-DD (Blue/Yellow)
dateOfBirth?: string; // YYYY-MM-DD if provided
}
// Visa
interface VisaRequest extends ConsentFields {
documentType: 'visa';
givenName: string; // max 49 chars
familyName: string; // max 49 chars
dateOfBirth: string; // YYYY, YYYY-MM, or YYYY-MM-DD
passportNumber: string; // max 14 chars
countryOfIssue?: string; // ISO 3166-1 alpha-3 (optional)
}
// Birth Certificate
interface BirthCertificateRequest extends ConsentFields {
documentType: 'birth_certificate';
givenName?: string; // optional (single-name certificates), max 60 chars
familyName: string; // max 50 chars
dateOfBirth: string; // YYYY, YYYY-MM, or YYYY-MM-DD
certificateNumber?: string; // max 12 chars; required for ACT
registrationDate?: string; // YYYY-MM-DD
registrationNumber?: string; // max 10 chars (max 7 for NSW)
registrationState: 'NSW' | 'VIC' | 'QLD' | 'WA' | 'SA' | 'TAS' | 'ACT' | 'NT';
registrationYear?: number;
}
// Citizenship Certificate
interface CitizenshipRequest extends ConsentFields {
documentType: 'citizenship';
givenName?: string; // optional (single-name individuals), max 100 chars
familyName: string; // max 100 chars
dateOfBirth: string; // YYYY, YYYY-MM, or YYYY-MM-DD
stockNumber: string; // alphanumeric + forward slashes, max 11 (e.g. ACC123456)
acquisitionDate: string; // YYYY-MM-DD
}
// ImmiCard
interface ImmiCardRequest extends ConsentFields {
documentType: 'immicard';
givenName: string; // max 49 chars; use hyphen if no given name
familyName: string; // max 49 chars
dateOfBirth: string; // YYYY, YYYY-MM, or YYYY-MM-DD
immiCardNumber: string; // 3 uppercase letters + 6 digits (e.g. EAB123456)
}
// Marriage Certificate
interface MarriageCertificateRequest extends ConsentFields {
documentType: 'marriage_certificate';
givenName?: string; // Participant 1 given name, optional, max 60 chars
familyName: string; // Participant 1 family name, required, max 50 chars
givenName2?: string; // Participant 2 given name, optional, max 60 chars
familyName2: string; // Participant 2 family name, required, max 50 chars
dateOfMarriage: string; // YYYY-MM-DD
certificateNumber?: string; // max 11 chars; required for ACT
registrationDate?: string; // YYYY-MM-DD
registrationNumber?: string; // max 10 chars
registrationState: 'NSW' | 'VIC' | 'QLD' | 'WA' | 'SA' | 'TAS' | 'ACT' | 'NT';
registrationYear?: number;
}
// Change of Name Certificate
interface ChangeOfNameCertificateRequest extends ConsentFields {
documentType: 'change_of_name_certificate';
givenName?: string; // New given name, optional, max 60 chars
familyName: string; // New family name, required, max 50 chars
oldGivenName?: string; // Previous given name, optional, max 60 chars
oldFamilyName?: string; // Previous family name, optional, max 50 chars
dateOfBirth: string; // YYYY-MM-DD
certificateNumber?: string; // max 11 chars; required for ACT
registrationDate?: string; // YYYY-MM-DD
registrationNumber?: string; // max 10 chars
registrationState: 'NSW' | 'VIC' | 'QLD' | 'WA' | 'SA' | 'TAS' | 'ACT' | 'NT';
registrationYear?: number;
}
// Death Certificate
interface DeathCertificateRequest extends ConsentFields {
documentType: 'death_certificate';
givenName?: string; // optional, max 60 chars
familyName: string; // max 50 chars
dateOfDeath: string; // YYYY-MM-DD
certificateNumber?: string; // max 12 chars
registrationDate?: string; // YYYY-MM-DD
registrationNumber?: string; // max 10 chars (max 7 for NSW)
registrationState: 'NSW' | 'VIC' | 'QLD' | 'WA' | 'SA' | 'TAS' | 'ACT' | 'NT';
}
// Centrelink Concession Card
interface CentrelinkRequest extends ConsentFields {
documentType: 'centrelink';
name: string; // Name as printed on card, max 32 chars
customerReferenceNumber: string; // 9 digits + 1 letter (e.g. 123456789A)
dateOfBirth?: string; // YYYY-MM-DD if provided
cardExpiry: string; // YYYY-MM-DD
cardType: 'PCC' | 'HCC' | 'SHC';
}
// ASIC / MSIC
interface AsicMsicRequest extends ConsentFields {
documentType: 'asic_msic';
nameOnCard: string; // max 128 chars
dateOfBirth: string; // YYYY-MM-DD
cardNumber: string; // max 50 chars
cardExpiry: string; // YYYY-MM (month/year only)
cardType: 'ASIC' | 'MSIC';
}
// POST /v1/verify response — real-time DVS result
interface VerificationResponse {
success: boolean;
verificationId: string;
documentType: string;
status: 'success' | 'failed' | 'error'; // Y→success, N/D→failed, S→error
match: boolean;
responseCode: 'Y' | 'N' | 'D' | 'S';
message: string;
timestamp: string;
environment: 'live' | 'sandbox';
requestId: string;
errors?: Array<{ // Field-level errors from issuer (N/D with VersionNumber=2)
source: string;
field?: string;
message: string;
}>;
}
// GET /v1/verify/:id response — processing state only (match result not stored per T&Cs 12.5)
interface VerificationRecord {
verificationId: string;
documentType: string;
status: 'pending' | 'completed' | 'error';
environment: 'live' | 'sandbox';
requestedAt: string;
completedAt: string | null;
error?: { code: string; message: string };
}Need Help?
- Email: support@veroid.com.au
- Documentation: https://docs.veroid.com.au