# 외부 발급내역 단건 조회 API

{% hint style="warning" %}
**Deprecated**

이 문서는 더 이상 관리되지 않습니다.

[PortOne 개발자센터](https://developers.portone.io/)를 이용해주세요.
{% endhint %}

### 현금영수증 발급내역을 조회합니다.

## 포트원을 통해 현금영수증 거래만 발급한 정보를 획득합니다.

<mark style="color:blue;">`GET`</mark> `https://api.iamport.kr/receipts/external/{merchant_uid}`

#### Path Parameters

| Name                                            | Type   | Description                              |
| ----------------------------------------------- | ------ | ---------------------------------------- |
| merchant\_uid<mark style="color:red;">\*</mark> | String | <mark style="color:red;">**주문번호**</mark> |

{% tabs %}
{% tab title="200: OK 성공" %}
{% tabs %}
{% tab title="ExternalReceiptResponse" %}
**`code`** <mark style="color:red;">**\***</mark> <mark style="color:purple;">**integer**</mark>

**응답코드**

0이면 정상적인 조회, 0 이 아닌 값이면 message를 확인해봐야 합니다

**`message`** <mark style="color:red;">**\***</mark> <mark style="color:green;">**string**</mark>

**응답메세지**

code 값이 0이 아닐 때, '존재하지 않는 결제정보입니다'와 같은 오류 메세지를 포함합니다

**`response`** <mark style="color:red;">**`(ExternalReceiptAnnotation, optional)`**</mark>
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="ExternalReceiptAnnotation" %}
**`merchant_uid`** <mark style="color:red;">**\***</mark> <mark style="color:green;">**`string`**</mark>

**`주문번호`**

**`receipt_tid`** <mark style="color:green;">**`string`**</mark>

**`현금영수증 PG사 발행고유번호`**

**`apply_num`** <mark style="color:red;">**\***</mark> <mark style="color:green;">**`string`**</mark>

**`현금영수증 국세청 발행번호`**

**`type`** <mark style="color:red;">**\***</mark> <mark style="color:green;">**`string`**</mark>

**`현금영수증 발행대상 타입`**

* 개인 : `person`
* 사업자 : `company`

**`amount`** <mark style="color:red;">**\***</mark> <mark style="color:orange;">**`integer`**</mark>

**`현금영수증 발행금액`**

**`vat`** <mark style="color:red;">**\***</mark> <mark style="color:orange;">**`integer`**</mark>

**`부가세`**

**`receipt_url`** <mark style="color:green;">**`string`**</mark>

**`발행된 현금영수증 URL`**

**`applied_at`** <mark style="color:red;">**\***</mark> <mark style="color:orange;">**`integer`**</mark>

**현금영수증 발행시각** `UNIX TIMESTAMP`

**`cancelled_at`** <mark style="color:orange;">**`integer`**</mark>

**`현금영수증 발행취소시각`** `UNIX TIMESTAMP`
{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="401: Unauthorized 인증 Token이 전달되지 않았거나 유효하지 않은 경우" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found merchant\_uid 로 현금영수증 발행된 내역이 확인되지 않는 경우" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

<details>

<summary>Response Model Schema</summary>

```
{
  "code": 0,
  "message": "string",
  "response": {
    "merchant_uid": "string",
    "receipt_tid": "string",
    "apply_num": "string",
    "type": "person",
    "amount": 0,
    "vat": 0,
    "receipt_url": "string",
    "applied_at": 0,
    "cancelled_at": 0
  }
}
```

</details>

{% hint style="success" %}
**Swagger Test Link**

[**https://api.iamport.kr/#!/receipts/getExternalReceipt**](https://api.iamport.kr/#!/receipts/getExternalReceipt)
{% endhint %}
