> For the complete documentation index, see [llms.txt](https://api.esignon.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.esignon.net/jp-1/workflow/view/readbydate.md).

# 期間で照会

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

## 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": "{文書の開始時間}"
				}
		]
	}
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://api.esignon.net/jp-1/workflow/view/readbydate.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
