# Realtime API Integration Status (FE <-> BE)

Dokumen ini untuk memastikan FE berjalan `pure API` (tanpa mock data).

## Status FE Saat Ini

FE sudah diubah agar call API langsung:

- Login: `POST /api/v1/auth/login`
- Product Master list: `GET /api/v1/products` (page/limit/search)
- Import product: `POST /api/v1/import/products`
- Export product: `GET /api/v1/export/products`

Jika endpoint belum ready, FE menampilkan pesan error API.

## Endpoint BE yang Wajib Online

1. `GET /api/v1/healthz` -> `200`
2. `POST /api/v1/auth/login` -> `200` + token
3. `GET /api/v1/products` -> `200` + `{ items, meta }`
4. `POST /api/v1/import/products` -> `200/202` + `job_id`
5. `GET /api/v1/export/products` -> file xlsx

## Blocker yang Masih Ada

1. TLS domain API (`apibazzar.softcomp.io`) harus benar.
   - Lihat: `docs/BE_API_DOMAIN_TLS_FIX.md`
2. Auth handler masih belum implement.
   - Lihat: `docs/AUTH_LOGIN_IMPLEMENTATION.md`
3. Product/import/export handler masih harus diimplementasi.
   - Lihat: `docs/PRODUCT_MASTER_API_REQUIREMENTS.md`

## Response Format Minimum (List Product)

```json
{
  "items": [
    {
      "id": 1,
      "item_code": "VLRMC020006",
      "barcode": "91031102000601",
      "name": "ABSTRACT TROPICAL",
      "brand": "RYCROFT",
      "category": "VOLLEY SHORT",
      "size": "S",
      "collection": "2024 Q4",
      "is_consignment": true
    }
  ],
  "meta": {
    "page": 1,
    "limit": 10,
    "total_items": 454,
    "total_pages": 46
  }
}
```

