# SERVICE API HANA ON AHO

**Link URL Service** → Method: `POST` → Environment: Development (Testing)

> **Catatan Format Tanggal (dikonfirmasi tim HOPES, 2026-03-17):**
> Format `regist_dt` yang benar adalah **`yyyy-MM-dd`** (ISO 8601, contoh: `2026-03-05`).
> Format `regist_tm` adalah **`HH:mm:ss`** (24-hour, contoh: `14:30:00`).
> Tabel parameter di doc versi lama yang mencantumkan `dd-MM-yyyy` adalah **keliru**.

---

## 1. Select Customer (`selectCust`)

| | URL |
|---|---|
| **TEST** | `https://cvstrnUAT.shf.co.id/selectCust` |
| **REAL** | `https://cvstrn.shf.co.id/selectCust` |

### JSON Request

```json
{
  "ppk": "121000012963",
  "scrn_Id": "OPIS",
  "regist_dt": "2026-03-05",
  "regist_tm": "14:26:00",
  "op_no": "1708064",
  "signature": "6A031486512164435A05BD9C8C8F0C0D680382BE"
}
```

### Request Parameters

| Data Type | Column Name | Description |
|-----------|-------------|-------------|
| String | `ppk` | PPK |
| String | `scrn_id` | Screen ID (`OPIS`) |
| String | `regist_dt` | Registration date (`yyyy-MM-dd`) |
| String | `regist_tm` | Registration time (`HH:mm:ss`) — 24-hour format |
| String | `op_no` | OP ID |
| String | `signature` | Encryption key |

### Signature

Please send the `signature` value encrypted using **SHA1** method.

- **Live** encryption key: `hanaOnAhoApi`
- **Development / UAT** encryption key: `ABC`

**Formula:** `ppk + regist_dt + regist_tm + op_no + encryption_key`

### Success Result

```json
{
  "cix_no": "00020491",
  "cust_nm": "ANWAR YULIANTO",
  "response_code": "00",
  "response_desc": "Success",
  "ppk": "121000012963"
}
```

---

## 2. Insert AHO (`insertAHO`)

| | URL                                     |
|---|-----------------------------------------|
| **TEST** | `https://cvstrnUAT.shf.co.id/insertAho` |
| **REAL** | `https://cvstrn.shf.co.id/insertAho`    |

### JSON Request

```json
{
  "ppk": "121000012963",
  "cix_no": "00020491",
  "regist_dt": "2026-03-05",
  "regist_tm": "14:30:00",
  "op_no": "1708064",
  "op_nm": "YOPPIE ANOM",
  "main_cd": "10",
  "sub_cd": "100",
  "conts": "OPIS Call test",
  "promDt": "2026-05-01",
  "file_name": "",
  "signature": "6A031486512164435A05BD9C8C8F0C0D680382BE"
}

```

### Request Parameters

| Data Type | Column Name | Description                      |
|-----------|-------------|----------------------------------|
| String | `ppk` | PPK                              |
| String | `cix_no` | Customer Number                  |
| String | `regist_dt` | Registration date (`yyyy-MM-dd`) |
| String | `regist_tm` | Registration time (`hh:mm:ss`)   |
| String | `op_no` | OP ID                            |
| String | `op_nm` | OP Name                          |
| String | `main_cd` | Main code (`KETEMU: 10`)         |
| String | `sub_cd` | Sub code (see table below)       |
| String | `conts` | Contents                         |
| String | `promDt` | Payment promise date             |
| String | `signature` | Encryption key                   |
| String | `file_name` | OPIS link address                |

#### Sub Code Values

| Code | Description |
|------|-------------|
| `100` | Janji Bayar |
| `101` | Sudah Bayar |
| `102` | Tarik Unit |
| `103` | Pelunasan |
| `104` | Unit Pindah Tangan |
| `105` | Unit Hilang |

### Signature

Please send the `signature` value encrypted using **SHA1** method.

- **Live** encryption key: `hanaOnAhoApi`
- **Development / UAT** encryption key: `ABC`

**Formula:** `ppk + regist_dt + regist_tm + op_no + encryption_key`

### Success Result

```json
{
  "cix_no": "00020491",
  "cust_nm": "ANWAR YULIANTO",
  "response_code": "00",
  "response_desc": "Success",
  "ppk": "121000012963"
}
```

### Fail Result

| Code | Message |
|------|---------|
| `01` | ppk is empty |
| `02` | scrn_id is empty |
| `03` | regist_dt is empty |
| `04` | regist_tm is empty |
| `05` | op_no is empty |
| `06` | op_nm is empty |
| `07` | main_cd is empty |
| `08` | sub_cd is empty |
| `09` | conts is empty |
| `10` | file_name is empty |
| `11` | Ppk not found data |
