# API Description

* The API provided by esignon is in the format of Header-Body.
* Body data format is also provided in Header-Body format for protocol code and version management.
* Format eg) Header-Body (Header-Body)
* For some APIs, the body type may be different, so please refer to the description of each API.
* When using eSignon API, a unique client ID is required.
* For client ID issuance, please contact customer inquiry in our [homepage](https://esignon.net/en/customer/).
* How to use) Client ID issuance (customer inquiry) -> Authentication token issuance -> API use by authentication token
* ※Please follow the format of header token value input※

## Ex) Header

![](/files/-M8JQ3iQWP_nbxpAVyj3)

In the case of Header, up to 2 input values are received, and all APIs except for the token issuance API must request by entering a token value in the Authorization field. A space between esignon and token value must be entered.

## Ex) Body

```jsx
{
    "header": {
        Key : "value"
    },
    "body": {
        key : "value"
    }
}
```

In the case of body, as above, when requesting, the header value and the key and value of the body must be written and requested in the body. Examples of key and value entered are listed in each API.


# issue authentication token

## issue authentication token

<mark style="color:green;">`POST`</mark> `https://docs.esignon.net/api/:companyId/login`&#x20;

When using eSignon API, an authentication token is absolutely required. This API issues the required user's authentication token.( accesstoken )

#### Path Parameters

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| companyId | string | Company ID  |

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | string | application/json |

#### Request Body

| Name                 | Type   | Description   |
| -------------------- | ------ | ------------- |
| header               | object |               |
| header.request\_code | string | 1001Q         |
| body                 | object |               |
| body.memb\_email     | string | User email    |
| body.memb\_pwd       | string | User password |

{% tabs %}
{% tab title="200 성공" %}

```javascript
{
  "header": {
    "response_code": "1001A",
    "result_code": "00",
    "result_msg": "You have successfully logged in.",
    "session_id": ""
  },
  "body": {
    "access_token": "{accesstoken}",
    "comp_id": "{Company ID}",
    "device_id": "{Device ID}",
    "expire_date": "{Expired}",
    "memb_email": "{User email}"
  }
}
```

{% endtab %}
{% endtabs %}

## Request Body Example

```javascript
{
  "header": {
    "request_code": "1001Q",
  },
  "body": {
    "memb_email": "{User email}",
    "memb_pwd": "{User password}",
  }
}
```

## Response Body Example

```javascript
{
  "header": {
    "response_code": "1001A",
    "result_code": "00",
    "result_msg": "You have successfully logged in.",
    "session_id": ""
  },
  "body": {
    "access_token": "{accesstoken}",
    "comp_id": "{Company ID}",
    "device_id": "{Device ID}",
    "expire_date": "{Expired}",
    "memb_email": "{User email}"
  }
}
```

## Response Body  header.result\_code

| Code | **Description** | **Reference**                                                                     |
| ---- | --------------- | --------------------------------------------------------------------------------- |
| 00   | success         | success                                                                           |
| 10   | Fail            | Your login information is incorrect.                                              |
| 12   | Fail            | Parsing failed because the body information of the received message is incorrect. |
| 95   | Fail            | The company is unable to call the API. Please contact the customer center.        |
| 99   | Fail            | Unexpected exception (incorrect format)                                           |


# Start


# Start email sending

* Begin the email sending template
* The export\_api value can be set separately to designate the format of the value to be received. (optional)
* export\_api is the feature that requests for a set value in esignon by a set URL when a customer approves or rejects in the process.
* ※ If the array-type parameter is optional, required values among the parameter values in the array must be entered during use. They do not need to be entered when it is not used.
* ※ The default value of the language parameter is "ko-KR" (Default settings)

## API URL Info

| Url                                                 | Type | **Code** |
| --------------------------------------------------- | ---- | -------- |
| <https://docs.esignon.net/api/{CompID}/startsimple> | POST | 5005Q    |

## Request

### Parameters

#### PathParameters

| **Parameter Name** | DataType | **Description** |
| ------------------ | -------- | --------------- |
| CompID             | String   | Company ID      |

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**    |
| ------------------ | -------- | -------- | ------------------ |
| Content-Type       | String   | Required | "application/json" |
| Authorization      | String   | Required | "esignon {token}"  |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description** |
| ------------------ | -------- | -------- | --------------- |
| request\_code      | String   | Required | "5005Q"         |
| version            | String   | Required | "9.9.99"        |

&#x20; Body - Body Parameter

| **Parameter Name**                                   | DataType | Required | **Description**                                                                                                                                               |
| ---------------------------------------------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| biz\_id                                              | String   | Required | "0"                                                                                                                                                           |
| workflow\_name                                       | String   | Required | Title of the document to start                                                                                                                                |
| doc\_id                                              | String   | Required | templateID to start                                                                                                                                           |
| memb\_email                                          | String   | Required | Email of document starter                                                                                                                                     |
| language                                             | String   | Optional | "ko-KR", "en-US", "ja-JP"                                                                                                                                     |
| comment                                              | String   | Optional | Delivered message                                                                                                                                             |
| player\_list                                         | Array    | Required | The information of the signer be filled out according to the steps of the template step                                                                       |
| player\_list.field\_owner                            | String   | Required | Start from "1" in the order of signing                                                                                                                        |
| player\_list.email                                   | String   | Required | Email                                                                                                                                                         |
| player\_list.name                                    | String   | Required | Name of the signer                                                                                                                                            |
| player\_list.password\_hint                          | String   | Optional | Password hint                                                                                                                                                 |
| player\_list.password                                | String   | Optional | Password                                                                                                                                                      |
| field\_list                                          | Array    | Optional | If there are values to be entered in advance, only the values of RadioBox, CheckBox, LabelBox and TextBox may be entered in advance                           |
| field\_list.field\_name                              | String   | Optional | Templete Field Name                                                                                                                                           |
| field\_list.field\_value                             | String   | Optional | For the form field values of Radio and Check Box, the values are received as (“N” or ”Y”); for Label and Text Box, the text values are received as they are   |
| export\_api\_info                                    | Array    | Optional | The value set when exporting the written data                                                                                                                 |
| export\_api\_info.api\_type                          | String   | Required | "StartAndEnd" (only start and end) or "ALL" (all)                                                                                                             |
| export\_api\_info.url                                | String   | Required | URL to receive data from                                                                                                                                      |
| export\_api\_info.request\_code                      | String   | Required | The arbitrary value defined by the customer                                                                                                                   |
| export\_api\_info.clientid                           | String   | Optional | ID issued by esignon ([question ](https://esignon.net/en/customer/)for issue)                                                                                 |
| export\_api\_info.authorization                      | String   | Optional | The value you want to set to header authorization when receiving data                                                                                         |
| export\_api\_info.request\_params                    | Array    | Optional | Use when you want to get a specific value inside a document.                                                                                                  |
| export\_api\_info.request\_params.param\_id          | String   | Required | Name of the parameter to be received (user-specified)                                                                                                         |
| export\_api\_info.request\_params.param\_value       | String   | Required | Default value to be received in case the value to be received from Params.fields does not exist in the document                                               |
| export\_api\_info.request\_params.fields             | Array    | Required | The value entered instead of param\_value if the value corresponding to the field name exists in the document by querying the field name inside the template. |
| export\_api\_info.request\_params.fields.doc\_id     | String   | Required | templateID                                                                                                                                                    |
| export\_api\_info.request\_params.fields.field\_name | String   | Required | template field name                                                                                                                                           |
| customer\_list                                       | Array    | Optional | Add if there are additional referers                                                                                                                          |
| customer\_list.email                                 | String   | Required | Email address                                                                                                                                                 |
| customer\_list.name                                  | String   | Required | Referer Name                                                                                                                                                  |
| customer\_list.language                              | String   | Optional | ko-KR, en-US, ja-JP                                                                                                                                           |

## Request Body Example

```javascript
{
	"header": {
		"request_code": "5005Q",
		"version": "9.9.99"
	},
	"body": {
		"biz_id": "0",
		"workflow_name": "{ Title of the document to start }",
		"memb_email":"{ Email of document starter }",
		"doc_id": "{Templete ID}",
		"language": "ko-KR",
		"comment": "",
		"player_list": [{
			"field_owner": "1",//(step)
			"email": "{ Email }",
      "name":"{ Signer name }",
			"language": "{ ko-KR }",
      "password_hint":"{ Password to use when proceeding with the contract hint }",
      "password":"{Password to use when proceeding with the contract}"
		},{
			"field_owner": "2",
			"email": "{}",
      "name":"{}",
			"language": "{}",
      "password_hint":"{}",
      "password":"{}"
		}],
		"field_list": [{
				"field_name": "{ field_name }",
				"field_value": "{ field_value }"
			}
		],
		"customer_list": [{ // Referer list
				"email": "{ Email }",
	      "name":"{ Referer Name }",
				"language": "{ko-KR}"
		}],
		"export_api_info": {
				"api_type": "{ StartAndEnd or ALL }",
				"url": "{ URL to receive data from }",
				"request_code": "{ Return The Value You Want to Receive or "embed"( See ExportAPI Description) }",
				"clientid": "{ Issued UniqueID }",
				"authorization":"{The value you want to set to header authorization when receiving data }",
	      "request_params": [{
								"param_id": "{Name of parameter to receive (custom)}",
								"param_value": "{Default value to be obtained if the value to be obtained from Params.fields is not in the document}",
								"fields": [{ // The value entered instead of param_value if the value corresponding to the field name exists in the document by querying the field name inside the format.
														 //	  filed_name not exist - param_id:param_value return  
														 //	  filed_name exist - param_id:field_value return
                            "doc_id":"{ templateID }",
                            "field_name":"{ template field name }" 
          			}]
				}]
	   }
	}
}
```

## Request Body Example - only Required

```javascript
{
	"header": {
		"request_code": "5005Q",
		"version": "9.9.99"
	},
	"body": {
		"biz_id": "0",
		"workflow_name": "{ Title of the document to start }",
		"memb_email":"{ Email of document starter }",
		"doc_id": "{Templete ID}",
		"language": "ko-KR",
		"player_list": [{
			"field_owner": "1",
			"email": "{ Email }",
			"name": "{ Signer name }"
		}, {
			"field_owner": "2",
			"email": "{}",
			"name": "{}"
		}]
	}
}
```

## Request Body Example - For TEST Account

```javascript
{
	"header": {
		"request_code": "5005Q",
		"version": "9.9.99"
	},
	"body": {
		"comp_id": "testapi",
		"biz_id": "0",
		"memb_email": "guide@esignon.net",
		"language": "ko-KR",
		"comment": "",
		"workflow_name": "TEST-NAME",
		"doc_id": "1",
		"player_list": [{
				"field_owner": "1",
				"email": "guide@esignon.net",
				"name": "TEST",
				"language": "ko-KR"
			},
			{
				"field_owner": "2",
				"email": "guide@esignon.net",
				"name": "TEST",
				"language": "ko-KR"
			}
		],
		"field_list": [{
			"doc_id": "1",
			"field_name": "name",
			"field_value": "name-value"
		}],
		"customer_list": [{
			"email": "guide@esignon.net",
			"name": "TEST",
			"language": "ko-KR"
		}]
	}
}
```

## Response

| Code | **Description**   | **Reference** |
| ---- | ----------------- | ------------- |
| 200  | success           |               |
| 400  | Connection failed |               |

#### Result\_msg

| Code | **Description** | **Reference**                                                                     |
| ---- | --------------- | --------------------------------------------------------------------------------- |
| 00   | success         | success                                                                           |
| 10   | fail            | fail                                                                              |
| 99   | fail            | Unexpected exception (incorrect format)                                           |
| 12   | fail            | Parsing failed because the body information of the received message is incorrect. |

## Response Body Example

```javascript
{ 
 "header":{
   "session_id": "S1001", 
   "response_code": "5005A",
   "result_code": "00", 
   "result_msg": "Work Flow Start", 
   "version": "9.9.99" }, 
 "body":{ 
   "comp_id": "{ Company ID }", 
   "biz_id": "0", 
   "memb_email": "{ Document starter name }", 
   "workflow_id": "{ Document ID }", 
   "workflow_name": "{ Title of the document that started }", 
   "token": "{ Token value used to access the creation page if the person who initiated the document is the first author of the contract }", 
   // https://docs.esignon.net/mail/sign?token=
   // Enter the token value issued to the above address to access the signature page
   "lang": "ko-KR" }
}
```

## Response export\_api Example

```javascript
{
	"header": {
		"api_name": "export",
		"session_id": "S1001",
		"request_code": "{ Value set at request }",
		"authorization":"{ Value set at request }"
	},
	"body": {
		"clientid": "{ Unique ID for using eSignonAPI }",
		"processid": "1", //Separated value for the progress stage of the document
		"requestid": "{ Value of request_code of the header }",
		"actionid": "1", //Separated value for the progress stage of the document
		"workdatetime": "2020-01-31 04:23:28.0", //Document finished time
		"worktype": "CF", //CF=Approval, RT=Rejection (The document is cancelled when the contract initiator rejects.)
		"wfuid": "{}", //
		"useremail": "{ Signer email }", 
		"opinion": "", //Display when the signers use messages of rejection or transmission upon approval or rejection
		"param_id": "param_value", // fields_value is returned when the fields value is set
	}
}
```


# Start email sending - ExportAPI Description

ExportAPI is a function that allows the contractor to export the body in JSON format based on the information set through the export\_api\_info parameter value at the start of the non-face-to-face contract.

If you enter "embed" instead of custom in request\_code, the contract progress URL will be exported and KakaoTalk and email notifications will not be sent to the contractor. This function is used when shipping separately from the customer based on the URL received.

If using embedded code, we provide the contract start URL with a response upon initial non-face-to-face contact call, and whenever the signer approves or rejects the contract, we provide the progress URL to export and the contractor's number or email that you entered (e-mail if called, number if called by number) Download documents so that documents can be downloaded at the end of the contract, and provide a history certificate download URL.

## Parameter&#x20;

| **Parameter Name**                                   | DataType | Required | **Description**                                                                                                                                             |
| ---------------------------------------------------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| export\_api\_info                                    | Array    | Optional | <p>The value that you set when you export the created data.</p><p>( like webhook )</p>                                                                      |
| export\_api\_info.api\_type                          | String   | Required | "StartAndEnd" ( Start and End step) or "ALL" ( ALL step )                                                                                                   |
| export\_api\_info.url                                | String   | Required | URL to receive data from                                                                                                                                    |
| export\_api\_info.request\_code                      | String   | Optional | Return The Value You Want to Receive or "embed"( See ExportAPI  Description)                                                                                |
| export\_api\_info.clientid                           | String   | Optional | ID issued by esignon ([question ](https://esignon.net/en/customer/)for issue)                                                                               |
| export\_api\_info.authorization                      | String   | Optional | The value you want to set to header authorization when receiving data                                                                                       |
| export\_api\_info.request\_params                    | Array    | Optional | Use when you want to get a specific value inside a document.                                                                                                |
| export\_api\_info.request\_params.param\_id          | String   | Required | Name of parameter to receive (custom)                                                                                                                       |
| export\_api\_info.request\_params.param\_value       | String   | Required | Default value to be obtained if the value to be obtained from Params.fields is not in the document                                                          |
| export\_api\_info.request\_params.fields             | Array    | Required | The value entered instead of param\_value if the value corresponding to the field name exists in the document by querying the field name inside the format. |
| export\_api\_info.request\_params.fields.doc\_id     | String   | Required | templateID                                                                                                                                                  |
| export\_api\_info.request\_params.fields.field\_name | String   | Required | template field name                                                                                                                                         |

## export\_api Response)&#x20;

```javascript
{
	"header": {
		"api_name": "export",
		"session_id": "S1001",
		"request_code": "{ Value set at request }"
	},
	"body": {
		"wfluid": "0", 
		"clientid": "{ Unique ID for using eSignonAPI }",
		"processid": "1", //Progress stage delimited value of document
		"requestid": "{ header's request_code }",
		"actionid": "1", //Progress stage delimited value of document
		"workdatetime": "2020-01-31 04:23:28.0", //Completion time
		"worktype": "CF", //CF=Approval, RT=turn back( If the original contractor returns the document, it will be canceled.)
		"wfuid": "{}", // Document ID
		"useremail": "{ Signer email }", 
		"opinion": "", //When approving or returning, print when customers use a return message or a transmission message.
		"param_id": "param_value" // filed_name exist - param_id:field_value return
	}
}
```

## Export\_api Response Example) When code-embedded (Playing)

```javascript
{
	"header": {
		"api_name": "export",
		"session_id": "S1001",
		"request_code": "{embed}"
	},
	"body": {
		"wfluid": "0",
		"clientid": "{ Unique ID for using eSignonAPI }",
		"processid": "1", //Progress stage delimited value of document
		"requestid": "{ embed }",
		"actionid": "1", //Progress stage delimited value of document
		"workdatetime": "2020-01-31 04:23:28.0", //Completion time
		"worktype": "CF",//CF=Approval, RT=turn back( If the original contractor returns the document, it will be canceled.)
		"wfuid": "{}", //Document ID
		"useremail": "{ Signer email }", 
		"opinion": "", //When approving or returning, print when customers use a return message or a transmission message.
		"param_id": "param_value",
		"next_play_user":"{Email to sign next}",
		"play_url":"{URLs to be passed to customers to sign next}",
		"status":"{Playing}", // progress status
		"next_user_name":"{Next Signer Name}",
		"user_name":"{Current Signer Name}"
	}
}
```

## Export\_api Response Example) When code-embedded (Complete)

```javascript
{
	"header": {
		"api_name": "export",
		"session_id": "S1001",
		"request_code": "{embed}"
	},
	"body": {
		"wfluid": "0",
		"clientid": "{ Unique ID for using eSignonAPI }",
		"processid": "1", //Progress stage delimited value of document
		"requestid": "{ embed }",
		"actionid": "1", //Progress stage delimited value of document
		"workdatetime": "2020-01-31 04:23:28.0", //Completion time
		"worktype": "CF",//CF=Approval, RT=turn back( If the original contractor returns the document, it will be canceled.)
		"wfuid": "{}", //Document ID
		"useremail": "{ Signer email }", 
		"opinion": "", //When approving or returning, print when customers use a return message or a transmission message.
		"param_id": "param_value",
		"cert_url":"{History Certificate Download URL}",
		"download_url":"{Document Download URL}",
		"status":"{Playing}", // progress status
		"user_name":"{Current Signer Name}"
	}
}
```


# Bulk Contract Start

* Start Bulk Contract

* For bulk sending, the order of signatures depends on the steps you set in the template. (It depends on the template step type) The sender will be set as starter of document and the signer's information will be determined by the value in unset\_player\_list. Document will be sent for all signers in the unset\_player\_list.

## API URL

| Url                                        | Type | **Code** |
| ------------------------------------------ | ---- | -------- |
| <https://docs.esignon.net/JEDOC/Common.do> | POST | 1410Q    |

## Request

### Parameters

#### &#x20;Headers

| **Parameter Name** | DataType | **Description**  |
| ------------------ | -------- | ---------------- |
| Content-Type       | String   | application/json |
| Authorization      | String   | esignon {token}  |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | **Description**                |
| ------------------ | -------- | ------------------------------ |
| request\_code      | String   | "1410Q"                        |
| request\_msg       | String   | "Start Work Flow Bulk Sending" |
| session\_id        | String   | "thread\_023"                  |
| version            | String   | "9.9.99"                       |

&#x20; Body - Body Parameter

| **Parameter Name**                         | DataType | **Description**                                                                                   |
| ------------------------------------------ | -------- | ------------------------------------------------------------------------------------------------- |
| comp\_id                                   | String   | Company ID                                                                                        |
| biz\_id                                    | String   | "0"                                                                                               |
| memb\_email                                | String   | Document starter's email                                                                          |
| workflow\_name                             | String   | ""                                                                                                |
| workflow\_lib\_id                          | String   | <p>lid\_id created when creating the template</p><p>(You can check the select Templete list.)</p> |
| unset\_player\_list                        | Data     | Enter the signers information                                                                     |
| unset\_player\_list.memb\_id\_type         | String   | "EMail"                                                                                           |
| unset\_player\_list.email                  | String   | Email address                                                                                     |
| unset\_player\_list.name                   | String   | Signer name                                                                                       |
| unset\_player\_list.language               | String   | "ko-KR","en-US","ja-JP"                                                                           |
| unset\_player\_list.workflow\_name         | String   | Document name to start                                                                            |
| unset\_player\_list.enable\_mobile\_cert   | String   | "false" ( is only available in Korea.)                                                            |
| unset\_player\_list.mobile\_number         | String   | "" ( is only available in Korea.)                                                                 |
| unset\_player\_list.enable\_password\_cert | String   | Password authentication feature "True or false"                                                   |
| unset\_player\_list.password\_hint         | String   | Password hint                                                                                     |
| unset\_player\_list.password               | String   | Password                                                                                          |
| field\_list                                | Data     | Field value added in case there is a value to be entered in advance                               |
| field\_list.doc\_id                        | String   | Templete ID                                                                                       |
| field\_list.field\_name                    | String   | Templete field name                                                                               |
| field\_list.field\_value                   | String   | The value you want to enter in the field                                                          |
| comment                                    | String   | ""                                                                                                |
| enable\_legal\_agreement                   | String   | "false"                                                                                           |

## Request Body Example

```javascript
{
  "header": {
    "request_code": "1410Q",
    "api_name": "Start Work Flow Bulk Sending",
    "session_id": "",
    "version" : "9.9.99"
  },
  "body": {
    "comp_id": "{Company ID}",
    "biz_id": "0",
    "memb_email": "{ Email of document starter}",
    "workflow_lib_id": "{ templete lib_id }",
    "workflow_name": "",
    "unset_player_list": [{
        "memb_id_type" : "{ EMail }",
        "email": "{ email adress }",
        "name" : "{ Signer name }",
        "language": "ko-KR",//ko-KR, ja-JP, en-US
        "workflow_name" : "{ document name }",
        "enable_mobile_cert" : "flase",//( is only available in Korea.)
        "mobile_number" : "",//( is only available in Korea.)
        "enable_password_cert":"{true or false}",
	      "password_hint":"{Password to use when proceeding with the contract hint}",  		
	      "password":"{Password to use when proceeding with the contract}",
        "field_list": [{ // Field used to transfer by entering a value in the field at contract startup
      				"doc_id": "{ Templete ID }",
      				"field_name": "{ Templete field name }",
      				"field_value": "{ The value you want to enter in the appropriate field }"
			  }]
      }],// Send contracts to all customers you set up
    "comment": "",
    "enable_legal_agreement":"false"
  }
}
```

## Response

| Code | **Description**   | **Reference** |
| ---- | ----------------- | ------------- |
| 200  | success           | success       |
| 400  | Connection failed |               |

#### Result\_msg

| Code | **Description** | **Reference**                                                                     |
| ---- | --------------- | --------------------------------------------------------------------------------- |
| 00   | success         | success                                                                           |
| -1   | fail            | Parsing failed because the body information of the received message is incorrect. |
| 10   | fail            | The specific Work Flow Library does not exist.                                    |
| 11   | fail            | Failed.                                                                           |
| 12   | fail            | The maximum storage capacity has been exceeded.                                   |
| 13   | fail            | The maximum number of documents is exceeded.                                      |
| 14   | fail            | The usage period has expired.                                                     |
| 15   | fail            | The writer setting is incorrect.                                                  |

## Response Body Example

```javascript
}
	"body":{
		"workflow_list":[
			{
			"workflow_id": "{Document ID}",
			"unset_player_email": "{Signer email}",
			"unset_player_name": "{Signer name}",
			"result": "OK",
			"description": "",
			"workflow_name": "{Documnet name}",
			"token": "{accesstoken}",
			"lang": "ko-KR",
			"reg_date": "{Company Payment Renewal Date}"},
			"comp_id": "{Company ID}",
			"biz_id": "0",
			"memb_email": "{Email of document starter}",
			"workflow_lib_id": "{Templete lib_id}"
			},
	"header":{
		"session_id": "thread_023",
		"response_code": "1410A",
		"result_code": "00",
		"result_msg": "Start Work Flow bulk Sending.",
		"version": "9.9.99"
	}
}
```


# Search


# Search with the specific field value.

* Search with the specific field value.
* Ex) Among template A, search only the documents with the Name field value "Somebody”

## API URL

| Url                                            | Type | **Code** |
| ---------------------------------------------- | ---- | -------- |
| <https://docs.esignon.net/api/{CompID}/search> | POST | 5008Q    |

## Request

### Parameters

#### PathParameters

| **Parameter Name** | DataType | **Description** |
| ------------------ | -------- | --------------- |
| CompID             | String   | Company ID      |

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**  |
| ------------------ | -------- | -------- | ---------------- |
| Content-Type       | String   | Required | application/json |
| Authorization      | String   | Required | esignon {token}  |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description** |
| ------------------ | -------- | -------- | --------------- |
| request\_code      | String   | Required | 5008Q           |
| api\_name          | String   | Required | start api       |
| session\_id        | String   | Required | ""              |
| version            | String   | Required | 1.1.60          |

&#x20; Body - Body Parameter

| **Parameter Name**       | DataType | Required | **Description**                                                               |
| ------------------------ | -------- | -------- | ----------------------------------------------------------------------------- |
| comp\_id                 | String   | Required | Company ID                                                                    |
| client\_id               | String   | Required | ID issued by esignon ([question](https://esignon.net/en/customer/) for issue) |
| field\_list              | Data     | Required | Information of the document to search                                         |
| field\_list.doc\_uid     | String   | Required | Templete ID of the document to search                                         |
| field\_list.field\_name  | String   | Optional | Templete field name of the document to search                                 |
| field\_list.field\_value | String   | Optional | Templete field value  of the document to search                               |

## Request Body Example

```javascript
{
	 "header" : {
	   "request_code" : "5008Q",            
	   "api_name" : "start api",    
	   "session_id" : "",    
	   "version" : "1.1.60"
	 },
	 "body" : {
	   "comp_id": "{ Company ID }",
	   "client_id":"{ ID issued by esignon }",
	   "field_list": [ 
			    {
						"doc_uid": "{Templete ID  of the document to search}",
						"field_name": "{Templete field name of the document to search}",
						"field_value": "{Templete field value  of the document to search}"
			    }
	   ]
	 }
}

```

## Response

| Code | **Description**   | **Reference** |
| ---- | ----------------- | ------------- |
| 200  | success           | success       |
| 400  | Connection failed |               |

#### Result\_msg

| Code | **Description** | **Reference**                                                                     |
| ---- | --------------- | --------------------------------------------------------------------------------- |
| 00   | success         | success                                                                           |
| 10   | fail            | fail                                                                              |
| 12   | fail            | Parsing failed because the body information of the received message is incorrect. |
| 17   | fail            | No required search conditions                                                     |
| 18   | fail            | No search conditions                                                              |
| 19   | fail            | Incorrect date format                                                             |
| 99   | fail            | Unexpected exception (incorrect format)                                           |

## Response Body Example

```javascript
{
	"header":{
		"response_code": "5008A",
		"result_code": "00",
		"result_msg": "Field status has been searched.",
		"session_id": "",
		"version": "1.1.60"
	},
	"body":{
		"comp_id": "{Company ID}",
		"wf_list":[
			{
				"doc_uid": "{Templete ID}",
				"end_date": "{Signature Completion Time}",
				"total_process_count": "1", // Total steps of template
				"wf_manager_name": "{ Document starter Name }",
				"wf_manager_email": "{ Document starter Email }",
				"wf_status": "Complete", // Document status Complete – Done, Playing – In progress
				"field_value": "{Searched field value}",
				"wfuid": "{Document ID}",
				"current_process_no": "1",
				"wf_title": "{Document Name}",
				"start_date": "{Document Start Time}",
				"field_name": "{Searched field name}"
			}
		]
	}
}

```


# Search by period

* Search for documents created by specific template and period

## API URL

| Url                                            | Type | **Code** |
| ---------------------------------------------- | ---- | -------- |
| <https://docs.esignon.net/api/{CompID}/search> | POST | 5009Q    |

## Request

### Parameters

#### PathParameters

| **Parameter Name** | DataType | **Description** |
| ------------------ | -------- | --------------- |
| CompID             | String   | Company ID      |

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**       |
| ------------------ | -------- | -------- | --------------------- |
| Content-Type       | String   | Required | "application/json"    |
| Authorization      | String   | Required | "esignon accesstoken" |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description** |
| ------------------ | -------- | -------- | --------------- |
| request\_code      | String   | Required | "5009Q"         |
| api\_name          | String   | Required | "start api"     |
| session\_id        | String   | Required | ""              |
| version            | String   | Required | "1.1.60"        |

&#x20; Body - Body Parameter

| **Parameter Name**      | DataType | Required | **Description**                                                                                                              |
| ----------------------- | -------- | -------- | ---------------------------------------------------------------------------------------------------------------------------- |
| comp\_id                | String   | Required | Company ID                                                                                                                   |
| client\_id              | String   | Required | ID issued by esignon ([question](https://esignon.net/en/customer/) for issue)                                                |
| search\_date\_type      | String   | Optional | <p>START or END / default - END<br>START – based on the start of the document <br>END – based on the end of the document</p> |
| start\_date             | String   | Required | Search Start Point YYYY-MM-DD                                                                                                |
| end\_date               | String   | Required | Search End Point YYYY-MM-DD                                                                                                  |
| field\_list             | Data     | Required | Information of the document to search                                                                                        |
| field\_list.doc\_uid    | String   | Required | Templete ID of the document to search                                                                                        |
| field\_list.field\_name | String   | Optional | Templete field name of the document to search                                                                                |

## Request Body Example)

```javascript
{
 "header" : {
   "request_code" : "5009Q",
   "api_name" : "start api",
   "session_id" : "",
   "version" : "1.1.60"
 },
   "body" : {
     "comp_id": "{Company ID}",
     "doc_uid": "{Templete ID of the document to search}",
     "client_id": "{ID issued by esignon}",
     "search_date_type":"{START or END}",
     "start_date": "{YYYY-MM-DD}",
     "end_date": "{YYYY-MM-DD}",
     "field_list": [{
  				"doc_uid": "{Templete ID of the document to search}",
  				"field_name": "{Templete field name of the document to search}"
  			}]
 }
}
```

## Response

| Code | **Description**   | **Reference** |
| ---- | ----------------- | ------------- |
| 200  | success           | success       |
| 400  | Connection failed |               |

#### Result\_msg

| Code | **Description** | **Reference**                                                                     |
| ---- | --------------- | --------------------------------------------------------------------------------- |
| 00   | success         | success                                                                           |
| 10   | fail            | fail                                                                              |
| 12   | fail            | Parsing failed because the body information of the received message is incorrect. |
| 17   | fail            | No required search conditions                                                     |
| 18   | fail            | No search conditions                                                              |
| 19   | fail            | Incorrect date format                                                             |
| 99   | fail            | Unexpected exception (incorrect format)                                           |

## Response Body Example)

```javascript
{
	"header":{
		"response_code": "5009A",
		"result_code": "00",
		"result_msg": "Field status has been searched.",
		"session_id": "",
		"version": "1.1.60"
	},
	"body":{
		"comp_id": "{Company ID}",
		"wf_list":[
				{
					"doc_uid": "{Templete ID}",
					"end_date": "{Signature Completion Time}",
					"total_process_count": "1", // Total steps of template
					"wf_manager_name": "{ Document starter Name }",
					"wf_manager_email": "{ Document starter Email }",
					"wf_status": "Complete", // Document status Complete – Done, Playing – In progress
					"field_value": "{Searched field value}",
					"wfuid": "{Document ID}",
					"current_process_no": "1",
					"wf_title": "{Document Name}",
					"start_date": "{Document Start Time}",
					"field_name": "{Searched field name}"
				}
		]
	}
}
```


# Search all documents

* Search all your company's documents list.
* Enter only token values issued to HEADERS using GET-based APIs.

## Search all documents

<mark style="color:blue;">`GET`</mark> `https://docs.esignon.net/worklists/new?page={value}&rows={value}`

You can check the status, type, level, etc. of the progress document.

#### Path Parameters

| Name | Type   | Description                                       |
| ---- | ------ | ------------------------------------------------- |
| rows | string | How many to search per page / Default 50          |
| page | string | The list on which page to be searched / Default 1 |

#### Headers

| Name          | Type   | Description           |
| ------------- | ------ | --------------------- |
| Authorization | string | esignon {accesstoken} |

{% tabs %}
{% tab title="200 " %}

```javascript
{
	"header":{
		"response_code": "/worklists/new",
		"result_code": "00",
		"result_msg": "",
		"session_id": ""
	},
	"body":{
		"comp_id": "{Company ID}",
		"isManager": true,
		"memb_email": "{Logged-in email}",
		"page": "{Number of the page to be displayed}",
		"rows": "{Number of lists to be shown per page}",
		"total": "{Total Documents}",
		"workflow_list":[{
			"wfuid": "{Documents ID}",
			"wfname": "{Documents Title}",
			"wftype": "{Documents Type}",
			"status": "{Documents Status}",
			"step": "{Documents Step}",
			"nickname": "{Document starter's name}",
			"currentactionid": "{Process step number of document}",
			"email": "{Document starter's email}",
			"startdate": "{Document Start Time}",
			"totalprocesscount": "{Total number of steps in the document}",
			"currentprocesscount": "{Completion Process Step Number}",
			"confirmdate": "{Document finished time}",
			"preactionid": {},
			"preactionemail":"{Referer Email}"
			}]
	}
}

```

{% endtab %}
{% endtabs %}

### Parameter Info

| **Name**              | **Value** | **Description**        |
| --------------------- | --------- | ---------------------- |
| Workflow\_list.status | Playing   | Playing                |
|                       | Canceled  | Canceled               |
|                       | Complete  | Complete               |
|                       | Truncate  | Truncate               |
| Workflow\_list.wftype | NORMAL    | Email sending document |
|                       | BULKWEB   | Bulk sending document  |
| Workflow\_list.step   | Myturn    | Myturn                 |
|                       | Progress  | in Progress            |
|                       | Complete  | Complete               |


# Change Status


# Approval, Rejection

* Approve or Rejection the document.
* Required values must be entered on the document upon approval.

## API URL

| Url                                            | Type | **Code** |
| ---------------------------------------------- | ---- | -------- |
| <https://docs.esignon.net/api/{CompID}/action> | POST | 5010Q    |

## Request

### Parameters

#### PathParameters

| **Parameter Name** | DataType | Required | **Description** |
| ------------------ | -------- | -------- | --------------- |
| CompID             | String   | Required | Company ID      |

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**       |
| ------------------ | -------- | -------- | --------------------- |
| Content-Type       | String   | Required | "application/json"    |
| Authorization      | String   | Required | "esignon AccessToken" |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description** |
| ------------------ | -------- | -------- | --------------- |
| request\_code      | String   | Required | "5010Q"         |
| api\_name          | String   | Optional | "start api"     |
| session\_id        | String   | Optional | ""              |
| version            | String   | Required | "9.9.99"        |

&#x20; Body - Body Parameter

| **Parameter Name** | DataType | Required | **Description**                                                                                                                |
| ------------------ | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| comp\_id           | String   | Required | Company ID                                                                                                                     |
| biz\_id            | String   | Required | "0"                                                                                                                            |
| client\_id         | String   | Required | ID issued by esignon ([question](https://esignon.net/en/customer/) for issue)                                                  |
| memb\_email        | String   | Required | Email of the signer                                                                                                            |
| action\_id         | String   | Required | Process step of current document                                                                                               |
| workflow\_id       | String   | Required | Document ID                                                                                                                    |
| comment            | String   | Required | Message to deliver upon approval or rejection                                                                                  |
| command            | String   | Required | RT - Rejection / CF - Approval / For CF, it is possible to proceed only if required values are already entered in the document |

## Request Body Example)

```javascript
{
 "header" : {
   "request_code" : "5010Q",            
   "api_name" : "start api",    
   "session_id" : "",    
   "version" : "9.9.99"
 },
 "body" : {
   "comp_id": "{Company ID}",
   "client_id":"{ID issued by esignon}",
   "biz_id":"0",
   "memb_email":"{Email of the signer}",
   "action_id":"1" // Process step of current document
   "workflow_id":"{Document ID}",
   "comment":"{Message to deliver upon approval or rejection}",
   "command":"{RT or CF}" // CF=Approval, RT=Rejection
 }
}

```

## Response

| Code | **Description**   | **Reference** |
| ---- | ----------------- | ------------- |
| 200  | success           | success       |
| 400  | Connection failed |               |

#### Result\_msg

| Code | **Description** | **Reference**                                                                     |
| ---- | --------------- | --------------------------------------------------------------------------------- |
| 00   | success         | success                                                                           |
| 10   | fail            | fail                                                                              |
| 12   | fail            | Parsing failed because the body information of the received message is incorrect. |
| 99   | fail            | We can't proceed because there are required items left.                           |
| 99   | fail            | Unexpected exception (incorrect format)                                           |

## Response Body Example)

```
{
	"header":{
		"response_code": "5010A",
		"result_code": "00",
		"result_msg": "success.",
		"version": "9.9.99"
	},
	"body":{
		"comp_id": "{Company ID}"
	}
}
```


# Cancel, disposal

* Cancel or disposal the document
* Cancel - to cancel the document in playing.
* disposal- disposal completed documents.

## API URL

| Url                                        | Type | **Code** |
| ------------------------------------------ | ---- | -------- |
| <https://docs.esignon.net/JEDOC/Common.do> | POST | 1510Q    |

## Request

### Parameters

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**       |
| ------------------ | -------- | -------- | --------------------- |
| Content-Type       | String   | Required | "application/json"    |
| Authorization      | String   | Required | "esignon accesstoken" |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description** |
| ------------------ | -------- | -------- | --------------- |
| request\_code      | String   | Required | "1510Q"         |
| request\_msg       | String   | Required | ""              |
| request\_lang      | String   | Optional | "ko","en","ja"  |
| session\_id        | String   | Required | "thread\_023"   |
| version            | String   | Required | "9.9.99"        |

&#x20; Body - Body Parameter

| **Parameter Name** | DataType | Required | **Description**                                                 |
| ------------------ | -------- | -------- | --------------------------------------------------------------- |
| comp\_id           | String   | Required | Company ID                                                      |
| biz\_id            | String   | Required | "0"                                                             |
| memb\_email        | String   | Required | user email                                                      |
| workflow\_id       | String   | Required | Document ID                                                     |
| command            | String   | Required | "cancel" or  "disposal"                                         |
| description        | String   | Optional | Required value for "disposal" - "Reasons for disposal"          |
| timezone\_offset   | String   | Optional | Required value for "disposal" - "Enter UTC time value"/"+00:00" |

## Request Body Example)

```javascript
{
	"header": {
			"request_code": "1510Q",
			"request_msg": "",
	    "request_lang":"{ko or ja or en}",
			"session_id": "session_id",
			"version": "9.9.99"
	},
	"body": {
			"comp_id": "{Company ID}",
      "biz_id":"0",
      "memb_email":"{user email}",
      "workflow_id":"{Document ID}",
      "command":"{ CANCEL or DISPOSAL }",
      "description":"{Enter a reason for disposal}", // 
      "timezone_offset":"+00:00" // +04:00 for Washington DC
	}
}
```

## Response

| Code | **Description**   | **Reference** |
| ---- | ----------------- | ------------- |
| 200  | success           | success       |
| 400  | Connection failed |               |

#### Result\_msg

| Code | **Description** | **Reference**                                                                     |
| ---- | --------------- | --------------------------------------------------------------------------------- |
| 00   | success         | success                                                                           |
| 94   | fail            | The authentication key is incorrect.                                              |
| 11   | fail            | Required values do not exist or status values are incorrect.                      |
| -1   | fail            | Parsing failed because the body information of the received message is incorrect. |

## Response Body Example)

```
{
	"header":{
		"session_id": "session_id",
		"response_code": "1510A",
		"result_code": "00",
		"result_msg": "success",
		"version": "9.9.99"
	},
	"body":{
		"comp_id": "{Company ID}",
		"biz_id": "0",
		"memb_email": "{user email}",
		"workflow_id": "{Document ID}",
		"command": "{executed command}"
	}
}
```


# Create Download URL

Create URL for downloading the document using the company ID and document ID.

&#x20;Can only access documents where users who retain the token values entered under Authorization can view. (logged-in users)

The created URL is valid for 5 minutes.

## workflow\_download

<mark style="color:green;">`POST`</mark> `https://docs.esignon.net/workflow/download`

#### Headers

| Name          | Type   | Description         |
| ------------- | ------ | ------------------- |
| Authorization | string | **esignon {token}** |
| Content-Type  | string | application/json    |

#### Request Body

| Name         | Type   | Description              |
| ------------ | ------ | ------------------------ |
| workflow\_id | string | ID of completed document |
| client\_id   | string | ID issued by esignon     |

{% tabs %}
{% tab title="200 " %}

```javascript
{
	"header":{
		"response_code": "",
		"result_code": "00",
		"result_msg": "Success",
		"session_id": ""
	},
	"body":{
		"cert_url": "{History Certificate Download URL}",
		"doc_url": "{Document Download URL}",
		"workflow_name": "{Completed Document Name}"
	}
}
```

{% endtab %}
{% endtabs %}

Example) Request Body

```javascript
{
  "client_id":"{ID issued by esignon}",
	"workflow_id": "{ID of completed document}"
}
```

Example) Response Body / Error

```javascript
{
    "header":{
        "response_code": "",
        "result_code": "{Result code}",
        "result_msg": "{'Message by code'}",
        "session_id": ""
    },
    "body":{}
}
```


# Resend

* Resend the document.
* Completed or cancelled documents cannot be resent.

## API URL

| Url                                                | Type | **Code** |
| -------------------------------------------------- | ---- | -------- |
| <https://docs.esignon.net/JEDOC/Common.do?lang={}> | POST | 1429Q    |

## Request

### Parameters

#### PathParameters

| **Parameter Name** | DataType | **Description** |
| ------------------ | -------- | --------------- |
| lang               | String   | ko,en,jp        |

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**       |
| ------------------ | -------- | -------- | --------------------- |
| Content-Type       | String   | Required | "application/json"    |
| Authorization      | String   | Required | "esignon AccessToken" |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description**      |
| ------------------ | -------- | -------- | -------------------- |
| request\_code      | String   | Required | "1429Q"              |
| request\_msg       | String   | Required | "Request to resend." |
| session\_id        | String   | Required | ""                   |

&#x20; Body - Body Parameter

| **Parameter Name** | DataType | Required | **Description**             |
| ------------------ | -------- | -------- | --------------------------- |
| comp\_id           | String   | Required | Company ID                  |
| biz\_id            | String   | Required | "0"                         |
| workflow\_id       | String   | Required | Current document ID (wfuid) |
| memb\_email        | String   | Required | user email                  |

## Request Body Example)

```javascript
{
	"header": {
		"request_code": "1429Q",
		"request_msg": "Request to resend.",
		"session_id": ""},
	"body": {
		"comp_id": "{Company ID}",
		"biz_id": "0",
		"memb_email": "{user email}",
		"workflow_id": "{Current document ID (wfuid)}"
		}
}

```

## Response

| Code | **Description**   | **Reference** |
| ---- | ----------------- | ------------- |
| 200  | success           | success       |
| 400  | Connection failed |               |

#### Result\_msg

| Code | **Description** | **Reference**                           |
| ---- | --------------- | --------------------------------------- |
| 00   | success         | success                                 |
| 10   | fail            | fail                                    |
| 11   | fail            | This document has been signed.          |
| 12   | fail            | This document has been cancelled.       |
| 99   | fail            | Unexpected exception (incorrect format) |

## Response Body Example)

```javascript
{
	"header":{
		"session_id": "thread_023",
		"response_code": "1429A",
		"result_code": "00",
		"result_msg": "Remind succeeded."
	},
	"body":{
		"comp_id": "{Company ID}",
		"biz_id": "0",
		"memb_email": "{user email}",
		"workflow_id": "{Current document ID (wfuid)}"
	}
}

```


# Search Template Info

* Search list of template.

## API URL

| Url                                                     | Type | **Code** |
| ------------------------------------------------------- | ---- | -------- |
| <https://docs.esignon.net/JEDOC/Common.do?lang={value}> | POST | 1123Q    |

## Request

### Parameters

#### PathParameters

| **Parameter Name** | DataType | **Description** |
| ------------------ | -------- | --------------- |
| lang               | String   | ko,en,jp        |

#### &#x20;Headers

| **Parameter Name** | DataType | **Description**       |
| ------------------ | -------- | --------------------- |
| Content-Type       | String   | "application/json"    |
| Authorization      | String   | "esignon AccessToken" |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | **Description** |
| ------------------ | -------- | --------------- |
| request\_code      | String   | "1123Q"         |
| request\_msg       | String   | ""              |
| session\_id        | String   | ""              |
| version            | String   | "9.9.99"        |

&#x20; Body - Body Parameter

| **Parameter Name**   | DataType | **Description**                                                                             |
| -------------------- | -------- | ------------------------------------------------------------------------------------------- |
| comp\_id             | String   | Company ID                                                                                  |
| memb\_email          | Stirng   | user email                                                                                  |
| biz\_id              | String   | "0"                                                                                         |
| search\_dir\_id      | String   | ID of the folder from which templates to be found / "all" (shared folder), "my" (my folder) |
| display\_order\_mode | String   | 1 through 11 in the order of Response file\_list field values of the sorting criteria value |

## Request Body Example)

```javascript
{
        "header": {
                "request_code": "1123Q",
                "request_msg": "",
                "session_id": "",
                "version": "9.9.99"
        },
        "body": {
                 "comp_id": "{Company ID}",
                 "biz_id": "0",
                 "memb_email" : "{user email}",
                 "search_dir_id": "all", // all (shared folder) , my (my folder)
                 "display_order_mode": "1" // 1 ~ 11
        }
}

```

## Response

| Code | **Description**   | **Reference** |
| ---- | ----------------- | ------------- |
| 200  | success           | success       |
| 400  | Connection failed |               |

#### Result\_msg

| Code | **Description** | **Reference**                                                                     |
| ---- | --------------- | --------------------------------------------------------------------------------- |
| 00   | success         | success                                                                           |
| 10   | fail            | fail                                                                              |
| 99   | fail            | Unexpected exception (incorrect format)                                           |
| 12   | fail            | Parsing failed because the body information of the received message is incorrect. |

## Response Body Example)

```javascript
{
	"body":{
		"comp_id": "{Company ID}",
		"biz_id": "0",
		"memb_email": "{user email}",
		"search_dir_id": "all",
		"file_list":[{Displays all template data as it is a full search of the templates}]
	},
	"header":{
		"session_id": "session_id",
		"response_code": "1123A",
		"result_code": "00",
		"result_msg": "file list",
		"version": "9.9.99"
	}
}

```

#### Example) file\_list

```javascript
{
	"file_id": "{Template ID}",
	"file_type": "templete",
	"file_name": "{Template name}",
	"dir_type": "{Folder in which template are located}",
	"create_memb_email": "{Email of the creator of the template}",
	"create_date": "{Template creation date}",
	"create_memb_name": "{Name of the creator of the template}",
	"file_workflow_count": "1", // Number of steps in the template
	"file_workflow_type": "WEBTYPE", // Face-to-face and email sending (WEBTYPE) bulk sending (BULK)
	"file_workflow_library_id": "{lib ID of the Template}", //(used for bulk sending)
	"last_modify_date": "{Last modified date}"
}
```


# API説明

* esignon の API は Header-Body 形式であり
* Bodyデータ形式もプロトコルコードとversion管理のためにHeader - Body形式で提供します。
* 形式ex) Header - Body (Header - Body)
* 一部のAPIの場合はBodyの形式が異なる場合があります。 各APIの説明を参考にしてください。
* esignon APIを使用する際には企業固有のクライアントIDが必要です。
* &#x20;クライアントIDの発行は、[カスタマーサポート](https://esignon.net/jp/customer/)をご利用ください。
* 使用順序）クライアントID発行(会社問い合わせ) -認証トークン発行 -認証トークンを利用してAPIを使用
* ※Headerトークン値の入力形式を必ずお守りください。※

## 例) Header

![](/files/-M8JQ3iQWP_nbxpAVyj3)

Headerの場合、最大2つの入力値が与えられ、トークン発行APIを除くすべてのAPIは、Authorizationにトークン値を入力して要請しなければなりません。 esignon とトークン値の間はスペースを必ず開けて入力することが必要です。

## 例) Body

```jsx
{
    "header": {
        Key : "value"
    },
    "body": {
        key : "value"
    }
}
```

Bodyの場合、request時に上記のようにbodyの中にヘッダー値とbodyのkey,valueをそれぞれ作成して要請することが必要です。 中に入るkey,valueの例は各APIに明示されています。


# 認証トークン発行

## 認証トークン発行

<mark style="color:green;">`POST`</mark> `https://docs.esignon.net/api/:companyId/login`&#x20;

esignon APIを使用する時に必要なユーザーの認証トークン(accesstoken)を発行します。

#### Path Parameters

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| companyId | string | 会社 ID       |

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | string | application/json |

#### Request Body

| Name                 | Type   | Description  |
| -------------------- | ------ | ------------ |
| header               | object |              |
| header.request\_code | string | 1001Q        |
| body                 | object |              |
| body.memb\_email     | string | 使用者 email    |
| body.memb\_pwd       | string | 使用者 password |

{% tabs %}
{% tab title="200 성공" %}

```javascript
{
  "header": {
    "response_code": "1001A",
    "result_code": "00",
    "result_msg": "成功裏にログインされました。",
    "session_id": ""
  },
  "body": {
    "access_token": "{accesstoken}",
    "comp_id": "{会社 ID}",
    "device_id": "{Device ID}",
    "expire_date": "{満了日}",
    "memb_email": "{使用者 email}"
  }
}
```

{% endtab %}
{% endtabs %}

## Request Body Example

```javascript
{
  "header": {
    "request_code": "1001Q",
  },
  "body": {
    "memb_email": "{使用者 email}",
    "memb_pwd": "{使用者 password}",
  }
}
```

## Response Body Example

```javascript
{
  "header": {
    "response_code": "1001A",
    "result_code": "00",
    "result_msg": "成功裏にログインされました。",
    "session_id": ""
  },
  "body": {
    "access_token": "{accesstoken}",
    "comp_id": "{会社 ID}",
    "device_id": "{Device ID}",
    "expire_date": "{満了日}",
    "memb_email": "{使用者 email}"
  }
}
```

## Response Body  header.result\_code

| Code | **Description** | **Reference**                        |
| ---- | --------------- | ------------------------------------ |
| 00   | 成功              | 成功                                   |
| 10   | 失敗              | ログイン情報が正確ではありません。                    |
| 12   | 失敗              | 受信メッセージのBody情報が正しくない形のため、パスできませんでした。 |
| 95   | 失敗              | APIを呼び出せない会社です。 管理者にお問い合わせください。      |
| 99   | 失敗              | Unexpected exception（誤ったフォーマット）      |


# 作成


# 非対面契約開始

* 非対面契約書式を始めます。
* エクスポート\_api値を別途に設定して、受信する値の形式を指定できます。（オプション）
* エクスポート\_apiとは、お客様が進行中に承認·差し戻しをする場合、設定された値を設定されたURLに、esignonでrequestする機能です。
* ※ Arrayタイプのパラメータがoptionalの場合は、使用の際にArray内部パラメータ値のうち必須値は必ず入力してください。 お使いにならない場合は、ご入力いただかなくても構いません。
* ※ language パリメータの場合、デフォルト値"ko-KR" (設定しなかった場合)

## API URL Info

| Url                                                 | Type | **Code** |
| --------------------------------------------------- | ---- | -------- |
| <https://docs.esignon.net/api/{CompID}/startsimple> | POST | 5005Q    |

## Request

### Parameters

#### PathParameters

| **Parameter Name** | DataType | **Description** |
| ------------------ | -------- | --------------- |
| CompID             | String   | 会社 ID           |

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**         |
| ------------------ | -------- | -------- | ----------------------- |
| Content-Type       | String   | Required | "application/json"      |
| Authorization      | String   | Required | "esignon {accesstoken}" |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description** |
| ------------------ | -------- | -------- | --------------- |
| request\_code      | String   | Required | "5005Q"         |
| version            | String   | Required | "9.9.99"        |

&#x20; Body - Body Parameter

| **Parameter Name**                                   | DataType | Required | **Description**                                                            |
| ---------------------------------------------------- | -------- | -------- | -------------------------------------------------------------------------- |
| biz\_id                                              | String   | Required | "0"                                                                        |
| workflow\_name                                       | String   | Required | 開始する文書の名前                                                                  |
| doc\_id                                              | String   | Required | 開始する書式ID                                                                   |
| memb\_email                                          | String   | Required | 契約開始者Email                                                                 |
| language                                             | String   | Optional | "ko-KR", "en-US", "ja-JP"                                                  |
| comment                                              | String   | Optional | 配信メッセージ                                                                    |
| player\_list                                         | Array    | Required | 署名者の情報は、テンプレート段階に従って作成されなければならない。                                          |
| player\_list.field\_owner                            | String   | Required | 作成順序"1"からスタート                                                              |
| player\_list.email                                   | String   | Required | Email                                                                      |
| player\_list.name                                    | String   | Required | 契約進行者名                                                                     |
| player\_list.password\_hint                          | String   | Optional | 文書パスワードヒント                                                                 |
| player\_list.password                                | String   | Optional | 文書パスワード設定                                                                  |
| field\_list                                          | Array    | Optional | あらかじめ入力する値がある場合、追加する値RadioBox、CheckBox、LabelBox、TextBox のみあらかじめ値を入力可能      |
| field\_list.field\_name                              | String   | Optional | 書式フィールド名                                                                   |
| field\_list.field\_value                             | String   | Optional | 書式フィールド値Radio、Check Boxの場合の値を("N" or "Y")で受信Label、Text Boxの場合はテキスト値をそのまま受信 |
| export\_api\_info                                    | Array    | Optional | 作成データをエクスポートする時に設定する値                                                      |
| export\_api\_info.api\_type                          | String   | Required | "StartAndEnd"(始まりと終わりだけ) or "ALL"(全て)                                      |
| export\_api\_info.url                                | String   | Required | 通信を受けるurl                                                                  |
| export\_api\_info.request\_code                      | String   | Required | 顧客が定義する任意のvalue or "embed" (Export APIの説明参照)                               |
| export\_api\_info.clientid                           | String   | Optional | esignonから発行されたID(発行は[お問い合わせ](https://esignon.net/jp/customer/))            |
| export\_api\_info.authorization                      | String   | Optional | データの受信時にヘッダーauthorizationに設定したいvalue                                       |
| export\_api\_info.request\_params                    | Array    | Optional | 文書の内部に特定の値を受け取りたいときに使用                                                     |
| export\_api\_info.request\_params.param\_id          | String   | Required | 受信パラメータ名(ユーザー指定)                                                           |
| export\_api\_info.request\_params.param\_value       | String   | Required | Params.fieldsで受信する値が文書にない場合に受信する基本value                                    |
| export\_api\_info.request\_params.fields             | Array    | Required | 書式内部にあるフィールド名を照会し、フィールド名に該当する値が文書に存在する場合、param\_valueの代わりに入るvalue          |
| export\_api\_info.request\_params.fields.doc\_id     | String   | Required | 書式ID                                                                       |
| export\_api\_info.request\_params.fields.field\_name | String   | Required | 値を取得する書式内のフィールド名                                                           |
| customer\_list                                       | Array    | Optional | 参照者がいる場合、追加                                                                |
| customer\_list.email                                 | String   | Required | Email                                                                      |
| customer\_list.name                                  | String   | Required | 参照者名                                                                       |
| customer\_list.language                              | String   | Optional | ko-KR, en-US, ja-JP                                                        |

## Request Body Example

```javascript
{
	"header": {
		"request_code": "5005Q",
		"version": "9.9.99"
	},
	"body": {
		"biz_id": "0",
		"workflow_name": "{ 開始する文書の名前 }",
		"memb_email":"{ 契約開始者Email }",
		"doc_id": "{ 開始する書式ID }",
		"language": "ja-JP",
		"comment": "",
		"player_list": [{
			"field_owner": "1",//(step)
			"email": "{ 署名者 Email }",
      "name":"{ 署名者 name }",
			"language": "{ ja-JP }",
      "password_hint":"{ 文書パスワードヒント }",
      "password":"{ 文書パスワード設定 }"
		},{
			"field_owner": "2",
			"email": "{}",
      "name":"{}",
			"language": "{}",
      "password_hint":"{}",
      "password":"{}"
		}],
		"field_list": [{
				"field_name": "{ field_name }",
				"field_value": "{ field_value }"
			}
		],
		"customer_list": [{ // 参照者 list
				"email": "{ 参照者 Email }",
	      "name":"{ 参照者 Name }",
				"language": "{ja-JP}"
		}],
		"export_api_info": {
				"api_type": "{ StartAndEnd or ALL }",
				"url": "{ 通信を受けるurl }",
				"request_code": "{ 顧客が定義する任意のvalue or "embed" (Export APIの説明参照) }",
				"clientid": "{ esignonから発行されたID }",
				"authorization":"{ データの受信時にヘッダーauthorizationに設定したいvalue }",
	      "request_params": [{
								"param_id": "{受信パラメータ名(ユーザー指定)}",
								"param_value": "{Params.fieldsで受信する値が文書にない場合に受信する基本value}",
								"fields": [{ // 書式内部にあるフィールド名を照会し、フィールド名に該当する値が文書に存在する場合、param_valueの代わりに入るvalue
														 //	  filed_name not exist - param_id:param_value return  
														 //	  filed_name exist - param_id:field_value return
                            "doc_id":"{ 文書 ID }",
                            "field_name":"{ 文書 field name }" 
          			}]
				}]
	   }
	}
}
```

## Request Body Example - only Required

```javascript
{
	"header": {
		"request_code": "5005Q",
		"version": "9.9.99"
	},
	"body": {
		"biz_id": "0",
		"workflow_name": "{ 開始された文書名 }",
		"memb_email":"{ 契約開始者Email }",
		"doc_id": "{文書 ID}",
		"language": "ja-JP",
		"player_list": [{
			"field_owner": "1",
			"email": "{ 署名者 Email }",
			"name": "{ 署名者 name }"
		}, {
			"field_owner": "2",
			"email": "{}",
			"name": "{}"
		}]
	}
}
```

## Request Body Example - For TEST Account

```javascript
{
	"header": {
		"request_code": "5005Q",
		"version": "9.9.99"
	},
	"body": {
		"comp_id": "testapi",
		"biz_id": "0",
		"memb_email": "guide@esignon.net",
		"language": "ja-JP",
		"comment": "",
		"workflow_name": "TEST-NAME",
		"doc_id": "1",
		"player_list": [{
				"field_owner": "1",
				"email": "guide@esignon.net",
				"name": "TEST",
				"language": "ja-JP"
			},
			{
				"field_owner": "2",
				"email": "guide@esignon.net",
				"name": "TEST",
				"language": "ja-JP"
			}
		],
		"field_list": [{
			"doc_id": "1",
			"field_name": "name",
			"field_value": "name-value"
		}],
		"customer_list": [{
			"email": "guide@esignon.net",
			"name": "TEST",
			"language": "ja-JP"
		}]
	}
}
```

## Response

| Code | **Description** | **Reference** |
| ---- | --------------- | ------------- |
| 200  | 成功              | 成功            |
| 400  | 失敗              |               |

#### Result\_msg

| Code | **Description** | **Reference**                        |
| ---- | --------------- | ------------------------------------ |
| 00   | 成功              | 成功                                   |
| 10   | 失敗              | 失敗                                   |
| 12   | 失敗              | 受信メッセージのBody情報が正しくない形のため、パスできませんでした。 |
| 99   | 失敗              | Unexpected exception（誤ったフォーマット）      |

## Response Body Example

```javascript
{ 
 "header":{
   "session_id": "S1001", 
   "response_code": "5005A",
   "result_code": "00", 
   "result_msg": "Work Flow Start", 
   "version": "9.9.99" }, 
 "body":{ 
   "comp_id": "{ 会社 ID }", 
   "biz_id": "0", 
   "memb_email": "{ 契約開始者Eメール }", 
   "workflow_id": "{ 文書ID }", 
   "workflow_name": "{ 開始された文書名 }", 
   "token": "{ 文書を始めた人が契約の最初の作成者である場合、作成ページにアクセスするときに使用するトークンvalue }", 
   // https://docs.esignon.net/mail/sign?token=
   // Enter the token value issued to the above address to access the signature page
   "lang": "ja-JP" }
}
```

## Response export\_api Example

```javascript
{
	"header": {
		"api_name": "export",
		"session_id": "S1001",
		"request_code": "{ exportAPI_info で指定したrequest_code value }",
		"authorization":"{ 非対面契約API使用時に設定したauthorization value }"
	},
	"body": {
		"clientid": "{ eSignonAPI使用のためのUnique ID }",
		"processid": "1", //文書の進行段階の区分値
		"requestid": "{ ヘッダーのrequest_code value }",
		"actionid": "1", //文書の進行段階の区分値
		"workdatetime": "2020-01-31 04:23:28.0", //作成完了時間
		"worktype": "CF", //CF=承認、RT=返却（最初の契約者が返戻した場合、文書はキャンセルされます。）
		"wfuid": "{}", //
		"useremail": "{ 署名者 email }", 
		"opinion": "", //承認、差し戻し時に顧客が差し戻しメッセージ、転送メッセージを使用した場合に出力
		"param_id": "param_value", // fields値を設定した場合、fields_valueをreturn
	}
}
```


# 非対面契約開始 - ExportAPI 説明

エクスポートAPIとは、非対面契約の開始時にエクスポート\_api\_info Parameterの値を通じて設定した情報に基づいて、契約者が契約書を承認し、却下時に設定値を基に作成されたJSON形式のbodyを設定したURLにエクスポートして、該当会社側から受け取ることができるようにする機能です。

request\_codeにユーザー定義の代わりに「embed」を入力すると、契約書進行のURLがエキスポートされ、カカオトークとメール通知は契約者に送信されません。 エクスポートを受信したURLに基づき、お客様側で別途に発送を行うことができます。

embed Code を使用する場合は、最初の非対面契約の呼び出し時にresponse に契約開始 URL を提供し、契約の進行時に署名者が契約書を承認、却下するたびにエクスポートで進行 URL と入力した契約者の番号、または電子メールを提供します。(電子メール、番号で呼び出した場合は番号) 契約完了時に文書のダウンロード、履歴認証書のダウンロード URL を提供します。

## Parameter&#x20;

| **Parameter Name**                                   | DataType | Required | **Description**                                                   |
| ---------------------------------------------------- | -------- | -------- | ----------------------------------------------------------------- |
| export\_api\_info                                    | Array    | Optional | 作成データをエクスポートする時に設定する値                                             |
| export\_api\_info.api\_type                          | String   | Required | "StartAndEnd"(始まりと終わりだけ) or "ALL"(全て)                             |
| export\_api\_info.url                                | String   | Required | 通信を受けるurl                                                         |
| export\_api\_info.request\_code                      | String   | Optional | 顧客が定義する任意のvalue or "embed" (Export APIの説明参照)                      |
| export\_api\_info.clientid                           | String   | Optional | esignonから発行されたID(発行は[お問い合わせ](https://esignon.net/jp/customer/))   |
| export\_api\_info.authorization                      | String   | Optional | データの受信時にヘッダーauthorizationに設定したいvalue                              |
| export\_api\_info.request\_params                    | Array    | Optional | 文書の内部に特定の値を受け取りたいときに使用                                            |
| export\_api\_info.request\_params.param\_id          | String   | Required | 受信パラメータ名(ユーザー指定)                                                  |
| export\_api\_info.request\_params.param\_value       | String   | Required | Params.fieldsで受信する値が文書にない場合に受信する基本value                           |
| export\_api\_info.request\_params.fields             | Array    | Required | 書式内部にあるフィールド名を照会し、フィールド名に該当する値が文書に存在する場合、param\_valueの代わりに入るvalue |
| export\_api\_info.request\_params.fields.doc\_id     | String   | Required | 書式ID                                                              |
| export\_api\_info.request\_params.fields.field\_name | String   | Required | 値を取得する書式内のフィールド名                                                  |

## export\_api Response)&#x20;

```javascript
{
	"header": {
		"api_name": "export",
		"session_id": "S1001",
		"request_code": "{ exportAPI_info で指定したrequest_code value }",
		"authorization":"{ 非対面契約API使用時に設定したauthorization value }"
	},
	"body": {
		"clientid": "{ eSignonAPI使用のためのUnique ID }",
		"processid": "1", //文書の進行段階の区分値
		"requestid": "{ ヘッダーのrequest_code value }",
		"actionid": "1", //文書の進行段階の区分値
		"workdatetime": "2020-01-31 04:23:28.0", //作成完了時間
		"worktype": "CF", //CF=承認、RT=返却（最初の契約者が返戻した場合、文書はキャンセルされます。）
		"wfuid": "{}", //
		"useremail": "{ 署名者 email }", 
		"opinion": "", //承認、差し戻し時に顧客が差し戻しメッセージ、転送メッセージを使用した場合に出力
		"param_id": "param_value", // fields値を設定した場合、fields_valueをreturn
	}
}
```

## Export\_api Response 例) code-embed 状態のとき (進行中)

```javascript
{
	"header": {
		"api_name": "export",
		"session_id": "S1001",
		"request_code": "{embed}"
	},
	"body": {
		"wfluid": "0",
		"clientid": "{ eSignonAPI使用のためのUnique ID }",
		"processid": "1", //文書の進行段階の区分値
		"requestid": "{ embed }",
		"actionid": "1", //文書の進行段階の区分値
		"workdatetime": "2020-01-31 04:23:28.0", //作成完了時間
		"worktype": "CF",//CF=承認、RT=返却（最初の契約者が返戻した場合、文書はキャンセルされます。）
		"wfuid": "{}",
		"useremail": "{ 署名者 email }", 
		"opinion": "", //承認、差し戻し時に顧客が差し戻しメッセージ、転送メッセージを使用した場合に出力
		"param_id": "param_value",
		"next_play_user":"{次の順番にサインするEメール}",
		"play_url":"{次の順番にサインインするお客様にお渡しするURL}",
		"status":"{Playing}", // 進行状態 - Playing(進行中) Complete(完了)
		"next_user_name":"{次の署名者の名前}",
		"user_name":"{現在の署名者名}"
	}
}
```

## Export\_api Response 例）code-embed 状態のとき（完了）

```javascript
{
	"header": {
		"api_name": "export",
		"session_id": "S1001",
		"request_code": "{embed}"
	},
	"body": {
		"wfluid": "0",
		"clientid": "{ eSignonAPI使用のためのUnique ID }",
		"processid": "1", //文書の進行段階の区分値
		"requestid": "{ embed }",
		"actionid": "1", //文書の進行段階の区分値
		"workdatetime": "2020-01-31 04:23:28.0", //作成完了時間
		"worktype": "CF",//CF=承認、RT=返却（最初の契約者が返戻した場合、文書はキャンセルされます。）
		"wfuid": "{}",
		"useremail": "{ 署名者 email }", 
		"opinion": "", //承認、差し戻し時に顧客が差し戻しメッセージ、転送メッセージを使用した場合に出力
		"param_id": "param_value",
		"cert_url":"{履歴証明書ダウンロードURL}",
		"download_url":"{文書ダウンロードURL}",
		"status":"{Playing}", // 進行状態 - Playing(進行中) Complete(完了)
		"user_name":"{現在の署名者名}"
	}
}
```


# 大量契約の開始

* 大量契約転送を開始します

* 大量契約時の署名順序は、書式を作成する際に設定した段階によって、顧客、担当者が文書を受け取る順序が決まります。 (1段階のみ設定時に顧客にのみ伝達)担当者は生成者として固定され、顧客情報はunset\_player\_listに入った値に決定されます。 unset\_player\_listに入っているすべての顧客に契約が送信されます。

## API URL

| Url                                        | Type | **Code** |
| ------------------------------------------ | ---- | -------- |
| <https://docs.esignon.net/JEDOC/Common.do> | POST | 1410Q    |

## Request

### Parameters

#### &#x20;Headers

| **Parameter Name** | DataType | **Description**  |
| ------------------ | -------- | ---------------- |
| Content-Type       | String   | application/json |
| Authorization      | String   | esignon {token}  |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | **Description**                |
| ------------------ | -------- | ------------------------------ |
| request\_code      | String   | "1410Q"                        |
| request\_msg       | String   | "Start Work Flow Bulk Sending" |
| session\_id        | String   | "thread\_023"                  |
| version            | String   | "9.9.99"                       |

&#x20; Body - Body Parameter

| **Parameter Name**                         | DataType | **Description**                    |
| ------------------------------------------ | -------- | ---------------------------------- |
| comp\_id                                   | String   | 会社ID                               |
| biz\_id                                    | String   | "0"                                |
| memb\_email                                | String   | 文書生成者Email                         |
| workflow\_name                             | String   | ""                                 |
| workflow\_lib\_id                          | String   | 書式を作成すると生成されるlid\_id リスト照会で確認可能    |
| unset\_player\_list                        | Data     | 署名するお客様の情報を入力                      |
| unset\_player\_list.memb\_id\_type         | String   | "EMail"                            |
| unset\_player\_list.email                  | String   | Email address                      |
| unset\_player\_list.name                   | String   | 契約進行者名                             |
| unset\_player\_list.language               | String   | "ko-KR","en-US","ja-JP"            |
| unset\_player\_list.workflow\_name         | String   | 開始するドキュメント名                        |
| unset\_player\_list.enable\_mobile\_cert   | String   | "false" ( モバイルは韓国でのみサービスされます。)     |
| unset\_player\_list.mobile\_number         | String   | "" ( モバイルは韓国でのみサービスされます。)          |
| unset\_player\_list.enable\_password\_cert | String   | パスワード認証機能「True or false」           |
| unset\_player\_list.password\_hint         | String   | パスワードヒント                           |
| unset\_player\_list.password               | String   | パスワード                              |
| field\_list                                | Data     | 契約開始時にフィールドに値を入力して転送する場合に使用するフィールド |
| field\_list.doc\_id                        | String   | 書式ID                               |
| field\_list.field\_name                    | String   | 書式フィールド名                           |
| field\_list.field\_value                   | String   | 該当フィールドに入力したい値                     |
| comment                                    | String   | ""                                 |
| enable\_legal\_agreement                   | String   | "false"                            |

## Request Body Example

```javascript
{
  "header": {
    "request_code": "1410Q",
    "api_name": "Start Work Flow Bulk Sending",
    "session_id": "",
    "version" : "9.9.99"
  },
  "body": {
    "comp_id": "{文書ID}",
    "biz_id": "0",
    "memb_email": "{ 文書生成者Email }",
    "workflow_lib_id": "{ templete lib_id }",
    "workflow_name": "",
    "unset_player_list": [
      {
        "memb_id_type" : "{ EMail }",
        "email": "{ email adress }",
        "name" : "{ 契約進行者名 }",
        "language": "ja-JP",//ko-KR, ja-JP, en-US
        "workflow_name" : "{ 開始するドキュメント名 }",
        "enable_mobile_cert" : "flase",//( モバイルは韓国でのみサービスされます。)
        "mobile_number" : "",//( モバイルは韓国でのみサービスされます。)
        "enable_password_cert":"{true or false}",
	      "password_hint":"{パスワードヒント}",  		
	      "password":"{パスワード}",
        "field_list": [{ // 契約開始時にフィールドに値を入力して転送する場合に使用するフィールド
      				"doc_id": "{ 書式ID }",
      				"field_name": "{ 書式フィールド名 }",
      				"field_value": "{ 該当フィールドに入力したい値 }"
			}]
      }
      ],// 設定したプレイヤーすべてに発送されます。
    "comment": "",
    "enable_legal_agreement":"false"
  }
}
```

## Response

| Code | **Description**   | **Reference** |
| ---- | ----------------- | ------------- |
| 200  | 成功                | 成功            |
| 400  | Connection failed |               |

#### Result\_msg

| Code | **Description** | **Reference**                        |
| ---- | --------------- | ------------------------------------ |
| 00   | 成功              | 成功                                   |
| -1   | 失敗              | 受信メッセージのBody情報が正しくない形のため、パスできませんでした。 |
| 10   | 失敗              | 当該WorkFlow Libraryが存在しません。           |
| 11   | 失敗              | 失敗しました。                              |
| 12   | 失敗              | 許容された保存容量を超過しました。                    |
| 13   | 失敗              | 可能な文書数を超過します。                        |
| 14   | 失敗              | 利用期間が満了しました。                         |
| 15   | 失敗              | 作成者の設定が正しくありません。                     |

## Response Body Example

```javascript
}
	"body":{
		"workflow_list":[
			{
			"workflow_id": "{文書ID}",
			"unset_player_email": "{署名者 email}",
			"unset_player_name": "{署名者 name}",
			"result": "OK",
			"description": "",
			"workflow_name": "{文書名}",
			"token": "{accesstoken}",
			"lang": "ja-JP",
			"reg_date": "{会社決済更新日}"},
			"comp_id": "{会社ID}",
			"biz_id": "0",
			"memb_email": "{生成者Eメール}",
			"workflow_lib_id": "{書式を生成すると生成されるlid_idwfUIDとは異なる値}"
			},
	"header":{
		"session_id": "thread_023",
		"response_code": "1410A",
		"result_code": "00",
		"result_msg": "Start Work Flow bulk Sending.",
		"version": "9.9.99"
	}
}
```


# 照会


# 特定フィールド値で照会

* 特定のフィールド値で照会します。
* 例) A書式中、Nameフィールド値が"誰か"の文書のみ照会

## API URL

| Url                                            | Type | **Code** |
| ---------------------------------------------- | ---- | -------- |
| <https://docs.esignon.net/api/{CompID}/search> | POST | 5008Q    |

## Request

### Parameters

#### PathParameters

| **Parameter Name** | DataType | **Description** |
| ------------------ | -------- | --------------- |
| CompID             | String   | 会社ID            |

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**  |
| ------------------ | -------- | -------- | ---------------- |
| Content-Type       | String   | Required | application/json |
| Authorization      | String   | Required | esignon {token}  |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description** |
| ------------------ | -------- | -------- | --------------- |
| request\_code      | String   | Required | 5008Q           |
| api\_name          | String   | Required | start api       |
| session\_id        | String   | Required | ""              |
| version            | String   | Required | 1.1.60          |

&#x20; Body - Body Parameter

| **Parameter Name**       | DataType | Required | **Description**                                                 |
| ------------------------ | -------- | -------- | --------------------------------------------------------------- |
| comp\_id                 | String   | Required | 会社ID                                                            |
| client\_id               | String   | Required | esignonから発行されたID(発行は[お問い合わせ](https://esignon.net/jp/customer/)) |
| field\_list              | Data     | Required | 照会する文書情報                                                        |
| field\_list.doc\_uid     | String   | Required | 照会する文書の書式ID                                                     |
| field\_list.field\_name  | String   | Optional | 照会する文書書式のフィールド名                                                 |
| field\_list.field\_value | String   | Optional | 照会する文書書式のフィールド値                                                 |

## Request Body 例

```javascript
{
	 "header" : {
	   "request_code" : "5008Q",            
	   "api_name" : "start api",    
	   "session_id" : "",    
	   "version" : "1.1.60"
	 },
	 "body" : {
	   "comp_id": "{ 会社ID }",
	   "client_id":"{ esignonから発行されたID }",
	   "field_list": [ 
			    {
						"doc_uid": "{照会する文書の書式ID}",
						"field_name": "{照会する文書書式のフィールド名}",
						"field_value": "{照会する文書書式のフィールド値}"
			    }
	   ]
	 }
}

```

## Response

| Code | **Description** | **Reference** |
| ---- | --------------- | ------------- |
| 200  | 成功              | 成功            |
| 400  | Connection 失敗   |               |

#### Result\_msg

| Code | **Description** | **Reference**                        |
| ---- | --------------- | ------------------------------------ |
| 00   | 成功              | 成功                                   |
| 10   | 失敗              | 失敗                                   |
| 12   | 失敗              | 受信メッセージのBody情報が正しくない形のため、パスできませんでした。 |
| 17   | 失敗              | 必須検索条件がありません。                        |
| 18   | 失敗              | 検索条件がありません。                          |
| 19   | 失敗              | 日付形式が間違っています。                        |
| 99   | 失敗              | Unexpected exception（誤ったフォーマット）      |

## Response Body 例

```javascript
{
	"header":{
		"response_code": "5008A",
		"result_code": "00",
		"result_msg": "フィールドステータスが検索されました。",
		"session_id": "",
		"version": "1.1.60"
	},
	"body":{
		"comp_id": "{会社ID}",
		"wf_list":[
			{
				"doc_uid": "{書式ID}",
				"end_date": "{署名完了時間}",
				"total_process_count": "1", // 生息段階
				"wf_manager_name": "{ 文書作成者名 }",
				"wf_manager_email": "{ 文書作成者Eメールアドレス }",
				"wf_status": "Complete", // 文書性態 Complete–完了、Playing–進行中
				"field_value": "{照会したフィールド値}",
				"wfuid": "{文書ID}",
				"current_process_no": "1",
				"wf_title": "{文書名}",
				"start_date": "{文書の開始時間}",
				"field_name": "{照会したフィールド名}"
			}
		]
	}
}

```


# 期間で照会

* 特定の書式に作成した文書を期間で照会します。

## API URL

| Url                                            | Type | **Code** |
| ---------------------------------------------- | ---- | -------- |
| <https://docs.esignon.net/api/{CompID}/search> | POST | 5009Q    |

## Request

### Parameters

#### PathParameters

| **Parameter Name** | DataType | **Description** |
| ------------------ | -------- | --------------- |
| CompID             | String   | 会社ID            |

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**         |
| ------------------ | -------- | -------- | ----------------------- |
| Content-Type       | String   | Required | "application/json"      |
| Authorization      | String   | Required | "esignon {accesstoken}" |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description** |
| ------------------ | -------- | -------- | --------------- |
| request\_code      | String   | Required | "5009Q"         |
| api\_name          | String   | Required | "start api"     |
| session\_id        | String   | Required | ""              |
| version            | String   | Required | "1.1.60"        |

&#x20; Body - Body Parameter

| **Parameter Name**      | DataType | Required | **Description**                                                 |
| ----------------------- | -------- | -------- | --------------------------------------------------------------- |
| comp\_id                | String   | Required | 会社ID                                                            |
| client\_id              | String   | Required | esignonから発行されたID(発行は[お問い合わせ](https://esignon.net/jp/customer/)) |
| search\_date\_type      | String   | Optional | START or END START – 文書開始基準 END – 文書完了基準                        |
| start\_date             | String   | Required | 検索スタート地点 YYYY-MM-DD                                             |
| end\_date               | String   | Required | 検索終了地点 YYYY-MM-DD                                               |
| field\_list             | Data     | Required | 照会する文書情報                                                        |
| field\_list.doc\_uid    | String   | Required | 照会する文書の書式ID                                                     |
| field\_list.field\_name | String   | Optional | 照会する文書書式のフィールド名                                                 |

## Request Body 例)

```javascript
{
 "header" : {
   "request_code" : "5009Q",
   "api_name" : "start api",
   "session_id" : "",
   "version" : "1.1.60"
 },
   "body" : {
     "comp_id": "{会社ID}",
     "doc_uid": "{照会する文書の書式ID}",
     "client_id": "{esignonから発行されたID}",
     "search_date_type":"{START or END}",
     "start_date": "{YYYY-MM-DD}",
     "end_date": "{YYYY-MM-DD}",
     "field_list": [{
  				"doc_uid": "{照会する文書の書式ID}",
  				"field_name": "{照会する文書書式のフィールド名}"
  			}]
 }
}
```

## Response

| Code | **Description**   | **Reference** |
| ---- | ----------------- | ------------- |
| 200  | success           | success       |
| 400  | Connection failed |               |

#### Result\_msg

| Code | **Description** | **Reference**                        |
| ---- | --------------- | ------------------------------------ |
| 00   | 成功              | 成功                                   |
| 10   | 失敗              | 失敗                                   |
| 12   | 失敗              | 受信メッセージのBody情報が正しくない形のため、パスできませんでした。 |
| 17   | 失敗              | 必須検索条件がありません。                        |
| 18   | 失敗              | 検索条件がありません。                          |
| 19   | 失敗              | 日付形式が間違っています。                        |
| 99   | 失敗              | Unexpected exception（誤ったフォーマット）      |

## Response Body 例)

```javascript
{
	"header":{
		"response_code": "5009A",
		"result_code": "00",
		"result_msg": "Field status has been searched.",
		"session_id": "",
		"version": "1.1.60"
	},
	"body":{
		"comp_id": "{会社ID}",
		"wf_list":[
				{
					"doc_uid": "{書式ID}",
					"end_date": "{署名完了時間}",
					"total_process_count": "1", // 生息段階
					"wf_manager_name": "{ 文書作成者名 }",
					"wf_manager_email": "{ 文書作成者Eメールアドレス }",
					"wf_status": "Complete", // 文書状態 Complete–完了、Playing–進行中
					"field_value": "{照会したフィールド値}",
					"wfuid": "{文書ID}",
					"current_process_no": "1",
					"wf_title": "{Document Name}",
					"start_date": "{文書名}",
					"field_name": "{文書の開始時間}"
				}
		]
	}
}
```


# 進行文書リスト照会

* 該当会社の進行文書リストをすべて照会します。
* GET方式のAPIでHEADERSに発行されたトークン値だけを入力して照会します。

## 進行文書リスト照会

<mark style="color:blue;">`GET`</mark> `https://docs.esignon.net/worklists/new?page={value}&rows={value}`

進行文書の状態、種類、段階などを確認することができます。

#### Path Parameters

| Name | Type   | Description                 |
| ---- | ------ | --------------------------- |
| rows | string | 1ページあたり照会する文書数 / Default 50 |
| page | string | 照会するページの番号 / Default 1      |

#### Headers

| Name          | Type   | Description           |
| ------------- | ------ | --------------------- |
| Authorization | string | esignon {accesstoken} |

{% tabs %}
{% tab title="200 " %}

```javascript
{
	"header":{
		"response_code": "/worklists/new",
		"result_code": "00",
		"result_msg": "",
		"session_id": ""
	},
	"body":{
		"comp_id": "{会社ID}",
		"isManager": true,
		"memb_email": "{ログインしたEメール}",
		"page": "{出力するページの番号}",
		"rows": "{ページあたりの表示リストの数}",
		"total": "{全文書数}",
		"workflow_list":[{
			"wfuid": "{文書ID}",
			"wfname": "{文書のタイトル}",
			"wftype": "{文書タイプ}",
			"status": "{文書状態}",
			"step": "{文書段階}",
			"nickname": "{文書作成者}",
			"currentactionid": "{契約中の段階番号}",
			"email": "{文書作成者Eメール}",
			"startdate": "{文書開始日}",
			"totalprocesscount": "{文書の総工数}",
			"currentprocesscount": "{完了した契約段階番号}",
			"confirmdate": "{文書完了日}",
			"preactionid": {},
			"preactionemail":"{参照のEメール}"
			}]
	}
}

```

{% endtab %}
{% endtabs %}

### Parameter Info

| **Name**              | **Value** | **Description** |
| --------------------- | --------- | --------------- |
| Workflow\_list.status | Playing   | 進行中             |
|                       | Canceled  | キャンセル           |
|                       | Complete  | 完了              |
|                       | Truncate  | 廃棄              |
| Workflow\_list.wftype | NORMAL    | 一般発送の文書         |
|                       | BULKWEB   | 大量発送文書          |
| Workflow\_list.step   | Myturn    | 私の番             |
|                       | Progress  | 契約者が進行中         |
|                       | Complete  | 完了              |


# 状態変更


# 承認、返戻

* 文書を承認または却下します。
* 承認時に文書は必須値が入力されている必要があります。

## API URL

| Url                                            | Type | **Code** |
| ---------------------------------------------- | ---- | -------- |
| <https://docs.esignon.net/api/{CompID}/action> | POST | 5010Q    |

## Request

### Parameters

#### PathParameters

| **Parameter Name** | DataType | Required | **Description** |
| ------------------ | -------- | -------- | --------------- |
| CompID             | String   | Required | Company ID      |

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**       |
| ------------------ | -------- | -------- | --------------------- |
| Content-Type       | String   | Required | "application/json"    |
| Authorization      | String   | Required | "esignon AccessToken" |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description** |
| ------------------ | -------- | -------- | --------------- |
| request\_code      | String   | Required | "5010Q"         |
| api\_name          | String   | Optional | "start api"     |
| session\_id        | String   | Optional | ""              |
| version            | String   | Required | "9.9.99"        |

&#x20; Body - Body Parameter

| **Parameter Name** | DataType | Required | **Description**                                                 |
| ------------------ | -------- | -------- | --------------------------------------------------------------- |
| comp\_id           | String   | Required | 会社ID                                                            |
| biz\_id            | String   | Required | "0"                                                             |
| client\_id         | String   | Required | esignonから発行されたID(発行は[お問い合わせ](https://esignon.net/jp/customer/)) |
| memb\_email        | String   | Required | 契約進行者Eメール                                                       |
| action\_id         | String   | Required | 契約進行中の段階                                                        |
| workflow\_id       | String   | Required | 契約中の文書ID                                                        |
| comment            | String   | Required | 承認 or 返戻時に伝えるメッセージ                                              |
| command            | String   | Required | RT - 返戻 CF - 承認 CF の際は、文書に必須値を入力した状態 必須項目が残っているため進行できません。       |

## Request Body 例)

```javascript
{
 "header" : {
   "request_code" : "5010Q",            
   "api_name" : "start api",    
   "session_id" : "",    
   "version" : "9.9.99"
 },
 "body" : {
   "comp_id": "{会社ID}",
   "client_id":"{esignonから発行されたID}",
   "biz_id":"0",
   "memb_email":"{契約進行者Eメール}",
   "action_id":"1" // 契約進行中の段階
   "workflow_id":"{契約中の文書ID}",
   "comment":"{承認 or 返戻時に伝えるメッセージ}",
   "command":"{RT or CF}" // RT - 返戻 CF - 承認
 }
}

```

## Response

| Code | **Description** | **Reference** |
| ---- | --------------- | ------------- |
| 200  | 成功              | 成功            |
| 400  | Connection 失敗   |               |

#### Result\_msg

| Code | **Description** | **Reference**                        |
| ---- | --------------- | ------------------------------------ |
| 00   | 成功              | 成功                                   |
| 10   | 失敗              | 失敗                                   |
| 12   | 失敗              | 受信メッセージのBody情報が正しくない形のため、パスできませんでした。 |
| 99   | 失敗              | 必須項目が残っているため進行できません。                 |
| 99   | 失敗              | Unexpected exception（誤ったフォーマット）      |

## Response Body 例)

```javascript
{
	"header":{
		"response_code": "5010A",
		"result_code": "00",
		"result_msg": "success.",
		"version": "9.9.99"
	},
	"body":{
		"comp_id": "{会社ID}"
	}
}
```


# 取り消し、廃棄

* 文書を削除または廃棄します。
* キャンセル - 進行中の文書をキャンセル処理します。
* 廃棄 - 完了した文書を廃棄処理します。

## API URL

| Url                                        | Type | **Code** |
| ------------------------------------------ | ---- | -------- |
| <https://docs.esignon.net/JEDOC/Common.do> | POST | 1510Q    |

## Request

### Parameters

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**       |
| ------------------ | -------- | -------- | --------------------- |
| Content-Type       | String   | Required | "application/json"    |
| Authorization      | String   | Required | "esignon accesstoken" |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description** |
| ------------------ | -------- | -------- | --------------- |
| request\_code      | String   | Required | "1510Q"         |
| request\_msg       | String   | Required | ""              |
| request\_lang      | String   | Optional | "ko","en","ja"  |
| session\_id        | String   | Required | "thread\_023"   |
| version            | String   | Required | "9.9.99"        |

&#x20; Body - Body Parameter

| **Parameter Name** | DataType | Required | **Description**                       |
| ------------------ | -------- | -------- | ------------------------------------- |
| comp\_id           | String   | Required | 会社ID                                  |
| biz\_id            | String   | Required | "0"                                   |
| memb\_email        | String   | Required | 使用者 email                             |
| workflow\_id       | String   | Required | 文書ID                                  |
| command            | String   | Required | 「cancel」 - キャンセル 「disposal」 - 廃棄。     |
| description        | String   | Optional | 「disposal」時には必須値 - 「廃棄事由」             |
| timezone\_offset   | String   | Optional | 「disposal」時には必須値 - 「UTC時間値入力」「+00:00」 |

## Request Body 例)

```javascript
{
	"header": {
			"request_code": "1510Q",
			"request_msg": "",
	    "request_lang":"{ko or ja or en}",
			"session_id": "session_id",
			"version": "9.9.99"
	},
	"body": {
			"comp_id": "{会社ID}",
      "biz_id":"0",
      "memb_email":"{使用者 email}",
      "workflow_id":"{文書ID}",
      "command":"{ CANCEL or DISPOSAL }",
      "description":"{廃棄事由の入力}", // 
      "timezone_offset":"+00:00" // 日本の場合+09:00
	}
}
```

## Response

| Code | **Description** | **Reference** |
| ---- | --------------- | ------------- |
| 200  | 成功              | 成功            |
| 400  | Connection 失敗   |               |

#### Result\_msg

| Code | **Description** | **Reference**                        |
| ---- | --------------- | ------------------------------------ |
| 00   | 成功              | 成功                                   |
| -1   | 失敗              | 受信メッセージのBody情報が正しくない形のため、パスできませんでした。 |
| 11   | 失敗              | 必須値がないか、ステータス値が正しくありません。             |
| 94   | 失敗              | 認証キーが正しくありません。                       |

## Response Body 例)

```javascript
{
	"header":{
		"session_id": "session_id",
		"response_code": "1510A",
		"result_code": "00",
		"result_msg": "success",
		"version": "9.9.99"
	},
	"body":{
		"comp_id": "{会社ID}",
		"biz_id": "0",
		"memb_email": "{使用者 email}",
		"workflow_id": "{文書ID}",
		"command": "{実行されたコマンド}"
	}
}
```


# ダウンロードURL作成

会社 ID と文書の ID を通じて文書をダウンロードできる URL を取得します。

Authorizationに入力されたToken値を持つユーザーが閲覧できる文書のみアクセス可能です。（ログインしたユーザー）

作成されたURLは5分間維持されます。

## workflow\_download

<mark style="color:green;">`POST`</mark> `https://docs.esignon.net/workflow/download`

#### Headers

| Name          | Type   | Description         |
| ------------- | ------ | ------------------- |
| Authorization | string | **esignon {token}** |
| Content-Type  | string | application/json    |

#### Request Body

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| workflow\_id | string | 完了した文書のID        |
| client\_id   | string | esignonから発行されたID |

{% tabs %}
{% tab title="200 " %}

```javascript
{
	"header":{
		"response_code": "",
		"result_code": "00",
		"result_msg": "Success",
		"session_id": ""
	},
	"body":{
		"cert_url": "{履歴認証書URL}",
		"doc_url": "{完了した文書URL}",
		"workflow_name": "{完了した文書名}"
	}
}
```

{% endtab %}
{% endtabs %}

Example) Request Body

```javascript
{
  "client_id":"{esignonから発行されたID}",
	"workflow_id": "{完了した文書のID}"
}
```

Example) Response Body / Error

```javascript
{
    "header":{
        "response_code": "",
        "result_code": "{応答コード}",
        "result_msg": "{コードに沿ったメッセージ}",
        "session_id": ""
    },
    "body":{}
}
```


# 再送信

* 文書を再送信します。
* 完了、キャンセルされた文書は、再送信できません。

## API URL

| Url                                                | Type | **Code** |
| -------------------------------------------------- | ---- | -------- |
| <https://docs.esignon.net/JEDOC/Common.do?lang={}> | POST | 1429Q    |

## Request

### Parameters

#### PathParameters

| **Parameter Name** | DataType | **Description** |
| ------------------ | -------- | --------------- |
| lang               | String   | ko,en,jp        |

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**       |
| ------------------ | -------- | -------- | --------------------- |
| Content-Type       | String   | Required | "application/json"    |
| Authorization      | String   | Required | "esignon AccessToken" |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description** |
| ------------------ | -------- | -------- | --------------- |
| request\_code      | String   | Required | "1429Q"         |
| request\_msg       | String   | Required | "再送信要請"         |
| session\_id        | String   | Required | ""              |

&#x20; Body - Body Parameter

| **Parameter Name** | DataType | Required | **Description** |
| ------------------ | -------- | -------- | --------------- |
| comp\_id           | String   | Required | 会社ID            |
| biz\_id            | String   | Required | "0"             |
| workflow\_id       | String   | Required | 進行文書ID (wfuid)  |
| memb\_email        | String   | Required | 使用者 email       |

## Request Body 例)

```javascript
{
	"header": {
		"request_code": "1429Q",
		"request_msg": "再送信要請",
		"session_id": ""},
	"body": {
		"comp_id": "{会社ID}",
		"biz_id": "0",
		"memb_email": "{使用者 email}",
		"workflow_id": "{進行文書ID (wfuid)}"
		}
}

```

## Response

| Code | **Description** | **Reference** |
| ---- | --------------- | ------------- |
| 200  | 成功              | 成功            |
| 400  | Connection 失敗   |               |

#### Result\_msg

| Code | **Description** | **Reference**                   |
| ---- | --------------- | ------------------------------- |
| 00   | 成功              | 成功                              |
| 10   | 失敗              | 失敗                              |
| 11   | 失敗              | 署名が完了した文書です。                    |
| 12   | 失敗              | キャンセル処理された文書です。                 |
| 99   | 失敗              | Unexpected exception（誤ったフォーマット） |

## Response Body 例)

```javascript
{
	"header":{
		"session_id": "thread_023",
		"response_code": "1429A",
		"result_code": "00",
		"result_msg": "Remind succeeded."
	},
	"body":{
		"comp_id": "{会社ID}",
		"biz_id": "0",
		"memb_email": "{使用者 email}",
		"workflow_id": "{進行文書ID (wfuid)}"
	}
}

```


# 書式リスト照会

* 書式リストを照会します。

## API URL

| Url                                                     | Type | **Code** |
| ------------------------------------------------------- | ---- | -------- |
| <https://docs.esignon.net/JEDOC/Common.do?lang={value}> | POST | 1123Q    |

## Request

### Parameters

#### PathParameters

| **Parameter Name** | DataType | **Description** |
| ------------------ | -------- | --------------- |
| lang               | String   | ko,en,jp        |

#### &#x20;Headers

| **Parameter Name** | DataType | **Description**       |
| ------------------ | -------- | --------------------- |
| Content-Type       | String   | "application/json"    |
| Authorization      | String   | "esignon AccessToken" |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | **Description** |
| ------------------ | -------- | --------------- |
| request\_code      | String   | "1123Q"         |
| request\_msg       | String   | ""              |
| session\_id        | String   | ""              |
| version            | String   | "9.9.99"        |

&#x20; Body - Body Parameter

| **Parameter Name**   | DataType | **Description**                         |
| -------------------- | -------- | --------------------------------------- |
| comp\_id             | String   | 会社ID                                    |
| memb\_email          | Stirng   | 使用者 email                               |
| biz\_id              | String   | "0"                                     |
| search\_dir\_id      | String   | 書式を探すフォルダID "all"(共有フォルダ)、"my"(自分のフォルダ) |
| display\_order\_mode | String   | ソート基準値Response file\_list フィールド値順に1\~11 |

## Request Body 例)

```javascript
{
        "header": {
                "request_code": "1123Q",
                "request_msg": "",
                "session_id": "",
                "version": "9.9.99"
        },
        "body": {
                 "comp_id": "{会社ID}",
                 "biz_id": "0",
                 "memb_email" : "{使用者 email}",
                 "search_dir_id": "all", // 書式を探すフォルダID "all"(共有フォルダ)、"my"(自分のフォルダ)
                 "display_order_mode": "1" // 1 ~ 11
        }
}

```

## Response

| Code | **Description** | **Reference** |
| ---- | --------------- | ------------- |
| 200  | 成功              | 成功            |
| 400  | Connection 失敗   |               |

#### Result\_msg

| Code | **Description** | **Reference**                        |
| ---- | --------------- | ------------------------------------ |
| 00   | 成功              | 成功                                   |
| 10   | 失敗              | 失敗                                   |
| 12   | 失敗              | 受信メッセージのBody情報が正しくない形のため、パスできませんでした。 |
| 99   | 失敗              | Unexpected exception（誤ったフォーマット）      |

## Response Body 例)

```javascript
{
	"body":{
		"comp_id": "{会社ID}",
		"biz_id": "0",
		"memb_email": "{使用者 email}",
		"search_dir_id": "all",
		"file_list":[{ 書式全体照会のため、すべての書式データを出力}]
	}
	"header":{
		"session_id": "session_id",
		"response_code": "1123A",
		"result_code": "00",
		"result_msg": "file list",
		"version": "9.9.99"
	}
}

```

#### Example) file\_list

```javascript
{
	"file_id": "{書式ID}",
	"file_type": "書式",
	"file_name": "{書式名}",
	"dir_type": "{書式が位置するフォルダー}",
	"create_memb_email": "{書式作成者のEメールアドレス}",
	"create_date": "{書式生成日}",
	"create_memb_name": "{書式作成者名}",
	"file_workflow_count": "1", // 書式の段数
	"file_workflow_type": "WEBTYPE", // 対面、肥大なら(WEB TYPE)/大量(BULK)
	"file_workflow_library_id": "{書式のlibID}", //(大量発送に使用)
	"last_modify_date": "{最終修正日}"
}
```


# API 설명

## <mark style="color:red;">**API 사이트가 개편되었습니다.**</mark>

### <mark style="color:red;">**아래 링크를통해 이동해주세요!!**</mark>&#x20;

### [**개편된 API 사이트로 이동하기 !!!!!!** ](https://developer.esignon.net/) &#x20;

* eignon 의 API 는 Header - Body 형식 이며&#x20;
* Body 데이터 형식또한 프로토콜 코드와 version 관리를 위해 Header - Body 형식으로 제공합니다.
* 형식 ex) Header - Body ( Header - Body )
* 일부 API 의 경우 Body 의 형식이 다를 수 있습니다. 각 API의 설명을 참고해주시기 바랍니다.
* API 요금제 구입 문의는 [고객문의](https://esignon.net/customer/)를 이용 부탁드립니다.
* 사용순서 ) API회사 등록([고객문의](https://esignon.net/customer/)) -> 인증토큰 발급 -> 인증토큰을 이용하여 API 사용
* **`※Header 토큰 값 입력 형식을 꼭 지켜주세요※`**

## Ex) Header

![](/files/-M8JQ3iQWP_nbxpAVyj3)

Header 의 경우 최대 2개의 입력 값을 받으며 토큰 발급 API 를 제외한 모든 API는 Authorization에 토큰값을 입력해서 요청을 해야합니다. esignon 과 토큰 값 사이의 띄어쓰기 값이 필수적으로 입력되야 합니다.

## Ex) Body

```jsx
{
    "header": {
        Key : "value"
    },
    "body": {
        key : "value"
    }
}
```

Body 의 경우 request 시에 위 처럼 body안에 header 값과 body 의 key,value를 각각 작성하여 요청하여야합니다. 안에 들어가는 key,value의 예시는 각 API에 명 되어있습니다

## CompanyID&#x20;

companyId 의 경우 회사명이 아닌 회사 고유의 ID를 지칭합니다. 아래의 화면에서 확인가능합니다.

![](/files/-MSjPuaZhhcyMYq8IvKC)

## API List

<img src="/files/-MKmbTdM2RX8nIsglgTM" alt="" data-size="original"> **발급 API**

* [인증토큰 발급 ](https://api.esignon.net/issued/token)

<img src="/files/-MKmbs6Ws3JxDbn_ByR-" alt="" data-size="original"> **문서 - 시작 API List**

* [비대면 계약 시작](https://api.esignon.net/workflow/start/nonfacestart)
* [비대면 계약 - ExportAPI](https://api.esignon.net/workflow/start/exportapi)
* [대량전송 계약 시](https://api.esignon.net/workflow/start/bulkstart)

<img src="/files/-MKmc1tDOaC91p1mUZYM" alt="" data-size="original"> **문서 - 조회 API List**

* [문서 정보조회](https://api.esignon.net/workflow/view/workflowinfo)
* [특정필드 값으로 조회](https://api.esignon.net/workflow/view/readbyfiled)
* [기간으로 조회](https://api.esignon.net/workflow/view/readbydate)
* [진행 문서 목록조회](https://api.esignon.net/workflow/view/readallworkflow)
* [모든필드 값 조회](https://api.esignon.net/v/kor_20210407/workflow/view/searchall) (구)

<img src="/files/-MKmc52uB7ObuVK9ooqM" alt="" data-size="original"> **문서 - 상태변경 API List 및 기타 API List**

* [승인, 반려](https://api.esignon.net/workflow/modify/reject)
* [취소, 폐기, 삭제](https://api.esignon.net/workflow/modify/cancel)
* [문서 재전송](https://api.esignon.net/workflow/remind)
* [다운로드 URL 생성](https://api.esignon.net/v/kor_20210407/workflow/downloadurl) (구)&#x20;

<img src="/files/-MKmc8VDw-cvBFQcdwCS" alt="" data-size="original"> **서식  API**

* [서식 정보조회 ](https://api.esignon.net/template/docinfo)
* [서식 목록조회](https://api.esignon.net/template/readdocument)

<img src="/files/-MKmbTdM2RX8nIsglgTM" alt="" data-size="original"> **회사  API**

* [회사 정보조회](https://api.esignon.net/company/compinfo)


# 인증토큰 발급

## 인증토큰 발급

<mark style="color:green;">`POST`</mark> `https://docs.esignon.net/api/:companyId/login`&#x20;

이싸인온 API 사용시 필요한 사용자의 인증토큰을 발급합니다.

#### Path Parameters

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| companyId | string | 회사아이디       |

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | string | application/json |

#### Request Body

| Name                 | Type   | Description |
| -------------------- | ------ | ----------- |
| header               | object |             |
| header.request\_code | string | 1001Q       |
| body                 | object |             |
| body.memb\_email     | string | 사용자이메일      |
| body.memb\_pwd       | string | 사용자비밀번호     |

{% tabs %}
{% tab title="200 성공" %}

```javascript
{
  "header": {
    "response_code": "1001A",
    "result_code": "00",
    "result_msg": "성공적으로 로그인되었습니다.",
    "session_id": ""
  },
  "body": {
    "access_token": "{인증토큰}",
    "comp_id": "{회사아이디}",
    "device_id": "{디바이스아이디}",
    "expire_date": "{만료일}",
    "memb_email": "{사용자 이메일}"
  }
}
```

{% endtab %}
{% endtabs %}

## Request Body Example

```javascript
{
  "header": {
    "request_code": "1001Q"
  },
  "body": {
    "memb_email": "{사용자 이메일}",
    "memb_pwd": "{사용자 비밀번호}"
  }
}
```

## Response Body Example

```javascript
{
  "header": {
    "response_code": "1001A",
    "result_code": "00",
    "result_msg": "성공적으로 로그인되었습니다.",
    "session_id": ""
  },
  "body": {
    "access_token": "{인증토큰}",
    "comp_id": "{회사아이디}",
    "device_id": "{디바이스아이디}",
    "expire_date": "{만료일}",
    "memb_email": "{사용자 이메일}"
  }
}
```

## Response Body  header.result\_code

| Code | **Description** | **Reference**                         |
| ---- | --------------- | ------------------------------------- |
| 00   | 성공              | 성공                                    |
| 10   | 실패              | 로그인 정보가 정확하지 않습니다.                    |
| 12   | 실패              | 수신 메세지의 Body 정보가 잘못된 형태여서 파싱하지 못했습니다. |
| 95   | 실패              | API를 호출할 수 없는 회사입니다. 관리자에게 문의해주세요.    |
| 99   | 실패              | Unexpected exception ( 잘못된 포맷 )       |


# 시작


# 비대면 계약 시작

* 비대면 계약 서식을 시작합니다.
* export\_api 값을 따로 설정하여 받아올 값의 형식을 지정할 수 있습니다.(선택사항)
* export\_api 란 고객님이 진행중 승인, 반려를 할 경우 설정된 값을 설정된 URL로 esignon에서 request 해주는 기능입니다.
* ※ Body 파라미터 중 **Required 값은 필수 값이므로 입력하지 않으시면 요청에 실패합니다.** 또한, Optional 이지만 Array 타입의 파라미터를 사용하실 경우 Array 내부 파라미터 값 중 Required 값을 꼭 입력해주셔야 합니다. 사용을 하지 않으실 경우에 내부 파라미터를 입력하실 필요가 없습니다.
* ※ language 파리미터의 경우 기본값 "ko-KR" ( 설정 안했을경우 )

## API 주소 정보&#x20;

| Url                                                   | Type | **Code** |
| ----------------------------------------------------- | ---- | -------- |
| <https://docs.esignon.net/api/:companyId/startsimple> | POST | 5005Q    |

## Request

### Parameters

#### PathParameters

| **Parameter Name** | DataType | **Description** |
| ------------------ | -------- | --------------- |
| :companyId         | String   | 회사아이디           |

#### &#x20;Headers

| **Parameter Name** | DataType | Required     | **Description**     |
| ------------------ | -------- | ------------ | ------------------- |
| Content-Type       | String   | **Required** | "application/json"  |
| Authorization      | String   | **Required** | "esignon ${발급받은토큰}" |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required     | **Description**    |
| ------------------ | -------- | ------------ | ------------------ |
| request\_code      | String   | **Required** | "5005Q"(API 고유 코드) |
| version            | String   | **Required** | "9.9.99"           |

&#x20; Body - Body Parameter

| **Parameter Name**                                   | DataType | Required       | **Description**                                                                                                                                                                                                                                                  |
| ---------------------------------------------------- | -------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| workflow\_name                                       | String   | **Required**   | 문서명 ( 계약서 이름 )                                                                                                                                                                                                                                                   |
| doc\_id                                              | String   | **Required**   | 시작할 서식 ID                                                                                                                                                                                                                                                        |
| memb\_email                                          | String   | **Required**   | 계약 시작자 이메일                                                                                                                                                                                                                                                       |
| language                                             | String   | Optional       | <p>"ko-KR", "en-US", "ja-JP"</p><p>전달하는 메일 및 플레이화의 표기언어</p><p>카톡의 경우 한글만 제공</p>                                                                                                                                                                                  |
| comment                                              | String   | Optional       | 전달메시지                                                                                                                                                                                                                                                            |
| expireddate                                          | String   | Optional       | <p>YYYY-MM-DD형식으로 입력</p><p>문서의 작성기한 설정</p><p>년 - 월 - 일 </p>                                                                                                                                                                                                      |
| preview                                              | String   | Optional       | <p>"preview" - 입력값 고정</p><p>옵션 설정시 비대면 계약 </p><p>시작이 아닌 미리보기URL</p><p>이 제공됩니다.</p>                                                                                                                                                                               |
|                                                      |          |                |                                                                                                                                                                                                                                                                  |
| player\_list                                         | Array    | **Required**   | 서명하는 고객의 정보를 입력  서식의 단계에 맞춰서 작성 필수                                                                                                                                                                                                                               |
| player\_list.email                                   | String   | **Required**   | 이메일 or 전화번호                                                                                                                                                                                                                                                      |
| player\_list.name                                    | String   | **Required**   | 계약 진행자 이름                                                                                                                                                                                                                                                        |
| player\_list.mobile\_number                          | String   | Optional       | 본인인증에 사용할 번호                                                                                                                                                                                                                                                     |
| player\_list.password\_hint                          | String   | Optional       | 계약 진행시 사용할  비밀번호 힌트                                                                                                                                                                                                                                              |
| player\_list.password                                | String   | Optional       | 계약 진행시 사용할 비밀번호                                                                                                                                                                                                                                                  |
|                                                      |          |                |                                                                                                                                                                                                                                                                  |
| field\_list                                          | Array    | Optional       | <p>미리 입력할 값이 있을 경우 추가하는 값<br>입력가능한 박스 : RadioBox, CheckBox, LabelBox, TextBox, PictureBox,<br>DatePickerBox(날짜박스)</p>                                                                                                                                            |
| field\_list.field\_name                              | String   | Optional       | 각 필드명 (서식 수정의 오른쪽 에서 정의한 박스 이름)                                                                                                                                                                                                                                  |
| field\_list.field\_value                             | String   | Optional       | <p>Radio, Check Box : "N" or "Y"</p><p>Label, Text Box : 텍스트 값</p><p>DatePickerBox : YYYY-MM-DD 형식의 날짜 입력</p><p>PictureBox : 이미지를 base64로 인코딩한 텍스트 값 ( ※ 가능한 이미지 파일 확장자는 jpg, jpeg, png입니다. 다른 확장자 파일을 넣을 경우 문서가 열리지 않을 수 있습니다. 이미지 파일 크기는 1MB를 넘지 않아야 합니다.)</p> |
|                                                      |          |                |                                                                                                                                                                                                                                                                  |
| export\_api\_info                                    | Array    | Optional       | 작성 데이터를 내보낼시에 설정하는 값                                                                                                                                                                                                                                             |
| export\_api\_info.api\_type                          | String   | ***Required*** | "StartAndEnd"(시작과 끝만) or "ALL" (전부)                                                                                                                                                                                                                              |
| export\_api\_info.url                                | String   | ***Required*** | 통신 받을 url                                                                                                                                                                                                                                                        |
| export\_api\_info.link\_type                         | String   | Optional       | <p>embed 전용옵션 <br>문서 완료 시 이력인증서, <br>PDF 문서 URL의 type을 변경<br>default - viewer URL<br>"download"  - download URL</p>                                                                                                                                              |
| export\_api\_info.request\_code                      | String   | Optional       | 고객이 정의하는 임의의 값 or "embed"( ExportAPI 설명 참조)                                                                                                                                                                                                                      |
| export\_api\_info.authorization                      | String   | Optional       | <p>데이터를 수신받을때 헤더 authorization 로 설정하고 싶은 값</p><p>(수신측에서 암호토큰을 받아서 보안상 활용하고 싶으신경우)</p>                                                                                                                                                                            |
| export\_api\_info.request\_params                    | Array    | Optional       | 문서내부에 특정 값을 받아 오고싶을때 사용                                                                                                                                                                                                                                          |
| export\_api\_info.request\_params.param\_id          | String   | ***Required*** | 받아올 파라미터 이름(사용자 지정)                                                                                                                                                                                                                                              |
| export\_api\_info.request\_params.param\_value       | String   | ***Required*** | request\_params.fields에서 받아올 값이 문서에 없는경우 받아올 기본 값                                                                                                                                                                                                                |
| export\_api\_info.request\_params.fields             | Array    | ***Required*** | 서식 내부에 있는 필드명을 조회하여 필드이름에 해당하는 값이 문서에 존재할 경우 request\_params.param\_value 대신에 들어가는 값                                                                                                                                                                             |
| export\_api\_info.request\_params.fields.doc\_id     | String   | ***Required*** | 서식 ID                                                                                                                                                                                                                                                            |
| export\_api\_info.request\_params.fields.field\_name | String   | ***Required*** | 값을 가져올 서식 내 필드 명                                                                                                                                                                                                                                                 |
|                                                      |          |                |                                                                                                                                                                                                                                                                  |
| customer\_list                                       | Array    | Optional       | 참조자가 있을 경우 추가                                                                                                                                                                                                                                                    |
| customer\_list.email                                 | String   | ***Required*** | 이메일 or 휴대폰번호                                                                                                                                                                                                                                                     |
| customer\_list.name                                  | String   | ***Required*** | 참조자 이름                                                                                                                                                                                                                                                           |
| customer\_list.language                              | String   | Optional       | "ko-KR", "en-US", "ja-JP"                                                                                                                                                                                                                                        |

## Request Body Example

```javascript
{
	"header": {
		"request_code": "5005Q",
		"version": "9.9.99"
	},
	"body": {
		"biz_id": "0",
		"workflow_name": "{ 작성할 문서명 }",
		"memb_email":"{ 계약 시작자 이메일 }",
		"doc_id": "{서식 ID}",
		"language": "ko-KR",
		"comment": "",
		"expireddate": "YYYY-MM-DD",
		"player_list": [{
			"field_owner": "1",
			"email": "{ 받는 사람 email or 받는 사람 휴대폰 번호 }",
      "name":"{ 받는 사람 이름 }",
			"mobile_number": "{ 휴대폰 본인인증시 사용할 휴대폰번호 }",
      "password_hint":"{ 비밀번호 힌트 }",
      "password":"{비밀번호}"
		},{
			"field_owner": "2",
			"email": "{}",
      "name":"{}",
			"mobile_number": "{}",
      "password_hint":"{}",
      "password":"{}"
		}],
		"field_list": [{
				"field_name": "{ field_name }", 
				"field_value": "{ field_value }"
			}
		],
		"customer_list": [{
				"email": "{ id_type에 따라서 참조자 이메일 or 휴대폰번호 }",
	      "name":"{ 참조자 이름 }"
		}],
		"export_api_info": {
				"api_type": "{ StartAndEnd or ALL }",
				"url": "{ 통신 받을 url }",
				"link_type": "{download or null}",
				"request_code": "{ 고객이 정의하는 임의 값 }",
				"authorization": "{설정 URL로 request 시에 Header - authorization 으로 받아올 값 }",
	      "request_params": [{
								"param_id": "{받아올 파라미터 이름(사용자 지정)}",
								"param_value": "{fields에서 설정한 값이 없을 경우 받아올 기본 값}",
								"fields": [{ 
                            "doc_id":"{ 서식 ID }",
                            "field_name":"{ 값을 가져올 서식 내 필드명 }" 
          			}]
				}]
	   }
	}
}
```

**request\_params** \
서식에 field\_name으로 등록한 필드 박스의 값이 없을경우 param\_id:param\_value return \
값이 있을경우엔 param\_id:field\_value를 return

## Request Body Example - only Required

```javascript
{
	"header": {
		"request_code": "5005Q",
		"version": "9.9.99"
	},
	"body": {
		"biz_id": "0",
		"workflow_name": "{ 작성할 문서명 }",
		"memb_email":"{ 계약 시작자 이메일 }",
		"doc_id": "{서식 ID}",
		"language": "ko-KR",
		"player_list": [{
			"field_owner": "1",
			"email": "{ 받는 사람 email or 받는 사람 번호 }",
			"name": "{ 받는 사람 이름 }"
		}, {
			"field_owner": "2",
			"email": "{}",
			"name": "{}"
		}]
	}
}
```

## Request Body Example - For TEST Account

```javascript
{
	"header": {
		"request_code": "5005Q",
		"version": "9.9.99"
	},
	"body": {
		"biz_id": "0",
		"memb_email": "guide@esignon.net",
		"language": "ko-KR",
		"comment": "",
		"workflow_name": "TEST-NAME",
		"doc_id": "1",
		"player_list": [{
				"field_owner": "1",
				"email": "guide@esignon.net",
				"name": "TEST"
			},
			{
				"field_owner": "2",
				"email": "guide@esignon.net",
				"name": "TEST"
			}
		],
		"field_list": [{
			"field_name": "name",
			"field_value": "name-value"
		}],
		"customer_list": [{
			"email": "guide@esignon.net",
			"name": "TEST"
		}]
	}
}
```

## Response

| Code | **Description** | **Reference**              |
| ---- | --------------- | -------------------------- |
| 200  | 성공              | 형식이 잘못 된 경우 result\_msg 참조 |
| 400  | 연결 실패           |                            |

#### Result\_msg

| Code | **Description** | **Reference**                                                                                                                     |                                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ---- | --------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 00   | 성공              | 성공                                                                                                                                |                                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| -1   | 실패              | <p>문서명은 1\~128자로 입력해주세요.<br>timezone\_offset의 형식이 잘못되었습니다. // ( +XX:XX or -XX:XX ) 형식 <br>문서이름에 특수문자를 포함할 수 없습니다.(', ", \\, /, :, | , <, >, <em>. ?)</em> <br><em>이름에 특수문자를 포함할 수 없습니다.(', ", \\, /, :, | , <, >,</em> . ?) <br>휴대폰 형식이 맞지 않습니다. ( - 유무 상관없음 ) <br>이메일 형식이 맞지 않습니다. <br>휴대폰 본인인증 요청 생년월일의 날짜가 적합하지 않습니다. 8자리로 입력해주세요.(ex.20200120)(요청 생년월일 :\*\*\*\* ) </p><p>비밀번호에 한글은 입력할 수 없습니다. </p><p>비밀번호에 특수문자\[' " ]를 입력할 수 없습니다. </p><p>비밀번호인증 비밀번호(password)는 4\~15자로 입력해주세요. </p><p>비밀번호인증 힌트는 50자 이하로 입력해주세요. </p><p>메세지 글자수를 초과했습니다.(250자 제한) </p><p>player\_list의 name 값은 필수로 입력하셔야 합니다. </p><p>시작하는 사람(memb\_email:\***)은 회사에 가입된 사람이여야 합니다. </p><p>존재하지 않는 서식입니다.</p><p>(서식아이디:**) 서식에 작성자가 설정되지 않았습니다.</p><p>서식메뉴에서 해당 서식의 문서 작성자를 지정해주세요.(서식아이디:\*\*) </p><p>설정한 문서작성자 수( \* <em>)와 서식의 문서작성자 수( \*</em> )가 일치하지 않습니다.</p> |
| 10   | 실패              | 실패                                                                                                                                |                                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 11   | 실패              | 수신 메세지의 Body 정보가 잘못된 형태여서 파싱하지 못했습니다.                                                                                             |                                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 12   | 실패              | eSignon 서비스 이용기간이 만료되었습니다. 고객지원센터로 연락부탁드립니다.(02-6299-5926)                                                                        |                                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 13   | 실패              | eSignon 서비스 사용건수가 초과되었습니다. 고객지원센터로 연락부탁드립니다.(02-6299-5926)                                                                        |                                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 19   | 실패              | 날짜형식이 잘못되었습니다. ( 만료일 설정 )                                                                                                         |                                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 20   | 실패              | 지난 날짜를 만료일로 설정할 수 없습니다.                                                                                                           |                                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 99   | 실패              | Unexpected exception ( 잘못된 포맷 )                                                                                                   |                                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

## Response Body Example

```javascript
{ 
 "header":{
   "session_id": "S1001", 
   "response_code": "5005A",
   "result_code": "00", 
   "result_msg": "Work Flow가 시작됩니다.", 
   "version": "9.9.99" }, 
 "body":{ 
   "comp_id": "{ 회사 ID }", 
   "biz_id": "0", 
   "memb_email": "{ 계약 시작자 이메일 }", 
   "workflow_id": "{ 문서아이디 }", 
   "workflow_name": "{ 시작된 서식 이름 }", 
   "token": "{ 문서를 시작한 사람이 계약의 첫번째 작성자일 경우 작성페이지에 접근할때 사용하는 토큰값 }", 
   "lang": "ko-KR" }
}
```

Response 로 수신한 토큰을 <https://docs.esignon.net/mail/sign?token=:token> 경로에 token 값을 입력\
한뒤 접근하면 진행중인 계약서에 접근할 수 있습니다. \
( 생성자 기준으로 발급되는 token 입니다. 생성자가 만약 계약 단계에 있을경우 해당 URL로 서명이 가능\
그 외의 경우에는 해당 URL로 진행중인 문서 확인이 가능합니다.  )&#x20;

## Response export\_api Example

```javascript
{
	"header": {
		"api_name": "export",
		"session_id": "S1001",
		"request_code": "{ exportAPI_info 에서 지정한 request_code 값 }",
		"authorization":"{ 비대면 계약 API 사용시 설정했던 authorization 값 }"
	},
	"body": {
		"clientid": "{ eSignonAPI 사용을 위한 Unique ID }",
		"processid": "1", //문서의 진행 단계 구분값
		"requestid": "{ header 의 request_code 값 }",
		"actionid": "1", //문서의 진행 단계 구분값
		"workdatetime": "2020-01-31 04:23:28.0", //작성완료시간
		"worktype": "CF", //CF=승인, RT=반려 ( 처음 계약자가 반려시 문서는 취소 처리됩니다.)
		"wfuid": "{}", //문서의 고유ID
		"useremail": "{ 서명자 이메일or휴대폰번호 }", 
		"opinion": "", //승인, 반려시 고객들이 반려 메세지,전송 메세지를 사용한 경우 출력
		"param_id": "param_value", // fields 값을 설정한 경우 fields_value를 return
	}
}
```

## Response Body Example ( Preview )

```javascript
{
	"header": {
		"response_code": "5005A",
		"result_code": "00",
		"result_msg": "success (preview url)",
		"version": "9.9.99"
	},
	"body": {
		"preview_url": "미리보기 URL"
	}
}
```

preview 옵션 설정시 Response로 비대면 계약 시작이 아닌 미리보기 URL이 제공됩니다.&#x20;


# 비대면 계약 - 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.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", //작성완료시간 UTC±00:00
		"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", //작성완료시간 UTC±00:00
		"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", //작성완료시간 UTC±00:00
		"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":"{현재 서명자 이름}"
	}
}
```


# 대량전송 계약 시작

* 계약 대량 전송을 시작합니다.
* 대량 계약시 서명 순서는 서식을 작성 할 때 설정한 단계에 따라 고객, 담당자가 문서를 받을 순서가 결정됩니다. (1단계만 설정 시 고객에게만 전달) 담장자는 생성자로 고정되며 고객정보는 unset\_player\_list 에 들어간 값으로 결정됩니다. unset\_player\_list에 들어있는 모든 고객에게 계약이 발전송니다.
* 참조자는 서식에 등록되어있는 계정을 따라가며 따로 설정하지않습니다.
* 2단계C 의 경우 담당자 항목이 없기때문에 고객 B의 정보를 추가로 기입해야하기때문에 Body에 \
  customer\_list*파라미터를 추가 기입하여 설정 해 주셔야합니다.*
* 2단계C의 경우\
  고객 ( unset\_player\_list ) → 고객 B ( customer\_list )

## API 주소 정보&#x20;

| Url                                        | Type | **Code** |
| ------------------------------------------ | ---- | -------- |
| <https://docs.esignon.net/JEDOC/Common.do> | POST | 1410Q    |

## Request

### Parameters

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**   |
| ------------------ | -------- | -------- | ----------------- |
| Content-Type       | String   | Required | application/json  |
| Authorization      | String   | Required | esignon ${발급받은토큰} |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description**                  |
| ------------------ | -------- | -------- | -------------------------------- |
| request\_code      | String   | Required | "1410Q"(API 고유 코드)               |
| request\_msg       | String   | Optional | "Work Flow Bulk Sending를 시작합니다." |
| session\_id        | String   | Required | "thread\_023"                    |
| version            | String   | Required | "9.9.99"                         |

&#x20; Body - Body Parameter

| **Parameter Name**                           | DataType | Required | **Description**                                                            |
| -------------------------------------------- | -------- | -------- | -------------------------------------------------------------------------- |
| comp\_id                                     | String   | Required | 회사 ID / companyId                                                          |
| biz\_id                                      | String   | Required | "0"                                                                        |
| memb\_email                                  | String   | Required | 생성자 이메일                                                                    |
| workflow\_name                               | String   | Required | <p>unset\_player\_list.workflow\_name 이름을</p><p>설정하지 않을경우 기본으로 지정되는 문서</p> |
| workflow\_lib\_id                            | String   | Required | <p>서식을 생성하면 생성되는 lid\_id<br>서식ID와는 다른값입니다.</p><p>(서식목록조회에서 확인가능합니다.)</p>   |
| unset\_player\_list                          | Data     | Required | 서명하는 고객의 정보를 입력                                                            |
| unset\_player\_list.memb\_id\_type           | String   | Required | "EMail" or "Mobile"                                                        |
| unset\_player\_list.email                    | String   | Required | <p>memb\_id\_type 에 따라 </p><p>이메일 or 전화번호</p>                              |
| unset\_player\_list.name                     | String   | Required | 계약 진행자 이름                                                                  |
| unset\_player\_list.language                 | String   | Optional | "ko-KR","en-US","ja-JP"                                                    |
| unset\_player\_list.workflow\_name           | String   | Optional | 문서명 ( 계약서 이름 )                                                             |
| unset\_player\_list.enable\_mobile\_cert     | String   | Required | 휴대폰 인증 기능 "true or false"                                                  |
| unset\_player\_list.mobile\_number           | String   | Required | 본인인증에 사용할 번호 / - 없이                                                        |
| unset\_player\_list.enable\_password\_cert   | String   | Required | 비밀번호 인증 기능 "true or false"                                                 |
| unset\_player\_list.password\_hint           | String   | Required | 비밀번호 힌트                                                                    |
| unset\_player\_list.password                 | String   | Required | 비밀번호                                                                       |
| unset\_player\_list.field\_list              | Data     | Required | <p>미리 설정할 값이 있을경우 입력</p><p>여러개 설정가능.</p>                                   |
| unset\_player\_list.field\_list.doc\_id      | String   | Required | 서식 ID                                                                      |
| unset\_player\_list.field\_list.field\_name  | String   | Required | 서식 필드 이름                                                                   |
| unset\_player\_list.field\_list.field\_value | String   | Required | 서식 필드                                                                      |
| comment                                      | String   | Required | 전달할 메세                                                                     |
| enable\_legal\_agreement                     | String   | Required | "false"                                                                    |
| customer\_list                               | Data     | Optional | <p>서식의 설정이 2단계 C일 경우에 설정</p><p>고객 B의 정보</p>                                |
| customer\_list.memb\_id\_type                | String   | Required | "EMail" or "Mobile"                                                        |
| customer\_list.email                         | String   | Required | <p>memb\_id\_type 에 따라 </p><p>이메일 or 전화번호</p>                              |
| customer\_list.name                          | String   | Required | 계약 진행자 이름                                                                  |
| customer\_list.language                      | String   | Optional | "ko-KR","en-US","ja-JP"                                                    |
| customer\_list.enable\_mobile\_cert          | String   | Required | 휴대폰 인증 기능 "true or false"                                                  |
| customer\_list.mobile\_number                | String   | Required | 본인인증에 사용할 번호 / - 없이                                                        |
| customer\_list.enable\_password\_cert        | String   | Required | 비밀번호 인증 기능 "true or false"                                                 |
| customer\_list.password\_hint                | String   | Required | 비밀번호 힌트                                                                    |
| customer\_list.password                      | String   | Required | 비밀번호                                                                       |

## 요청 Body 예시)

```javascript
{
  "header": {
    "request_code": "1410Q",
    "api_name": "Work Flow Bulk Sending를 시작합니다.",
    "session_id": "",
    "version" : "9.9.99"
  },
  "body": {
    "comp_id": "{회사 ID}",
    "biz_id": "0",
    "memb_email": "{ 사용자 이메일 }",
    "workflow_lib_id": "{ 서식의 lib_id }",
    "workflow_name": "",
    "unset_player_list": [{
        "memb_id_type" : "{ EMail or Mobile }",
        "email": "{ memb_id_type 에 따라 번호나 이메일 }",
        "name" : "{ 받는 사람 이름 }",
        "language": "{ko-KR or ja-JP or en-US}",
        "workflow_name" : "{서식 이름}",
        "enable_mobile_cert" : "{ 휴대폰 본인인증 여부 true or false }",
        "mobile_number" : "{ 본인 인증에 사용할 전화번호 }",
        "enable_password_cert":"{true or false}",
	      "password_hint":"{계약자가 볼 비밀번호 힌트}",  		
	      "password":"{설정할 문서 비밀번호}",
        "field_list": [{
      				"doc_id": "{ 서식 ID }",
      				"field_name": "{ 서식 필드명 }",
      				"field_value": "{ 서식 필드 값 }"
			  }]
      }],
    	"customer_list": [{
        "memb_id_type": "{ 2단계 C 서식 사용시에만 기입해주세요 }",
			  "email": "",
			  "name": "",
			  "language": "",
        "enable_mobile_cert":"",
        "mobile_number":"",
        "enable_password_cert":"",
        "password_hint":"",  		
        "password":""
		}],
    "comment": "",
    "enable_legal_agreement":"false"
  }
}
```

## Response

| Code | **Description** | **Reference**              |
| ---- | --------------- | -------------------------- |
| 200  | 성공              | 형식이 잘못 된 경우 result\_msg 참조 |
| 400  | 연결 실패           |                            |

#### Result\_msg

| Code | **Description** | **Reference**                         |
| ---- | --------------- | ------------------------------------- |
| 00   | 성공              | 성공                                    |
| -1   | 실패              | 수신 메세지의 Body 정보가 잘못된 형태여서 파싱하지 못했습니다. |
| 10   | 실패              | 해당 Work Flow Library가 존재하지 않습니다.      |
| 11   | 실패              | 실패하였습니다.                              |
| 12   | 실패              | 허용된 저장 용량이 초과되었습니다                    |
| 13   | 실패              | 가능한 문서 수를 초과합니다.                      |
| 14   | 실패              | 이용기간이 만료되었습니다.                        |
| 15   | 실패              | 작성자 설정이 올바르지 않습니다.                    |

## 응답 Body 예시)

```javascript
}
	"body":{
		"workflow_list":[{
			"workflow_id": "{문서ID}",
			"unset_player_email": "{서명자 이메일 or 전화번호}",
			"unset_player_name": "{서명자 이름}",
			"result": "OK",
			"description": "",
			"workflow_name": "{서식 이름}",
			"token": "{인증 토큰 코드}",
			"lang": "ko-KR",
			"reg_date": "{회사 결제 갱신일}"}],
			"comp_id": "{회사 ID}",
			"biz_id": "0",
			"memb_email": "{생성자 이메일}",
			"workflow_lib_id": "{서식 lib_id}"
			},
	"header":{
		"session_id": "thread_023",
		"response_code": "1410A",
		"result_code": "00",
		"result_msg": "Work Flow bulk Sending이 시작됩니다.",
		"version": "9.9.99"
	}
}
```


# 조회


# 정보 조회

## 문서 정보 조회

<mark style="color:blue;">`GET`</mark> `https://docs.esignon.net/api/v2/workflows/:workflowId`

&#x20;문서 id를 통해 문서의 작성 이력, 필드 목록, 작성자 목록, 참조자 목록을 포함한 상세 정보를 조회합니다.

#### Path Parameters

| Name       | Type   | Description |
| ---------- | ------ | ----------- |
| workflowId | string | 조회할 문서의 ID  |

#### Query Parameters

| Name   | Type   | Description                                      |
| ------ | ------ | ------------------------------------------------ |
| offset | string | <p>UTC offset<br>±hh:mm 형식으로 입력 (기본값 +09:00)</p> |

#### Headers

| Name           | Type   | Description     |
| -------------- | ------ | --------------- |
| Authentication | string | esignon ${인증토큰} |

{% tabs %}
{% tab title="200 조회 성공" %}

```
{
    "header":{
        "response_code": "/api/v2/workflows/:workflowId",
        "result_code": "00",
        "result_msg": "Success",
        "session_id": ""
    },
    "body":{
        "workflow_id": "{문서 id}",
        "workflow_name": "{문서명}",
        "workflow_status": "{문서 상태}",    
        "last_modify_date": "{마지막 작성일}",
        "expiry_date": "{문서 작성 기한}",
        "create_date": "{생성일}",
        "creator_email": "{생성자}",
        "creator_name": "{생성자 이메일}",
        "biz_id": "{부서 id}",
        "biz_name": "{부서명}",
        "action_history_list":[    // 작성 이력
            {
                "step_code": "{상태 코드}",
                "action_id": "{단계 id}",
                "confirm_date": "{작성일}",
                "name": "{작성자 이름}",
                "confirm_email": "{작성자 이메일}",
                "comment": "{메세지}",
            }
        ],
        "current_action_id": "{현재 작성 단계}",
        "total_action_count": "{문서 작성자 수}",
        "certificate_url": "{인증서 다운로드 url}",
        "download_url": "{문서 다운로드 url}",
        "view_url": "{문서 보기 url}",
        "referer_list":[    // 참조자 목록
            {
                "name": "{이름}",
                "type": "{참조 타입}",
                "email": "{이메일}",
            }
        ],
        "field_list":[    // 필드 목록
            {
                "action_id": "{단계 id}",
                "field_owner": "{필드명}",
                "field_value": "{입력값}",
                "email": "{이메일}",
            }
        ],
        "owner_list":[    // 생성자 목록
            {
                "action_id": "{단계 id}",
                "turn_yn": "{작성 차례 여부}",
                "name": "{이름}",
                "email": "{이메일}",
                "phone_number": "{핸드폰 번호}",
                "cert_mobile_yn": "{핸드폰 인증 여부}",
                "cert_password_yn": "{비밀번호 인증 여부}",
                "password_hint": "{비밀번호 힌트}",
            }
        ]
    }
}
```

{% endtab %}
{% endtabs %}

## Response

### **Status code**

| Code | Description | Reference                        |
| ---- | ----------- | -------------------------------- |
| 200  | 성공          | 형식이 잘못된 경우 header.result\_msg 참조 |
| 400  | 연결 실패       |                                  |

### Body

**header.result\_code**

| Code | Description | Reference                    |
| ---- | ----------- | ---------------------------- |
| 00   | 성공          | 성공                           |
| 10   | 실패          | 문서 정보 조회가 실패했습니다. id를 확인하세요. |

**body.workflow\_type**

| Value    | Description |
| -------- | ----------- |
| WEBTYPE  | 비대면         |
| BULKTYPE | 대량발송        |
| FACEWEB  | 대면          |

**body.workflow\_status**

| Value    | Description |
| -------- | ----------- |
| Complete | 완료          |
| Canceled | 취소          |
| Playing  | 진행 중        |
| Truncate | 완전 삭제       |
| Disposal | 폐기          |

**body.action\_history\_list.step\_code**

| Value              | Description |
| ------------------ | ----------- |
| CERT\_DOWN         | 이력 인증서 다운로드 |
| DELETED            | 원본 PDF 삭제   |
| DISPOSAL           | 폐기          |
| DOC\_DOWN          | 문서 다운로드     |
| EXCEL\_EXPORT      | 엑셀 다운로드     |
| MOBILE\_CERT       | 휴대폰 인증 완료   |
| PASSWORD\_CERT     | 비밀번호 인증 완료  |
| PUBLIC\_CERT       | 공인인증 서명 완료  |
| RESEND             | 문서 재전송      |
| SIGN\_COMPLETE     | 서명 완료       |
| SIGN\_REQ          | 서명 요청       |
| SIGN\_RETURN       | 서명 반려       |
| SIGN\_START        | 서명 시작       |
| TRUNCATE           | 문서 삭제       |
| VIEW               | 문서 보기       |
| WORKFLOW\_CANCEL   | 문서 취소       |
| WORKFLOW\_COMPLETE | 문서 완료       |
| WORKFLOW\_REJECT   | 문서 반려       |
| WORKFLOW\_START    | 문서 시작       |

**body.referer\_list.type**

| Value   | Description |
| ------- | ----------- |
| starter | 생성자         |
| referer | 참조자         |


# 특정필드 값으로 조회

* 특정필드값으로 조회합니다.&#x20;
* field\_name 으로 설정 된 필드에 field\_value 로 설정한 값을 조회합니다.

## API 속성-

| Url                                              | Type | **Code** |
| ------------------------------------------------ | ---- | -------- |
| <https://docs.esignon.net/api/:companyId/search> | POST | 5008Q    |

## Request

### Parameters

#### PathParameters

| **Parameter Name** | DataType | **Description** |
| ------------------ | -------- | --------------- |
| companyId          | String   | 회사ID            |

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**   |
| ------------------ | -------- | -------- | ----------------- |
| Content-Type       | String   | Required | application/json  |
| Authorization      | String   | Required | esignon ${발급받은토큰} |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description** |
| ------------------ | -------- | -------- | --------------- |
| request\_code      | String   | Required | 5008Q           |
| api\_name          | String   | Required | start api       |
| session\_id        | String   | Required | ""              |
| version            | String   | Required | 1.1.60          |

&#x20; Body - Body Parameter

| **Parameter Name**       | DataType | Required | **Description**  |
| ------------------------ | -------- | -------- | ---------------- |
| comp\_id                 | String   | Required | 회사 ID            |
| field\_list              | Data     | Required | 조회할 문서 정보        |
| field\_list.doc\_uid     | String   | Required | 조회할 문서의 서식 ID    |
| field\_list.field\_name  | String   | Required | 조회할 문서 서식의 필드 이름 |
| field\_list.field\_value | String   | Required | 조회할 문서 서식의 필드    |

## 요청 Body 예시)

```javascript
{
	 "header" : {
	   "request_code" : "5008Q",            
	   "api_name" : "start api",    
	   "session_id" : "",    
	   "version" : "1.1.60"
	 },
	 "body" : {
	   "comp_id": "{ 회사 ID }",
	   "field_list": [ 
			    {
						"doc_uid": "{조회할 서식 ID}",
						"field_name": "{조회할 서식의 필드 이름}",
						"field_value": "{위에 설정한 필드 이름에 들어간 값}"
			    }
	   ]
	 }
}

```

## Response

| Code | **Description** | **Reference**              |
| ---- | --------------- | -------------------------- |
| 200  | 성공              | 형식이 잘못 된 경우 result\_msg 참조 |
| 400  | 연결 실패           |                            |

#### Result\_msg

| Code | **Description** | **Reference**                         |
| ---- | --------------- | ------------------------------------- |
| 00   | 성공              | 성공                                    |
| 10   | 실패              | 실패                                    |
| 12   | 실패              | 수신 메세지의 Body 정보가 잘못된 형태여서 파싱하지 못했습니다. |
| 17   | 실패              | 필수 검색 조건이 없습니다.                       |
| 18   | 실패              | 검색 조건이 없습니다.                          |
| 19   | 실패              | 날짜 형식이 잘못되었습니다.                       |
| 99   | 실패              | Unexpected exception ( 잘못된 포맷 )       |

## 응답 Body 예시)

```javascript
{
	"header":{
		"response_code": "5008A",
		"result_code": "00",
		"result_msg": "필드 상태가 검색되었습니다.",
		"session_id": "",
		"version": "1.1.60"
	},
	"body":{
		"comp_id": "{회사 ID}",
		"wf_list":[
			{
				"doc_uid": "{서식ID}",
				"end_date": "{서명 완료 시간}",
				"total_process_count": "{ 문서의 계약자 수 }",
				"wf_manager_name": "{ 문서 생성자 이름 }",
				"wf_manager_email": "{ 문서 생성자 이메일 }",
				"wf_status": "{ 문서의 상태 값 }",
				"field_value": "{조회한 필드 값}",
				"wfuid": "{문서 ID}",
				"current_process_no": "1",
				"wf_title": "{문서 이름}",
				"start_date": "{문서 시작 시간}",
				"field_name": "{조회한 필드 이름}"
			}
		]
	}
}

```

### Parameter Info

| **Name**            | **Value** | **Description**  |
| ------------------- | --------- | ---------------- |
| wf\_list.wf\_status | Playing   | 진행중              |
|                     | Canceled  | 취소               |
|                     | Complete  | 완료               |
|                     | Disposal  | 폐기               |
|                     | Truncate  | (취소 상태 후 삭제한 경우) |


# 기간으로 조회

* 특정 서식으로 작성한 문서를 기간으로 조회합니다.

## API 속성-

| Url                                              | Type | **Code** |
| ------------------------------------------------ | ---- | -------- |
| <https://docs.esignon.net/api/:companyId/search> | POST | 5009Q    |

## Request

### Parameters

#### PathParameters

| **Parameter Name** | DataType | **Description** |
| ------------------ | -------- | --------------- |
| companyId          | String   | 회사ID            |

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**    |
| ------------------ | -------- | -------- | ------------------ |
| Content-Type       | String   | Required | "application/json" |
| Authorization      | String   | Required | esignon ${발급받은토큰}  |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description**    |
| ------------------ | -------- | -------- | ------------------ |
| request\_code      | String   | Required | "5009Q"(API 고유 코드) |
| api\_name          | String   | Required | "start api"        |
| session\_id        | String   | Required | ""                 |
| version            | String   | Required | "1.1.60"           |

&#x20; Body - Body Parameter

| **Parameter Name**      | DataType | Required | **Description**                                                     |
| ----------------------- | -------- | -------- | ------------------------------------------------------------------- |
| comp\_id                | String   | Required | 회사 ID                                                               |
| search\_date\_type      | String   | Optional | START or END / START – 문서 시작 기준 / END – 문서 완료 기준 - 미 입력시 디폴트값 "END" |
| start\_date             | String   | Required | 검색 시작 지점 YYYY-MM-DD                                                 |
| end\_date               | String   | Required | 검색 종료 지점 YYYY-MM-DD                                                 |
| field\_list             | Data     | Required | 조회할 문서 정보                                                           |
| field\_list.doc\_uid    | String   | Required | 조회할 문서의 서식 ID                                                       |
| field\_list.field\_name | String   | Optional | <p>조회할 문서 서식의 필드 이름</p><p> - 입력시 해당 필드 이름과 같은 필드의 값을 가져옵니다.</p>     |

## 요청 Body 예시)

```javascript
{
 "header" : {
   "request_code" : "5009Q",
   "api_name" : "start api",
   "session_id" : "",
   "version" : "1.1.60"
 },
   "body" : {
     "comp_id": "{회사 ID}",
     "search_date_type":"{START or END}",
     "start_date": "{검색 시작 지점}",
     "end_date": "{검색 종료 지점}",
     "field_list": [{
  				"doc_uid": "{서식 ID}",
  				"field_name": "{서식 내부에 있는 필드명}"
  			}]
 }
}
```

## Response

| Code | **Description** | **Reference**              |
| ---- | --------------- | -------------------------- |
| 200  | 성공              | 형식이 잘못 된 경우 result\_msg 참조 |
| 400  | 연결 실패           |                            |

#### Result\_msg

| Code | **Description** | **Reference**                         |
| ---- | --------------- | ------------------------------------- |
| 00   | 성공              | 성공                                    |
| 10   | 실패              | 실패                                    |
| 99   | 실패              | Unexpected exception ( 잘못된 포맷 )       |
| 12   | 실패              | 수신 메세지의 Body 정보가 잘못된 형태여서 파싱하지 못했습니다. |
| 17   | 실패              | 필수 검색 조건이 없습니다.                       |
| 18   | 실패              | 검색 조건이 없습니다.                          |
| 19   | 실패              | 날짜 형식이 잘못되었습니다.                       |

## 응답 Body 예시)

```javascript
{
	"header":{
		"response_code": "5009A",
		"result_code": "00",
		"result_msg": "필드 상태가 검색되었습니다.",
		"session_id": "",
		"version": "1.1.60"
	},
	"body":{
		"comp_id": "{회사 ID}",
		"wf_list":[
				{
					"doc_uid": "{서식ID}",
					"end_date": "{서명 완료 시간}",
					"total_process_count": "{문서의 계약자 }",
					"wf_manager_name": "{ 문서 생성자 이름 }",
					"wf_manager_email": "{ 문서 생성자 이메일 }",
					"wf_status": "{문서의 상태값}",
					"field_value": "{조회한 필드 값}",
					"wfuid": "{문서 ID}",
					"current_process_no": "1",
					"wf_title": "{문서 이름}",
					"start_date": "{문서 시작 시간}",
					"field_name": "{조회한 필드 이름}"
				}
		]
	}
}
```

### Parameter Info

| **Name**            | **Value** | **Description**  |
| ------------------- | --------- | ---------------- |
| wf\_list.wf\_status | Playing   | 진행중              |
|                     | Canceled  | 취소               |
|                     | Complete  | 완료               |
|                     | Disposal  | 폐기               |
|                     | Truncate  | (취소 상태 후 삭제한 경우) |


# 진행 문서 목록조회

* 해당 회사의 진행문서 목록을 전부 조회합니다.&#x20;
* GET 방식의 API로 HEADERS에 발급받은 토큰 값만 입력하여 조회합니다.

## 진행 문서 조회

<mark style="color:blue;">`GET`</mark> `https://docs.esignon.net/worklists/new?page={value}&rows={value}`

진행 문서의 상태, 종류, 단계등을 확인할 수 있습니다.

#### Path Parameters

| Name | Type   | Description                  |
| ---- | ------ | ---------------------------- |
| rows | string | 1페이지에 몇개나 조회할 것인지 / 기본값 50   |
| page | string | 몇페이지에 있는 목록을 조회할 것인지 / 기본값 1 |

#### Headers

| Name          | Type   | Description      |
| ------------- | ------ | ---------------- |
| Content-Type  | string | application/json |
| Authorization | string | esignon ${발급받토큰} |

{% tabs %}
{% tab title="200 " %}

```javascript
{
	"header":{
		"response_code": "/worklists/new",
		"result_code": "00",
		"result_msg": "",
		"session_id": ""
	},
	"body":{
		"comp_id": "{회사 ID}",
		"isManager": true,
		"memb_email": "{로그인한 이메일}",
		"page": "{출력할 페이지의 번호}",
		"rows": "{페이지 당 보여줄 목록의 갯수}",
		"total": "{전체 문서 수}",
		"workflow_list":[{
			"wfuid": "{문서 ID}",
			"wfname": "{문서 제목}",
			"wftype": "{문서 타입}",
			"status": "{문서 상태}",
			"step": "{문서 단계}",
			"nickname": "{문서 작성자}",
			"currentactionid": "{계약 중인 단계 번호}",
			"email": "{문서 작성자 이메일}",
			"startdate": "{문서 시작일}",
			"totalprocesscount": "{문서의 총 단계 갯수}",//3단계 문서일 경우 3
			"currentprocesscount": "{완료 된 계약 단계 번호}",
			"confirmdate": "{문서 완료일}",
			"preactionid": "{}",
			"preactionemail":"{참조하는 이메일}"
			}]
	}
}

```

{% endtab %}
{% endtabs %}

### Parameter Info

| **Name**              | **Value** | **Description**  |
| --------------------- | --------- | ---------------- |
| Workflow\_list.status | Playing   | 진행중              |
|                       | Canceled  | 취소               |
|                       | Complete  | 완료               |
|                       | Disposal  | 폐기               |
|                       | Truncate  | (취소 상태 후 삭제한 경우) |
| Workflow\_list.wftype | NORMAL    | 일반 발송 문서         |
|                       | BULKWEB   | 대량 발송 문서         |
| Workflow\_list.step   | Myturn    | 내 차례             |
|                       | Progress  | 계약자가 진행중         |
|                       | Complete  | 완료               |


# 상태변경


# 승인, 반려

* 문서를 승인 또는 반려 합니다.
* 승인시 문서는 필수 값이 입력되어 있어야합니다.

## API 속성-

| Url                                              | Type | **Code** |
| ------------------------------------------------ | ---- | -------- |
| <https://docs.esignon.net/api/:companyId/action> | POST | 5010Q    |

## Request

### Parameters

#### PathParameters

| **Parameter Name** | DataType | Required | **Description** |
| ------------------ | -------- | -------- | --------------- |
| companyId          | String   | Required | 회사ID            |

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**     |
| ------------------ | -------- | -------- | ------------------- |
| Content-Type       | String   | Required | "application/json"  |
| Authorization      | String   | Required | "esignon ${발급받은토큰}" |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description**    |
| ------------------ | -------- | -------- | ------------------ |
| request\_code      | String   | Required | "5010Q"(API 고유 코드) |
| api\_name          | String   | Optional | "start api"        |
| session\_id        | String   | Optional | ""                 |
| version            | String   | Required | "9.9.99"           |

&#x20; Body - Body Parameter

| **Parameter Name** | DataType | Required | **Description**                                    |
| ------------------ | -------- | -------- | -------------------------------------------------- |
| comp\_id           | String   | Required | 회사 ID                                              |
| biz\_id            | String   | Required | "0"                                                |
| memb\_email        | String   | Required | 계약 진행자 이메일                                         |
| action\_id         | String   | Required | 계약 진행중인 단계                                         |
| workflow\_id       | String   | Required | 계약중인 문서 ID                                         |
| comment            | String   | Required | 승인 or 반려 시 전달하는 메세지                                |
| command            | String   | Required | RT - 반려 / CF - 승인 / CF 시엔 문서에 필수 값을 입력한 상태여야 진행 가능 |

## 요청 Body 예시)

```javascript
{
 "header" : {
   "request_code" : "5010Q",            
   "api_name" : "start api",    
   "session_id" : "",    
   "version" : "9.9.99"
 },
 "body" : {
   "comp_id": "{회사 ID}",
   "biz_id":"0",
   "memb_email":"{계약 진행자 이메일}",
   "action_id":"1"
   "workflow_id":"{계약 중인 문서 ID}",
   "comment":"{승인 or 반려시 전달하는 문자}",
   "command":"{RT or CF}"
 }
}

```

## Response

| Code | **Description** | **Reference**              |
| ---- | --------------- | -------------------------- |
| 200  | 성공              | 형식이 잘못 된 경우 result\_msg 참조 |
| 400  | 연결 실패           |                            |

#### Result\_msg

| Code | **Description** | **Reference**                         |
| ---- | --------------- | ------------------------------------- |
| 00   | 성공              | 성공                                    |
| 10   | 실패              | 실패                                    |
| 12   | 실패              | 수신 메세지의 Body 정보가 잘못된 형태여서 파싱하지 못했습니다. |
| 99   | 실패              | 필수항목이 남아있어 진행할 수 없습니다.                |
| 99   | 실패              | Unexpected exception ( 잘못된 포맷 )       |

## 응답 Body 예시)

```javascript
{
	"header":{
		"response_code": "5010A",
		"result_code": "00",
		"result_msg": "성공하였습니다.",
		"version": "9.9.99"
	},
	"body":{
		"comp_id": "{회사 ID}"
	}
}
```


# 취소, 폐기, 삭제

* 문서를 취소 또는 폐기합니다.
* 취소 - 진행중인 문서를 취소 처리합니다.
* 폐기 - 완료된 문서를 폐기 처리합니다.
* 삭제 - 취소된 문서를 삭제 처리합니다. ( 문서란에서 보이지않게 삭제합니다. )

## API 속성-

| Url                                        | Type | **Code** |
| ------------------------------------------ | ---- | -------- |
| <https://docs.esignon.net/JEDOC/Common.do> | POST | 1510Q    |

## Request

### Parameters

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**     |
| ------------------ | -------- | -------- | ------------------- |
| Content-Type       | String   | Required | "application/json"  |
| Authorization      | String   | Required | "esignon ${발급받은토큰}" |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description**    |
| ------------------ | -------- | -------- | ------------------ |
| request\_code      | String   | Required | "1510Q"(API 고유 코드) |
| request\_msg       | String   | Required | ""                 |
| request\_lang      | String   | Optional | "ko","en","ja"     |
| session\_id        | String   | Required | "thread\_023"      |
| version            | String   | Required | "9.9.99"           |

&#x20; Body - Body Parameter

| **Parameter Name** | DataType | Required | **Description**                                                         |
| ------------------ | -------- | -------- | ----------------------------------------------------------------------- |
| comp\_id           | String   | Required | 회사 ID                                                                   |
| biz\_id            | String   | Required | "0"                                                                     |
| memb\_email        | String   | Required | 사용자 이메일                                                                 |
| workflow\_id       | String   | Required | 문서 ID                                                                   |
| command            | String   | Required | "CANCEL" - 취소 / "DISPOSAL" - 폐기 / "DELETE" - 삭제                         |
| description        | String   | Optional | "disposal" 시엔 필수 값 - "폐기 사유"                                            |
| timezone\_offset   | String   | Optional | <p>"disposal" 시엔 필수 값 - "UTC 시간값 입력"/"+00:00"</p><p>한국의 경우 "+09:00"</p> |

## 요청 Body 예시)

```javascript
{
	"header": {
			"request_code": "1510Q",
			"request_msg": "",
	    "request_lang":"{ko or ja or en}",
			"session_id": "session_id",
			"version": "9.9.99"
	},
	"body": {
			"comp_id": "{회사 ID}",
      "biz_id":"0",
      "memb_email":"{사용자 이메일}",
      "workflow_id":"{문서 ID}",
      "command":"{ CANCEL or DISPOSAL or DELETE }",
      "description":"{폐기 사유 입력}",
      "timezone_offset":"+09:00"
	}
}
```

## Response

| Code | **Description** | **Reference**              |
| ---- | --------------- | -------------------------- |
| 200  | 성공              | 형식이 잘못 된 경우 result\_msg 참조 |
| 400  | 연결 실패           |                            |

#### Result\_msg

| Code | **Description** | **Reference**                         |
| ---- | --------------- | ------------------------------------- |
| 00   | 성공              | 성공                                    |
| 94   | 실패              | 인증키가 올바르지 않습니다.                       |
| 11   | 실패              | 필수 값이 없거나 상태 값이 올바르지 않습니다.            |
| -1   | 실패              | 수신 메세지의 Body 정보가 잘못된 형태여서 파싱하지 못했습니다. |

## 응답 Body 예시)

```javascript
{
	"header":{
		"session_id": "session_id",
		"response_code": "1510A",
		"result_code": "00",
		"result_msg": "폐기/취소를 성공했습니다.",
		"version": "9.9.99"
	},
	"body":{
		"comp_id": "{회사 ID}",
		"biz_id": "0",
		"memb_email": "{사용자 이메일}",
		"workflow_id": "{문서 ID}",
		"command": "{실행된 커맨드}"
	}
}
```


# 재전송

* 문서를 재전송 합니다.
* 완료, 취소된 문서는 재전송 할 수 없습니다.

## API 속성-

| Url                                                | Type | **Code** |
| -------------------------------------------------- | ---- | -------- |
| <https://docs.esignon.net/JEDOC/Common.do?lang={}> | POST | 1429Q    |

## Request

### Parameters

#### PathParameters

| **Parameter Name** | **Value** | **Description** |
| ------------------ | --------- | --------------- |
| lang               | String    | ko,en,jp        |

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**     |
| ------------------ | -------- | -------- | ------------------- |
| Content-Type       | String   | Required | "application/json"  |
| Authorization      | String   | Required | "esignon ${발급받은토큰}" |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description**    |
| ------------------ | -------- | -------- | ------------------ |
| request\_code      | String   | Required | "1429Q"(API 고유 코드) |
| request\_msg       | String   | Required | "Remind 를 요청합니다."  |
| session\_id        | String   | Required | ""                 |

&#x20; Body - Body Parameter

| **Parameter Name** | DataType | Required | **Description** |
| ------------------ | -------- | -------- | --------------- |
| comp\_id           | String   | Required | 회사 ID           |
| biz\_id            | String   | Required | "0"             |
| workflow\_id       | String   | Required | 진행 문서 ID        |
| memb\_email        | String   | Required | 사용자 이메일         |

## 요청 Body 예시)

```javascript
{
	"header": {
		"request_code": "1429Q",
		"request_msg": "Remind 를 요청합니다.",
		"session_id": ""
	},
	"body": {
		"comp_id": "{회사 ID}",
		"biz_id": "0",
		"memb_email": "{사용자 이메일}",
		"workflow_id": "{진행 문서 ID}"
		}
}

```

## Response

| Code | **Description** | **Reference**              |
| ---- | --------------- | -------------------------- |
| 200  | 성공              | 형식이 잘못 된 경우 result\_msg 참조 |
| 400  | 연결 실패           |                            |

#### Result\_msg

| Code | **Description** | **Reference**                   |
| ---- | --------------- | ------------------------------- |
| 00   | 성공              | 성공                              |
| 10   | 실패              | 실패                              |
| 11   | 실패              | 완료 상태의 문서는 재전송을 할 수 없습니다.       |
| 12   | 실패              | 취소 상태의 문서는 재전송을 할 수 없습니다.       |
| 99   | 실패              | Unexpected exception ( 잘못된 포맷 ) |

## 응답 Body 예시)

```javascript
{
	"header":{
		"session_id": "thread_023",
		"response_code": "1429A",
		"result_code": "00",
		"result_msg": "Remind를 성공 하었습니다."
	},
	"body":{
		"comp_id": "{회사 ID}",
		"biz_id": "0",
		"memb_email": "{사용자 이메일}",
		"workflow_id": "{진행 문서 ID}"
	}
}

```


# 정보 조회

## 서식 정보 조회&#x20;

<mark style="color:blue;">`GET`</mark> `https://docs.esignon.net/api/v2/docs/:documentId`

서식 id를 통해 서식의 상세 정보를 조회합니다.&#x20;

#### Path Parameters

| Name       | Type   | Description |
| ---------- | ------ | ----------- |
| documentId | string | 조회할 서식의 id  |

#### Query Parameters

| Name   | Type   | Description                                      |
| ------ | ------ | ------------------------------------------------ |
| offset | string | <p>UTC offset<br>±hh:mm 형식으로 입력 (기본값 +09:00)</p> |

#### Headers

| Name           | Type   | Description     |
| -------------- | ------ | --------------- |
| Authentication | string | esignon ${인증토큰} |

{% tabs %}
{% tab title="200 조회 성공" %}

```
{
    "header":{
        "response_code": "/api/v2/docs/:documentId",
        "result_code": "00",
        "result_msg": "Success",
        "session_id": ""
    },
    "body":{
        "doc_id": "{서식 id}",
        "doc_name": "{서식명}",
        "doc_type": "{서식 종류}",
        "creator": "{생성자}",
        "workflow_library_id": "{라이브러리 id}",
        "dir_type": "{폴더 종류}",
        "dir_path": "{폴더 위치}",
        "last_modifier": "{마지막 수정자}",
        "file_workflow_count": "{문서 작성자 수}",
        "last_modify_date": "{마지막 수정일}",
        "create_date": "{생성일}",
        "field_list":[    // 필드 목록
            {
                "action_id": "{단계 id}",
                "field_owner": "{필드명}",
                "email": "{이메일}",
            }
        ]
    }
}
```

{% endtab %}
{% endtabs %}

## Response

### **Status code**

| Code | Description | Reference                        |
| ---- | ----------- | -------------------------------- |
| 200  | 성공          | 형식이 잘못된 경우 header.result\_msg 참조 |
| 400  | 연결 실패       |                                  |

### Body

**header.result\_code**

| Code | Description | Reference                    |
| ---- | ----------- | ---------------------------- |
| 00   | 성공          | 성공                           |
| 10   | 실패          | 완성되지 않은 서식입니다.               |
| 11   | 실패          | 문서 정보 조회가 실패했습니다. id를 확인하세요. |

**body.doc\_type**

| Value    | Description |
| -------- | ----------- |
| WEBTYPE  | 비대면         |
| BULKTYPE | 대량발송        |
| FACEWEB  | 대면          |

**body.dir\_type**

| Value  | Description |
| ------ | ----------- |
| shared | 공유된 폴더      |
| biz    | 부서폴더        |
| my     | 내폴더         |


# 목록 조회

* 서식 목록을 조회합니다.

## API 속성-

| Url                                                     | Type | **Code** |
| ------------------------------------------------------- | ---- | -------- |
| <https://docs.esignon.net/JEDOC/Common.do?lang={value}> | POST | 1123Q    |

## Request

### Parameters

#### PathParameters

| **Parameter Name** | DataType | **Description** |
| ------------------ | -------- | --------------- |
| lang               | String   | ko,en,jp        |

#### &#x20;Headers

| **Parameter Name** | DataType | **Description**     |
| ------------------ | -------- | ------------------- |
| Content-Type       | String   | "application/json"  |
| Authorization      | String   | "esignon ${발급받은토큰}" |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | **Description**    |
| ------------------ | -------- | ------------------ |
| request\_code      | String   | "1123Q"(API 고유 코드) |
| request\_msg       | String   | ""                 |
| session\_id        | String   | ""                 |
| version            | String   | "9.9.99"           |

&#x20; Body - Body Parameter

| **Parameter Name**   | DataType | **Description**                                                                                                                                                                             |
| -------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| comp\_id             | String   | 회사 ID                                                                                                                                                                                       |
| memb\_email          | Stirng   | 사용자 이메일                                                                                                                                                                                     |
| biz\_id              | String   | "0"                                                                                                                                                                                         |
| search\_dir\_id      | String   | <p>서식을 찾을 폴더 ID <br>"all"(전체보기)<br>"my"(내 폴더)</p><p>"shared"(공유된 폴더)</p>                                                                                                                    |
| display\_order\_mode | String   | <p>정렬기준값 </p><p>2 서식 생성일 오름차순 </p><p>3 서식명 내림차순 </p><p>4 서식명 오름차순 </p><p>5 서식ID 내림차순 </p><p>6 서식ID 오름차순 </p><p>7 서식타입 내림차순 </p><p>8 서식타입 오름차순</p><p>9 문서작성자수 내림차순 </p><p>10 문서작성자수 오름차순</p> |

## 요청 Body 예시)

```javascript
{
        "header": {
                "request_code": "1123Q",
                "request_msg": "",
                "session_id": "",
                "version": "9.9.99"
        },
        "body": {
                 "comp_id": "{회사 ID}",
                 "biz_id": "0",
                 "memb_email" : "{사용자 이메일}",
                 "search_dir_id": "all",
                 "display_order_mode": "2" 
        }
}

```

## Response

| Code | **Description** | **Reference**              |
| ---- | --------------- | -------------------------- |
| 200  | 성공              | 형식이 잘못 된 경우 result\_msg 참조 |
| 400  | 연결 실패           |                            |

#### Result\_msg

| Code | **Description** | **Reference**                         |
| ---- | --------------- | ------------------------------------- |
| 00   | 성공              | 성공                                    |
| 10   | 실패              | 실패                                    |
| 99   | 실패              | Unexpected exception ( 잘못된 포맷 )       |
| 12   | 실패              | 수신 메세지의 Body 정보가 잘못된 형태여서 파싱하지 못했습니다. |

## 응답 Body 예시)

```javascript
{
	"body":{
		"comp_id": "{회사 ID}",
		"biz_id": "0",
		"memb_email": "{사용자 이메일}",
		"search_dir_id": "all",
		"file_list":[{//서식 정보  Example} file_lsit 참조}] 서식 전체 조회이기 때문에 모든 서식 데이터
	}],
	"header":{
		"session_id": "session_id",
		"response_code": "1123A",
		"result_code": "00",
		"result_msg": "파일 리스트입니다.",
		"version": "9.9.99"
	}
}

```

#### Example) file\_list

```javascript
{
	"file_id": "{서식ID}",
	"file_type": "templete",
	"file_name": "{서식 이름}",
	"dir_type": "{서식이 위치한 폴더}",
	"create_memb_email": "{서식 작성자 이메일}",
	"create_date": "{서식 생성일}",
	"create_memb_name": "{서식 작성자 이름}",
	"file_workflow_count": "1", // 서식의 단계 수
	"file_workflow_type": "WEBTYPE", // 대면,비대면 WEBTYPE 대량 BULK
	"file_workflow_library_id": "{서식의 lib ID}", // 대량 발송에 사용
	"last_modify_date": "{마지막 수정일}"
}
```


# 정보 조회

## 회사 정보 조회&#x20;

<mark style="color:blue;">`GET`</mark> `https://docs.esignon.net/api/v2/company`

회사의 상세 정보를 조회합니다.

#### Query Parameters

| Name   | Type   | Description                                      |
| ------ | ------ | ------------------------------------------------ |
| offset | string | <p>UTC offset<br>±hh:mm 형식으로 입력 (기본값 +09:00)</p> |

#### Headers

| Name           | Type   | Description     |
| -------------- | ------ | --------------- |
| Authentication | string | esignon ${인증토큰} |

{% tabs %}
{% tab title="200 조회 성공" %}

```
{
    "header":{
        "response_code": "/api/v2/company",
        "result_code": "00",
        "result_msg": "Success",
        "session_id": ""
    },
    "body":{
        "name": "{회사명}",
        "contract_company_name": "{계약 진행용 회사명}",
        "create_email": "{생성자}",
        "country_code": "{국가 코드}",
        "workflow_capacity": "{충전 건수}",
        "workflow_usage": "{사용 건수}",
        "allow_list":[
            "{ip 주소}"
        ],
        "expiry_date": "{만료일}",
        "workflow_charge_list":[
            "grade_code": "{요금제 코드}",
            "email": "{결제자}",
            "payment_date_time": "{결제일}",
            "doc_capacity": "{충전 건수}",
            "payment_system": "{결제 시스템}",
            "payment_amount": "{결제 횟수}",
        ],
        "sign_up_type": "{구분}",
        "grade_code": "{요금제 코드}",
        "create_date": "{생성일}",
    }
}
```

{% endtab %}
{% endtabs %}

## Response

### **Status code**

| Code | Description | Reference                        |
| ---- | ----------- | -------------------------------- |
| 200  | 성공          | 형식이 잘못된 경우 header.result\_msg 참조 |
| 400  | 연결 실패       |                                  |

### Body

**header.result\_code**

| Code | Description | Reference         |
| ---- | ----------- | ----------------- |
| 00   | 성공          | 성공                |
| 10   | 실패          | 회사 정보 조회가 실패했습니다. |

**body.grade\_code**

| Value | Description  |
| ----- | ------------ |
| BB    | Beginner     |
| BR    | Rookie       |
| BE    | Expert       |
| BP    | Premier      |
| PS    | Personal     |
| ST    | Standard     |
| BV    | Business VIP |
| PP    | PostPaid     |
| R1    | MONTH 10     |
| R2    | MONTH 30     |
| R3    | MONTH 50     |
| R4    | MONTH 100    |
| R5    | MONTH 250    |
| R6    | MONTH 500    |
| R0    | MONTH 0      |
| RT    | Rookie Test  |

**body.sign\_up\_type**

| Value   | Description |
| ------- | ----------- |
| my      | 개인 고객       |
| company | 기업 고객       |


# API 설명

* esignon 의 API 는 Header - Body 형식 이며&#x20;
* Body 데이터 형식또한 프로토콜 코드와 version 관리를 위해 Header - Body 형식으로 제공합니다.
* 형식 ex) Header - Body ( Header - Body )
* 일부 API 의 경우 Body 의 형식이 다를 수 있습니다. 각 API의 설명을 참고해주시기 바랍니다.
* 이싸인온 API 사용시 회사 고유의 클라이언트 ID가 필요합니다. &#x20;
* 클라이언트 ID 발급은 [고객문의](https://esignon.net/customer/)를 이용 부탁드립니다.
* 사용순서 ) 클라이언트 ID 발급(회사문의) -> 인증토큰 발급 -> 인증토큰을 이용하여 API 사용
* **`※Header 토큰 값 입력 형식을 꼭 지켜주세요※`**

## Ex) Header

![](/files/-M8JQ3iQWP_nbxpAVyj3)

Header 의 경우 최대 2개의 입력 값을 받으며 토큰 발급 API 를 제외한 모든 API는 Authorization에 토큰값을 입력해서 요청을 해야합니다. esignon 과 토큰 값 사이의 띄어쓰기 값이 필수적으로 입력되야 합니다.

## Ex) Body

```jsx
{
    "header": {
        Key : "value"
    },
    "body": {
        key : "value"
    }
}
```

Body 의 경우 request 시에 위 처럼 body안에 header 값과 body 의 key,value를 각각 작성하여 요청하여야합니다. 안에 들어가는 key,value의 예시는 각 API에 명 되어있습니다

## CompanyID&#x20;

companyId 의 경우 회사명이 아닌 회사 고유의 ID를 지칭합니다. 아래의 화면에서 확인가능합니다.

![](/files/-MSjPuaZhhcyMYq8IvKC)

## API List

<img src="/files/-MKmbTdM2RX8nIsglgTM" alt="" data-size="original"> **발급 API**

* [인증토큰 발급 ](https://api.esignon.net/issued/token)

<img src="/files/-MKmbs6Ws3JxDbn_ByR-" alt="" data-size="original"> **문서 - 시작 API List**

* [비대면 계약 시작](https://api.esignon.net/workflow/start/nonfacestart)
* [비대면 계약 - ExportAPI](https://api.esignon.net/workflow/start/exportapi)
* [대량전송 계약 시](https://api.esignon.net/workflow/start/bulkstart)

<img src="/files/-MKmc1tDOaC91p1mUZYM" alt="" data-size="original"> **문서 - 조회 API List**

* [특정필드 값으로 조회](https://api.esignon.net/workflow/view/readbyfiled)
* [기간으로 조회](https://api.esignon.net/workflow/view/readbydate)
* [진행 문서 목록조회](https://api.esignon.net/workflow/view/readallworkflow)
* [모든필드 값 조회](https://api.esignon.net/workflow/view/searchall)&#x20;

<img src="/files/-MKmc52uB7ObuVK9ooqM" alt="" data-size="original"> **문서 - 상태변경 API List 및 기타 API List**

* [승인, 반려](https://api.esignon.net/workflow/modify/reject)
* [취소, 폐기, 삭제](https://api.esignon.net/workflow/modify/cancel)
* [다운로드 URL 생성](https://api.esignon.net/workflow/downloadurl)
* [문서 재전송](https://api.esignon.net/workflow/remind)

<img src="/files/-MKmc8VDw-cvBFQcdwCS" alt="" data-size="original"> **서식  API**

* [목록조회](https://api.esignon.net/template/readdocument)


# 인증토큰 발급

## 인증토큰 발급

<mark style="color:green;">`POST`</mark> `https://docs.esignon.net/api/:companyId/login`&#x20;

이싸인온 API 사용시 필요한 사용자의 인증토큰을 발급합니다.

#### Path Parameters

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| companyId | string | 회사아이디       |

#### Headers

| Name         | Type   | Description      |
| ------------ | ------ | ---------------- |
| Content-Type | string | application/json |

#### Request Body

| Name                 | Type   | Description |
| -------------------- | ------ | ----------- |
| header               | object |             |
| header.request\_code | string | 1001Q       |
| body                 | object |             |
| body.memb\_email     | string | 사용자이메일      |
| body.memb\_pwd       | string | 사용자비밀번호     |

{% tabs %}
{% tab title="200 성공" %}

```javascript
{
  "header": {
    "response_code": "1001A",
    "result_code": "00",
    "result_msg": "성공적으로 로그인되었습니다.",
    "session_id": ""
  },
  "body": {
    "access_token": "{인증토큰}",
    "comp_id": "{회사아이디}",
    "device_id": "{디바이스아이디}",
    "expire_date": "{만료일}",
    "memb_email": "{사용자 이메일}"
  }
}
```

{% endtab %}
{% endtabs %}

## Request Body Example

```javascript
{
  "header": {
    "request_code": "1001Q"
  },
  "body": {
    "memb_email": "{사용자 이메일}",
    "memb_pwd": "{사용자 비밀번호}"
  }
}
```

## Response Body Example

```javascript
{
  "header": {
    "response_code": "1001A",
    "result_code": "00",
    "result_msg": "성공적으로 로그인되었습니다.",
    "session_id": ""
  },
  "body": {
    "access_token": "{인증토큰}",
    "comp_id": "{회사아이디}",
    "device_id": "{디바이스아이디}",
    "expire_date": "{만료일}",
    "memb_email": "{사용자 이메일}"
  }
}
```

## Response Body  header.result\_code

| Code | **Description** | **Reference**                         |
| ---- | --------------- | ------------------------------------- |
| 00   | 성공              | 성공                                    |
| 10   | 실패              | 로그인 정보가 정확하지 않습니다.                    |
| 12   | 실패              | 수신 메세지의 Body 정보가 잘못된 형태여서 파싱하지 못했습니다. |
| 95   | 실패              | API를 호출할 수 없는 회사입니다. 관리자에게 문의해주세요.    |
| 99   | 실패              | Unexpected exception ( 잘못된 포맷 )       |


# 시작


# 비대면 계약 시작

* 비대면 계약 서식을 시작합니다.
* export\_api 값을 따로 설정하여 받아올 값의 형식을 지정할 수 있습니다.(선택사항)
* export\_api 란 고객님이 진행중 승인, 반려를 할 경우 설정된 값을 설정된 URL로 esignon에서 request 해주는 기능입니다.
* ※ Array 타입의 파라미터가 optional 인 경우 사용 시 Array 내부 파라미터 값 중 필수 값은 반드시 입력하셔야합니다. 사용을 하지 않으실 경우엔 입력하지 않으셔도 상관없습니다.
* ※ language 파리미터의 경우 기본값 "ko-KR" ( 설정 안했을경우 )

## API 주소 정보&#x20;

| Url                                                   | Type | **Code** |
| ----------------------------------------------------- | ---- | -------- |
| <https://docs.esignon.net/api/:companyId/startsimple> | POST | 5005Q    |

## Request

### Parameters

#### PathParameters

| **Parameter Name** | DataType | **Description** |
| ------------------ | -------- | --------------- |
| CompID             | String   | 회사아이디           |

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**     |
| ------------------ | -------- | -------- | ------------------- |
| Content-Type       | String   | Required | "application/json"  |
| Authorization      | String   | Required | "esignon ${발급받은토큰}" |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description**    |
| ------------------ | -------- | -------- | ------------------ |
| request\_code      | String   | Required | "5005Q"(API 고유 코드) |
| version            | String   | Required | "9.9.99"           |

&#x20; Body - Body Parameter

| **Parameter Name**                                   | DataType | Required | **Description**                                                                                                                                     |
| ---------------------------------------------------- | -------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| biz\_id                                              | String   | Required | "0"                                                                                                                                                 |
| workflow\_name                                       | String   | Required | 문서명 ( 계약서 이름 )                                                                                                                                      |
| doc\_id                                              | String   | Required | 시작할 서식 ID                                                                                                                                           |
| memb\_email                                          | String   | Required | 계약 시작자 이메일                                                                                                                                          |
| language                                             | String   | Optional | <p>"ko-KR", "en-US", "ja-JP"</p><p>전달하는 메일 및 플레이화의 표기언어</p><p>카톡의 경우 한글만 제공</p>                                                                     |
| comment                                              | String   | Optional | 전달메시지                                                                                                                                               |
| expireddate                                          | String   | Optional | <p>YYYY-MM-DD형식으로 입력</p><p>문서의 작성기한 설정</p><p>년 - 월 - 일 </p>                                                                                         |
| preview                                              | String   | Optional | <p>"preview" - 입력값 고정</p><p>옵션 설정시 비대면 계약 </p><p>시작이 아닌 미리보기URL</p><p>이 제공됩니다.</p>                                                                  |
| player\_list                                         | Array    | Required | 서명하는 고객의 정보를 입력  서식의 단계에 맞춰서 작성 필수                                                                                                                  |
| player\_list.field\_owner                            | String   | Required | 작성 순서 " 1 " 부터 시작                                                                                                                                   |
| player\_list.email                                   | String   | Required | 이메일 or 전화번호                                                                                                                                         |
| player\_list.name                                    | String   | Required | 계약 진행자 이름                                                                                                                                           |
| player\_list.mobile\_number                          | String   | Optional | 본인인증에 사용할 번호                                                                                                                                        |
| player\_list.password\_hint                          | String   | Optional | 계약 진행시 사용할  비밀번호 힌트                                                                                                                                 |
| player\_list.password                                | String   | Optional | 계약 진행시 사용할 비밀번호                                                                                                                                     |
| field\_list                                          | Array    | Optional | 미리 입력할 값이 있을 경우 추가하는 값 RadioBox,CheckBox,LabelBox ,TextBox,DatePickerBox 만 미리 값 입력가능                                                                |
| field\_list.field\_name                              | String   | Optional | 서식 필드 이름                                                                                                                                            |
| field\_list.field\_value                             | String   | Optional | <p>서식 필드 값 Radio,Check Box 의 경우 값을 (“N” or ”Y”) 로 수신 Label,Text Box 의 경우 텍스트 값을 그대로 수신</p><p>DatePickerBox  ( 날짜박스 )</p><p>의 경우 YYYY-MM-DD 형태로입</p> |
| export\_api\_info                                    | Object   | Optional | 작성 데이터를 내보낼시에 설정하는 값                                                                                                                                |
| export\_api\_info.api\_type                          | String   | Required | "StartAndEnd"(시작과 끝만) or "ALL" (전부)                                                                                                                 |
| export\_api\_info.url                                | String   | Required | 통신 받을 url                                                                                                                                           |
| export\_api\_info.link\_type                         | String   | Optional | <p>embed 전용옵션 <br>문서 완료 시 이력인증서, <br>PDF 문서 URL의 type을 변경<br>default - viewer URL<br>"download"  - download URL</p>                                 |
| export\_api\_info.request\_code                      | String   | Required | 고객이 정의하는 임의의 값 or "embed"( ExportAPI 설명 참조)                                                                                                         |
| export\_api\_info.clientid                           | String   | Optional | esignon 에서 발급받은 ID ( 발급은 문의 )                                                                                                                       |
| export\_api\_info.authorization                      | String   | Optional | <p>데이터를 수신받을때 헤더 authorization 로 설정하고 싶은 값</p><p>(수신측에서 암호토큰을 받아서 보안상 활용하고 싶으신경우)</p>                                                               |
| export\_api\_info.request\_params                    | Array    | Optional | 문서내부에 특정 값을 받아 오고싶을때 사용                                                                                                                             |
| export\_api\_info.request\_params.param\_id          | String   | Required | 받아올 파라미터 이름(사용자 지정)                                                                                                                                 |
| export\_api\_info.request\_params.param\_value       | String   | Required | Params.fields에서 받아올 값이 문서에 없는경우 받아올 기본                                                                                                              |
| export\_api\_info.request\_params.fields             | Array    | Required | 서식 내부에 있는 필드명을 조회하여 필드이름에 해당하는 값이 문서에 존재할 경우 param\_value 대신에 들어가는 값                                                                                |
| export\_api\_info.request\_params.fields.doc\_id     | String   | Required | 서식 ID                                                                                                                                               |
| export\_api\_info.request\_params.fields.field\_name | String   | Required | 값을 가져올 서식 내 필드 명                                                                                                                                    |
| customer\_list                                       | Array    | Optional | 참조자가 있을 경우 추가                                                                                                                                       |
| customer\_list.email                                 | String   | Required | 이메일 or 휴대폰번호                                                                                                                                        |
| customer\_list.name                                  | String   | Required | 참조자 이름                                                                                                                                              |
| customer\_list.language                              | String   | Optional | ko-KR, en-US, ja-JP                                                                                                                                 |

## Request Body Example

```javascript
{
	"header": {
		"request_code": "5005Q",
		"version": "9.9.99"
	},
	"body": {
		"biz_id": "0",
		"workflow_name": "{ 작성할 문서명 }",
		"memb_email":"{ 계약 시작자 이메일 }",
		"doc_id": "{서식 ID}",
		"language": "ko-KR",
		"comment": "",
		"expireddate": "YYYY-MM-DD",
		"player_list": [{
			"field_owner": "1",
			"email": "{ 받는 사람 email or 받는 사람 휴대폰 번호 }",
      "name":"{ 받는 사람 이름 }",
			"mobile_number": "{ 휴대폰 본인인증시 사용할 휴대폰번호 }",
      "password_hint":"{ 비밀번호 힌트 }",
      "password":"{비밀번호}"
		},{
			"field_owner": "2",
			"email": "{}",
      "name":"{}",
			"mobile_number": "{}",
      "password_hint":"{}",
      "password":"{}"
		}],
		"field_list": [{
				"field_name": "{ field_name }", 
				"field_value": "{ field_value }"
			}
		],
		"customer_list": [{
				"email": "{ id_type에 따라서 참조자 이메일 or 휴대폰번호 }",
	      "name":"{ 참조자 이름 }"
		}],
		"export_api_info": {
				"api_type": "{ StartAndEnd or ALL }",
				"url": "{ 통신 받을 url }",
				"link_type": "{download or null}",
				"request_code": "{ 고객이 정의하는 임의 값 }",
				"clientid": "{ 발급받은 UniqueID }",
				"authorization": "{설정 URL로 request 시에 Header - authorization 으로 받아올 값 }",
	      "request_params": [{
								"param_id": "{받아올 파라미터 이름(사용자 지정)}",
								"param_value": "{fields에서 설정한 값이 없을 경우 받아올 기본 값}",
								"fields": [{ 
                            "doc_id":"{ 서식 ID }",
                            "field_name":"{ 값을 가져올 서식 내 필드명 }" 
          			}]
				}]
	   }
	}
}
```

**request\_params** \
서식에 field\_name으로 등록한 필드 박스의 값이 없을경우 param\_id:param\_value return \
값이 있을경우엔 param\_id:field\_value를 return

## Request Body Example - only Required

```javascript
{
	"header": {
		"request_code": "5005Q",
		"version": "9.9.99"
	},
	"body": {
		"biz_id": "0",
		"workflow_name": "{ 작성할 문서명 }",
		"memb_email":"{ 계약 시작자 이메일 }",
		"doc_id": "{서식 ID}",
		"language": "ko-KR",
		"player_list": [{
			"field_owner": "1",
			"email": "{ 받는 사람 email or 받는 사람 번호 }",
			"name": "{ 받는 사람 이름 }"
		}, {
			"field_owner": "2",
			"email": "{}",
			"name": "{}"
		}]
	}
}
```

## Request Body Example - For TEST Account

```javascript
{
	"header": {
		"request_code": "5005Q",
		"version": "9.9.99"
	},
	"body": {
		"biz_id": "0",
		"memb_email": "guide@esignon.net",
		"language": "ko-KR",
		"comment": "",
		"workflow_name": "TEST-NAME",
		"doc_id": "1",
		"player_list": [{
				"field_owner": "1",
				"email": "guide@esignon.net",
				"name": "TEST"
			},
			{
				"field_owner": "2",
				"email": "guide@esignon.net",
				"name": "TEST"
			}
		],
		"field_list": [{
			"field_name": "name",
			"field_value": "name-value"
		}],
		"customer_list": [{
			"email": "guide@esignon.net",
			"name": "TEST"
		}]
	}
}
```

## Response

| Code | **Description** | **Reference**              |
| ---- | --------------- | -------------------------- |
| 200  | 성공              | 형식이 잘못 된 경우 result\_msg 참조 |
| 400  | 연결 실패           |                            |

#### Result\_msg

| Code | **Description** | **Reference**                         |
| ---- | --------------- | ------------------------------------- |
| 00   | 성공              | 성공                                    |
| 10   | 실패              | 실패                                    |
| 99   | 실패              | Unexpected exception ( 잘못된 포맷 )       |
| 12   | 실패              | 수신 메세지의 Body 정보가 잘못된 형태여서 파싱하지 못했습니다. |

## Response Body Example

```javascript
{ 
 "header":{
   "session_id": "S1001", 
   "response_code": "5005A",
   "result_code": "00", 
   "result_msg": "Work Flow가 시작됩니다.", 
   "version": "9.9.99" }, 
 "body":{ 
   "comp_id": "{ 회사 ID }", 
   "biz_id": "0", 
   "memb_email": "{ 계약 시작자 이메일 }", 
   "workflow_id": "{ 문서아이디 }", 
   "workflow_name": "{ 시작된 서식 이름 }", 
   "token": "{ 문서를 시작한 사람이 계약의 첫번째 작성자일 경우 작성페이지에 접근할때 사용하는 토큰값 }", 
   "lang": "ko-KR" }
}
```

Response 로 수신한 토큰을 <https://docs.esignon.net/mail/sign?token=:token> 경로에 token 값을 입력\
한뒤 접근하면 진행중인 계약서에 접근할 수 있습니다. \
( 생성자 기준으로 발급되는 token 입니다. 생성자가 만약 계약 단계에 있을경우 해당 URL로 서명이 가능\
그 외의 경우에는 해당 URL로 진행중인 문서 확인이 가능합니다.  )&#x20;

## Response export\_api Example

```javascript
{
	"header": {
		"api_name": "export",
		"session_id": "S1001",
		"request_code": "{ exportAPI_info 에서 지정한 request_code 값 }",
		"authorization":"{ 비대면 계약 API 사용시 설정했던 authorization 값 }"
	},
	"body": {
		"clientid": "{ eSignonAPI 사용을 위한 Unique ID }",
		"processid": "1", //문서의 진행 단계 구분값
		"requestid": "{ header 의 request_code 값 }",
		"actionid": "1", //문서의 진행 단계 구분값
		"workdatetime": "2020-01-31 04:23:28.0", //작성완료시간
		"worktype": "CF", //CF=승인, RT=반려 ( 처음 계약자가 반려시 문서는 취소 처리됩니다.)
		"wfuid": "{}", //문서의 고유ID
		"useremail": "{ 서명자 이메일or휴대폰번호 }", 
		"opinion": "", //승인, 반려시 고객들이 반려 메세지,전송 메세지를 사용한 경우 출력
		"param_id": "param_value", // fields 값을 설정한 경우 fields_value를 return
	}
}
```

## Response Body Example ( Preview )

```javascript
{
	"header": {
		"response_code": "5005A",
		"result_code": "00",
		"result_msg": "success (preview url)",
		"version": "9.9.99"
	},
	"body": {
		"preview_url": "미리보기 URL"
	}
}
```

preview 옵션 설정시 Response로 비대면 계약 시작이 아닌 미리보기 URL이 제공됩니다.&#x20;


# 비대면 계약 - 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":"{현재 서명자 이름}"
	}
}
```


# 대량전송 계약 시작

* 계약 대량 전송을 시작합니다.
* 대량 계약시 서명 순서는 서식을 작성 할 때 설정한 단계에 따라 고객, 담당자가 문서를 받을 순서가 결정됩니다. (1단계만 설정 시 고객에게만 전달) 담장자는 생성자로 고정되며 고객정보는 unset\_player\_list 에 들어간 값으로 결정됩니다. unset\_player\_list에 들어있는 모든 고객에게 계약이 발전송니다.
* 참조자는 서식에 등록되어있는 계정을 따라가며 따로 설정하지않습니다.
* 2단계C 의 경우 담당자 항목이 없기때문에 고객 B의 정보를 추가로 기입해야하기때문에 Body에 \
  customer\_list*파라미터를 추가 기입하여 설정 해 주셔야합니다.*
* 2단계C의 경우\
  고객 ( unset\_player\_list ) → 고객 B ( customer\_list )

## API 주소 정보&#x20;

| Url                                        | Type | **Code** |
| ------------------------------------------ | ---- | -------- |
| <https://docs.esignon.net/JEDOC/Common.do> | POST | 1410Q    |

## Request

### Parameters

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**   |
| ------------------ | -------- | -------- | ----------------- |
| Content-Type       | String   | Required | application/json  |
| Authorization      | String   | Required | esignon ${발급받은토큰} |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description**                  |
| ------------------ | -------- | -------- | -------------------------------- |
| request\_code      | String   | Required | "1410Q"(API 고유 코드)               |
| request\_msg       | String   | Optional | "Work Flow Bulk Sending를 시작합니다." |
| session\_id        | String   | Required | "thread\_023"                    |
| version            | String   | Required | "9.9.99"                         |

&#x20; Body - Body Parameter

| **Parameter Name**                           | DataType | Required | **Description**                                                            |
| -------------------------------------------- | -------- | -------- | -------------------------------------------------------------------------- |
| comp\_id                                     | String   | Required | 회사 ID / companyId                                                          |
| biz\_id                                      | String   | Required | "0"                                                                        |
| memb\_email                                  | String   | Required | 생성자 이메일                                                                    |
| workflow\_name                               | String   | Required | <p>unset\_player\_list.workflow\_name 이름을</p><p>설정하지 않을경우 기본으로 지정되는 문서</p> |
| workflow\_lib\_id                            | String   | Required | <p>서식을 생성하면 생성되는 lid\_id<br>서식ID와는 다른값입니다.</p><p>(서식목록조회에서 확인가능합니다.)</p>   |
| unset\_player\_list                          | Data     | Required | 서명하는 고객의 정보를 입력                                                            |
| unset\_player\_list.memb\_id\_type           | String   | Required | "EMail" or "Mobile"                                                        |
| unset\_player\_list.email                    | String   | Required | <p>memb\_id\_type 에 따라 </p><p>이메일 or 전화번호</p>                              |
| unset\_player\_list.name                     | String   | Required | 계약 진행자 이름                                                                  |
| unset\_player\_list.language                 | String   | Optional | "ko-KR","en-US","ja-JP"                                                    |
| unset\_player\_list.workflow\_name           | String   | Optional | 문서명 ( 계약서 이름 )                                                             |
| unset\_player\_list.enable\_mobile\_cert     | String   | Required | 휴대폰 인증 기능 "true or false"                                                  |
| unset\_player\_list.mobile\_number           | String   | Required | 본인인증에 사용할 번호 / - 없이                                                        |
| unset\_player\_list.enable\_password\_cert   | String   | Required | 비밀번호 인증 기능 "true or false"                                                 |
| unset\_player\_list.password\_hint           | String   | Required | 비밀번호 힌트                                                                    |
| unset\_player\_list.password                 | String   | Required | 비밀번호                                                                       |
| unset\_player\_list.field\_list              | Data     | Required | <p>미리 설정할 값이 있을경우 입력</p><p>여러개 설정가능.</p>                                   |
| unset\_player\_list.field\_list.doc\_id      | String   | Required | 서식 ID                                                                      |
| unset\_player\_list.field\_list.field\_name  | String   | Required | 서식 필드 이름                                                                   |
| unset\_player\_list.field\_list.field\_value | String   | Required | 서식 필드                                                                      |
| comment                                      | String   | Required | 전달할 메세                                                                     |
| enable\_legal\_agreement                     | String   | Required | "false"                                                                    |
| customer\_list                               | Data     | Optional | <p>서식의 설정이 2단계 C일 경우에 설정</p><p>고객 B의 정보</p>                                |
| customer\_list.memb\_id\_type                | String   | Required | "EMail" or "Mobile"                                                        |
| customer\_list.email                         | String   | Required | <p>memb\_id\_type 에 따라 </p><p>이메일 or 전화번호</p>                              |
| customer\_list.name                          | String   | Required | 계약 진행자 이름                                                                  |
| customer\_list.language                      | String   | Optional | "ko-KR","en-US","ja-JP"                                                    |
| customer\_list.enable\_mobile\_cert          | String   | Required | 휴대폰 인증 기능 "true or false"                                                  |
| customer\_list.mobile\_number                | String   | Required | 본인인증에 사용할 번호 / - 없이                                                        |
| customer\_list.enable\_password\_cert        | String   | Required | 비밀번호 인증 기능 "true or false"                                                 |
| customer\_list.password\_hint                | String   | Required | 비밀번호 힌트                                                                    |
| customer\_list.password                      | String   | Required | 비밀번호                                                                       |

## 요청 Body 예시)

```javascript
{
  "header": {
    "request_code": "1410Q",
    "api_name": "Work Flow Bulk Sending를 시작합니다.",
    "session_id": "",
    "version" : "9.9.99"
  },
  "body": {
    "comp_id": "{회사 ID}",
    "biz_id": "0",
    "memb_email": "{ 사용자 이메일 }",
    "workflow_lib_id": "{ 서식의 lib_id }",
    "workflow_name": "",
    "unset_player_list": [{
        "memb_id_type" : "{ EMail or Mobile }",
        "email": "{ memb_id_type 에 따라 번호나 이메일 }",
        "name" : "{ 받는 사람 이름 }",
        "language": "{ko-KR or ja-JP or en-US}",
        "workflow_name" : "{서식 이름}",
        "enable_mobile_cert" : "{ 휴대폰 본인인증 여부 true or false }",
        "mobile_number" : "{ 본인 인증에 사용할 전화번호 }",
        "enable_password_cert":"{true or false}",
	      "password_hint":"{계약자가 볼 비밀번호 힌트}",  		
	      "password":"{설정할 문서 비밀번호}",
        "field_list": [{
      				"doc_id": "{ 서식 ID }",
      				"field_name": "{ 서식 필드명 }",
      				"field_value": "{ 서식 필드 값 }"
			  }]
      }],
    	"customer_list": [{
        "memb_id_type": "{ 2단계 C 서식 사용시에만 기입해주세요 }",
			  "email": "",
			  "name": "",
			  "language": "",
        "enable_mobile_cert":"",
        "mobile_number":"",
        "enable_password_cert":"",
        "password_hint":"",  		
        "password":""
		}],
    "comment": "",
    "enable_legal_agreement":"false"
  }
}
```

## Response

| Code | **Description** | **Reference**              |
| ---- | --------------- | -------------------------- |
| 200  | 성공              | 형식이 잘못 된 경우 result\_msg 참조 |
| 400  | 연결 실패           |                            |

#### Result\_msg

| Code | **Description** | **Reference**                         |
| ---- | --------------- | ------------------------------------- |
| 00   | 성공              | 성공                                    |
| -1   | 실패              | 수신 메세지의 Body 정보가 잘못된 형태여서 파싱하지 못했습니다. |
| 10   | 실패              | 해당 Work Flow Library가 존재하지 않습니다.      |
| 11   | 실패              | 실패하였습니다.                              |
| 12   | 실패              | 허용된 저장 용량이 초과되었습니다                    |
| 13   | 실패              | 가능한 문서 수를 초과합니다.                      |
| 14   | 실패              | 이용기간이 만료되었습니다.                        |
| 15   | 실패              | 작성자 설정이 올바르지 않습니다.                    |

## 응답 Body 예시)

```javascript
}
	"body":{
		"workflow_list":[{
			"workflow_id": "{문서ID}",
			"unset_player_email": "{서명자 이메일 or 전화번호}",
			"unset_player_name": "{서명자 이름}",
			"result": "OK",
			"description": "",
			"workflow_name": "{서식 이름}",
			"token": "{인증 토큰 코드}",
			"lang": "ko-KR",
			"reg_date": "{회사 결제 갱신일}"}],
			"comp_id": "{회사 ID}",
			"biz_id": "0",
			"memb_email": "{생성자 이메일}",
			"workflow_lib_id": "{서식 lib_id}"
			},
	"header":{
		"session_id": "thread_023",
		"response_code": "1410A",
		"result_code": "00",
		"result_msg": "Work Flow bulk Sending이 시작됩니다.",
		"version": "9.9.99"
	}
}
```


# 조회


# 특정필드 값으로 조회

* 특정필드값으로 조회합니다.&#x20;
* field\_name 으로 설정 된 필드에 field\_value 로 설정한 값을 조회합니다.

## API 속성-

| Url                                              | Type | **Code** |
| ------------------------------------------------ | ---- | -------- |
| <https://docs.esignon.net/api/:companyId/search> | POST | 5008Q    |

## Request

### Parameters

#### PathParameters

| **Parameter Name** | DataType | **Description** |
| ------------------ | -------- | --------------- |
| companyId          | String   | 회사ID            |

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**   |
| ------------------ | -------- | -------- | ----------------- |
| Content-Type       | String   | Required | application/json  |
| Authorization      | String   | Required | esignon ${발급받은토큰} |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description** |
| ------------------ | -------- | -------- | --------------- |
| request\_code      | String   | Required | 5008Q           |
| api\_name          | String   | Required | start api       |
| session\_id        | String   | Required | ""              |
| version            | String   | Required | 1.1.60          |

&#x20; Body - Body Parameter

| **Parameter Name**       | DataType | Required | **Description**  |
| ------------------------ | -------- | -------- | ---------------- |
| comp\_id                 | String   | Required | 회사 ID            |
| field\_list              | Data     | Required | 조회할 문서 정보        |
| field\_list.doc\_uid     | String   | Required | 조회할 문서의 서식 ID    |
| field\_list.field\_name  | String   | Required | 조회할 문서 서식의 필드 이름 |
| field\_list.field\_value | String   | Required | 조회할 문서 서식의 필드    |

## 요청 Body 예시)

```javascript
{
	 "header" : {
	   "request_code" : "5008Q",            
	   "api_name" : "start api",    
	   "session_id" : "",    
	   "version" : "1.1.60"
	 },
	 "body" : {
	   "comp_id": "{ 회사 ID }",
	   "field_list": [ 
			    {
						"doc_uid": "{조회할 서식 ID}",
						"field_name": "{조회할 서식의 필드 이름}",
						"field_value": "{위에 설정한 필드 이름에 들어간 값}"
			    }
	   ]
	 }
}

```

## Response

| Code | **Description** | **Reference**              |
| ---- | --------------- | -------------------------- |
| 200  | 성공              | 형식이 잘못 된 경우 result\_msg 참조 |
| 400  | 연결 실패           |                            |

#### Result\_msg

| Code | **Description** | **Reference**                         |
| ---- | --------------- | ------------------------------------- |
| 00   | 성공              | 성공                                    |
| 10   | 실패              | 실패                                    |
| 12   | 실패              | 수신 메세지의 Body 정보가 잘못된 형태여서 파싱하지 못했습니다. |
| 17   | 실패              | 필수 검색 조건이 없습니다.                       |
| 18   | 실패              | 검색 조건이 없습니다.                          |
| 19   | 실패              | 날짜 형식이 잘못되었습니다.                       |
| 99   | 실패              | Unexpected exception ( 잘못된 포맷 )       |

## 응답 Body 예시)

```javascript
{
	"header":{
		"response_code": "5008A",
		"result_code": "00",
		"result_msg": "필드 상태가 검색되었습니다.",
		"session_id": "",
		"version": "1.1.60"
	},
	"body":{
		"comp_id": "{회사 ID}",
		"wf_list":[
			{
				"doc_uid": "{서식ID}",
				"end_date": "{서명 완료 시간}",
				"total_process_count": "{ 문서의 계약자 수 }",
				"wf_manager_name": "{ 문서 생성자 이름 }",
				"wf_manager_email": "{ 문서 생성자 이메일 }",
				"wf_status": "{ 문서의 상태 값 }",
				"field_value": "{조회한 필드 값}",
				"wfuid": "{문서 ID}",
				"current_process_no": "1",
				"wf_title": "{문서 이름}",
				"start_date": "{문서 시작 시간}",
				"field_name": "{조회한 필드 이름}"
			}
		]
	}
}

```

### Parameter Info

| **Name**            | **Value** | **Description**  |
| ------------------- | --------- | ---------------- |
| wf\_list.wf\_status | Playing   | 진행중              |
|                     | Canceled  | 취소               |
|                     | Complete  | 완료               |
|                     | Disposal  | 폐기               |
|                     | Truncate  | (취소 상태 후 삭제한 경우) |


# 기간으로 조회

* 특정 서식으로 작성한 문서를 기간으로 조회합니다.

## API 속성-

| Url                                              | Type | **Code** |
| ------------------------------------------------ | ---- | -------- |
| <https://docs.esignon.net/api/:companyId/search> | POST | 5009Q    |

## Request

### Parameters

#### PathParameters

| **Parameter Name** | DataType | **Description** |
| ------------------ | -------- | --------------- |
| companyId          | String   | 회사ID            |

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**    |
| ------------------ | -------- | -------- | ------------------ |
| Content-Type       | String   | Required | "application/json" |
| Authorization      | String   | Required | esignon ${발급받은토큰}  |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description**    |
| ------------------ | -------- | -------- | ------------------ |
| request\_code      | String   | Required | "5009Q"(API 고유 코드) |
| api\_name          | String   | Required | "start api"        |
| session\_id        | String   | Required | ""                 |
| version            | String   | Required | "1.1.60"           |

&#x20; Body - Body Parameter

| **Parameter Name**      | DataType | Required | **Description**                                                     |
| ----------------------- | -------- | -------- | ------------------------------------------------------------------- |
| comp\_id                | String   | Required | 회사 ID                                                               |
| search\_date\_type      | String   | Optional | START or END / START – 문서 시작 기준 / END – 문서 완료 기준 - 미 입력시 디폴트값 "END" |
| start\_date             | String   | Required | 검색 시작 지점 YYYY-MM-DD                                                 |
| end\_date               | String   | Required | 검색 종료 지점 YYYY-MM-DD                                                 |
| field\_list             | Data     | Required | 조회할 문서 정보                                                           |
| field\_list.doc\_uid    | String   | Required | 조회할 문서의 서식 ID                                                       |
| field\_list.field\_name | String   | Optional | <p>조회할 문서 서식의 필드 이름</p><p> - 입력시 해당 필드 이름과 같은 필드의 값을 가져옵니다.</p>     |

## 요청 Body 예시)

```javascript
{
 "header" : {
   "request_code" : "5009Q",
   "api_name" : "start api",
   "session_id" : "",
   "version" : "1.1.60"
 },
   "body" : {
     "comp_id": "{회사 ID}",
     "search_date_type":"{START or END}",
     "start_date": "{검색 시작 지점}",
     "end_date": "{검색 종료 지점}",
     "field_list": [{
  				"doc_uid": "{서식 ID}",
  				"field_name": "{서식 내부에 있는 필드명}"
  			}]
 }
}
```

## Response

| Code | **Description** | **Reference**              |
| ---- | --------------- | -------------------------- |
| 200  | 성공              | 형식이 잘못 된 경우 result\_msg 참조 |
| 400  | 연결 실패           |                            |

#### Result\_msg

| Code | **Description** | **Reference**                         |
| ---- | --------------- | ------------------------------------- |
| 00   | 성공              | 성공                                    |
| 10   | 실패              | 실패                                    |
| 99   | 실패              | Unexpected exception ( 잘못된 포맷 )       |
| 12   | 실패              | 수신 메세지의 Body 정보가 잘못된 형태여서 파싱하지 못했습니다. |
| 17   | 실패              | 필수 검색 조건이 없습니다.                       |
| 18   | 실패              | 검색 조건이 없습니다.                          |
| 19   | 실패              | 날짜 형식이 잘못되었습니다.                       |

## 응답 Body 예시)

```javascript
{
	"header":{
		"response_code": "5009A",
		"result_code": "00",
		"result_msg": "필드 상태가 검색되었습니다.",
		"session_id": "",
		"version": "1.1.60"
	},
	"body":{
		"comp_id": "{회사 ID}",
		"wf_list":[
				{
					"doc_uid": "{서식ID}",
					"end_date": "{서명 완료 시간}",
					"total_process_count": "{문서의 계약자 }",
					"wf_manager_name": "{ 문서 생성자 이름 }",
					"wf_manager_email": "{ 문서 생성자 이메일 }",
					"wf_status": "{문서의 상태값}",
					"field_value": "{조회한 필드 값}",
					"wfuid": "{문서 ID}",
					"current_process_no": "1",
					"wf_title": "{문서 이름}",
					"start_date": "{문서 시작 시간}",
					"field_name": "{조회한 필드 이름}"
				}
		]
	}
}
```

### Parameter Info

| **Name**            | **Value** | **Description**  |
| ------------------- | --------- | ---------------- |
| wf\_list.wf\_status | Playing   | 진행중              |
|                     | Canceled  | 취소               |
|                     | Complete  | 완료               |
|                     | Disposal  | 폐기               |
|                     | Truncate  | (취소 상태 후 삭제한 경우) |


# 진행 문서 목록조회

* 해당 회사의 진행문서 목록을 전부 조회합니다.&#x20;
* GET 방식의 API로 HEADERS에 발급받은 토큰 값만 입력하여 조회합니다.

## 진행 문서 조회

<mark style="color:blue;">`GET`</mark> `https://docs.esignon.net/worklists/new?page={value}&rows={value}`

진행 문서의 상태, 종류, 단계등을 확인할 수 있습니다.

#### Path Parameters

| Name | Type   | Description                  |
| ---- | ------ | ---------------------------- |
| rows | string | 1페이지에 몇개나 조회할 것인지 / 기본값 50   |
| page | string | 몇페이지에 있는 목록을 조회할 것인지 / 기본값 1 |

#### Headers

| Name          | Type   | Description      |
| ------------- | ------ | ---------------- |
| Content-Type  | string | application/json |
| Authorization | string | esignon ${발급받토큰} |

{% tabs %}
{% tab title="200 " %}

```javascript
{
	"header":{
		"response_code": "/worklists/new",
		"result_code": "00",
		"result_msg": "",
		"session_id": ""
	},
	"body":{
		"comp_id": "{회사 ID}",
		"isManager": true,
		"memb_email": "{로그인한 이메일}",
		"page": "{출력할 페이지의 번호}",
		"rows": "{페이지 당 보여줄 목록의 갯수}",
		"total": "{전체 문서 수}",
		"workflow_list":[{
			"wfuid": "{문서 ID}",
			"wfname": "{문서 제목}",
			"wftype": "{문서 타입}",
			"status": "{문서 상태}",
			"step": "{문서 단계}",
			"nickname": "{문서 작성자}",
			"currentactionid": "{계약 중인 단계 번호}",
			"email": "{문서 작성자 이메일}",
			"startdate": "{문서 시작일}",
			"totalprocesscount": "{문서의 총 단계 갯수}",//3단계 문서일 경우 3
			"currentprocesscount": "{완료 된 계약 단계 번호}",
			"confirmdate": "{문서 완료일}",
			"preactionid": "{}",
			"preactionemail":"{참조하는 이메일}"
			}]
	}
}

```

{% endtab %}
{% endtabs %}

### Parameter Info

| **Name**              | **Value** | **Description**  |
| --------------------- | --------- | ---------------- |
| Workflow\_list.status | Playing   | 진행중              |
|                       | Canceled  | 취소               |
|                       | Complete  | 완료               |
|                       | Disposal  | 폐기               |
|                       | Truncate  | (취소 상태 후 삭제한 경우) |
| Workflow\_list.wftype | NORMAL    | 일반 발송 문서         |
|                       | BULKWEB   | 대량 발송 문서         |
| Workflow\_list.step   | Myturn    | 내 차례             |
|                       | Progress  | 계약자가 진행중         |
|                       | Complete  | 완료               |


# 모든필드 값 조회

### 해당 API는 구버전입니다. 신규 API 인[ 문서 정보 조회 API](https://api.esignon.net/workflow/view/workflowinfo) 를 사용하세요.

* 문서 ID를 받아 해당 문서 내 모든 필드값을 조회합니다.

## Export field

<mark style="color:green;">`POST`</mark> `https://docs.esignon.net/exportfield`

문서 내 모든 필드값을 조회합니다.

#### Headers

| Name          | Type   | Description                          |
| ------------- | ------ | ------------------------------------ |
| Content-Type  | string | application/json                     |
| Authorization | string | esignon {token} / 값 입력시 띄어쓰기는 필수입니다. |

#### Request Body

| Name         | Type   | Description |
| ------------ | ------ | ----------- |
| workflow\_id | string | 문서 ID       |

{% tabs %}
{% tab title="200 Response Body 예시)" %}

```javascript
{
    "header":{
        "response_code": "",
        "result_code": "00",
        "result_msg": "Success",
        "session_id": ""
    },
    "body":{
        "field_data":{
            "{필드명}": "{필드값}",
            "{필드명}": "{필드값}"......
        },
        "sender_email": "{문서 생성자 Email}",
        "start_date": "{문서 생성 시간}",
        "status": "{현재 문서의 상태}",
        "workflow_id": "{문서 ID}",
        "workflow_name": "{문서 제목}",
        "doc_uid": "{서식 ID}"
    }
}
```

{% endtab %}
{% endtabs %}

### Parameter Info

| **Name** | **Value** | **Description**  |
| -------- | --------- | ---------------- |
| status   | Playing   | 진행중              |
|          | Canceled  | 취소               |
|          | Complete  | 완료               |
|          | Disposal  | 폐기               |
|          | Truncate  | (취소 상태 후 삭제한 경우) |


# 상태변경


# 승인, 반려

* 문서를 승인 또는 반려 합니다.
* 승인시 문서는 필수 값이 입력되어 있어야합니다.

## API 속성-

| Url                                              | Type | **Code** |
| ------------------------------------------------ | ---- | -------- |
| <https://docs.esignon.net/api/:companyId/action> | POST | 5010Q    |

## Request

### Parameters

#### PathParameters

| **Parameter Name** | DataType | Required | **Description** |
| ------------------ | -------- | -------- | --------------- |
| companyId          | String   | Required | 회사ID            |

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**     |
| ------------------ | -------- | -------- | ------------------- |
| Content-Type       | String   | Required | "application/json"  |
| Authorization      | String   | Required | "esignon ${발급받은토큰}" |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description**    |
| ------------------ | -------- | -------- | ------------------ |
| request\_code      | String   | Required | "5010Q"(API 고유 코드) |
| api\_name          | String   | Optional | "start api"        |
| session\_id        | String   | Optional | ""                 |
| version            | String   | Required | "9.9.99"           |

&#x20; Body - Body Parameter

| **Parameter Name** | DataType | Required | **Description**                                    |
| ------------------ | -------- | -------- | -------------------------------------------------- |
| comp\_id           | String   | Required | 회사 ID                                              |
| biz\_id            | String   | Required | "0"                                                |
| memb\_email        | String   | Required | 계약 진행자 이메일                                         |
| action\_id         | String   | Required | 계약 진행중인 단계                                         |
| workflow\_id       | String   | Required | 계약중인 문서 ID                                         |
| comment            | String   | Required | 승인 or 반려 시 전달하는 메세지                                |
| command            | String   | Required | RT - 반려 / CF - 승인 / CF 시엔 문서에 필수 값을 입력한 상태여야 진행 가능 |

## 요청 Body 예시)

```javascript
{
 "header" : {
   "request_code" : "5010Q",            
   "api_name" : "start api",    
   "session_id" : "",    
   "version" : "9.9.99"
 },
 "body" : {
   "comp_id": "{회사 ID}",
   "biz_id":"0",
   "memb_email":"{계약 진행자 이메일}",
   "action_id":"1"
   "workflow_id":"{계약 중인 문서 ID}",
   "comment":"{승인 or 반려시 전달하는 문자}",
   "command":"{RT or CF}"
 }
}

```

## Response

| Code | **Description** | **Reference**              |
| ---- | --------------- | -------------------------- |
| 200  | 성공              | 형식이 잘못 된 경우 result\_msg 참조 |
| 400  | 연결 실패           |                            |

#### Result\_msg

| Code | **Description** | **Reference**                         |
| ---- | --------------- | ------------------------------------- |
| 00   | 성공              | 성공                                    |
| 10   | 실패              | 실패                                    |
| 12   | 실패              | 수신 메세지의 Body 정보가 잘못된 형태여서 파싱하지 못했습니다. |
| 99   | 실패              | 필수항목이 남아있어 진행할 수 없습니다.                |
| 99   | 실패              | Unexpected exception ( 잘못된 포맷 )       |

## 응답 Body 예시)

```javascript
{
	"header":{
		"response_code": "5010A",
		"result_code": "00",
		"result_msg": "성공하였습니다.",
		"version": "9.9.99"
	},
	"body":{
		"comp_id": "{회사 ID}"
	}
}
```


# 취소, 폐기, 삭제

* 문서를 취소 또는 폐기합니다.
* 취소 - 진행중인 문서를 취소 처리합니다.
* 폐기 - 완료된 문서를 폐기 처리합니다.
* 삭제 - 취소된 문서를 삭제 처리합니다. ( 문서란에서 보이지않게 삭제합니다. )

## API 속성-

| Url                                        | Type | **Code** |
| ------------------------------------------ | ---- | -------- |
| <https://docs.esignon.net/JEDOC/Common.do> | POST | 1510Q    |

## Request

### Parameters

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**     |
| ------------------ | -------- | -------- | ------------------- |
| Content-Type       | String   | Required | "application/json"  |
| Authorization      | String   | Required | "esignon ${발급받은토큰}" |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description**    |
| ------------------ | -------- | -------- | ------------------ |
| request\_code      | String   | Required | "1510Q"(API 고유 코드) |
| request\_msg       | String   | Required | ""                 |
| request\_lang      | String   | Optional | "ko","en","ja"     |
| session\_id        | String   | Required | "thread\_023"      |
| version            | String   | Required | "9.9.99"           |

&#x20; Body - Body Parameter

| **Parameter Name** | DataType | Required | **Description**                                                         |
| ------------------ | -------- | -------- | ----------------------------------------------------------------------- |
| comp\_id           | String   | Required | 회사 ID                                                                   |
| biz\_id            | String   | Required | "0"                                                                     |
| memb\_email        | String   | Required | 사용자 이메일                                                                 |
| workflow\_id       | String   | Required | 문서 ID                                                                   |
| command            | String   | Required | "CANCEL" - 취소 / "DISPOSAL" - 폐기 / "DELETE" - 삭제                         |
| description        | String   | Optional | "disposal" 시엔 필수 값 - "폐기 사유"                                            |
| timezone\_offset   | String   | Optional | <p>"disposal" 시엔 필수 값 - "UTC 시간값 입력"/"+00:00"</p><p>한국의 경우 "+09:00"</p> |

## 요청 Body 예시)

```javascript
{
	"header": {
			"request_code": "1510Q",
			"request_msg": "",
	    "request_lang":"{ko or ja or en}",
			"session_id": "session_id",
			"version": "9.9.99"
	},
	"body": {
			"comp_id": "{회사 ID}",
      "biz_id":"0",
      "memb_email":"{사용자 이메일}",
      "workflow_id":"{문서 ID}",
      "command":"{ CANCEL or DISPOSAL or DELETE }",
      "description":"{폐기 사유 입력}",
      "timezone_offset":"+09:00"
	}
}
```

## Response

| Code | **Description** | **Reference**              |
| ---- | --------------- | -------------------------- |
| 200  | 성공              | 형식이 잘못 된 경우 result\_msg 참조 |
| 400  | 연결 실패           |                            |

#### Result\_msg

| Code | **Description** | **Reference**                         |
| ---- | --------------- | ------------------------------------- |
| 00   | 성공              | 성공                                    |
| 94   | 실패              | 인증키가 올바르지 않습니다.                       |
| 11   | 실패              | 필수 값이 없거나 상태 값이 올바르지 않습니다.            |
| -1   | 실패              | 수신 메세지의 Body 정보가 잘못된 형태여서 파싱하지 못했습니다. |

## 응답 Body 예시)

```javascript
{
	"header":{
		"session_id": "session_id",
		"response_code": "1510A",
		"result_code": "00",
		"result_msg": "폐기/취소를 성공했습니다.",
		"version": "9.9.99"
	},
	"body":{
		"comp_id": "{회사 ID}",
		"biz_id": "0",
		"memb_email": "{사용자 이메일}",
		"workflow_id": "{문서 ID}",
		"command": "{실행된 커맨드}"
	}
}
```


# 다운로드 URL 생성

### 해당 API는 구버전입니다. 신규 API 인[ 문서 정보 조회 API](https://api.esignon.net/workflow/view/workflowinfo) 를 사용하세요.

[**문서 정보 조회 API**](https://api.esignon.net/workflow/view/workflowinfo) **에서 해당 정보 가져올수있습니다. ( 유지시간 무제한 )**

회사 ID 와 문서의 ID 를 통하여 문서를 다운로드 할 수 있는 URL 을 가져옵니다.

Authorization에 입력된 Token 값을 가진 유저가 볼 수 있는 문서만 접근 가능합니다.(로그인한 유저)

생성된 URL은 5분간 유지됩니다.

## workflow\_download

<mark style="color:green;">`POST`</mark> `https://docs.esignon.net/workflow/download`

#### Headers

| Name          | Type   | Description                                                        |
| ------------- | ------ | ------------------------------------------------------------------ |
| Authorization | string | <p>esignon ${발급받은토큰}<br> <strong>/ 값 입력시 띄어쓰기는 필수입니다.</strong></p> |
| Content-Type  | string | application/json                                                   |

#### Request Body

| Name         | Type   | Description           |
| ------------ | ------ | --------------------- |
| workflow\_id | string | 완료 된 문서의 ID 값 / wfuid |

{% tabs %}
{% tab title="200 " %}

```javascript
{
	"header":{
		"response_code": "",
		"result_code": "00",
		"result_msg": "Success",
		"session_id": ""
	},
	"body":{
		"cert_url": "{이력인증서 URL}",
		"doc_url": "{완료된 문서 URL}",
		"workflow_name": "{완료된 문서 이름}"
	}
}
```

{% endtab %}
{% endtabs %}

Example) Request Body

```javascript
{
	"workflow_id": "{완료 된 문서의 ID 값}"
}
```

Example) Response Body / Error

```javascript
{
    "header":{
        "response_code": "",
        "result_code": "{결과코드}",
        "result_msg": "{'코드에 따른 메세지'}",
        "session_id": ""
    },
    "body":{}
}
```


# 재전송

* 문서를 재전송 합니다.
* 완료, 취소된 문서는 재전송 할 수 없습니다.

## API 속성-

| Url                                                | Type | **Code** |
| -------------------------------------------------- | ---- | -------- |
| <https://docs.esignon.net/JEDOC/Common.do?lang={}> | POST | 1429Q    |

## Request

### Parameters

#### PathParameters

| **Parameter Name** | **Value** | **Description** |
| ------------------ | --------- | --------------- |
| lang               | String    | ko,en,jp        |

#### &#x20;Headers

| **Parameter Name** | DataType | Required | **Description**     |
| ------------------ | -------- | -------- | ------------------- |
| Content-Type       | String   | Required | "application/json"  |
| Authorization      | String   | Required | "esignon ${발급받은토큰}" |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | Required | **Description**    |
| ------------------ | -------- | -------- | ------------------ |
| request\_code      | String   | Required | "1429Q"(API 고유 코드) |
| request\_msg       | String   | Required | "Remind 를 요청합니다."  |
| session\_id        | String   | Required | ""                 |

&#x20; Body - Body Parameter

| **Parameter Name** | DataType | Required | **Description** |
| ------------------ | -------- | -------- | --------------- |
| comp\_id           | String   | Required | 회사 ID           |
| biz\_id            | String   | Required | "0"             |
| workflow\_id       | String   | Required | 진행 문서 ID        |
| memb\_email        | String   | Required | 사용자 이메일         |

## 요청 Body 예시)

```javascript
{
	"header": {
		"request_code": "1429Q",
		"request_msg": "Remind 를 요청합니다.",
		"session_id": ""
	},
	"body": {
		"comp_id": "{회사 ID}",
		"biz_id": "0",
		"memb_email": "{사용자 이메일}",
		"workflow_id": "{진행 문서 ID}"
		}
}

```

## Response

| Code | **Description** | **Reference**              |
| ---- | --------------- | -------------------------- |
| 200  | 성공              | 형식이 잘못 된 경우 result\_msg 참조 |
| 400  | 연결 실패           |                            |

#### Result\_msg

| Code | **Description** | **Reference**                   |
| ---- | --------------- | ------------------------------- |
| 00   | 성공              | 성공                              |
| 10   | 실패              | 실패                              |
| 11   | 실패              | 서명이 완료된 문서입니다.                  |
| 12   | 실패              | 취소 처리 된 문서입니다.                  |
| 99   | 실패              | Unexpected exception ( 잘못된 포맷 ) |

## 응답 Body 예시)

```javascript
{
	"header":{
		"session_id": "thread_023",
		"response_code": "1429A",
		"result_code": "00",
		"result_msg": "Remind를 성공 하었습니다."
	},
	"body":{
		"comp_id": "{회사 ID}",
		"biz_id": "0",
		"memb_email": "{사용자 이메일}",
		"workflow_id": "{진행 문서 ID}"
	}
}

```


# 목록 조회

* 서식 목록을 조회합니다.

## API 속성-

| Url                                                     | Type | **Code** |
| ------------------------------------------------------- | ---- | -------- |
| <https://docs.esignon.net/JEDOC/Common.do?lang={value}> | POST | 1123Q    |

## Request

### Parameters

#### PathParameters

| **Parameter Name** | DataType | **Description** |
| ------------------ | -------- | --------------- |
| lang               | String   | ko,en,jp        |

#### &#x20;Headers

| **Parameter Name** | DataType | **Description**     |
| ------------------ | -------- | ------------------- |
| Content-Type       | String   | "application/json"  |
| Authorization      | String   | "esignon ${발급받은토큰}" |

#### &#x20; Body&#x20;

&#x20; Body - Header Parameter

| **Parameter Name** | DataType | **Description**    |
| ------------------ | -------- | ------------------ |
| request\_code      | String   | "1123Q"(API 고유 코드) |
| request\_msg       | String   | ""                 |
| session\_id        | String   | ""                 |
| version            | String   | "9.9.99"           |

&#x20; Body - Body Parameter

| **Parameter Name**   | DataType | **Description**                                                                                                                                                                             |
| -------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| comp\_id             | String   | 회사 ID                                                                                                                                                                                       |
| memb\_email          | Stirng   | 사용자 이메일                                                                                                                                                                                     |
| biz\_id              | String   | "0"                                                                                                                                                                                         |
| search\_dir\_id      | String   | <p>서식을 찾을 폴더 ID <br>"all"(전체보기)<br>"my"(내 폴더)</p><p>"shared"(공유된 폴더)</p>                                                                                                                    |
| display\_order\_mode | String   | <p>정렬기준값 </p><p>2 서식 생성일 오름차순 </p><p>3 서식명 내림차순 </p><p>4 서식명 오름차순 </p><p>5 서식ID 내림차순 </p><p>6 서식ID 오름차순 </p><p>7 서식타입 내림차순 </p><p>8 서식타입 오름차순</p><p>9 문서작성자수 내림차순 </p><p>10 문서작성자수 오름차순</p> |

## 요청 Body 예시)

```javascript
{
        "header": {
                "request_code": "1123Q",
                "request_msg": "",
                "session_id": "",
                "version": "9.9.99"
        },
        "body": {
                 "comp_id": "{회사 ID}",
                 "biz_id": "0",
                 "memb_email" : "{사용자 이메일}",
                 "search_dir_id": "all",
                 "display_order_mode": "2" 
        }
}

```

## Response

| Code | **Description** | **Reference**              |
| ---- | --------------- | -------------------------- |
| 200  | 성공              | 형식이 잘못 된 경우 result\_msg 참조 |
| 400  | 연결 실패           |                            |

#### Result\_msg

| Code | **Description** | **Reference**                         |
| ---- | --------------- | ------------------------------------- |
| 00   | 성공              | 성공                                    |
| 10   | 실패              | 실패                                    |
| 99   | 실패              | Unexpected exception ( 잘못된 포맷 )       |
| 12   | 실패              | 수신 메세지의 Body 정보가 잘못된 형태여서 파싱하지 못했습니다. |

## 응답 Body 예시)

```javascript
{
	"body":{
		"comp_id": "{회사 ID}",
		"biz_id": "0",
		"memb_email": "{사용자 이메일}",
		"search_dir_id": "all",
		"file_list":[{//서식 정보  Example} file_lsit 참조}] 서식 전체 조회이기 때문에 모든 서식 데이터
	}],
	"header":{
		"session_id": "session_id",
		"response_code": "1123A",
		"result_code": "00",
		"result_msg": "파일 리스트입니다.",
		"version": "9.9.99"
	}
}

```

#### Example) file\_list

```javascript
{
	"file_id": "{서식ID}",
	"file_type": "templete",
	"file_name": "{서식 이름}",
	"dir_type": "{서식이 위치한 폴더}",
	"create_memb_email": "{서식 작성자 이메일}",
	"create_date": "{서식 생성일}",
	"create_memb_name": "{서식 작성자 이름}",
	"file_workflow_count": "1", // 서식의 단계 수
	"file_workflow_type": "WEBTYPE", // 대면,비대면 WEBTYPE 대량 BULK
	"file_workflow_library_id": "{서식의 lib ID}", // 대량 발송에 사용
	"last_modify_date": "{마지막 수정일}"
}
```


