# API Dokumentasi: Get & Claim ID Card Consignee

**Ditujukan untuk:** MECS HQ Developer

---

## Token Autentikasi

Header: `Authorization: Bearer mars_sec_e175061ff59b26b6bb4bccbff27b506b78e40685`

---

## 1. GET ID Cards (Filter account=ERGE & mecs_claim=0)

### cURL

```bash
curl -X GET "https://officecoresys.com/ext/v1/coloader/id-cards?account=ERGE&mecs_claim=0" \
  -H "Authorization: Bearer mars_sec_e175061ff59b26b6bb4bccbff27b506b78e40685"
```

### Response

```json
{
  "success": true,
  "message": "Success",
  "data": {
    "id_cards": [
      {
        "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",
        "mecs_claim": 0,
        "claimed_at": null,
        "created_at": "2026-10-19 22:00:00"
      }
    ],
    "filters": {
      "account": "ERGE",
      "mecs_claim": "0",
      "country": "ALL",
      "search": null,
      "date_from": null,
      "date_to": null
    },
    "pagination": {
      "total": 1,
      "page": 1,
      "limit": 50,
      "total_pages": 1
    }
  }
}
```

---

## 2. GET ID Cards (Filter account=ZVX & mecs_claim=0)

### cURL

```bash
curl -X GET "https://officecoresys.com/ext/v1/coloader/id-cards?account=ZVX&mecs_claim=0" \
  -H "Authorization: Bearer mars_sec_e175061ff59b26b6bb4bccbff27b506b78e40685"
```

### Response

```json
{
  "success": true,
  "message": "Success",
  "data": {
    "id_cards": [
      {
        "id": 2,
        "id_number": "B987654321",
        "consignee_name": "CHEN MEILING",
        "country": "TW",
        "expired_date": "2030-12-31",
        "coloader_name": "ZVX",
        "photo_depan": "https://officecoresys.com/id-card-files/coloader_id_cards/front_6ad62c9c.jpg",
        "photo_belakang": "https://officecoresys.com/id-card-files/coloader_id_cards/back_6ad62c9d.jpg",
        "mecs_claim": 0,
        "claimed_at": null,
        "created_at": "2026-10-19 22:05:00"
      }
    ],
    "filters": {
      "account": "ZVX",
      "mecs_claim": "0",
      "country": "ALL",
      "search": null,
      "date_from": null,
      "date_to": null
    },
    "pagination": {
      "total": 1,
      "page": 1,
      "limit": 50,
      "total_pages": 1
    }
  }
}
```

---

## 3. POST Claim ID Cards

### cURL

```bash
curl -X POST "https://officecoresys.com/ext/v1/coloader/id-cards/claim" \
  -H "Authorization: Bearer mars_sec_e175061ff59b26b6bb4bccbff27b506b78e40685" \
  -H "Content-Type: application/json" \
  -d '{
    "id_numbers": ["A123456789"]
  }'
```

### Response

```json
{
  "success": true,
  "message": "1 ID Card(s) successfully marked as claimed by MECS",
  "data": {
    "claimed_count": 1
  }
}
```

---

## 4. GET Detail ID Card by ID Number

### cURL

```bash
curl -X GET "https://officecoresys.com/ext/v1/coloader/id-cards/A123456789" \
  -H "Authorization: Bearer mars_sec_e175061ff59b26b6bb4bccbff27b506b78e40685"
```

### 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",
    "mecs_claim": 1,
    "claimed_at": "2026-10-19 22:05:00",
    "created_at": "2026-10-19 22:00:00"
  }
}
```
