API Indonesia docsAPI referenceGet an API keyllms.txt

Validation and test data

Documentation index for AI agents: /llms.txt. Every page is also available as markdown: add .md to the URL.

NIK, NPWP and bank account format validation, plus dummy NIK/NPWP/phone generators for testing.

Validation checks structure and format only. It does not confirm with Dukcapil or a bank that a person or account exists. The dummy generators return synthetic values for test environments.

All endpoints need the x-api-key header (see Authentication) and return the standard envelope. A successful request costs 2 credits.

Endpoints on this page

Format Validation

GET /api/v1/validasi/bank

List banks. Returns bank codes with valid account number lengths.

curl "https://use.apiindonesia.id/api/v1/validasi/bank" \
  -H "x-api-key: YOUR_API_KEY"

Example response (shortened):

{
  "data": [
    {
      "code": "014",
      "name": "Bank BCA",
      "short_name": "BCA",
      "min_account_length": 10,
      "max_account_length": 10
    }
  ]
}

POST /api/v1/validasi/nik

Validate NIK. Checks 16-digit NIK format and extracts region/birth date codes. Not Dukcapil verification.

Body fieldRequiredTypeDescription
nikyesstring16-digit NIK
curl -X POST "https://use.apiindonesia.id/api/v1/validasi/nik" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "content-type: application/json" \
  -d '{"nik":"3201010101900001"}'

Example response (shortened):

{
  "data": {
    "valid": true,
    "province_code": "32",
    "birth_date": "1990-01-01"
  },
  "meta": {
    "disclaimer": "Validasi struktural saja..."
  }
}

POST /api/v1/validasi/npwp

Validate NPWP. Checks 15-digit NPWP format. Not DJP verification.

Body fieldRequiredTypeDescription
npwpyesstringNPWP number
curl -X POST "https://use.apiindonesia.id/api/v1/validasi/npwp" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "content-type: application/json" \
  -d '{"npwp":"01.234.567.8-901.000"}'

Example response (shortened):

{
  "data": {
    "valid": true,
    "formatted": "01.234.567.8-901.000"
  }
}

Developer Utilities

POST /api/v1/util/dummy/nik

Generate dummy NIK. Synthetic test data, not official verification.

curl -X POST "https://use.apiindonesia.id/api/v1/util/dummy/nik" \
  -H "x-api-key: YOUR_API_KEY"

Example response (shortened):

{
  "data": {},
  "meta": {
    "disclaimer": "Data sintetis untuk testing. Bukan data Dukcapil/DJP."
  }
}

POST /api/v1/util/dummy/npwp

Generate dummy NPWP. Synthetic test data, not official verification.

curl -X POST "https://use.apiindonesia.id/api/v1/util/dummy/npwp" \
  -H "x-api-key: YOUR_API_KEY"

Example response (shortened):

{
  "data": {},
  "meta": {
    "disclaimer": "Data sintetis untuk testing. Bukan data Dukcapil/DJP."
  }
}

POST /api/v1/util/dummy/telepon

Generate dummy TELEPON. Synthetic test data, not official verification.

curl -X POST "https://use.apiindonesia.id/api/v1/util/dummy/telepon" \
  -H "x-api-key: YOUR_API_KEY"

Example response (shortened):

{
  "data": {},
  "meta": {
    "disclaimer": "Data sintetis untuk testing. Bukan data Dukcapil/DJP."
  }
}