Peleza β€” Trust built on data
πŸ‡¬πŸ‡­ Ghana
On this page

Ghana Card / Voter ID

Verify a Ghana Card or voter ID. Ghana Card (default) requires a Personal ID in GHA-#########-# format; document numbers are not accepted. Send id_type=voter to look up a voter ID.

Test data

Sandbox test data

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

Sample Ghana Card (fictional)
Sample voter number (fictional)

Request

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

Body Parameters

ParameterTypeDescriptionRequired
id_numberstringGhana Card Personal ID (default) or voter number when id_type=voterrequired
id_typestring"card" (default) or "voter"optional
full_namestringOptional for voter lookupsoptional
is_new_idbooleanOptional Ghana flag echoed in the responseoptional
consentbooleanMust be true β€” confirms data-subject consent to perform this verificationrequired
customer_numberstringOptional reference for your own tracking (max 255 characters)optional

Ghana Card (default)

Sample request body for Ghana Card (default):

Sample dataSample request body
{
  "id_number": "GHA-123456789-0",
  "consent": true
}

Sample response for Ghana Card (default):

200 OKSample dataSample response
{
  "success": true,
  "response_code": 200,
  "message": "Ghana ID details fetched successfully",
  "country": "gh",
  "data": {
    "id_number": "GHA-123456789-0",
    "voter_number": "GHA-123456789-0",
    "first_name": "Kwame",
    "last_name": "Mensah",
    "name": "Kwame Mensah",
    "gender": "Male",
    "full_name": "Kwame Mensah",
    "is_new_id": null,
    "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": "123456789",
  "id_type": "voter",
  "consent": true
}

Sample response for id_type=voter:

200 OKSample dataSample response
{
  "success": true,
  "response_code": 200,
  "message": "Ghana ID details fetched successfully",
  "country": "gh",
  "data": {
    "id_number": "123456789",
    "voter_number": "123456789",
    "first_name": "Kwame",
    "last_name": "Mensah",
    "name": "Kwame Mensah",
    "gender": "Male",
    "full_name": "Kwame Mensah",
    "is_new_id": false,
    "valid": true
  },
  "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 "gh" for this route
data.id_numberstringPersonal ID or voter number
data.voter_numberstringVoter number when present
data.first_namestringGiven name
data.last_namestringSurname
data.namestringFull display name
data.genderstringGender
data.full_namestringSame as name
data.is_new_idbooleanOptional Ghana new-ID flag
data.validbooleanWhether the ID is valid

Error codes

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

CodeWhenBilled?
200Ghana ID details returned successfullyYes
400Validation β€” missing/invalid id_number, consent (must be true), or Ghana-specific fieldsNo
401Missing or invalid Bearer tokenNo
402Insufficient wallet balance or credit limitNo
403No active wallet or billing profile (or service not enabled)No
404Ghana 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": "Ghana Card requires a Personal ID (GHA-#########-#), not a document number",
  "country": "gh",
  "errors": {
    "id_number": "Ghana Card requires a Personal ID (GHA-#########-#), not a document number"
  },
  "data": null,
  "request_id": "550e8400-e29b-41d4-a716-446655440010"
}

404 β€” ID not found

404Sample data404 β€” ID not found
{
  "success": false,
  "response_code": 404,
  "message": "Ghana ID not found",
  "description": "There is no information for requested search parameters",
  "country": "gh",
  "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.