Kalkulator THR
Hitung THR menurut Permenaker 6/2016, penuh atau proporsional.
POST /api/v1/thr- Versi API
- v1
- Skema output
- 1
Path endpoint selalu /v1. Angka skema di bawah menandai bentuk output tool ini dan berubah terpisah.
Bikin akun gratis →Parameter
| Parameter | Tipe | Wajib | Default |
|---|---|---|---|
| wage | number | tidak | 5000000 |
| months | number | tidak | 7 |
| basis | monthly | daily | piece-rate | tidak | monthly |
| rounding | whole-months | as-entered | tidak | whole-months |
| holiday | text | tidak | — |
Request
curl -X POST https://sinikoding.dev/api/v1/thr \ -H 'content-type: application/json' \ -H 'x-api-key: tk_live_…' \ -d '{"wage":5000000,"months":7,"basis":"monthly","rounding":"whole-months","holiday":"…"}'
Mengembalikan
"output": { "kind": "table", "columns": ["…"], "rows": [["…"]] }
Memanggil endpoint sandbox same-origin, bukan /api/v1. Tanpa key, dibatasi 15 request per menit.
Request
curl -X POST https://sinikoding.dev/api/v1/thr \ -H 'content-type: application/json' \ -H 'x-api-key: tk_live_…' \ -d '{"wage":"5000000","months":"7","basis":"monthly","rounding":"whole-months","holiday":""}'
Response
Kirim request untuk melihat response-nya.