# 증빙서류

## 팝빌연동 세금계산서 메일전송

> \## 기능설명\
> \* 팝빌 문서번호, 주문번호, 이메일로 팝빌에서 제공하는 이메일 재전송 기능\
> \---\
> \## 상세설명\
> \* 팝빌에 있는 이메일 재전송 기능을 활용해 사용자가 원하는 때에 세금계산서 이메일 전송<br>

```json
{"openapi":"3.0.1","info":{"title":"X2BEE Order API","version":"v1"},"servers":[{"url":"https://api-order.x2bee.com/api/order/","description":"prd"}],"paths":{"/v1/popbill/invoice/sendEmail":{"post":{"tags":["증빙서류"],"summary":"팝빌연동 세금계산서 메일전송","description":"## 기능설명\n* 팝빌 문서번호, 주문번호, 이메일로 팝빌에서 제공하는 이메일 재전송 기능\n---\n## 상세설명\n* 팝빌에 있는 이메일 재전송 기능을 활용해 사용자가 원하는 때에 세금계산서 이메일 전송\n","operationId":"sendEmail","parameters":[{"name":"Authorization","in":"header","description":"Access Token","required":false}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxInvoiceEmailRequest"}}},"required":true},"responses":{"200":{"description":"성공","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}},"components":{"schemas":{"TaxInvoiceEmailRequest":{"type":"object","properties":{"ordNo":{"type":"string"},"mgrNo":{"type":"string"},"email":{"type":"string"}}},"Response":{"type":"object","properties":{"timestamp":{"type":"string","description":"result time","format":"date-time"},"code":{"type":"string","description":"result code"},"message":{"type":"string","description":"result message"},"isProcess":{"type":"boolean","description":"process check"},"payload":{"type":"object","description":"payload"},"error":{"type":"boolean","description":"is error"},"errors":{"type":"array","description":"validation error list","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string","description":"field"},"message":{"type":"string","description":"field message"}},"description":"validation error list"}}}}
```

## 세금 계산서 팝빌 웹훅 연동

> \## 기능설명\
> \* 팝빌에서 웹훅으로 보내주는 이벤트 처리\
> \---\
> \## 상세설명\
> \* Issue, CancelIssue, CLOSEDOWN, NTS, OPEN, Request, CancelRequest, Refuse 이벤트를 처리한다.\
> \---\
> \## 특이사항\
> \* 시스템 내부에서 호출되는 api가 아닌 popbill webhook에서 호출하는 API입니다.\
> \* popbill webhook 스펙에서 공통으로 감싸주는 response 형태를 수용하지 못함으로 @DisableResponseBodyAdvice 추가<br>

```json
{"openapi":"3.0.1","info":{"title":"X2BEE Order API","version":"v1"},"servers":[{"url":"https://api-order.x2bee.com/api/order/","description":"prd"}],"paths":{"/v1/popbill/invoice/connect":{"post":{"tags":["증빙서류"],"summary":"세금 계산서 팝빌 웹훅 연동","description":"## 기능설명\n* 팝빌에서 웹훅으로 보내주는 이벤트 처리\n---\n## 상세설명\n* Issue, CancelIssue, CLOSEDOWN, NTS, OPEN, Request, CancelRequest, Refuse 이벤트를 처리한다.\n---\n## 특이사항\n* 시스템 내부에서 호출되는 api가 아닌 popbill webhook에서 호출하는 API입니다.\n* popbill webhook 스펙에서 공통으로 감싸주는 response 형태를 수용하지 못함으로 @DisableResponseBodyAdvice 추가\n","operationId":"invoiceConnect","parameters":[{"name":"taxInvoiceConnectRequest","in":"query","required":true,"schema":{"type":"string","description":"TaxInvoiceConnectRequest"}},{"name":"Authorization","in":"header","description":"Access Token","required":false}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaxInvoiceConnectRequest"}}},"required":true},"responses":{"200":{"description":"성공","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TaxInvoiceConnectResponse"}}}}}}}},"components":{"schemas":{"TaxInvoiceConnectRequest":{"required":["corpNum","eventDT","eventType","itemKey","ntsconfirmNum"],"type":"object","properties":{"corpNum":{"type":"string","description":"전자세금계산서 발행 유형별 작성자 사업자번호"},"itemKey":{"type":"string","description":"팝빌에서 세금계산서 관리 목적으로 할당한 식별번호"},"ntsconfirmNum":{"type":"string","description":"국세청승인번호"},"ntssendDT":{"type":"string","description":"국세청 전송일시"},"ntsresultDT":{"type":"string","description":"국세청 결과 수신일시"},"ntssendErrCode":{"type":"string","description":"결과코드"},"stateCode":{"type":"integer","description":"상태코드","format":"int64"},"stateDT":{"type":"string","description":"상태 변경일시"},"issueDT":{"type":"string","description":"발행일시"},"invoicerMgtKey":{"type":"string","description":"공급자 문서번호"},"invoiceeMgtKey":{"type":"string","description":"공급받는자 문서번호"},"trusteeMgtKey":{"type":"string","description":"수탁자 문서번호"},"eventDT":{"type":"string","description":"이벤트 실행일시"},"eventType":{"type":"string","description":"이벤트 유형"},"closeDownState":{"type":"integer","description":"공급받는자 휴폐업상태","format":"int32"},"closeDownStateDate":{"type":"string","description":"공급받는자 휴폐업일자"},"interOPYN":{"type":"boolean"},"stateMemo":{"type":"string"}},"description":"팝빌 세금 계산서 webhook response"},"TaxInvoiceConnectResponse":{"type":"object","properties":{"result":{"type":"string","description":"결과값"}},"description":"세금 계산서 웹훅 연동 response"}}}}
```

## 이니시스 현금영수증 대사 연동

> \## 기능설명\
> \* 이니시스 현금영수증 대사 연동\
> \---\
> \## 상세설명\
> \* 연동된 대사 정보를 통해 얻은 증빙서류의 발행상태를 DB에 업데이트한다.<br>

```json
{"openapi":"3.0.1","info":{"title":"X2BEE Order API","version":"v1"},"servers":[{"url":"https://api-order.x2bee.com/api/order/","description":"prd"}],"paths":{"/v1/inicis/receipt/connect":{"post":{"tags":["증빙서류"],"summary":"이니시스 현금영수증 대사 연동","description":"## 기능설명\n* 이니시스 현금영수증 대사 연동\n---\n## 상세설명\n* 연동된 대사 정보를 통해 얻은 증빙서류의 발행상태를 DB에 업데이트한다.\n","operationId":"connect","parameters":[{"name":"taxInvoiceConnectRequest","in":"query","required":true,"schema":{"type":"string","description":"TaxInvoiceConnectRequest"}},{"name":"Authorization","in":"header","description":"Access Token","required":false}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentIssueRequest"}}}},"required":true},"responses":{"200":{"description":"성공"}}}}},"components":{"schemas":{"DocumentIssueRequest":{"type":"object","properties":{"docSeq":{"type":"string"},"proofType":{"type":"string"},"pgGbCd":{"type":"string"},"termlId":{"type":"string"},"ordNo":{"type":"string"},"mgrNo":{"type":"string"}}}}}}
```

## 증빙서류 발행배치

> \## 기능설명\
> \* 발행실패로 발행대기 상태로 되어 있는 증빙서류를 발행요청하는 배치\
> \---\
> \## 상세설명\
> \* 배치에서 발행대기 상태에 데이터 리스트로 재발행요청\
> \---\
> \## 수정 번호\
> \* Release v2.01\_251020 : 이니시스 현금영수증 발행 추가<br>

```json
{"openapi":"3.0.1","info":{"title":"X2BEE Order API","version":"v1"},"servers":[{"url":"https://api-order.x2bee.com/api/order/","description":"prd"}],"paths":{"/v1/document/reissue":{"post":{"tags":["증빙서류"],"summary":"증빙서류 발행배치","description":"## 기능설명\n* 발행실패로 발행대기 상태로 되어 있는 증빙서류를 발행요청하는 배치\n---\n## 상세설명\n* 배치에서 발행대기 상태에 데이터 리스트로 재발행요청\n---\n## 수정 번호\n* Release v2.01_251020 : 이니시스 현금영수증 발행 추가\n","operationId":"reissue","parameters":[{"name":"Authorization","in":"header","description":"Access Token","required":false}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentIssueRequest"}}}},"required":true},"responses":{"200":{"description":"성공"}}}}},"components":{"schemas":{"DocumentIssueRequest":{"type":"object","properties":{"docSeq":{"type":"string"},"proofType":{"type":"string"},"pgGbCd":{"type":"string"},"termlId":{"type":"string"},"ordNo":{"type":"string"},"mgrNo":{"type":"string"}}}}}}
```

## 주문 증빙서류 목록 조회

> \## 기능설명\
> \* 주문번호(ordNo)를 포함한 요청 파라미터를 받아 해당 주문의 증빙서류 목록을 조회합니다.\
> \---\
> \## 상세설명\
> \* 주문번호(ordNo)를 포함한 요청 파라미터를 받아 해당 주문의 증빙서류 목록을 조회합니다.\
> \* ordNo: 주문번호 (필수)\
> \* 등록일 오름차순으로 정렬합니다.<br>

```json
{"openapi":"3.0.1","info":{"title":"X2BEE Order API","version":"v1"},"servers":[{"url":"https://api-order.x2bee.com/api/order/","description":"prd"}],"paths":{"/v1/document/getOrderEvidDocInfo":{"post":{"tags":["증빙서류"],"summary":"주문 증빙서류 목록 조회","description":"## 기능설명\n* 주문번호(ordNo)를 포함한 요청 파라미터를 받아 해당 주문의 증빙서류 목록을 조회합니다.\n---\n## 상세설명\n* 주문번호(ordNo)를 포함한 요청 파라미터를 받아 해당 주문의 증빙서류 목록을 조회합니다.\n* ordNo: 주문번호 (필수)\n* 등록일 오름차순으로 정렬합니다.\n","operationId":"getOrderEvidDocInfo","parameters":[{"name":"Authorization","in":"header","description":"Access Token","required":false}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderEvidDocInfoRequest"}}},"required":true},"responses":{"200":{"description":"성공","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OrderEvidDocInfoResponse"}}}},"900":{"description":"업무처리 오류 내용","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}},"components":{"schemas":{"OrderEvidDocInfoRequest":{"type":"object","properties":{"langCd":{"type":"string"},"ordNo":{"type":"string"},"mbrNo":{"type":"string"},"searchCondition":{"type":"string"},"startDt":{"type":"string"},"endDt":{"type":"string"},"documentType":{"type":"string"}}},"OrderEvidDocInfoResponse":{"type":"object","properties":{"totCnt":{"type":"integer","description":"증빙서류건수","format":"int32"},"rowsPerPage":{"type":"integer","description":"화면당노출수량","format":"int32"},"pageIdx":{"type":"integer","description":"페이지번호","format":"int32"},"documentList":{"type":"array","description":"증빙서류건수목록","items":{"$ref":"#/components/schemas/OrderEvidDocInfo"}}}},"OrderEvidDocInfo":{"type":"object","properties":{"ordNo":{"type":"string"},"entrNm":{"type":"string"},"ordSupPrc":{"type":"number"},"ordTaxPrc":{"type":"number"},"ordTotAmt":{"type":"number"},"ppblIsuStatCdNm":{"type":"string"},"ppblIsuStatCd":{"type":"string"},"ppblDocMgrNo":{"type":"string"},"docTypCd":{"type":"string"},"docTypCdNm":{"type":"string"},"sgtDt":{"type":"string"},"ordGbCd":{"type":"string"},"payWayCd":{"type":"string"},"pgGbCd":{"type":"string"}},"description":"증빙서류건수목록"},"Response":{"type":"object","properties":{"timestamp":{"type":"string","description":"result time","format":"date-time"},"code":{"type":"string","description":"result code"},"message":{"type":"string","description":"result message"},"isProcess":{"type":"boolean","description":"process check"},"payload":{"type":"object","description":"payload"},"error":{"type":"boolean","description":"is error"},"errors":{"type":"array","description":"validation error list","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string","description":"field"},"message":{"type":"string","description":"field message"}},"description":"validation error list"}}}}
```

## 주문 증빙서류 신청

> \## 기능설명\
> \* 주문에 대한 증빙서류(세금계산서 등) 신청을 처리합니다.\
> \---\
> \## 상세설명\
> \* 주문번호, 회원번호 등 필수 정보를 포함한 증빙서류 신청을 처리합니다.\
> \---\
> \## 수정 번호\
> \* Release v2.01\_251020 : 이니시스 현금영수증 발행 추가\
> \* Release v2.02\_260202 : 과면세 금액 처리 로직추가<br>

```json
{"openapi":"3.0.1","info":{"title":"X2BEE Order API","version":"v1"},"servers":[{"url":"https://api-order.x2bee.com/api/order/","description":"prd"}],"paths":{"/v1/document/applyOrderEvidence":{"post":{"tags":["증빙서류"],"summary":"주문 증빙서류 신청","description":"## 기능설명\n* 주문에 대한 증빙서류(세금계산서 등) 신청을 처리합니다.\n---\n## 상세설명\n* 주문번호, 회원번호 등 필수 정보를 포함한 증빙서류 신청을 처리합니다.\n---\n## 수정 번호\n* Release v2.01_251020 : 이니시스 현금영수증 발행 추가\n* Release v2.02_260202 : 과면세 금액 처리 로직추가\n","operationId":"applyOrderEvidence","parameters":[{"name":"Authorization","in":"header","description":"Access Token","required":false}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"object"}}}},"required":true},"responses":{"200":{"description":"성공"},"900":{"description":"업무처리 오류 내용","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}},"components":{"schemas":{"Response":{"type":"object","properties":{"timestamp":{"type":"string","description":"result time","format":"date-time"},"code":{"type":"string","description":"result code"},"message":{"type":"string","description":"result message"},"isProcess":{"type":"boolean","description":"process check"},"payload":{"type":"object","description":"payload"},"error":{"type":"boolean","description":"is error"},"errors":{"type":"array","description":"validation error list","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string","description":"field"},"message":{"type":"string","description":"field message"}},"description":"validation error list"}}}}
```

## 팝빌연동 세금계산서 팝업 URL 조회

> \## 기능설명\
> \* 팝빌 문서번호, 주문번호, 팝업타입으로 팝빌에서 제공하는 팝업 Url 조회\
> \---\
> \## 상세설명\
> \* 조회, 출력, PDF 다운로드 팝업 URL 조회 후 반환<br>

```json
{"openapi":"3.0.1","info":{"title":"X2BEE Order API","version":"v1"},"servers":[{"url":"https://api-order.x2bee.com/api/order/","description":"prd"}],"paths":{"/v1/popbill/invoice/getPopupUrl":{"get":{"tags":["증빙서류"],"summary":"팝빌연동 세금계산서 팝업 URL 조회","description":"## 기능설명\n* 팝빌 문서번호, 주문번호, 팝업타입으로 팝빌에서 제공하는 팝업 Url 조회\n---\n## 상세설명\n* 조회, 출력, PDF 다운로드 팝업 URL 조회 후 반환\n","operationId":"getPopupUrl","parameters":[{"name":"taxInvoicePopupRequest","in":"query","required":true,"schema":{"type":"string","description":"TaxInvoicePopupRequest"}},{"name":"Authorization","in":"header","description":"Access Token","required":false}],"responses":{"200":{"description":"성공","content":{"*/*":{"schema":{"type":"string"}}}}}}}}}
```

## 주문 결제 배분 정보 조회

> \## 기능설명\
> \* 주문번호(ordNo)를 포함한 요청 파라미터를 받아 해당 주문의 주문 결제 배분 정보 목록을 조회합니다.\
> \---\
> \## 상세설명\
> \* 주문번호(ordNo)를 포함한 요청 파라미터를 받아 해당 주문 결제 배분 정보 목록을 조회합니다.\
> \* ordNo: 주문번호 (필수)<br>

```json
{"openapi":"3.0.1","info":{"title":"X2BEE Order API","version":"v1"},"servers":[{"url":"https://api-order.x2bee.com/api/order/","description":"prd"}],"paths":{"/v1/document/getPayDivInfoByOrder":{"get":{"tags":["증빙서류"],"summary":"주문 결제 배분 정보 조회","description":"## 기능설명\n* 주문번호(ordNo)를 포함한 요청 파라미터를 받아 해당 주문의 주문 결제 배분 정보 목록을 조회합니다.\n---\n## 상세설명\n* 주문번호(ordNo)를 포함한 요청 파라미터를 받아 해당 주문 결제 배분 정보 목록을 조회합니다.\n* ordNo: 주문번호 (필수)\n","operationId":"getPayDivInfoByOrder","parameters":[{"name":"ordNo","in":"query","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","description":"Access Token","required":false}],"responses":{"200":{"description":"성공","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PayDivInfo"}}}}},"900":{"description":"업무처리 오류 내용","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Response"}}}}}}}},"components":{"schemas":{"PayDivInfo":{"type":"object","properties":{"entrNo":{"type":"string","description":"입점사번호"},"transferAmount":{"type":"integer","description":"계좌이체배분금액(실시간계좌이체+가상계좌)","format":"int64"},"goodsCount":{"type":"integer","description":"상품수","format":"int32"},"goodsNm":{"type":"string","description":"상품명"},"taxGbCd":{"type":"string","description":"세금구분타입(PR007)"}},"description":"주문 결제 배분 정보 DTO"},"Response":{"type":"object","properties":{"timestamp":{"type":"string","description":"result time","format":"date-time"},"code":{"type":"string","description":"result code"},"message":{"type":"string","description":"result message"},"isProcess":{"type":"boolean","description":"process check"},"payload":{"type":"object","description":"payload"},"error":{"type":"boolean","description":"is error"},"errors":{"type":"array","description":"validation error list","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"type":"object","properties":{"field":{"type":"string","description":"field"},"message":{"type":"string","description":"field message"}},"description":"validation error list"}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tech.x2bee.com/api/store-front-api/order-api/undefined-5.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
