openapi: 3.0.3
info:
  title: Sensitif
  description: "API ini digunakan untuk manajemen pengguna, autentikasi, dan akses data lainnya.\n    Gunakan endpoint login untuk mendapatkan token JWT sebelum mengakses endpoint lain.\n    Di bagian Authenticating Requests, Anda akan menemukan semua endpoint yang terkait autentikasi pengguna."
  version: 1.0.0
servers:
  -
    url: 'https://sensitifkesehatan.com'
tags:
  -
    name: Autentikasi
    description: "\nEndpoint untuk autentikasi pengguna, termasuk login, refresh token, dan logout.\nGunakan token yang diperoleh untuk mengakses endpoint lain."
  -
    name: Berita
    description: "\nEndpoint untuk mengelola data berita di aplikasi.\nMelalui endpoint ini, pengguna dapat melihat daftar berita,\nmelihat detail berita tertentu, dan melakukan pencarian berita.\nGunakan endpoint ini untuk menampilkan informasi terbaru kepada pengguna."
  -
    name: Pengguna
    description: "\nAPI untuk manajemen user, profil, token device, penduduk, hipertensi, dan notifikasi."
  -
    name: Region
    description: "\nMenampilkan data wilayah indonesia. Dokumentasi lengkap https://www.emsifa.com/api-wilayah-indonesia"
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: 'Gunakan token JWT dari endpoint login. Contoh: <code>Authorization: Bearer {token}</code>.'
security:
  -
    default: []
paths:
  /api/auth/login:
    post:
      summary: 'POST Login'
      operationId: pOSTLogin
      description: "Gunakan endpoint ini untuk melakukan login dengan username dan password.\nJika berhasil, Anda akan mendapatkan token JWT yang digunakan untuk autentikasi\npada endpoint lain (dengan header `Authorization: Bearer <token>`)."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  access_token: eyJ0eXAiOiJKV1QiLCJh...exampletoken
                  token_type: bearer
                  expires_in: 1209600
                  user:
                    idUser: 1
                    name: 'Super Admin'
                    username: superadmin
                    email: superadmin@stoklix.com
                    phone: 081xxxx
                    country: Indonesia
                    img: null
                    status_notif: true
                    device_token: 'dc_pMYEAhpUdN3e0HORvvO:APA91bGQa-VkkYO6KqfUywGC...'
                    userDetail: []
                properties:
                  access_token:
                    type: string
                    example: eyJ0eXAiOiJKV1QiLCJh...exampletoken
                  token_type:
                    type: string
                    example: bearer
                  expires_in:
                    type: integer
                    example: 1209600
                  user:
                    type: object
                    properties:
                      idUser:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: 'Super Admin'
                      username:
                        type: string
                        example: superadmin
                      email:
                        type: string
                        example: superadmin@stoklix.com
                      phone:
                        type: string
                        example: 081xxxx
                      country:
                        type: string
                        example: Indonesia
                      img:
                        type: string
                        example: null
                      status_notif:
                        type: boolean
                        example: true
                      device_token:
                        type: string
                        example: 'dc_pMYEAhpUdN3e0HORvvO:APA91bGQa-VkkYO6KqfUywGC...'
                      userDetail:
                        type: array
                        example: []
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthorized
                properties:
                  message:
                    type: string
                    example: Unauthorized
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User not found'
                properties:
                  message:
                    type: string
                    example: 'User not found'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Kesalahan server'
                properties:
                  message:
                    type: string
                    example: 'Kesalahan server'
      tags:
        - Autentikasi
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                  description: 'Username pengguna.'
                  example: johndoe
                  nullable: false
                password:
                  type: string
                  description: 'Password pengguna.'
                  example: secret123
                  nullable: false
              required:
                - username
                - password
      security: []
  /api/auth/logout:
    post:
      summary: 'POST Logout'
      operationId: pOSTLogout
      description: "Endpoint ini digunakan untuk mengakhiri sesi pengguna.\nSetelah logout, token JWT yang digunakan akan di-*revoke*\nsehingga tidak bisa dipakai kembali."
      parameters:
        -
          in: header
          name: X-Api-Version
          description: ''
          example: '1.0'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Anda berhasil logout'
                properties:
                  message:
                    type: string
                    example: 'Anda berhasil logout'
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Token tidak ditemukan'
                properties:
                  message:
                    type: string
                    example: 'Token tidak ditemukan'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Kesalahan server'
                properties:
                  message:
                    type: string
                    example: 'Kesalahan server'
      tags:
        - Autentikasi
  /api/auth/refresh:
    post:
      summary: 'POST Refresh token JWT.'
      operationId: pOSTRefreshTokenJWT
      description: "Endpoint ini digunakan untuk memperbarui token JWT yang sudah ada.\nToken lama akan dianggap revoked, dan token baru akan di-generate\nuntuk melanjutkan sesi autentikasi."
      parameters:
        -
          in: header
          name: X-Api-Version
          description: ''
          example: '1.0'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  access_token: eyJ0eXAiOiJKV1QiLCJh...exampletokenbaru
                  token_type: bearer
                  expires_in: 1209600
                properties:
                  access_token:
                    type: string
                    example: eyJ0eXAiOiJKV1QiLCJh...exampletokenbaru
                  token_type:
                    type: string
                    example: bearer
                  expires_in:
                    type: integer
                    example: 1209600
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Token tidak ditemukan'
                properties:
                  message:
                    type: string
                    example: 'Token tidak ditemukan'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Kesalahan server'
                properties:
                  message:
                    type: string
                    example: 'Kesalahan server'
      tags:
        - Autentikasi
  /api/berita:
    get:
      summary: 'GET berita'
      operationId: gETBerita
      description: "Menampilkan semua berita yang aktif dan dipublikasikan.\n\nMendukung filter berdasarkan search, category, editor, tags, dan limit data."
      parameters:
        -
          in: query
          name: search
          description: 'Kata kunci pencarian (opsional)'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Kata kunci pencarian (opsional)'
            example: consequatur
            nullable: false
        -
          in: query
          name: category
          description: 'ID kategori untuk filter (opsional)'
          example: 17
          required: false
          schema:
            type: integer
            description: 'ID kategori untuk filter (opsional)'
            example: 17
            nullable: false
        -
          in: query
          name: editor
          description: 'ID editor untuk filter (opsional)'
          example: 17
          required: false
          schema:
            type: integer
            description: 'ID editor untuk filter (opsional)'
            example: 17
            nullable: false
        -
          in: query
          name: tags
          description: 'Tags untuk filter (opsional)'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Tags untuk filter (opsional)'
            example: consequatur
            nullable: false
        -
          in: query
          name: limit
          description: 'Jumlah berita yang ditampilkan (opsional)'
          example: 17
          required: false
          schema:
            type: integer
            description: 'Jumlah berita yang ditampilkan (opsional)'
            example: 17
            nullable: false
        -
          in: header
          name: X-Api-Version
          description: ''
          example: '1.0'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"success\": true\n  \"totalResult\": 1\n  \"data\": [\n    {\n      \"idBerita\": 10,\n      \"judul\": \"Berita Teknologi Terbaru\",\n      \"slug\": \"berita-teknologi-terbaru\",\n      \"konten\": \"Isi konten berita di sini...\",\n      \"jmlView\": 1200,\n      \"editor\": \"John Doe\",\n      \"url\": \"https://example.com/post/berita-teknologi-terbaru/\",\n      \"typePost\": \"artikel\",\n      \"gambar\": \"https://example.com/storage/image.jpg\",\n      \"thumbnail\": \"https://example.com/storage/thumbnail.jpg\",\n      \"url_video\": \"https://youtube.com/examplevideo\",\n      \"tglPublish\": \"Senin, 16 Agustus 2025\",\n      \"jamPublish\": \"14:30\",\n      \"categories\": [\n        {\n          \"idCategory\": 1,\n          \"judul\": \"Teknologi\",\n          \"slug\": \"teknologi\",\n          \"posts\": []\n        }\n      ],\n       \"tags\": [{\n             \"idTag\":\"\",\n             \"judul\":\"\",\n             \"slug\":\"\",\n             \"posts\": []\n       }]\n    }\n  ],\n  \"message\": \"Sukses\",\n}"
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Token tidak ditemukan'
                properties:
                  message:
                    type: string
                    example: 'Token tidak ditemukan'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Kesalahan server'
                  errors:
                    message: 'Detail kesalahan server'
                properties:
                  message:
                    type: string
                    example: 'Kesalahan server'
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Detail kesalahan server'
      tags:
        - Berita
  /api/berita/tranding:
    get:
      summary: 'GET berita populer (trending).'
      operationId: gETBeritaPopulertrending
      description: 'Tampilan berita populer ini hanya menampilkan satu berita populer saja'
      parameters:
        -
          in: query
          name: search
          description: 'Kata kunci pencarian (opsional)'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Kata kunci pencarian (opsional)'
            example: consequatur
            nullable: false
        -
          in: query
          name: category
          description: 'slug kategori (opsional)'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'slug kategori (opsional)'
            example: consequatur
            nullable: false
        -
          in: query
          name: editor
          description: 'nama lengkap editor (opsional)'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'nama lengkap editor (opsional)'
            example: consequatur
            nullable: false
        -
          in: query
          name: tags
          description: 'Tags untuk filter (opsional)'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Tags untuk filter (opsional)'
            example: consequatur
            nullable: false
        -
          in: header
          name: X-Api-Version
          description: ''
          example: '1.0'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"success\": true\n  \"totalResult\": 1\n  \"data\": [\n    {\n      \"idBerita\": 11,\n      \"judul\": \"Berita Populer Hari Ini\",\n      ...\n    }\n  ],\n  \"message\": \"Sukses\",\n}"
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Token tidak ditemukan'
                properties:
                  message:
                    type: string
                    example: 'Token tidak ditemukan'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Kesalahan server'
                  errors:
                    message: 'Detail kesalahan server'
                properties:
                  message:
                    type: string
                    example: 'Kesalahan server'
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Detail kesalahan server'
      tags:
        - Berita
  /api/berita/new:
    get:
      summary: 'GET berita terbaru.'
      operationId: gETBeritaTerbaru
      description: 'Tampilan berita ini hanya menampilkan daftar berita terbaru dan hanya menampilkan 3 data saja'
      parameters:
        -
          in: query
          name: search
          description: 'Kata kunci pencarian (opsional)'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Kata kunci pencarian (opsional)'
            example: consequatur
            nullable: false
        -
          in: query
          name: category
          description: 'slug kategori (opsional)'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'slug kategori (opsional)'
            example: consequatur
            nullable: false
        -
          in: query
          name: editor
          description: 'nama lengkap editor (opsional)'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'nama lengkap editor (opsional)'
            example: consequatur
            nullable: false
        -
          in: query
          name: tags
          description: 'Tags untuk filter (opsional)'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Tags untuk filter (opsional)'
            example: consequatur
            nullable: false
        -
          in: header
          name: X-Api-Version
          description: ''
          example: '1.0'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"success\": true\n  \"totalResult\": 1\n  \"data\": [\n    {\n      \"idBerita\": 12,\n      \"judul\": \"Berita Terbaru\",\n      ...\n    }\n  ],\n  \"message\": \"Sukses\",\n}"
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Token tidak ditemukan'
                properties:
                  message:
                    type: string
                    example: 'Token tidak ditemukan'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Kesalahan server'
                  errors:
                    message: 'Detail kesalahan server'
                properties:
                  message:
                    type: string
                    example: 'Kesalahan server'
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Detail kesalahan server'
      tags:
        - Berita
  /api/berita/infinity-news:
    get:
      summary: 'GET berita pagination'
      operationId: gETBeritaPagination
      description: "Menampilkan berita dengan pagination (infinite scroll).\n\nMendukung filter berdasarkan search, category, editor, dan tags."
      parameters:
        -
          in: query
          name: search
          description: 'Kata kunci pencarian (opsional)'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Kata kunci pencarian (opsional)'
            example: consequatur
            nullable: false
        -
          in: query
          name: category
          description: 'slug kategori (opsional)'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'slug kategori (opsional)'
            example: consequatur
            nullable: false
        -
          in: query
          name: editor
          description: 'nama lengkap editor (opsional)'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'nama lengkap editor (opsional)'
            example: consequatur
            nullable: false
        -
          in: query
          name: tags
          description: 'Tags untuk filter (opsional)'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Tags untuk filter (opsional)'
            example: consequatur
            nullable: false
        -
          in: query
          name: limit
          description: 'Jumlah berita per halaman (default 10)'
          example: 17
          required: false
          schema:
            type: integer
            description: 'Jumlah berita per halaman (default 10)'
            example: 17
            nullable: false
        -
          in: query
          name: page
          description: 'Nomor halaman (default 1)'
          example: 17
          required: false
          schema:
            type: integer
            description: 'Nomor halaman (default 1)'
            example: 17
            nullable: false
        -
          in: header
          name: X-Api-Version
          description: ''
          example: '1.0'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"success\": true,\n  \"code\": 200,\n  \"current_page\": 1,\n  \"total\": 50,\n  \"last_page\": 5,\n  \"data\": [\n    {\n      \"idBerita\": 10,\n      \"judul\": \"Berita Teknologi Terbaru\",\n      \"slug\": \"berita-teknologi-terbaru\",\n      \"konten\": \"Isi konten berita di sini...\",\n      \"jmlView\": 1200,\n      \"editor\": \"John Doe\",\n      \"url\": \"https://example.com/post/berita-teknologi-terbaru/\",\n      \"typePost\": \"artikel\",\n      \"gambar\": \"https://example.com/storage/image.jpg\",\n      \"thumbnail\": \"https://example.com/storage/thumbnail.jpg\",\n      \"url_video\": \"https://youtube.com/examplevideo\",\n      \"tglPublish\": \"Senin, 16 Agustus 2025\",\n      \"jamPublish\": \"14:30\",\n      \"categories\": [\n        {\n          \"idCategory\": 1,\n          \"judul\": \"Teknologi\",\n          \"slug\": \"teknologi\",\n          \"posts\": []\n        }\n      ],\n      \"tags\": [{\n             \"idTag\":\"\",\n             \"judul\":\"\",\n             \"slug\":\"\",\n             \"posts\": []\n       }]\n    }\n  ],\n  \"message\": \"Sukses\",\n}"
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Token tidak ditemukan'
                properties:
                  message:
                    type: string
                    example: 'Token tidak ditemukan'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Kesalahan server'
                  errors:
                    message: 'Detail kesalahan server'
                properties:
                  message:
                    type: string
                    example: 'Kesalahan server'
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Detail kesalahan server'
      tags:
        - Berita
  /api/kategori:
    get:
      summary: 'GET Kategori'
      operationId: gETKategori
      description: 'Endpoint ini mengembalikan semua kategori berita, lengkap dengan daftar posts-nya.'
      parameters:
        -
          in: header
          name: X-Api-Version
          description: ''
          example: '1.0'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"success\": true\n  \"totalResult\": 1\n  \"data\": [\n    {\n      \"idCategory\": 1,\n      \"judul\": \"Teknologi\",\n      \"slug\": \"teknologi\",\n      \"posts\": [\n        {\n          \"idBerita\": 10,\n          \"judul\": \"Berita Teknologi Terbaru\",\n          \"slug\": \"berita-teknologi-terbaru\",\n          \"konten\": \"Isi konten berita di sini...\",\n          \"jmlView\": 1200,\n          \"editor\": \"John Doe\",\n          \"url\": \"https://example.com/post/berita-teknologi-terbaru/\",\n          \"typePost\": \"artikel\",\n          \"gambar\": \"https://example.com/storage/image.jpg\",\n          \"thumbnail\": \"https://example.com/storage/thumbnail.jpg\",\n          \"url_video\": \"https://youtube.com/examplevideo\",\n          \"tglPublish\": \"Senin, 16 Agustus 2025\",\n          \"jamPublish\": \"14:30\",\n          \"categories\": [\n            {\n              \"idCategory\": 1,\n              \"judul\": \"Teknologi\",\n              \"slug\": \"teknologi\",\n              \"posts\": []\n            }\n          ],\n             \"tags\": [{\n                 \"idTag\":\"\",\n                 \"judul\":\"\",\n                 \"slug\":\"\",\n                 \"posts\": []\n             }]\n        }\n      ]\n    }\n  ],\n  \"message\": \"Sukses\",\n}"
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Token tidak ditemukan'
                properties:
                  message:
                    type: string
                    example: 'Token tidak ditemukan'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Kesalahan server'
                  errors:
                    message: 'Detail kesalahan server'
                properties:
                  message:
                    type: string
                    example: 'Kesalahan server'
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Detail kesalahan server'
      tags:
        - Berita
  /api/tag:
    get:
      summary: 'GET Taggar berita'
      operationId: gETTaggarBerita
      description: 'Endpoint ini mengembalikan semua taggar berita, lengkap dengan daftar posts-nya.'
      parameters:
        -
          in: header
          name: X-Api-Version
          description: ''
          example: '1.0'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"success\": true\n  \"totalResult\": 1\n  \"data\": [\n    {\n      \"idTag\": 1,\n      \"judul\": \"Teknologi\",\n      \"slug\": \"teknologi\",\n      \"posts\": []\n    }\n  ],\n  \"message\": \"Sukses\",\n}"
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Token tidak ditemukan'
                properties:
                  message:
                    type: string
                    example: 'Token tidak ditemukan'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Kesalahan server'
                  errors:
                    message: 'Detail kesalahan server'
                properties:
                  message:
                    type: string
                    example: 'Kesalahan server'
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Detail kesalahan server'
      tags:
        - Berita
  /api/role:
    get:
      summary: 'GET Daftar Role'
      operationId: gETDaftarRole
      description: 'Menampilkan semua role kecuali `super_admin`, beserta daftar permission dan user yang terkait.'
      parameters:
        -
          in: header
          name: X-Api-Version
          description: ''
          example: '1.0'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  message: Sukses
                  data:
                    -
                      idRole: 2
                      name: admin
                      guard_name: web
                      permissions:
                        -
                          id: 1
                          name: create_post
                          guard_name: web
                          created_at: '2025-08-17T10:00:00.000000Z'
                          updated_at: '2025-08-17T10:00:00.000000Z'
                        -
                          id: 2
                          name: delete_post
                          guard_name: web
                          created_at: '2025-08-17T10:00:00.000000Z'
                          updated_at: '2025-08-17T10:00:00.000000Z'
                      users:
                        -
                          idUser: 1
                          name: 'Adi Murdayani'
                          username: adi123
                          email: adi@example.com
                          phone: '08123456789'
                          country: Indonesia
                          img: 'https://example.com/storage/images/profile.jpg'
                          status_notif: true
                          device_token: abcd1234
                          userDetail:
                            address: 'Jl. Merdeka No. 1'
                            birth_date: '1995-05-05'
                            gender: L
                    -
                      idRole: 3
                      name: user
                      guard_name: web
                      permissions: []
                      users: []
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Sukses
                  data:
                    type: array
                    example:
                      -
                        idRole: 2
                        name: admin
                        guard_name: web
                        permissions:
                          -
                            id: 1
                            name: create_post
                            guard_name: web
                            created_at: '2025-08-17T10:00:00.000000Z'
                            updated_at: '2025-08-17T10:00:00.000000Z'
                          -
                            id: 2
                            name: delete_post
                            guard_name: web
                            created_at: '2025-08-17T10:00:00.000000Z'
                            updated_at: '2025-08-17T10:00:00.000000Z'
                        users:
                          -
                            idUser: 1
                            name: 'Adi Murdayani'
                            username: adi123
                            email: adi@example.com
                            phone: '08123456789'
                            country: Indonesia
                            img: 'https://example.com/storage/images/profile.jpg'
                            status_notif: true
                            device_token: abcd1234
                            userDetail:
                              address: 'Jl. Merdeka No. 1'
                              birth_date: '1995-05-05'
                              gender: L
                      -
                        idRole: 3
                        name: user
                        guard_name: web
                        permissions: []
                        users: []
                    items:
                      type: object
                      properties:
                        idRole:
                          type: integer
                          example: 2
                        name:
                          type: string
                          example: admin
                        guard_name:
                          type: string
                          example: web
                        permissions:
                          type: array
                          example:
                            -
                              id: 1
                              name: create_post
                              guard_name: web
                              created_at: '2025-08-17T10:00:00.000000Z'
                              updated_at: '2025-08-17T10:00:00.000000Z'
                            -
                              id: 2
                              name: delete_post
                              guard_name: web
                              created_at: '2025-08-17T10:00:00.000000Z'
                              updated_at: '2025-08-17T10:00:00.000000Z'
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              name:
                                type: string
                                example: create_post
                              guard_name:
                                type: string
                                example: web
                              created_at:
                                type: string
                                example: '2025-08-17T10:00:00.000000Z'
                              updated_at:
                                type: string
                                example: '2025-08-17T10:00:00.000000Z'
                        users:
                          type: array
                          example:
                            -
                              idUser: 1
                              name: 'Adi Murdayani'
                              username: adi123
                              email: adi@example.com
                              phone: '08123456789'
                              country: Indonesia
                              img: 'https://example.com/storage/images/profile.jpg'
                              status_notif: true
                              device_token: abcd1234
                              userDetail:
                                address: 'Jl. Merdeka No. 1'
                                birth_date: '1995-05-05'
                                gender: L
                          items:
                            type: object
                            properties:
                              idUser:
                                type: integer
                                example: 1
                              name:
                                type: string
                                example: 'Adi Murdayani'
                              username:
                                type: string
                                example: adi123
                              email:
                                type: string
                                example: adi@example.com
                              phone:
                                type: string
                                example: '08123456789'
                              country:
                                type: string
                                example: Indonesia
                              img:
                                type: string
                                example: 'https://example.com/storage/images/profile.jpg'
                              status_notif:
                                type: boolean
                                example: true
                              device_token:
                                type: string
                                example: abcd1234
                              userDetail:
                                type: object
                                properties:
                                  address:
                                    type: string
                                    example: 'Jl. Merdeka No. 1'
                                  birth_date:
                                    type: string
                                    example: '1995-05-05'
                                  gender:
                                    type: string
                                    example: L
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  message: 'Token tidak ditemukan'
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Token tidak ditemukan'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: false
                  message: 'Kesalahan. [Database connection error]'
                  data:
                    message: 'Database connection error'
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Kesalahan. [Database connection error]'
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Database connection error'
      tags:
        - Pengguna
  /api/permission:
    get:
      summary: 'GET Daftar Permission'
      operationId: gETDaftarPermission
      description: 'Menampilkan semua permission beserta role yang terkait dengan permission tersebut.'
      parameters:
        -
          in: header
          name: X-Api-Version
          description: ''
          example: '1.0'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  message: Sukses
                  data:
                    -
                      idPermission: 1
                      name: create_post
                      guard_name: web
                      roles:
                        -
                          idRole: 2
                          name: admin
                          guard_name: web
                        -
                          idRole: 3
                          name: editor
                          guard_name: web
                    -
                      idPermission: 2
                      name: delete_post
                      guard_name: web
                      roles:
                        -
                          idRole: 2
                          name: admin
                          guard_name: web
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Sukses
                  data:
                    type: array
                    example:
                      -
                        idPermission: 1
                        name: create_post
                        guard_name: web
                        roles:
                          -
                            idRole: 2
                            name: admin
                            guard_name: web
                          -
                            idRole: 3
                            name: editor
                            guard_name: web
                      -
                        idPermission: 2
                        name: delete_post
                        guard_name: web
                        roles:
                          -
                            idRole: 2
                            name: admin
                            guard_name: web
                    items:
                      type: object
                      properties:
                        idPermission:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: create_post
                        guard_name:
                          type: string
                          example: web
                        roles:
                          type: array
                          example:
                            -
                              idRole: 2
                              name: admin
                              guard_name: web
                            -
                              idRole: 3
                              name: editor
                              guard_name: web
                          items:
                            type: object
                            properties:
                              idRole:
                                type: integer
                                example: 2
                              name:
                                type: string
                                example: admin
                              guard_name:
                                type: string
                                example: web
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  message: 'Token tidak ditemukan'
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Token tidak ditemukan'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: false
                  message: 'Kesalahan. [Database connection error]'
                  data:
                    message: 'Database connection error'
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Kesalahan. [Database connection error]'
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Database connection error'
      tags:
        - Pengguna
  /api/penduduk:
    get:
      summary: 'GET daftar penduduk'
      operationId: gETDaftarPenduduk
      description: 'Endpoint ini mengembalikan daftar penduduk beserta informasi relasi `village`.'
      parameters:
        -
          in: query
          name: search
          description: 'Opsional. Kata kunci pencarian berdasarkan nama/NIK/atribut penduduk.'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Opsional. Kata kunci pencarian berdasarkan nama/NIK/atribut penduduk.'
            example: consequatur
            nullable: false
        -
          in: query
          name: village
          description: 'Opsional. ID desa untuk memfilter penduduk berdasarkan desa tertentu.'
          example: 17
          required: false
          schema:
            type: integer
            description: 'Opsional. ID desa untuk memfilter penduduk berdasarkan desa tertentu.'
            example: 17
            nullable: false
        -
          in: query
          name: limit
          description: 'Opsional. Batasi jumlah hasil yang dikembalikan.'
          example: 17
          required: false
          schema:
            type: integer
            description: 'Opsional. Batasi jumlah hasil yang dikembalikan.'
            example: 17
            nullable: false
        -
          in: header
          name: X-Api-Version
          description: ''
          example: '1.0'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: true
                  message: Sukses
                  data:
                    -
                      idPenduduk: 1
                      code_village: '7301012001'
                      nik: '7301010101000001'
                      bpjs: '0001234567890'
                      name: 'Budi Santoso'
                      phone: '081234567890'
                      kelamin: Laki-laki
                      tempat_lahir: Palopo
                      tgl_lahir: '1980-01-01'
                      umur: 45
                      pekerjaan: Petani
                      status_pernikahan: Menikah
                      agama: Islam
                      nama_ayah: Sutanto
                      alamat: 'Jl. Contoh No. 123'
                      village:
                        idVillage: 101
                        kode_provinsi: '73'
                        kode_kabupaten: '7301'
                        kode_kecamatan: '730101'
                        kode: '7301012001'
                        nama: 'Desa Contoh'
                properties:
                  status:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Sukses
                  data:
                    type: array
                    example:
                      -
                        idPenduduk: 1
                        code_village: '7301012001'
                        nik: '7301010101000001'
                        bpjs: '0001234567890'
                        name: 'Budi Santoso'
                        phone: '081234567890'
                        kelamin: Laki-laki
                        tempat_lahir: Palopo
                        tgl_lahir: '1980-01-01'
                        umur: 45
                        pekerjaan: Petani
                        status_pernikahan: Menikah
                        agama: Islam
                        nama_ayah: Sutanto
                        alamat: 'Jl. Contoh No. 123'
                        village:
                          idVillage: 101
                          kode_provinsi: '73'
                          kode_kabupaten: '7301'
                          kode_kecamatan: '730101'
                          kode: '7301012001'
                          nama: 'Desa Contoh'
                    items:
                      type: object
                      properties:
                        idPenduduk:
                          type: integer
                          example: 1
                        code_village:
                          type: string
                          example: '7301012001'
                        nik:
                          type: string
                          example: '7301010101000001'
                        bpjs:
                          type: string
                          example: '0001234567890'
                        name:
                          type: string
                          example: 'Budi Santoso'
                        phone:
                          type: string
                          example: '081234567890'
                        kelamin:
                          type: string
                          example: Laki-laki
                        tempat_lahir:
                          type: string
                          example: Palopo
                        tgl_lahir:
                          type: string
                          example: '1980-01-01'
                        umur:
                          type: integer
                          example: 45
                        pekerjaan:
                          type: string
                          example: Petani
                        status_pernikahan:
                          type: string
                          example: Menikah
                        agama:
                          type: string
                          example: Islam
                        nama_ayah:
                          type: string
                          example: Sutanto
                        alamat:
                          type: string
                          example: 'Jl. Contoh No. 123'
                        village:
                          type: object
                          properties:
                            idVillage:
                              type: integer
                              example: 101
                            kode_provinsi:
                              type: string
                              example: '73'
                            kode_kabupaten:
                              type: string
                              example: '7301'
                            kode_kecamatan:
                              type: string
                              example: '730101'
                            kode:
                              type: string
                              example: '7301012001'
                            nama:
                              type: string
                              example: 'Desa Contoh'
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  message: 'Token tidak ditemukan'
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Token tidak ditemukan'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  message: 'Kesalahan. [Detail error]'
                  errors:
                    message: 'Detail error'
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Kesalahan. [Detail error]'
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Detail error'
      tags:
        - Pengguna
  /api/user:
    get:
      summary: 'GET Daftar User'
      operationId: gETDaftarUser
      description: "Menampilkan daftar user (kecuali super_admin & admin).\nBisa menggunakan parameter pencarian."
      parameters:
        -
          in: query
          name: search
          description: 'Opsional. Kata kunci untuk pencarian berdasarkan nama depan, nama belakang, atau username.'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Opsional. Kata kunci untuk pencarian berdasarkan nama depan, nama belakang, atau username.'
            example: consequatur
            nullable: false
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  message: Sukses
                  data:
                    -
                      id: 1
                      first_name: Adi
                      last_name: Murdayani
                      username: adi123
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Sukses
                  data:
                    type: array
                    example:
                      -
                        id: 1
                        first_name: Adi
                        last_name: Murdayani
                        username: adi123
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        first_name:
                          type: string
                          example: Adi
                        last_name:
                          type: string
                          example: Murdayani
                        username:
                          type: string
                          example: adi123
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Kesalahan server'
                  errors:
                    message: 'Detail kesalahan server'
                properties:
                  message:
                    type: string
                    example: 'Kesalahan server'
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Detail kesalahan server'
      tags:
        - Pengguna
      security: []
  /api/user/get-token:
    post:
      summary: 'POST Simpan Token Device'
      operationId: pOSTSimpanTokenDevice
      description: 'Menyimpan token device untuk push notification.'
      parameters:
        -
          in: header
          name: X-Api-Version
          description: ''
          example: '1.0'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  message: 'Token disimpan'
                  data:
                    id: 1
                    device_token: abcd1234
                    status_notif: true
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Token disimpan'
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      device_token:
                        type: string
                        example: abcd1234
                      status_notif:
                        type: boolean
                        example: true
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Token tidak ditemukan'
                properties:
                  message:
                    type: string
                    example: 'Token tidak ditemukan'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Kesalahan server'
                  errors:
                    message: 'Detail kesalahan server'
                properties:
                  message:
                    type: string
                    example: 'Kesalahan server'
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Detail kesalahan server'
      tags:
        - Pengguna
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                device_token:
                  type: string
                  description: 'Opsional. Token dari device untuk FCM.'
                  example: consequatur
                  nullable: false
                status_notif:
                  type: boolean
                  description: 'Wajib. Status apakah user mengaktifkan notifikasi.'
                  example: false
                  nullable: false
  /api/user/profil:
    get:
      summary: 'GET Profil User'
      operationId: gETProfilUser
      description: 'Mendapatkan profil user yang sedang login.'
      parameters:
        -
          in: header
          name: X-Api-Version
          description: ''
          example: '1.0'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  message: Sukses
                  data:
                    idUser: 1
                    name: 'Adi Murdayani'
                    username: adi123
                    roles:
                      -
                        id: 2
                        name: user
                        guard_name: web
                    email: adi@example.com
                    phone: '08123456789'
                    country: Indonesia
                    img: 'https://example.com/storage/images/profile.jpg'
                    status_notif: true
                    device_token: abcd1234
                    userDetail:
                      address: 'Jl. Merdeka No. 1'
                      birth_date: '1995-05-05'
                      gender: L
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Sukses
                  data:
                    type: object
                    properties:
                      idUser:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: 'Adi Murdayani'
                      username:
                        type: string
                        example: adi123
                      roles:
                        type: array
                        example:
                          -
                            id: 2
                            name: user
                            guard_name: web
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 2
                            name:
                              type: string
                              example: user
                            guard_name:
                              type: string
                              example: web
                      email:
                        type: string
                        example: adi@example.com
                      phone:
                        type: string
                        example: '08123456789'
                      country:
                        type: string
                        example: Indonesia
                      img:
                        type: string
                        example: 'https://example.com/storage/images/profile.jpg'
                      status_notif:
                        type: boolean
                        example: true
                      device_token:
                        type: string
                        example: abcd1234
                      userDetail:
                        type: object
                        properties:
                          address:
                            type: string
                            example: 'Jl. Merdeka No. 1'
                          birth_date:
                            type: string
                            example: '1995-05-05'
                          gender:
                            type: string
                            example: L
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Token tidak ditemukan'
                properties:
                  message:
                    type: string
                    example: 'Token tidak ditemukan'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Kesalahan server'
                  errors:
                    message: 'Detail kesalahan server'
                properties:
                  message:
                    type: string
                    example: 'Kesalahan server'
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Detail kesalahan server'
      tags:
        - Pengguna
  /api/user/history-notification:
    get:
      summary: 'GET Riwayat Notifikasi'
      operationId: gETRiwayatNotifikasi
      description: 'Menampilkan daftar notifikasi user.'
      parameters:
        -
          in: query
          name: per_page
          description: 'Opsional. Default 50. Jumlah data per halaman.'
          example: 17
          required: false
          schema:
            type: integer
            description: 'Opsional. Default 50. Jumlah data per halaman.'
            example: 17
            nullable: false
        -
          in: query
          name: unread
          description: 'Opsional. Jika `true`, hanya menampilkan notifikasi belum dibaca.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Opsional. Jika `true`, hanya menampilkan notifikasi belum dibaca.'
            example: false
            nullable: false
        -
          in: header
          name: X-Api-Version
          description: ''
          example: '1.0'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  total: 100
                  per_page: 50
                  current_page: 1
                  data:
                    -
                      id: uuid
                      type: NewMessageNotification
                      data:
                        message: Halo
                      read_at: null
                      created_at: '2025-08-17T12:00:00Z'
                properties:
                  success:
                    type: boolean
                    example: true
                  total:
                    type: integer
                    example: 100
                  per_page:
                    type: integer
                    example: 50
                  current_page:
                    type: integer
                    example: 1
                  data:
                    type: array
                    example:
                      -
                        id: uuid
                        type: NewMessageNotification
                        data:
                          message: Halo
                        read_at: null
                        created_at: '2025-08-17T12:00:00Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: uuid
                        type:
                          type: string
                          example: NewMessageNotification
                        data:
                          type: object
                          properties:
                            message:
                              type: string
                              example: Halo
                        read_at:
                          type: string
                          example: null
                        created_at:
                          type: string
                          example: '2025-08-17T12:00:00Z'
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Token tidak ditemukan'
                properties:
                  message:
                    type: string
                    example: 'Token tidak ditemukan'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Kesalahan server'
                  errors:
                    message: 'Detail kesalahan server'
                properties:
                  message:
                    type: string
                    example: 'Kesalahan server'
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Detail kesalahan server'
      tags:
        - Pengguna
  '/api/user/{id}/history-notification':
    post:
      summary: 'POST Tandai Notifikasi Terbaca'
      operationId: pOSTTandaiNotifikasiTerbaca
      description: 'Tandai sebuah notifikasi sebagai sudah dibaca.'
      parameters:
        -
          in: header
          name: X-Api-Version
          description: ''
          example: '1.0'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  message: sukses
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: sukses
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Token tidak ditemukan'
                properties:
                  message:
                    type: string
                    example: 'Token tidak ditemukan'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: false
                  message: 'Not found'
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Not found'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Kesalahan server'
                  errors:
                    message: 'Detail kesalahan server'
                properties:
                  message:
                    type: string
                    example: 'Kesalahan server'
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Detail kesalahan server'
      tags:
        - Pengguna
    parameters:
      -
        in: path
        name: id
        description: 'Optional parameter. Wajib. ID notifikasi.'
        required: true
        schema:
          type: string
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: consequatur
  /api/hipertensi/cek-riwayat:
    get:
      summary: 'GET hipertensi'
      operationId: gETHipertensi
      description: 'cek riwayat hipertensi per bulan'
      parameters:
        -
          in: header
          name: X-Api-Version
          description: ''
          example: '1.0'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: ''
                    type: object
                    example:
                      status: true
                      belum_isi: 3
                      pesan: 'Anda baru melakukan 9 kali cekup dan anda belum melakukan cek hipertensi di bulan: <strong>Januari, Februari, April</strong>. Silakan lakukan cek hipertensi untuk menjaga kesehatan Anda. Terimakasih!'
                    properties:
                      status:
                        type: boolean
                        example: true
                      belum_isi:
                        type: integer
                        example: 3
                      pesan:
                        type: string
                        example: 'Anda baru melakukan 9 kali cekup dan anda belum melakukan cek hipertensi di bulan: <strong>Januari, Februari, April</strong>. Silakan lakukan cek hipertensi untuk menjaga kesehatan Anda. Terimakasih!'
                  -
                    description: ''
                    type: object
                    example:
                      status: true
                      belum_isi: 0
                      pesan: 'Selamat! Anda sudah melakukan cek setiap bulan.'
                    properties:
                      status:
                        type: boolean
                        example: true
                      belum_isi:
                        type: integer
                        example: 0
                      pesan:
                        type: string
                        example: 'Selamat! Anda sudah melakukan cek setiap bulan.'
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Token tidak ditemukan'
                properties:
                  message:
                    type: string
                    example: 'Token tidak ditemukan'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Kesalahan server'
                  errors:
                    message: 'Detail kesalahan server'
                properties:
                  message:
                    type: string
                    example: 'Kesalahan server'
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Detail kesalahan server'
      tags:
        - Pengguna
  /api/province:
    get:
      summary: 'GET daftar provinsi'
      operationId: gETDaftarProvinsi
      description: "Endpoint ini mengambil daftar semua provinsi di Indonesia dari API eksternal **emsifa.com**.\nData dikembalikan dalam bentuk array JSON dengan `id` dan `nama`."
      parameters:
        -
          in: header
          name: X-Api-Version
          description: ''
          example: '1.0'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: true
                  message: 'Sukses memperbarui data kecamatan.'
                  data:
                    -
                      id: '11'
                      name: Aceh
                    -
                      id: '12'
                      name: 'Sumatera Utara'
                    -
                      id: '13'
                      name: 'Sumatera Barat'
                properties:
                  status:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Sukses memperbarui data kecamatan.'
                  data:
                    type: array
                    example:
                      -
                        id: '11'
                        name: Aceh
                      -
                        id: '12'
                        name: 'Sumatera Utara'
                      -
                        id: '13'
                        name: 'Sumatera Barat'
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: '11'
                        name:
                          type: string
                          example: Aceh
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  message: 'Gagal mengambil data dari API.'
                  errors:
                    message: 'Gagal mengambil data dari API'
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Gagal mengambil data dari API.'
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Gagal mengambil data dari API'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  message: 'Kesalahan. [Detail error]'
                  errors:
                    message: 'Detail error'
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Kesalahan. [Detail error]'
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Detail error'
      tags:
        - Region
      security: []
  /api/district:
    get:
      summary: 'GET daftar kabupaten/kota'
      operationId: gETDaftarKabupatenkota
      description: 'Endpoint ini mengembalikan daftar kabupaten/kota lengkap dengan kecamatan (kelurahan/desa).'
      parameters:
        -
          in: query
          name: search
          description: 'Opsional. Kata kunci pencarian nama kecamatan.'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Opsional. Kata kunci pencarian nama kecamatan.'
            example: consequatur
            nullable: false
        -
          in: query
          name: kecamatan
          description: 'Opsional. Kata kunci pencarian nama dan kode kecamatan.'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Opsional. Kata kunci pencarian nama dan kode kecamatan.'
            example: consequatur
            nullable: false
        -
          in: query
          name: limit
          description: 'Opsional. Batasi jumlah hasil yang dikembalikan.'
          example: 17
          required: false
          schema:
            type: integer
            description: 'Opsional. Batasi jumlah hasil yang dikembalikan.'
            example: 17
            nullable: false
        -
          in: header
          name: X-Api-Version
          description: ''
          example: '1.0'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: true
                  message: Sukses
                  data:
                    -
                      idDistrict: 1
                      kode_provinsi: '1101'
                      kode: '11'
                      nama: 'Kecamatan Banda'
                      sub_districts:
                        -
                          idSubDistrict: 10
                          kode_provinsi: '110101'
                          kode_kabupaten: 'Kelurahan A'
                          kode: 'Kelurahan A'
                          nama: 'Kelurahan A'
                          district: 'Kelurahan A'
                          village:
                            -
                              id: 100
                              code: '11010101'
                              name: 'Desa Contoh'
                properties:
                  status:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Sukses
                  data:
                    type: array
                    example:
                      -
                        idDistrict: 1
                        kode_provinsi: '1101'
                        kode: '11'
                        nama: 'Kecamatan Banda'
                        sub_districts:
                          -
                            idSubDistrict: 10
                            kode_provinsi: '110101'
                            kode_kabupaten: 'Kelurahan A'
                            kode: 'Kelurahan A'
                            nama: 'Kelurahan A'
                            district: 'Kelurahan A'
                            village:
                              -
                                id: 100
                                code: '11010101'
                                name: 'Desa Contoh'
                    items:
                      type: object
                      properties:
                        idDistrict:
                          type: integer
                          example: 1
                        kode_provinsi:
                          type: string
                          example: '1101'
                        kode:
                          type: string
                          example: '11'
                        nama:
                          type: string
                          example: 'Kecamatan Banda'
                        sub_districts:
                          type: array
                          example:
                            -
                              idSubDistrict: 10
                              kode_provinsi: '110101'
                              kode_kabupaten: 'Kelurahan A'
                              kode: 'Kelurahan A'
                              nama: 'Kelurahan A'
                              district: 'Kelurahan A'
                              village:
                                -
                                  id: 100
                                  code: '11010101'
                                  name: 'Desa Contoh'
                          items:
                            type: object
                            properties:
                              idSubDistrict:
                                type: integer
                                example: 10
                              kode_provinsi:
                                type: string
                                example: '110101'
                              kode_kabupaten:
                                type: string
                                example: 'Kelurahan A'
                              kode:
                                type: string
                                example: 'Kelurahan A'
                              nama:
                                type: string
                                example: 'Kelurahan A'
                              district:
                                type: string
                                example: 'Kelurahan A'
                              village:
                                type: array
                                example:
                                  -
                                    id: 100
                                    code: '11010101'
                                    name: 'Desa Contoh'
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 100
                                    code:
                                      type: string
                                      example: '11010101'
                                    name:
                                      type: string
                                      example: 'Desa Contoh'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  message: 'Kesalahan. [Detail error]'
                  errors:
                    message: 'Detail error'
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Kesalahan. [Detail error]'
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Detail error'
      tags:
        - Region
      security: []
  /api/district/sync:
    post:
      summary: 'POST sinkronisasi kecamatan'
      operationId: pOSTSinkronisasiKecamatan
      description: "Endpoint ini mengambil data kecamatan dari API wilayah Indonesia (emsifa) berdasarkan regency_id,\nlalu menyimpannya atau memperbaruinya ke database. dokumentasi lengkap https://www.emsifa.com/api-wilayah-indonesia/api/regencies/"
      parameters:
        -
          in: header
          name: X-Api-Version
          description: ''
          example: '1.0'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: true
                  message: 'Sukses memperbarui data kabupaten/kota.'
                  data: null
                properties:
                  status:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Sukses memperbarui data kabupaten/kota.'
                  data:
                    type: string
                    example: null
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  message: 'Gagal mengambil data dari API.'
                  errors:
                    message: 'Gagal mengambil data dari API'
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Gagal mengambil data dari API.'
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Gagal mengambil data dari API'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  message: 'Kesalahan. [Detail error]'
                  errors:
                    message: 'Detail error'
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Kesalahan. [Detail error]'
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Detail error'
      tags:
        - Region
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                regency_id:
                  type: string
                  description: 'Kode kabupaten/kota untuk sinkronisasi data kecamatan. Contoh: "1101".'
                  example: consequatur
                  nullable: false
              required:
                - regency_id
      security: []
  /api/sub-district:
    get:
      summary: 'GET daftar sub-district (kecamatan)'
      operationId: gETDaftarSubDistrictkecamatan
      description: "Endpoint ini mengambil daftar sub-district (kecamatan) dari database lokal.\nBisa difilter berdasarkan nama (`search`), kabupaten/kota (`district`), atau kelurahan/desa (`village`).\nHasil response mencakup relasi dengan kabupaten/kota (`district`) dan kelurahan/desa (`village`)."
      parameters:
        -
          in: query
          name: search
          description: 'Opsional. Cari berdasarkan nama kecamatan. Contoh: "Wara"'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Opsional. Cari berdasarkan nama kecamatan. Contoh: "Wara"'
            example: consequatur
            nullable: false
        -
          in: query
          name: district
          description: 'Opsional. Filter berdasarkan kode atau nama kabupaten/kota.'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Opsional. Filter berdasarkan kode atau nama kabupaten/kota.'
            example: consequatur
            nullable: false
        -
          in: query
          name: village
          description: 'Opsional. Filter berdasarkan kode atau nama kelurahan/desa.'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Opsional. Filter berdasarkan kode atau nama kelurahan/desa.'
            example: consequatur
            nullable: false
        -
          in: query
          name: limit
          description: 'Opsional. Batasi jumlah data yang ditampilkan. Contoh: 10'
          example: 17
          required: false
          schema:
            type: integer
            description: 'Opsional. Batasi jumlah data yang ditampilkan. Contoh: 10'
            example: 17
            nullable: false
        -
          in: header
          name: X-Api-Version
          description: ''
          example: '1.0'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  message: Sukses
                  data:
                    -
                      idSubDistrict: 101
                      kode_provinsi: '73'
                      kode_kabupaten: '7303'
                      kode: '7303060'
                      nama: 'Wara Timur'
                      district:
                        idDistrict: 21
                        kode: '7303'
                        nama: 'Kota Palopo'
                      village:
                        -
                          idVillage: 501
                          kode: '7303060001'
                          nama: Pontap
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Sukses
                  data:
                    type: array
                    example:
                      -
                        idSubDistrict: 101
                        kode_provinsi: '73'
                        kode_kabupaten: '7303'
                        kode: '7303060'
                        nama: 'Wara Timur'
                        district:
                          idDistrict: 21
                          kode: '7303'
                          nama: 'Kota Palopo'
                        village:
                          -
                            idVillage: 501
                            kode: '7303060001'
                            nama: Pontap
                    items:
                      type: object
                      properties:
                        idSubDistrict:
                          type: integer
                          example: 101
                        kode_provinsi:
                          type: string
                          example: '73'
                        kode_kabupaten:
                          type: string
                          example: '7303'
                        kode:
                          type: string
                          example: '7303060'
                        nama:
                          type: string
                          example: 'Wara Timur'
                        district:
                          type: object
                          properties:
                            idDistrict:
                              type: integer
                              example: 21
                            kode:
                              type: string
                              example: '7303'
                            nama:
                              type: string
                              example: 'Kota Palopo'
                        village:
                          type: array
                          example:
                            -
                              idVillage: 501
                              kode: '7303060001'
                              nama: Pontap
                          items:
                            type: object
                            properties:
                              idVillage:
                                type: integer
                                example: 501
                              kode:
                                type: string
                                example: '7303060001'
                              nama:
                                type: string
                                example: Pontap
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: false
                  message: 'Kesalahan. [Detail error]'
                  errors:
                    message: 'Detail error'
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Kesalahan. [Detail error]'
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Detail error'
      tags:
        - Region
      security: []
  /api/sub-district/sync:
    post:
      summary: 'POST sinkronisasi kecamatan'
      operationId: pOSTSinkronisasiKecamatan
      description: "Endpoint ini akan mengambil data kecamatan dari API eksternal **emsifa.com**,\nlalu menyimpannya ke database lokal menggunakan `updateOrCreate`."
      parameters:
        -
          in: header
          name: X-Api-Version
          description: ''
          example: '1.0'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: true
                  message: 'Sukses memperbarui data kecamatan.'
                  data: null
                properties:
                  status:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Sukses memperbarui data kecamatan.'
                  data:
                    type: string
                    example: null
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  message: 'Gagal mengambil data dari API.'
                  errors:
                    message: 'Gagal mengambil data dari API'
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Gagal mengambil data dari API.'
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Gagal mengambil data dari API'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  message: 'Kesalahan. [Detail error]'
                  errors:
                    message: 'Detail error'
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Kesalahan. [Detail error]'
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Detail error'
      tags:
        - Region
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                regency_id:
                  type: integer
                  description: 'ID kabupaten. Contoh: 7303'
                  example: 17
                  nullable: false
              required:
                - regency_id
      security: []
  /api/village:
    get:
      summary: 'GET daftar village (desa/kelurahan)'
      operationId: gETDaftarVillagedesakelurahan
      description: "Endpoint ini mengambil daftar desa/kelurahan dari database lokal.\nBisa difilter berdasarkan nama (`search`), kecamatan (`subDistrict`), atau kabupaten/kota (`district`).\nHasil response mencakup relasi dengan kecamatan (`subDistrict`) dan kabupaten/kota (`district`)."
      parameters:
        -
          in: query
          name: search
          description: 'Opsional. Cari berdasarkan nama desa/kelurahan. Contoh: "Pontap"'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Opsional. Cari berdasarkan nama desa/kelurahan. Contoh: "Pontap"'
            example: consequatur
            nullable: false
        -
          in: query
          name: district
          description: 'Opsional. Filter berdasarkan kode atau nama kabupaten/kota.'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Opsional. Filter berdasarkan kode atau nama kabupaten/kota.'
            example: consequatur
            nullable: false
        -
          in: query
          name: subDistrict
          description: 'Opsional. Filter berdasarkan kode atau nama kecamatan.'
          example: consequatur
          required: false
          schema:
            type: string
            description: 'Opsional. Filter berdasarkan kode atau nama kecamatan.'
            example: consequatur
            nullable: false
        -
          in: query
          name: limit
          description: 'Opsional. Batasi jumlah data yang ditampilkan. Contoh: 10'
          example: 17
          required: false
          schema:
            type: integer
            description: 'Opsional. Batasi jumlah data yang ditampilkan. Contoh: 10'
            example: 17
            nullable: false
        -
          in: header
          name: X-Api-Version
          description: ''
          example: '1.0'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: true
                  message: Sukses
                  data:
                    -
                      idVillage: 501
                      code_province: '73'
                      code_district: '7303'
                      code_sub_district: '7303060'
                      code: '7303060001'
                      name: Pontap
                      district:
                        idDistrict: 21
                        code: '7303'
                        name: 'Kota Palopo'
                      subDistrict:
                        idSubDistrict: 101
                        code: '7303060'
                        name: 'Wara Timur'
                properties:
                  status:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Sukses
                  data:
                    type: array
                    example:
                      -
                        idVillage: 501
                        code_province: '73'
                        code_district: '7303'
                        code_sub_district: '7303060'
                        code: '7303060001'
                        name: Pontap
                        district:
                          idDistrict: 21
                          code: '7303'
                          name: 'Kota Palopo'
                        subDistrict:
                          idSubDistrict: 101
                          code: '7303060'
                          name: 'Wara Timur'
                    items:
                      type: object
                      properties:
                        idVillage:
                          type: integer
                          example: 501
                        code_province:
                          type: string
                          example: '73'
                        code_district:
                          type: string
                          example: '7303'
                        code_sub_district:
                          type: string
                          example: '7303060'
                        code:
                          type: string
                          example: '7303060001'
                        name:
                          type: string
                          example: Pontap
                        district:
                          type: object
                          properties:
                            idDistrict:
                              type: integer
                              example: 21
                            code:
                              type: string
                              example: '7303'
                            name:
                              type: string
                              example: 'Kota Palopo'
                        subDistrict:
                          type: object
                          properties:
                            idSubDistrict:
                              type: integer
                              example: 101
                            code:
                              type: string
                              example: '7303060'
                            name:
                              type: string
                              example: 'Wara Timur'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  message: 'Kesalahan. [Detail error]'
                  errors:
                    message: 'Detail error'
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Kesalahan. [Detail error]'
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Detail error'
      tags:
        - Region
      security: []
  /api/village/sync:
    post:
      summary: 'Sinkronisasi village (desa/kelurahan) dari API Emsifa'
      operationId: sinkronisasiVillagedesakelurahanDariAPIEmsifa
      description: "Endpoint ini mengambil daftar desa/kelurahan dari API eksternal (Emsifa)\nberdasarkan `regency_id` (kode kecamatan/sub-district) lalu menyimpannya ke database lokal.\nData baru akan ditambahkan, dan data lama akan diperbarui jika sudah ada."
      parameters:
        -
          in: query
          name: regency_id
          description: "Required. Kode kecamatan (sub-district) untuk mengambil daftar desa/kelurahan.\nContoh: \"7303060\""
          example: consequatur
          required: false
          schema:
            type: string
            description: "Required. Kode kecamatan (sub-district) untuk mengambil daftar desa/kelurahan.\nContoh: \"7303060\""
            example: consequatur
            nullable: false
        -
          in: header
          name: X-Api-Version
          description: ''
          example: '1.0'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: true
                  message: 'Sukses memperbarui data kecamatan.'
                properties:
                  status:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Sukses memperbarui data kecamatan.'
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  message: 'Gagal mengambil data dari API.'
                  errors:
                    message: 'Gagal mengambil data dari API'
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Gagal mengambil data dari API.'
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Gagal mengambil data dari API'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  message: 'Kesalahan. [Detail error]'
                  errors:
                    message: 'Detail error'
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Kesalahan. [Detail error]'
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
                        example: 'Detail error'
      tags:
        - Region
      security: []
