> ## Documentation Index
> Fetch the complete documentation index at: https://docs.emplicon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Buat event absensi

> Mencatat clock in atau clock out untuk seorang karyawan.



## OpenAPI

````yaml openapi.json post /api/v1/attendances
openapi: 3.0.3
info:
  title: Emplicon API
  description: >-
    API publik Emplicon untuk integrasi: absensi, lembur (overtime), dan data
    karyawan.


    **Autentikasi:** API Key. Wajib mengirim dua header:

    - `X-Client-ID`: Client ID perusahaan (emp_cl_...)

    - `X-Api-Key`: API Secret Key (emp_sk_...)


    Keduanya didapat dari **Pengaturan → Perusahaan** di dashboard Emplicon.


    ---


    **Callback (webhook) yang tersedia saat ini:**

    - **Flip** — Inquiry Rekening: `POST
    https://api.emplicon.com/v1/webhooks/flip/inquiry`

    - **Flip** — Disbursement: `POST
    https://api.emplicon.com/v1/webhooks/flip/disbursement`


    URL callback didaftarkan di dashboard provider (Flip, dll). Emplicon
    menerima request GET (verifikasi URL) dan POST (payload).
  version: 1.0.0
servers:
  - url: https://api.emplicon.com
    description: Production
  - url: https://api-demo.emplicon.com
    description: Demo
security:
  - apiKeyAuth: []
    clientId: []
tags:
  - name: Attendances
    description: Absensi (clock in/out)
  - name: Overtimes
    description: Lembur (overtime start/end)
  - name: Employees
    description: Data karyawan
paths:
  /api/v1/attendances:
    post:
      tags:
        - Attendances
      summary: Buat event absensi
      description: Mencatat clock in atau clock out untuk seorang karyawan.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - unique_employee_id
                - date
                - clock_type
                - clock_time
              properties:
                unique_employee_id:
                  type: string
                  description: Unique ID karyawan (e.g. MULIA-1234567)
                date:
                  type: string
                  format: date
                clock_type:
                  type: string
                  enum:
                    - in
                    - out
                clock_time:
                  type: string
                  example: '08:00'
                status:
                  type: string
                latitude:
                  type: number
                longitude:
                  type: number
                notes:
                  type: string
                photo_url:
                  type: string
      responses:
        '201':
          description: Created
        '401':
          description: Missing or invalid API Key
      security:
        - apiKeyAuth: []
          clientId: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        API Secret Key (emp_sk_...). Wajib dikirim bersama header
        **X-Client-ID** (Client ID perusahaan). Keduanya didapat dari Pengaturan
        → Perusahaan di dashboard.
    clientId:
      type: apiKey
      in: header
      name: X-Client-ID
      description: Client ID perusahaan (emp_cl_...). Wajib dikirim bersama **X-Api-Key**.

````