# 보기/인쇄

## 1. GetPopUpURL - 전자세금계산서 팝업 URL

| HTTP Method | 테스트(Sandbox)                                                          | 운영(Production)                                                   |
| ----------- | --------------------------------------------------------------------- | ---------------------------------------------------------------- |
| GET         | <https://popbill-test.linkhub.co.kr/Taxinvoice/{MgtKeyType}/{MgtKey}> | <https://popbill.linkhub.co.kr/Taxinvoice/{MgtKeyType}/{MgtKey}> |

![전자세금계산서 팝업 URL 미리보기](https://developers.popbill.com/images/reference/taxinvoice/getPopUpURL.png)

**전자세금계산서 1건의 팝업 URL을 반환합니다.**

- 권장 사이즈 : width = 1,000px (최소 975px) / height = 800px
- 반환되는 URL은 30초 동안만 사용이 가능합니다.
- 반환되는 URL에서만 유효한 세션을 포함하고 있습니다.

### Request

**요청 헤더**

- Authorization `required: Y` `description: 인증 토큰`
  - [\[참고\] 인증 및 헤더 설정](https://developers.popbill.com/api-reference/taxinvoice/getting-started/authorization)
- Accept-Language `required: N` `description: 응답 언어 설정`
  - `ko-KR`: 기본값
  - `en-US`
- Accept-Encoding `required: N` `description: 응답 압축 방식`
  - `gzip`
- X-PB-UserID `required: N` `description: 팝빌회원 아이디`

**Path 파라미터**

- MgtKeyType `type: string` `length: -` `required: Y` `description: 문서번호 유형 (택 1)`
  - `SELL`: 매출
  - `BUY`: 매입
  - `TRUSTEE`: 위수탁
- MgtKey `type: string` `length: 24` `required: Y` `description: 파트너가 할당한 문서번호`

**Query 파라미터**

- TG `type: string` `length: -` `required: Y` `description: 고정값 : POPUP`

**요청 예시**

```bash
curl --request GET \
  --url 'https://{domain}/Taxinvoice/{MgtKeyType}/{MgtKey}?TG=POPUP' \
  --header 'Authorization: Bearer {token}'
```

### Response

**응답 본문**

- url `type: string` `length: -` `description: 전자세금계산서 팝업 URL`

**응답 예시**

```json
{
    "url": "https://test.popbill.com/App/API?T=2ZU3PQGQII4UD3J7HW2EURIBS...AWPV2OWRUPGACA======"
}
```

## 2. GetViewURL - 전자세금계산서 팝업 URL \[보기 전용]

| HTTP Method | 테스트(Sandbox)                                                          | 운영(Production)                                                   |
| ----------- | --------------------------------------------------------------------- | ---------------------------------------------------------------- |
| GET         | <https://popbill-test.linkhub.co.kr/Taxinvoice/{MgtKeyType}/{MgtKey}> | <https://popbill.linkhub.co.kr/Taxinvoice/{MgtKeyType}/{MgtKey}> |

![전자세금계산서 팝업 URL \[보기 전용\] 미리보기](https://developers.popbill.com/images/reference/taxinvoice/getViewURL.png)

**전자세금계산서 1건의 팝업 URL을 반환합니다.**

- 권장 사이즈 : width = 1,000px (최소 975px) / height = 800px
- 페이지 상/하단에 기능 버튼이 존재하지 않습니다.
- 반환되는 URL은 30초 동안만 사용이 가능합니다.
- 반환되는 URL에서만 유효한 세션을 포함하고 있습니다.

### Request

**요청 헤더**

- Authorization `required: Y` `description: 인증 토큰`
  - [\[참고\] 인증 및 헤더 설정](https://developers.popbill.com/api-reference/taxinvoice/getting-started/authorization)
- Accept-Language `required: N` `description: 응답 언어 설정`
  - `ko-KR`: 기본값
  - `en-US`
- Accept-Encoding `required: N` `description: 응답 압축 방식`
  - `gzip`
- X-PB-UserID `required: N` `description: 팝빌회원 아이디`

**Path 파라미터**

- MgtKeyType `type: string` `length: -` `required: Y` `description: 문서번호 유형 (택 1)`
  - `SELL`: 매출
  - `BUY`: 매입
  - `TRUSTEE`: 위수탁
- MgtKey `type: string` `length: 24` `required: Y` `description: 파트너가 할당한 문서번호`

**Query 파라미터**

- TG `type: string` `length: -` `required: Y` `description: 고정값 : VIEW`

**요청 예시**

```bash
curl --request GET \
  --url 'https://{domain}/Taxinvoice/{MgtKeyType}/{MgtKey}?TG=VIEW' \
  --header 'Authorization: Bearer {token}'
```

### Response

**응답 본문**

- url `type: string` `length: -` `description: 전자세금계산서 팝업 URL [보기 전용]`

**응답 예시**

```json
{
    "url": "https://test.popbill.com/App/API?T=IRXSGITDREOTPOIRLPUHCB4BSBC4...NX7BMAR3="
}
```

## 3. GetPrintURL - 공급자 인쇄 팝업 URL

| HTTP Method | 테스트(Sandbox)                                                          | 운영(Production)                                                   |
| ----------- | --------------------------------------------------------------------- | ---------------------------------------------------------------- |
| GET         | <https://popbill-test.linkhub.co.kr/Taxinvoice/{MgtKeyType}/{MgtKey}> | <https://popbill.linkhub.co.kr/Taxinvoice/{MgtKeyType}/{MgtKey}> |

![공급자 인쇄 팝업 URL 미리보기](https://developers.popbill.com/images/reference/taxinvoice/getPrintURL.png)

**전자세금계산서 1건의 공급자 인쇄 팝업 URL을 반환합니다.**

- 권장 사이즈 : width = 930px / height = 765px
- 반환되는 URL은 30초 동안만 사용이 가능합니다.
- 반환되는 URL에서만 유효한 세션을 포함하고 있습니다.

### Request

**요청 헤더**

- Authorization `required: Y` `description: 인증 토큰`
  - [\[참고\] 인증 및 헤더 설정](https://developers.popbill.com/api-reference/taxinvoice/getting-started/authorization)
- Accept-Language `required: N` `description: 응답 언어 설정`
  - `ko-KR`: 기본값
  - `en-US`
- Accept-Encoding `required: N` `description: 응답 압축 방식`
  - `gzip`
- X-PB-UserID `required: N` `description: 팝빌회원 아이디`

**Path 파라미터**

- MgtKeyType `type: string` `length: -` `required: Y` `description: 문서번호 유형 (택 1)`
  - `SELL`: 매출
  - `BUY`: 매입
  - `TRUSTEE`: 위수탁
- MgtKey `type: string` `length: 24` `required: Y` `description: 파트너가 할당한 문서번호`

**Query 파라미터**

- TG `type: string` `length: -` `required: Y` `description: 고정값 : PRINT`

**요청 예시**

```bash
curl --request GET \
  --url 'https://{domain}/Taxinvoice/{MgtKeyType}/{MgtKey}?TG=PRINT' \
  --header 'Authorization: Bearer {token}'
```

### Response

**응답 본문**

- url `type: string` `length: -` `description: 전자세금계산서 공급자 인쇄 팝업 URL`

**응답 예시**

```json
{
    "url": "https://test.popbill.com/App/API?T=IRXSGITDREOTPOIRLPUHCB4BSBC4...NX7BMAR3="
}
```

## 4. GetEPrintURL - 공급받는자 인쇄 팝업 URL

| HTTP Method | 테스트(Sandbox)                                                          | 운영(Production)                                                   |
| ----------- | --------------------------------------------------------------------- | ---------------------------------------------------------------- |
| GET         | <https://popbill-test.linkhub.co.kr/Taxinvoice/{MgtKeyType}/{MgtKey}> | <https://popbill.linkhub.co.kr/Taxinvoice/{MgtKeyType}/{MgtKey}> |

![공급받는자 인쇄 팝업 URL 미리보기](https://developers.popbill.com/images/reference/taxinvoice/getEPrintURL.png)

**전자세금계산서 1건의 공급받는자 인쇄 팝업 URL을 반환합니다.**

- 권장 사이즈 : width = 930px / height = 765px
- 반환되는 URL은 30초 동안만 사용이 가능합니다.
- 반환되는 URL에서만 유효한 세션을 포함하고 있습니다.

### Request

**요청 헤더**

- Authorization `required: Y` `description: 인증 토큰`
  - [\[참고\] 인증 및 헤더 설정](https://developers.popbill.com/api-reference/taxinvoice/getting-started/authorization)
- Accept-Language `required: N` `description: 응답 언어 설정`
  - `ko-KR`: 기본값
  - `en-US`
- Accept-Encoding `required: N` `description: 응답 압축 방식`
  - `gzip`
- X-PB-UserID `required: N` `description: 팝빌회원 아이디`

**Path 파라미터**

- MgtKeyType `type: string` `length: -` `required: Y` `description: 문서번호 유형 (택 1)`
  - `SELL`: 매출
  - `BUY`: 매입
  - `TRUSTEE`: 위수탁
- MgtKey `type: string` `length: 24` `required: Y` `description: 파트너가 할당한 문서번호`

**Query 파라미터**

- TG `type: string` `length: -` `required: Y` `description: 고정값 : EPRINT`

**요청 예시**

```bash
curl --request GET \
  --url 'https://{domain}/Taxinvoice/{MgtKeyType}/{MgtKey}?TG=EPRINT' \
  --header 'Authorization: Bearer {token}'
```

### Response

**응답 본문**

- url `type: string` `length: -` `description: 전자세금계산서 공급받는자 인쇄 팝업 URL`

**응답 예시**

```json
{
    "url": "https://test.popbill.com/App/API?T=IRXSGITDREOTPOIRLPUHCB4BSBC4...NX7BMAR3="
}
```

## 5. GetMassPrintURL - 다건 인쇄 팝업 URL

| HTTP Method | 테스트(Sandbox)                                                 | 운영(Production)                                          |
| ----------- | ------------------------------------------------------------ | ------------------------------------------------------- |
| POST        | <https://popbill-test.linkhub.co.kr/Taxinvoice/{MgtKeyType}> | <https://popbill.linkhub.co.kr/Taxinvoice/{MgtKeyType}> |

![다건 인쇄 팝업 URL 미리보기](https://developers.popbill.com/images/reference/taxinvoice/getPrintURL.png)

**전자세금계산서 다건의 인쇄 팝업 URL을 반환합니다.**

- 권장 사이즈 : width = 930px / height = 765px
- 1회 호출에 최대 100건까지 인쇄가 가능합니다.
- 반환되는 URL은 30초 동안만 사용이 가능합니다.
- 반환되는 URL에서만 유효한 세션을 포함하고 있습니다.

### Request

**요청 헤더**

- Authorization `required: Y` `description: 인증 토큰`
  - [\[참고\] 인증 및 헤더 설정](https://developers.popbill.com/api-reference/taxinvoice/getting-started/authorization)
- Content-Type `required: Y` `description: 요청 본문 형식`
  - `application/json`
- Accept-Language `required: N` `description: 응답 언어 설정`
  - `ko-KR`: 기본값
  - `en-US`
- Accept-Encoding `required: N` `description: 응답 압축 방식`
  - `gzip`
- X-PB-UserID `required: N` `description: 팝빌회원 아이디`

**Path 파라미터**

- MgtKeyType `type: string` `length: -` `required: Y` `description: 문서번호 유형 (택 1)`
  - `SELL`: 매출
  - `BUY`: 매입
  - `TRUSTEE`: 위수탁

**Query 파라미터**

- Print `type: string` `length: -` `required: Y` `description: 빈값으로 입력`

**요청 본문**

- \- `type: array` `length: 100` `required: Y` `description: 문서번호 목록`
  - 최대 : 100건

**요청 예시**

```bash
curl --request POST \
  --url 'https://{domain}/Taxinvoice/{MgtKeyType}?Print' \
  --header 'Authorization: Bearer {token}' \
  --header 'Content-Type: application/json' \
  --data '["TEST0001"]'
```

### Response

**응답 본문**

- url `type: string` `length: -` `description: 전자세금계산서 다건 인쇄 팝업 URL`

**응답 예시**

```json
{
    "url": "https://test.popbill.com/App/API?T=2ZU3PQGQII4UD3J7HW2EURIBS...AWPV2OWRUPGACA======"
}
```

## 6. GetMailURL - 메일 보기 팝업 URL

| HTTP Method | 테스트(Sandbox)                                                          | 운영(Production)                                                   |
| ----------- | --------------------------------------------------------------------- | ---------------------------------------------------------------- |
| GET         | <https://popbill-test.linkhub.co.kr/Taxinvoice/{MgtKeyType}/{MgtKey}> | <https://popbill.linkhub.co.kr/Taxinvoice/{MgtKeyType}/{MgtKey}> |

![메일 보기 팝업 URL 미리보기](https://developers.popbill.com/images/reference/taxinvoice/getMailURL.png)

**전자세금계산서 발행 안내 메일의 ‘보기’ 버튼 URL을 반환합니다.**

- 권장 사이즈 : width = 1,000px (최소 975px) / height = 800px
- 반환되는 URL은 유효기간 제한 없이 사용할 수 있습니다.
- 반환되는 URL에서만 유효한 세션을 포함하고 있습니다.

### Request

**요청 헤더**

- Authorization `required: Y` `description: 인증 토큰`
  - [\[참고\] 인증 및 헤더 설정](https://developers.popbill.com/api-reference/taxinvoice/getting-started/authorization)
- Accept-Language `required: N` `description: 응답 언어 설정`
  - `ko-KR`: 기본값
  - `en-US`
- Accept-Encoding `required: N` `description: 응답 압축 방식`
  - `gzip`
- X-PB-UserID `required: N` `description: 팝빌회원 아이디`

**Path 파라미터**

- MgtKeyType `type: string` `length: -` `required: Y` `description: 문서번호 유형 (택 1)`
  - `SELL`: 매출
  - `BUY`: 매입
  - `TRUSTEE`: 위수탁
- MgtKey `type: string` `length: 24` `required: Y` `description: 파트너가 할당한 문서번호`

**Query 파라미터**

- TG `type: string` `length: -` `required: Y` `description: 고정값 : MAIL`

**요청 예시**

```bash
curl --request GET \
  --url 'https://{domain}/Taxinvoice/{MgtKeyType}/{MgtKey}?TG=MAIL' \
  --header 'Authorization: Bearer {token}'
```

### Response

**응답 본문**

- url `type: string` `length: -` `description: 전자세금계산서 메일 보기 팝업 URL`

**응답 예시**

```json
{
    "url": "https://test.popbill.com/App/Taxinvoice/025102114360700001.E?T=Q5LM53CQT...FQH0QUG"
}
```

## 7. GetPDFURL - PDF 다운로드 URL

| HTTP Method | 테스트(Sandbox)                                                          | 운영(Production)                                                   |
| ----------- | --------------------------------------------------------------------- | ---------------------------------------------------------------- |
| GET         | <https://popbill-test.linkhub.co.kr/Taxinvoice/{MgtKeyType}/{MgtKey}> | <https://popbill.linkhub.co.kr/Taxinvoice/{MgtKeyType}/{MgtKey}> |

- 전자세금계산서 1건의 PDF 다운로드 URL을 반환합니다.
- 반환되는 URL은 30초 동안만 사용이 가능합니다.

### Request

**요청 헤더**

- Authorization `required: Y` `description: 인증 토큰`
  - [\[참고\] 인증 및 헤더 설정](https://developers.popbill.com/api-reference/taxinvoice/getting-started/authorization)
- Accept-Language `required: N` `description: 응답 언어 설정`
  - `ko-KR`: 기본값
  - `en-US`
- Accept-Encoding `required: N` `description: 응답 압축 방식`
  - `gzip`
- X-PB-UserID `required: N` `description: 팝빌회원 아이디`

**Path 파라미터**

- MgtKeyType `type: string` `length: -` `required: Y` `description: 문서번호 유형 (택 1)`
  - `SELL`: 매출
  - `BUY`: 매입
  - `TRUSTEE`: 위수탁
- MgtKey `type: string` `length: 24` `required: Y` `description: 파트너가 할당한 문서번호`

**Query 파라미터**

- TG `type: string` `length: -` `required: Y` `description: 고정값 : PDF`

**요청 예시**

```bash
curl --request GET \
  --url 'https://{domain}/Taxinvoice/{MgtKeyType}/{MgtKey}?TG=PDF' \
  --header 'Authorization: Bearer {token}'
```

### Response

**응답 본문**

- url `type: string` `length: -` `description: 세금계산서 PDF 다운로드 URL`

**응답 예시**

```json
{
    "url": "https://test.popbill.com/App/API?T=SRLKRJXIVD3BCHUOT57UJWIDWDEJYTKJNRF...P756YYKGQ===="
}
```
