Peleza β€” Trust built on data
πŸ‡ΊπŸ‡¬ Uganda
On this page

National ID

Verify a Ugandan National ID or voter record. The default is a NIN lookup. For a voter lookup, send id_type=voter with first_name and last_name.

Test data

Sandbox test data

Use these values against the sandbox host. Click a value to copy it.

Sample NIN (fictional)
Sample voter number (fictional)

Request

POST/api/v1/id/ug
{{baseUrl}}/api/v1/id/ug
HeaderTypeDescription
AuthorizationstringBearer YOUR_ACCESS_TOKEN from the OAuth client-credentials flow
Content-Typestringapplication/json

Body Parameters

ParameterTypeDescriptionRequired
id_numberstringUgandan NIN (default) or voter number when id_type=voterrequired
id_typestring"nin" (default) or "voter"optional
first_namestringRequired when id_type=voterconditional
last_namestringRequired when id_type=voterconditional
consentbooleanMust be true β€” confirms data-subject consent to perform this verificationrequired
customer_numberstringOptional reference for your own tracking (max 255 characters)optional

NIN (default)

Sample request body for NIN (default):

Sample dataSample request body
{
  "id_number": "CM123456789AB",
  "consent": true
}

Sample response for NIN (default):

200 OKSample dataSample response
{
  "success": true,
  "response_code": 200,
  "message": "Uganda ID details fetched successfully",
  "country": "ug",
  "data": {
    "id_number": "CM123456789AB",
    "first_name": "John",
    "last_name": "Musa",
    "other_name": null,
    "name": "John Musa",
    "dob": "1992-04-10",
    "gender": "Male",
    "valid": true
  },
  "request_id": "550e8400-e29b-41d4-a716-446655440000"
}

id_type=voter

Sample request body for id_type=voter:

Sample dataSample request body
{
  "id_number": "87654321",
  "id_type": "voter",
  "first_name": "John",
  "last_name": "Musa",
  "consent": true
}

Sample response for id_type=voter:

200 OKSample dataSample response
{
  "success": true,
  "response_code": 200,
  "message": "Uganda ID details fetched successfully",
  "country": "ug",
  "data": {
    "id_number": "87654321",
    "first_name": "John",
    "last_name": "Musa",
    "other_name": null,
    "name": "John Musa",
    "dob": "1992-04-10",
    "gender": "Male",
    "valid": true,
    "voter_number": "87654321",
    "district": "Sample District",
    "constituency": "Sample Constituency",
    "polling_station": "Sample Polling Station"
  },
  "request_id": "550e8400-e29b-41d4-a716-446655440000"
}

Response Fields

FieldTypeDescription
successbooleanWhether the request succeeded
response_codenumberApplication response code (typically mirrors HTTP)
messagestringHuman-readable status message
dataobjectPayload for the verified resource
request_idstringUUID for support and audit trails
countrystringCountry code β€” always "ug" for this route
data.id_numberstringNIN or voter number
data.first_namestringGiven name
data.last_namestringSurname
data.other_namestringOther / middle name
data.namestringFull display name
data.dobstringDate of birth (YYYY-MM-DD)
data.genderstringGender
data.validbooleanWhether the ID is valid
data.voter_numberstringPresent on voter lookups
data.districtstringPresent on voter lookups
data.constituencystringPresent on voter lookups
data.polling_stationstringPresent on voter lookups

Error codes

Standard Peleza HTTP / response_code values (same across all API calls). Validation message text is endpoint-specific. Full reference: Error Codes.

CodeWhenBilled?
200Uganda ID details returned successfullyYes
400Validation β€” missing/invalid id_number, consent (must be true), or Uganda-specific fieldsNo
401Missing or invalid Bearer tokenNo
402Insufficient wallet balance or credit limitNo
403No active wallet or billing profile (or service not enabled)No
404Uganda ID not found β€” or unsupported countryYes for ID-not-found; No for unsupported country
408Upstream timeout / service errorNo
429Rate limitedNo
502Upstream bad or unreadable responseNo
503Upstream connection unavailableNo

400 β€” validation

400Sample data400 β€” validation
{
  "success": false,
  "response_code": 400,
  "message": "The first name field is required when id type is voter",
  "country": "ug",
  "errors": {
    "first_name": "The first name field is required when id type is voter"
  },
  "data": null,
  "request_id": "550e8400-e29b-41d4-a716-446655440010"
}

404 β€” ID not found

404Sample data404 β€” ID not found
{
  "success": false,
  "response_code": 404,
  "message": "Uganda ID not found",
  "description": "There is no information for requested search parameters",
  "country": "ug",
  "data": null,
  "request_id": "550e8400-e29b-41d4-a716-446655440013"
}

Set {{baseUrl}} to https://api.peleza.com (production) or https://sandbox.peleza.com (sandbox). Authenticated calls need a Bearer token from POST /api/v1/oauth/token.