Skip to content

API Reference ​

The Core service exposes API endpoints under /api.

Base URL ​

txt
https://core.shkh1601.workers.dev

Base Endpoint ​

http
GET /api

Returns basic service metadata.

json
{
  "success": true,
  "message": "Success",
  "data": {
    "service": "Core API"
  }
}

Modules ​

ModuleBase pathPurpose
Users/api/userRegister, log in, and look up users.
Geography/api/geographyQuery Cambodia administrative geography.
Temples/api/templesCreate and search temple records.
Common/api/commonShared utility endpoints, including email sending.

Response Envelope ​

Successful responses use:

json
{
  "success": true,
  "message": "Success",
  "data": {}
}

Failed responses use:

json
{
  "success": false,
  "message": "Error message"
}

Status Codes ​

StatusMeaning
200Request succeeded.
201Resource created.
400Validation or request input failed.
401Authentication credentials are invalid.
404Resource or route was not found.
500Unexpected server error.

Content Type ​

Send JSON request bodies with:

http
Content-Type: application/json

Authentication ​

POST /api/user/login returns a JWT token. The current routes do not require an Authorization header, but consumers should store the token for authenticated endpoints added later.