## URL
Base url  : https://uapi.satumimpirp.id/api
## API

Base path: `/api`

Semua request memakai `POST` dengan header `Content-Type: application/json`.

### `POST /api`

Body umum:

```json
{
  "type": "top-week",
  "job": "usms",
  "week": "week17",
  "date": "current"
}
```

#### `type: top-week`

Body:

```json
{
  "type": "top-week",
  "job": "usms",
  "week": "week17"
}
```

#### `type: month`

Body:

```json
{
  "type": "month",
  "month": "april",
  "job": "usms"
}
```

#### `type: online-duty`

Body:

```json
{
  "type": "online-duty",
  "job": "usms"
}
```

#### `type: user`

Body:

```json
{
  "type": "user",
  "id": "123456789012345678",
  "job": "usms"
}
```

#### `type: payroll`

Current:

```json
{
  "type": "payroll",
  "date": "current",
  "job": "usms"
}
```

Custom:

```json
{
  "type": "payroll",
  "date": "custom",
  "start": "2026-05-01T00:00:00Z",
  "end": "2026-05-07T23:59:59Z",
  "job": "usms"
}
```

### Response umum

```json
{
  "status": true,
  "message": "success",
  "type": "top-week",
  "data": []
}
```

### Response top-week

```json
{
  "status": true,
  "message": "success",
  "type": "top-week",
  "week": {
    "key": "2026/week17",
    "label": "2026/Week 17",
    "year": 2026,
    "number": 17
  },
  "filter": {
    "job": "usms"
  },
  "data": []
}
```

### Response payroll current

```json
{
  "status": true,
  "message": "success",
  "type": "payroll",
  "date": "current",
  "period": {},
  "filter": {
    "job": "usms"
  },
  "data": []
}
```

### Response payroll custom

```json
{
  "status": true,
  "message": "success",
  "type": "payroll",
  "date": "custom",
  "period": {},
  "filter": {
    "job": "usms"
  },
  "data": []
}
```

### Catatan

- `type` mendukung: `top-week`, `month`, `online-duty`, `user`, `payroll`.
- `month` juga menerima typo lama `mounth`.
- `week` bisa diisi `week17` atau `2026/week17`.
- Kalau `type=user`, isi `id` wajib ada.
- Kalau `type=payroll` dan `date=custom`, `start` dan `end` wajib ada.
- Route GET lama sudah dihapus supaya API lebih rapi dan satu pintu.