{"id":11941,"date":"2019-10-22T15:23:17","date_gmt":"2019-10-22T06:23:17","guid":{"rendered":"https:\/\/www.eformsign.com\/kr\/support\/?post_type=manual_documentation&#038;p=11941"},"modified":"2019-11-27T10:23:12","modified_gmt":"2019-11-27T01:23:12","slug":"lookup-doc-information","status":"publish","type":"manual_documentation","link":"https:\/\/www.eformsign.com\/en\/support\/documentation\/open-api\/lookup-doc-information\/","title":{"rendered":"2.3.3 OPA_003 Lookup document information"},"content":{"rendered":"\n<p>API which looks up document information<\/p>\n\n\n\n<h2>Rest API<\/h2>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td>domain\/v1.0\/api\/documents\/{DOCUMENT_ID}<\/td><\/tr><\/tbody><\/table>\n\n\n\n<ul><li>Must use Access Token issued company.api_url for its domain<\/li><\/ul>\n\n\n\n<p>Example<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td>https:\/\/kr-api.eformsign.com\/v1.0\/api\/documents\/d803930e2094464aab548c340f7c8a4b<\/td><\/tr><\/tbody><\/table>\n\n\n\n<h2>Method<\/h2>\n\n\n\n<p>&#8211; GET<\/p>\n\n\n\n<h3>Request Header<\/h3>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td><strong>Name<\/strong><\/td><td><strong>Type<\/strong><\/td><td><strong>Description<\/strong><\/td><td><strong>Miscellaneous<\/strong><\/td><\/tr><tr><td>Content-Type<\/td><td>String<\/td><td>Content-Type<\/td><td>application\/json<\/td><\/tr><tr><td>access_token<\/td><td>String<\/td><td>Access token<\/td><td>&nbsp;<\/td><\/tr><\/tbody><\/table>\n\n\n\n<h3>QueryString<\/h3>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td><strong>Name<\/strong><\/td><td><strong>Type<\/strong><\/td><td><strong>Description<\/strong><\/td><td><strong>Miscellaneous<\/strong><\/td><\/tr><\/tbody><\/table>\n\n\n\n<h3>Request Body<\/h3>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td><strong>Name<\/strong><\/td><td><strong>Type<\/strong><\/td><td><strong>Description<\/strong><\/td><td><strong>Miscellaneous<\/strong><\/td><\/tr><\/tbody><\/table>\n\n\n\n<h3>Response Header<\/h3>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td><strong>Name<\/strong><\/td><td><strong>Type<\/strong><\/td><td><strong>Description<\/strong><\/td><td><strong>Miscellaneous<\/strong><\/td><\/tr><tr><td>Content-Type<\/td><td>String<\/td><td>Content-Type<\/td><td>application\/json<\/td><\/tr><\/tbody><\/table>\n\n\n\n<h3>Success Response Body<\/h3>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td><strong>Name<\/strong><\/td><td><strong>Type<\/strong><\/td><td><strong>Description<\/strong><\/td><td><strong>Miscellaneous<\/strong><\/td><\/tr><tr><td>id<\/td><td>String<\/td><td>Document id<\/td><td><\/td><\/tr><tr><td>template_id<\/td><td>String<\/td><td>Template id<\/td><td>&nbsp;<\/td><\/tr><tr><td>template_name<\/td><td>String<\/td><td>Template name<\/td><td>&nbsp;<\/td><\/tr><tr><td>template_version<\/td><td>int<\/td><td>Template version<\/td><td>&nbsp;<\/td><\/tr><tr><td>title<\/td><td>String<\/td><td>Document title<\/td><td>&nbsp;<\/td><\/tr><tr><td>creator<\/td><td>Object<\/td><td>Document creator info<\/td><td>document creator object (includes id, name)<\/td><\/tr><tr><td>creator.id<\/td><td>String<\/td><td>Document creator id<\/td><td>&nbsp;<\/td><\/tr><tr><td>creator.name<\/td><td>String<\/td><td>Creator name<\/td><td>&nbsp;<\/td><\/tr><tr><td>created_date<\/td><td>long<\/td><td>Created date<\/td><td>&nbsp;<\/td><\/tr><tr><td>editor<\/td><td>Object<\/td><td>Document editor info<\/td><td>document editor object (includes id, name)<\/td><\/tr><tr><td>editor.id<\/td><td>String<\/td><td>Document editor id<\/td><td>&nbsp;<\/td><\/tr><tr><td>editor.name<\/td><td>String<\/td><td>Document editor name<\/td><td>&nbsp;<\/td><\/tr><tr><td>updated_date<\/td><td>long<\/td><td>Document edited date<\/td><td>&nbsp;<\/td><\/tr><tr><td>current_status<\/td><td>String<\/td><td>Document status<\/td><td>doc_created(document created),<br>doc_tempsave (document saved as a draft),<br>doc_request_approval (approval requested),<br>doc_accept_approval (document approved),<br>doc_reject_approval (document not approved),<br>doc_request_external (external user process sent),<br>doc_remind_external (external user process sent again),<br>doc_open_external (external user opened, viewed the document),<br>doc_accept_external (external user approved the document),<br>doc_reject_external (external user rejected the document),<br>doc_request_internal (internal user process sent),<br>doc_accept_internal (internal user process approved),<br>doc_reject_internal (internal user process rejected),<br>doc_tempsave_internal (internal user saved the document as a draft),<br>doc_cancel_request (sender cancels the document request),<br>doc_reject_request (sender requests to reject one&#8217;s approval),<br>doc_decline_cancel_request (declines the cancel request from the sender),<br>doc_delete_request(sender request to delete the request),<br>doc_decline_delete_request (declines the delete request from the sender),<br>doc_deleted (document deleted),<br>doc_complete (document completed)<\/td><\/tr><tr><td>user_defined_status<\/td><td>String<\/td><td>user defined document status<\/td><td>The document status which user has defined<\/td><\/tr><tr><td>workflow_step_type<\/td><td>String<\/td><td>Workflow step type<\/td><td>&nbsp;<\/td><\/tr><tr><td>workflow_step_name<\/td><td>String<\/td><td>Workflow step name<\/td><td>&nbsp;<\/td><\/tr><tr><td>data_list<\/td><td>Object<\/td><td>user input data<\/td><td>Gets displayed in form_id : value format based on input data<\/td><\/tr><\/tbody><\/table>\n\n\n\n<h3>Fail Response Body<\/h3>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td>Name<\/td><td>Type<\/td><td>Description<\/td><td>Miscellaneous<\/td><\/tr><tr><td>error<\/td><td>Object<\/td><td>Error details<\/td><td>Only appears when there is an error. Error object (includes code, message)<\/td><\/tr><tr><td>error.code<\/td><td>String<\/td><td>Error code<\/td><td>&nbsp;<\/td><\/tr><tr><td>error.message<\/td><td>String<\/td><td>Error message<\/td><td>&nbsp;<\/td><\/tr><\/tbody><\/table>\n\n\n\n<h4>Example<\/h4>\n\n\n\n<p><strong>Request<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>GET \/v1.0\/api\/documents\/d803930e2094464aab548c340f7c8a4b HTTP\/1.1\n\nContent-Type : application\/json\n\naccess_token : eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJvY2UuaWFtIiwiY29udGV4dCI6eyJjbGllbnRJ....\n\nHOST : https:\/\/kr-api.eformsign.com<\/code><\/pre>\n\n\n\n<p><strong>Response<\/strong><\/p>\n\n\n\n<p>&#8211; When succeeded<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>HTTPS\/1.1 200 OK\nContent-Type: application\/json\n{\n\"id\": \"1e9c508486d149d8a402a4357c7533a2\",\n\"template_id\": \"f261bba9d4d343ebb67bc1a839f8feff\",\n\"template_name\": \"Product purchase request form\",\n\"template_version\": 1,\n\n\"document_number\":\"Purchase NO.1\",\n\"title\": \"Request\",\n\"creator\": {\n\"id\": \"test1@forcs.com\",\n\"name\": \"John Doe\"\n},\n\"created_date\": 1477385802676,\n\"editor\": {\n\"id\": \"test1@forcs.com\",\n\"name\": \"John Doe\"\n},\n\"updated_date\": 1477385802676,\n\"current_status\": \"doc_request_approval\",\n\"user_defined_status\": \"Purchase request\",\n\"workflow_step_type\": \"approval\",\n\"workflow_step_name\": \"Approval\",\n\"data_list\": {\n\"name\": \"John Doe\",\n\"address\": \"Domant Dr.\",\n\"product\": \"Name card\",\n\"memo\": \"Please make these ASAP\"\n}\n}<\/code><\/pre>\n\n\n\n<p>&#8211; When failed (error)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>HTTPS \/ 1.1 403 forbidden\nContent-Type: application\/json\n{\n\"error\": {\n\"code\": \"4030001\",\n\"message\": \"invalid api key\"\n}\n}<\/code><\/pre>\n","protected":false},"author":1,"featured_media":0,"parent":11930,"menu_order":0,"template":"","manualdocumentationcategory":[44],"_links":{"self":[{"href":"https:\/\/www.eformsign.com\/en\/support\/wp-json\/wp\/v2\/manual_documentation\/11941"}],"collection":[{"href":"https:\/\/www.eformsign.com\/en\/support\/wp-json\/wp\/v2\/manual_documentation"}],"about":[{"href":"https:\/\/www.eformsign.com\/en\/support\/wp-json\/wp\/v2\/types\/manual_documentation"}],"author":[{"embeddable":true,"href":"https:\/\/www.eformsign.com\/en\/support\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":3,"href":"https:\/\/www.eformsign.com\/en\/support\/wp-json\/wp\/v2\/manual_documentation\/11941\/revisions"}],"predecessor-version":[{"id":12721,"href":"https:\/\/www.eformsign.com\/en\/support\/wp-json\/wp\/v2\/manual_documentation\/11941\/revisions\/12721"}],"up":[{"embeddable":true,"href":"https:\/\/www.eformsign.com\/en\/support\/wp-json\/wp\/v2\/manual_documentation\/11930"}],"wp:attachment":[{"href":"https:\/\/www.eformsign.com\/en\/support\/wp-json\/wp\/v2\/media?parent=11941"}],"wp:term":[{"taxonomy":"manualdocumentationcategory","embeddable":true,"href":"https:\/\/www.eformsign.com\/en\/support\/wp-json\/wp\/v2\/manualdocumentationcategory?post=11941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}