# 비대면 계약 - ExportAPI 설명

ExportAPI 란 비대면 계약시작시 export\_api\_info Parameter 값을 통하여 설정한 정보를 기반으로               계약자가 계약서를 승인, 반려시에 설정 값을 기반으로 만들어진 JSON 형식의 body 를 설정한 URL에 export 하여 해당 회사측에서 받을 수 있게 해주는 기능입니다.

request\_code 에 사용자 정의 대신 "embed" 를 입력 할 경우 계약서 진행 URL을 export 해주며 카카오톡 및 이메일 알림이 계약자에게 발송되지 않습니다. export 받은 URL을 기반으로 고객측에서 발송을 따로               진행 할 수 있습니다. &#x20;

embed Code를 사용 할 경우 최초 비대면 계약 호출시 response로 계약 시작 URL을 제공하며 계약을         진행 시 서명자가 계약서를 승인, 반려 할 때마다 export 로 진행 URL 과 입력하셨던 계약자의  번호  또는   이메일을 제공합니다. ( 이메일로 호출한 경우 이메일, 번호로 호출한 경우 번호 ) 계약 완료시엔                   문서 다운로드가 가능하도록 문서 다운로드, 이력 인증서 다운로드 URL을 제공합니다. \
※ 계약 완료시 받을수 있는 URL 형식은 link\_type 옵션으로 viewer, download 중 하나로 선택가능합니다.

## Parameter&#x20;

| **Parameter Name**                                   | DataType | **Description**                                                                                                     |
| ---------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------- |
| export\_api\_info                                    | Data     | 작성 데이터를 내보낼시에 설정하는 값                                                                                                |
| export\_api\_info.api\_type                          | String   | "StartAndEnd"(시작과 끝만) or "ALL" (전부)                                                                                 |
| export\_api\_info.url                                | String   | 통신 받을 url                                                                                                           |
| export\_api\_info.authorization                      | String   | <p>데이터를 수신받을때 헤더 authorization 로 설정하고 싶은 값</p><p>(수신측에서 암호토큰을 받아서 보안상 활용하고 싶으신경우)</p>                               |
| export\_api\_info.link\_type                         | String   | <p>embed 전용옵션 <br>문서 완료 시 이력인증서, <br>PDF 문서 URL의 type을 변경<br>default - viewer URL<br>"download"  - download URL</p> |
| export\_api\_info.request\_code                      | String   | <p>고객이 정의하는 임의의 값</p><p>"embed" - 설명 참조 </p>                                                                        |
| export\_api\_info.clientid                           | String   | esignon 에서 발급받은 ID ( 발급은 문의 )                                                                                       |
| export\_api\_info.request\_params                    | Data     | 받아올 필드의 정보를 가진 Data                                                                                                 |
| export\_api\_info.request\_params.param\_id          | String   | 받아올 파라미터 이름(사용자 지정)                                                                                                 |
| export\_api\_info.request\_params.param\_value       | String   | ""                                                                                                                  |
| export\_api\_info.request\_params.fields             | Data     | 서식 내부에 있는 필드명을 조회하여 필드이름에 해당하는 값이 문서에 존재할 경우 param\_value 대신에 들어가는 값                                                |
| export\_api\_info.request\_params.fields.doc\_id     | String   | 서식 ID                                                                                                               |
| export\_api\_info.request\_params.fields.field\_name | String   | 값을 가져올 서식 내 필드 명                                                                                                    |

## export\_api Response)&#x20;

```javascript
{
	"header": {
		"api_name": "export",
		"session_id": "S1001",
		"request_code": "{ exportAPI_info 에서 지정한 request_code 값 }"
	},
	"body": {
		"wfluid": "0", //이싸인온에서 사용하는 서식구분id
		"clientid": "{ eSignonAPI 사용을 위한 Unique ID }",
		"processid": "1", //이싸인온에서 사용하는 process 구분값
		"requestid": "{ header 의 request_code 값 }",
		"actionid": "1", //이싸인온에서 사용하는 action 구분값
		"workdatetime": "2020-01-31 04:23:28.0", //작성완료시간
		"worktype": "CF", //CF=승인, RT=반려 작성자가 2단계 이상의 문서에서는 승인, 반려를 선택할 수 있음.
		"wfuid": "{}", //이싸인온에서 사용하는 문서구분id
		"useremail": "{ 서명자 이메일or휴대폰번호 }", 
		"opinion": "", //승인, 반려시 고객들이 반려 메세지,전송 메세지를 사용한 경우 출력
		"param_id": "param_value", // 서식에 field_name으로 등록한 필드 박스의 값이 없을경우 param_id:param_value return  
															 //	값이 있을경우엔 param_id:field_value를 return
		"status":"{Playing}", // 진행 상태 - Playing 진행중 / Complete 완료 / Canceled 취소됨
	}
}
```

## export\_api 응답 예시) code-embed 상태 일 때 ( 진행중 )

```javascript
{
	"header": {
		"api_name": "export",
		"session_id": "S1001",
		"request_code": "{embed로 고정}"
	},
	"body": {
		"wfluid": "0", //이싸인온에서 사용하는 서식구분id
		"clientid": "{ eSignonAPI 사용을 위한 Unique ID }",
		"processid": "1", //이싸인온에서 사용하는 process 구분값
		"requestid": "{ embed로 고정 }",
		"actionid": "1", //이싸인온에서 사용하는 action 구분값
		"workdatetime": "2020-01-31 04:23:28.0", //작성완료시간
		"worktype": "CF", //CF=승인, RT=반려 작성자가 2단계 이상의 문서에서는 승인, 반려를 선택할 수 있음.
		"wfuid": "{}", //이싸인온에서 사용하는 문서구분id
		"useremail": "{ 서명자 이메일or휴대폰번호 }", 
		"opinion": "", //승인, 반려시 고객들이 반려 메세지,전송 메세지를 사용한 경우 출력
		"param_id": "param_value", // fields 값을 설정한 경우 fields_value를 return
		"next_play_user":"{다음 차례로 서명할 이메일 or 휴대폰 번호}",
		"play_url":"{다음 차례로 서명할 고객에게 전달할 URL}",
		"status":"{Playing}", // 진행 상태 - Playing 진행중 / Complete 완료 / Canceled 취소됨
		"next_user_name":"{다음 서명자 이름}",
		"user_name":"{현재 서명자 이름}"
	}
}
```

## export\_api 응답 예시) code-embed 상태 일 때 ( 완료 )

```javascript
{
	"header": {
		"api_name": "export",
		"session_id": "S1001",
		"request_code": "{embed로 고정}"
	},
	"body": {
		"wfluid": "0", //이싸인온에서 사용하는 서식구분id
		"clientid": "{ eSignonAPI 사용을 위한 Unique ID }",
		"processid": "1", //이싸인온에서 사용하는 process 구분값
		"requestid": "{ embed로 고정 }",
		"actionid": "1", //이싸인온에서 사용하는 action 구분값
		"workdatetime": "2020-01-31 04:23:28.0", //작성완료시간
		"worktype": "CF", //CF=승인, RT=반려 작성자가 2단계 이상의 문서에서는 승인, 반려를 선택할 수 있음.
		"wfuid": "{}", //이싸인온에서 사용하는 문서구분id
		"useremail": "{ 서명자 이메일or휴대폰번호 }", 
		"opinion": "", //승인, 반려시 고객들이 반려 메세지,전송 메세지를 사용한 경우 출력
		"param_id": "param_value", // fields 값을 설정한 경우 fields_value를 return
		"cert_url":"{이력 인증서 다운로드 URL}", // link_type 옵션으로 URL 종류 선택가능
		"download_url":"{문서 다운로드 URL}", // link_type 옵션으로 URL 종류 선택가능
		"status":"{Complete}", // 진행 상태 - Playing 진행중 / Complete 완료 / Canceled 취소됨
		"user_name":"{현재 서명자 이름}"
	}
}
```


---

# 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://api.esignon.net/kor_20210407/workflow/start/exportapi.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.
