# 기간으로 조회

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

## 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  | (취소 상태 후 삭제한 경우) |


---

# Agent Instructions: Querying This Documentation

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

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

```
GET https://api.esignon.net/workflow/view/readbydate.md?ask=<question>
```

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

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