# API Dokumentasi: Upload ID Card Consignee

**Ditujukan untuk:** ERGE

---

## Token Autentikasi

Header: `Authorization: Bearer mars_erge_205fb04828f22cba4e2abccfe3db4dcfd689`

---

## 1. POST Submit ID Card (Format JSON + Base64)

### cURL

```bash
curl -X POST "https://officecoresys.com/ext/v1/coloader/id-cards" \
  -H "Authorization: Bearer mars_erge_205fb04828f22cba4e2abccfe3db4dcfd689" \
  -H "Content-Type: application/json" \
  -d '{
    "id_number": "A123456789",
    "consignee_name": "WANG XIAOMING",
    "country": "TW",
    "expired_date": "2030-12-31",
    "photo_depan": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD...",
    "photo_belakang": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD..."
  }'
```

### Response

```json
{
  "success": true,
  "message": "Consignee ID Card information successfully recorded",
  "data": {
    "id": 1,
    "id_number": "A123456789",
    "consignee_name": "WANG XIAOMING",
    "country": "TW",
    "expired_date": "2030-12-31",
    "coloader_name": "ERGE",
    "photo_depan": "https://officecoresys.com/id-card-files/coloader_id_cards/front_6ad62c9a.jpg",
    "photo_belakang": "https://officecoresys.com/id-card-files/coloader_id_cards/back_6ad62c9b.jpg",
    "created_at": "2026-10-19 22:00:00"
  }
}
```

---

## 2. POST Submit ID Card (Format Multipart / File Upload)

### cURL

```bash
curl -X POST "https://officecoresys.com/ext/v1/coloader/id-cards" \
  -H "Authorization: Bearer mars_erge_205fb04828f22cba4e2abccfe3db4dcfd689" \
  -F "id_number=A123456789" \
  -F "consignee_name=WANG XIAOMING" \
  -F "country=TW" \
  -F "expired_date=2030-12-31" \
  -F "photo_depan=@/path/to/id_card_front.jpg" \
  -F "photo_belakang=@/path/to/id_card_back.jpg"
```

### Response

```json
{
  "success": true,
  "message": "Consignee ID Card information successfully recorded",
  "data": {
    "id": 1,
    "id_number": "A123456789",
    "consignee_name": "WANG XIAOMING",
    "country": "TW",
    "expired_date": "2030-12-31",
    "coloader_name": "ERGE",
    "photo_depan": "https://officecoresys.com/id-card-files/coloader_id_cards/front_6ad62c9a.jpg",
    "photo_belakang": "https://officecoresys.com/id-card-files/coloader_id_cards/back_6ad62c9b.jpg",
    "created_at": "2026-10-19 22:00:00"
  }
}
```

---

## 3. GET Cek ID Card by ID Number

### cURL

```bash
curl -X GET "https://officecoresys.com/ext/v1/coloader/id-cards/A123456789" \
  -H "Authorization: Bearer mars_erge_205fb04828f22cba4e2abccfe3db4dcfd689"
```

### Response

```json
{
  "success": true,
  "message": "ID Card fetched successfully",
  "data": {
    "id": 1,
    "id_number": "A123456789",
    "consignee_name": "WANG XIAOMING",
    "country": "TW",
    "expired_date": "2030-12-31",
    "coloader_name": "ERGE",
    "photo_depan": "https://officecoresys.com/id-card-files/coloader_id_cards/front_6ad62c9a.jpg",
    "photo_belakang": "https://officecoresys.com/id-card-files/coloader_id_cards/back_6ad62c9b.jpg",
    "created_at": "2026-10-19 22:00:00"
  }
}
```
