API Reference
One reference page per product, generated directly from that product's OpenAPI spec (the same file served raw at /openapi/{product}.yaml — see Getting Started for why that matters if you're integrating via code or an AI agent rather than reading by hand).
| Product | Status | Reference | Raw spec |
|---|---|---|---|
| geodoc | Live | /api/geodoc | /openapi/geodoc.yaml |
| otpauth | Private testing | /api/otpauth | /openapi/otpauth.yaml |
Gateway-wide behavior (auth, errors, rate limits) is documented once in the Guide, not repeated on every product page. All paths below are relative to https://api.webapi.id/v1/{product}.
Endpoints at a glance
geodoc
| Method | Path | Description |
|---|---|---|
GET | /provinces | List all 38 provinces |
GET | /regencies?province_code= | List regencies/cities in a province |
GET | /districts?regency_code= | List districts in a regency/city |
GET | /villages?district_code= | List villages in a district |
GET | /villages?postal_code= | Look up villages by postal code |
GET | /villages?name= | Search villages by name (case-insensitive exact match) |
→ Full parameter/response details on /api/geodoc.
otpauth private testing
| Method | Path | Description |
|---|---|---|
POST | /request | Send a one-time code to an email address |
POST | /verify | Verify a one-time code, receive a bearer session token |
→ Full parameter/response details, including the non-standard error shape this product uses, on /api/otpauth.