Dokumentasi API

Solusi lengkap untuk pembuatan CV ATS otomatis, pengelolaan dokumen, dan penghapusan data aman.

POST

Authentication (OTP Login)

Sistem login tanpa password menggunakan verifikasi kode ke email Gmail.

Langkah 1: Request Login OTP

/api/auth/login/request
Request Body{
  "email": "dimassfeb@gmail.com"
}

Langkah 2: Verify Login OTP

/api/auth/login/verify
Request Body{ 
  "email": "dimassfeb@gmail.com", 
  "code": "123456" 
}

Response Sukses (Login)

Response JSON{
  "success": true,
  "message": "Login successful",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "user": {
    "id": "72bccb2e-ae04-4d3c-b5ae-5534d6093763",
    "email": "dimassfeb@gmail.com",
    "name": "dimassfeb",
    "created_at": "2026-05-01T07:04:52.647Z"
  }
}
POST

1. Generate & Save CV

/api/generate

Membuat file PDF dan menyimpan data. Wajib menggunakan token login.

Header Wajib:
Authorization: Bearer <token_jwt>

Request Body Lengkap

Request JSON{
  "cv_title": "Resume 2026",
  "layout": ["summary", "experience", "education", "skills", "projects"],
  "personal": {
    "name": "Dimas Febriyanto",
    "email": "work.dimas@gmail.com",
    "phone": "0823-1234-5678",
    "title": "Senior Flutter Developer",
    "location": "Bekasi, Indonesia",
    "github": "https://github.com/dimassfeb",
    "linkedin": "https://linkedin.com/in/dimassfeb",
    "website": "https://dimassfeb.com"
  },
  "summary": "Software Engineer berpengalaman dengan fokus pada ekosistem Flutter...",
  "experience": [
    {
      "company": "Sagara Technology",
      "title": "Lead Mobile Developer",
      "location": "Remote",
      "start_date": "Jan 2024",
      "end_date": "Present",
      "bullets": [
        "Mengembangkan arsitektur aplikasi menggunakan Clean Architecture",
        "Optimasi performa aplikasi hingga 40%"
      ]
    }
  ],
  "education": [
    {
      "institution": "Gunadarma University",
      "degree": "S1 Teknik Informatika",
      "location": "Depok",
      "start_date": "2021",
      "end_date": "2025",
      "gpa": 3.85
    }
  ],
  "skills": [
    { "name": "Programming", "items": ["Dart", "Go", "TypeScript"] },
    { "name": "Framework", "items": ["Flutter", "Node.js", "React"] }
  ],
  "projects": [
    {
      "name": "Dolan App",
      "description": "Aplikasi travel marketplace",
      "link": "https://play.google.com/...",
      "technologies": ["Flutter", "Go", "Supabase"],
      "bullets": ["Digunakan oleh 10,000+ pengguna"]
    }
  ],
  "custom_sections": [
    {
      "title": "Languages",
      "content": "Proficient in English and Indonesian",
      "bullets": ["English (TOEFL 600)", "Native Indonesian"]
    }
  ]
}

Response Sukses (Generate)

Response JSON{
  "success": true,
  "message": "CV generated and saved successfully",
  "data": {
    "cv_id": "a1b2c3d4-e5f6-4g7h-8i9j-k0l1m2n3o4p5",
    "title": "Resume 2026",
    "pdf_url": "https://storage.supabase.co/...",
    "download_url": "https://storage.supabase.co/.../signed_url_token"
  }
}
GET

2. Get CV Details

/api/cv/:id

Mengambil data lengkap CV (Simetris dengan request generate).

Header Wajib:
Authorization: Bearer <token_jwt>

Response Sukses (Full CV)

Response JSON{
  "success": true,
  "data": {
    "cv_id": "a1b2c3d4-e5f6-4g7h-8i9j-k0l1m2n3o4p5",
    "title": "Resume 2026",
    "layout": ["summary", "experience", "education", "skills"],
    "personal": {
      "name": "Dimas Febriyanto",
      "email": "work.dimas@gmail.com",
      "title": "Senior Flutter Developer"
    },
    "summary": "Software Engineer berpengalaman...",
    "experience": [...],
    "education": [...],
    "skills": [...],
    "projects": [...],
    "created_at": "2026-05-01T12:00:00Z"
  }
}
GET

3. Fetch User History

/api/cv/user/:email

Mendapatkan daftar CV milik user.

Response Sukses (History)

Response JSON{
  "success": true,
  "count": 2,
  "cvs": [
    {
      "id": "uuid-1",
      "title": "Resume Software Eng",
      "pdf_url": "https://...",
      "status": "completed",
      "created_at": "2026-05-01T..."
    }
  ]
}
Security

4. Secure Deletion System

Proses penghapusan data bersifat permanen dan memerlukan verifikasi ganda.

Step 1: Request Verification (OTP)

POST /api/cv/delete/request
Request Body{
  "email": "dimassfeb@gmail.com",
  "cv_id": "optional-uuid"
}

Step 2: Execute Deletion

Headers Wajib:
x-owner-email: Email pemilik
x-verification-code: Kode 6-digit

A. Delete Single CV

DELETE /api/cv/:id

B. Bulk Delete All CVs

DELETE /api/cv/user/:email