# 외국인등록증 진위 확인



외국인등록증의 진위여부를 확인합니다.



인증: Authorization: Bearer $APICK_API_KEY

본문 있는 REST 요청: multipart/form-data. GET 본문 및 MCP JSON-RPC 규격은 해당 명세를 따릅니다.

인증키는 서버에 보관하세요. 모든 예제는 정적 자료입니다.



## POST /rest/identi_card/5 응답 필드

- `data` (object): 조회 데이터

- `data.ic_id` (integer): 신분증 진위 확인 요청 ID

- `data.type` (integer): 신분증 종류1: 주민등록증2: 운전면허증3: 여권4: 주민등록등본5: 외국인등록증

- `data.result` (integer): 조회 결과0: 실패1: 성공2: 추가 확인 필요(msg 참고)3: 실패(timeout)

- `data.msg` (string): 메시지

- `data.success` (integer): 과금 여부0: 실패1: 성공3: 실패(timeout)

- `api` (object): API 호출 공통 데이터

- `api.success` (boolean): API 서버 정상 응답 여부

- `api.cost` (integer): API 호출 요금

- `api.ms` (integer): API 응답 시간

- `api.pl_id` (integer): API 결제 로그 ID

## API 요청: POST /rest/identi_card/5



### 입력

- `rrn` (string, 필수): 외국인등록번호 (숫자 13자리)

- `made_date` (string, 필수): 발급일자 (10자리, 예: 2020-01-01)

- `card_sn` (string, 선택): 뒷면 일련번호 (11자리). 2011-01-01 이후 발급분은 필수



### 응답 명세

```json

{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "ic_id": {
          "type": "integer",
          "description": "신분증 진위 확인 요청 ID"
        },
        "type": {
          "type": "integer",
          "description": "신분증 종류1: 주민등록증2: 운전면허증3: 여권4: 주민등록등본5: 외국인등록증"
        },
        "result": {
          "type": "integer",
          "description": "조회 결과0: 실패1: 성공2: 추가 확인 필요(msg 참고)3: 실패(timeout)"
        },
        "msg": {
          "type": "string",
          "description": "메시지"
        },
        "success": {
          "type": "integer",
          "description": "과금 여부0: 실패1: 성공3: 실패(timeout)"
        }
      },
      "description": "조회 데이터"
    },
    "api": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "API 서버 정상 응답 여부"
        },
        "cost": {
          "type": "integer",
          "description": "API 호출 요금"
        },
        "ms": {
          "type": "integer",
          "description": "API 응답 시간"
        },
        "pl_id": {
          "type": "integer",
          "description": "API 결제 로그 ID"
        }
      },
      "description": "API 호출 공통 데이터"
    }
  }
}

```

### 정적 응답 예시

```json

{
  "data": {
    "ic_id": 121305,
    "type": 5,
    "result": 1,
    "msg": "귀하께서 조회하신 외국인등록번호 1234561234567,   발급일자 2020-01-01,   일련번호 10181111111\n 법무부가 보유한 정보와 일치합니다.\n\n\n※ 조회결과는 전산기록과 비교한 것이므로 위조제작이나 사진교체 등 위ㆍ변조 여부에 대한 판단 기준은 될 수 없습니다.",
    "success": 1
  },
  "api": {
    "success": true,
    "cost": 40,
    "ms": 2020,
    "pl_id": 128605
  }
}

```

### curl

```curl

curl --fail-with-body --request POST 'https://apick.app/rest/identi_card/5' \
  --header "Authorization: Bearer $APICK_API_KEY" \
  --form-string 'rrn=1234561234567' \
  --form-string 'made_date=2020-01-01' \
  --form-string 'card_sn=10181111111'

```

### Node.js (서버 ESM)

```javascript

const form = new FormData();
form.append("rrn", "1234561234567");
form.append("made_date", "2020-01-01");
form.append("card_sn", "10181111111");
const response = await fetch("https://apick.app/rest/identi_card/5", {
  method: "POST",
  headers: { Authorization: "Bearer " + process.env.APICK_API_KEY },
  body: form,
  signal: AbortSignal.timeout(120_000),
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const result = await response.json();
console.log(result);

```

### python

```python

import os
import requests
parts = [
    ("rrn", (None, "1234561234567")),
    ("made_date", (None, "2020-01-01")),
    ("card_sn", (None, "10181111111")),
]
response = requests.request("POST", "https://apick.app/rest/identi_card/5",
    headers={"Authorization": "Bearer " + os.environ["APICK_API_KEY"]},
    files=parts,
    timeout=(10, 120))
response.raise_for_status()
result = response.json()
print(result)

```

### php

```php

<?php
$headers = ["Authorization: Bearer " . getenv("APICK_API_KEY")];
$form = [
    'rrn' => '1234561234567',
    'made_date' => '2020-01-01',
    'card_sn' => '10181111111',
];
$curl = curl_init('https://apick.app/rest/identi_card/5');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_POSTFIELDS => $form,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CONNECTTIMEOUT => 10, CURLOPT_TIMEOUT => 120,
]);
$body = curl_exec($curl);
if ($body === false) { throw new RuntimeException(curl_error($curl)); }
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($status >= 400) { throw new RuntimeException($body); }
$result = json_decode($body, true, 512, JSON_THROW_ON_ERROR);
print_r($result);

```

## 코드·오류

## 상세 기능·요금

Method URL POST https://apick.app/rest/identi_card/5 일련번호는 카드 뒷면에 표기되어 있습니다. 2011.01.01 이전에 발급된 등록증은 공란으로 요청하면 됩니다.

## 상세 요청

Header 이름 필수 설명 Authorization O Bearer 인증키

## 상세 응답

Body 이름 타입 설명 data Object 조회 데이터 ic_id Integer 신분증 진위 확인 요청 ID type Integer 신분증 종류1: 주민등록증2: 운전면허증3: 여권4: 주민등록등본5: 외국인등록증 result Integer 조회 결과0: 실패1: 성공2: 추가 확인 필요(msg 참고)3: 실패(timeout) msg String 메시지 success Integer 과금 여부0: 실패1: 성공3: 실패(timeout) api Object API 호출 공통 데이터 success Boolean API 서버 정상 응답 여부 cost Integer API 호출 요금 ms Integer API 응답 시간 pl_id Integer API 결제 로그 ID

## 상세 예제

요청 예시 form-data 전체 예제 보기 응답 예시 { "data": { "ic_id": 121305, "type": 5, "result": 1, "msg": "귀하께서 조회하신 외국인등록번호 1234561234567, 발급일자 2020-01-01, 일련번호 10181111111\n 법무부가 보유한 정보와 일치합니다.\n\n\n※ 조회결과는 전산기록과 비교한 것이므로 위조제작이나 사진교체 등 위ㆍ변조 여부에 대한 판단 기준은 될 수 없습니다.", "success": 1 }, "api": { "success": true, "cost": 40, "ms": 2020, "pl_id": 128605 } }
