Peleza β€” Trust built on data
πŸ‡°πŸ‡ͺ KYC
On this page

Passport

Verify a Kenyan passport via POST /api/v1/passport/ke. Send passport_number and/or id_number (at least one required). HTTP 200 and 404 are billable; validation 400 is not. Other country codes are not supported yet.

Request

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

Body Parameters

ParameterTypeDescriptionRequired
passport_numberstringPassport number (4–40 chars, must include both letters and numbers)optional*
id_numberstringNational ID linked to the passport (6–10 digits)optional*
consentbooleanMust be true β€” confirms data-subject consent to perform this verificationrequired
customer_numberstringOptional reference for your own tracking (max 255 characters)optional

Sample request body

All verification APIs require consent: true in the JSON body.

Sample dataSample request body
{
  "passport_number": "A1234567",
  "id_number": "12345678",
  "consent": true
}

Response

200 OKSample dataExample response
{
  "success": true,
  "response_code": 200,
  "message": "Passport Details Fetched Successfully",
  "country": "ke",
  "data": {
    "first_name": "JAMES",
    "surname": "KAMAU",
    "other_name": "OTIENO",
    "name": "JAMES OTIENO KAMAU",
    "gender": "Male",
    "dob": "1985-05-15",
    "citizenship": "Kenyan",
    "id_number": "1028845317",
    "passport_number": "A1234567",
    "clan": "SAMPLE CLAN",
    "ethnic_group": "SAMPLE ETHNIC GROUP",
    "family": "SAMPLE FAMILY",
    "occupation": "Engineer",
    "pin": "A123456789Z",
    "place_of_birth": "Nairobi, Kenya",
    "place_of_live": "Nairobi, Kenya",
    "reg_office": "Nairobi",
    "date_of_issue": "2015-06-18",
    "date_of_expiry": "2025-06-18",
    "valid": true,
    "fingerprint_path": null,
    "photo_path": "https://cdn.example.com/passport_images/photo_xxx.jpeg",
    "signature_path": null
  },
  "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 "ke" for this route
data.first_namestringGiven name(s)
data.surnamestringSurname
data.other_namestringOther / middle name
data.namestringFull display name
data.genderstringGender
data.dobstringDate of birth (YYYY-MM-DD)
data.citizenshipstringCitizenship
data.id_numberstringLinked national ID number
data.passport_numberstringPassport number
data.date_of_issuestringIssue date when available
data.date_of_expirystringExpiry date when available
data.validbooleanWhether the passport is valid
data.photo_pathstringCDN photo URL when available
data.fingerprint_pathstringCDN fingerprint URL when available
data.signature_pathstringCDN signature URL when available
request_idstringUUID for support and audit trails

Error codes

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

CodeWhenBilled?
200Passport details returned successfullyYes
400Validation β€” need id_number and/or passport_number; id_number 6–10 digits; passport_number 4–40 with letters and numbersNo
401Missing or invalid Bearer tokenNo
402Insufficient wallet balance or credit limitNo
403No active wallet or billing profile (or service not enabled)No
404Passport not foundYes
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": "Either ID number or passport number is required in the request body",
  "errors": {
    "id_number": "Either ID number or passport number is required in the request body"
  },
  "data": null,
  "request_id": "550e8400-e29b-41d4-a716-446655440030"
}

404 β€” not found

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

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.