{"id":11948,"date":"2019-10-22T15:36:23","date_gmt":"2019-10-22T06:36:23","guid":{"rendered":"https:\/\/www.eformsign.com\/kr\/support\/?post_type=manual_documentation&#038;p=11948"},"modified":"2019-11-27T10:30:15","modified_gmt":"2019-11-27T01:30:15","slug":"lookup-doc-status","status":"publish","type":"manual_documentation","link":"https:\/\/www.eformsign.com\/en\/support\/documentation\/open-api\/lookup-doc-status\/","title":{"rendered":"2.3.4 OPA_004 Lookup document status"},"content":{"rendered":"\n<p>API which looks up document status<\/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}\/status<\/td><\/tr><\/tbody><\/table>\n\n\n\n<ul><li><em>Must use Access Token issued company.api_url for its domain<\/em><\/li><\/ul>\n\n\n\n<p>Example<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td>https:\/\/sg-api.eformsign.com\/v1.0\/api\/documents\/d803930e2094464aab548c340f7c8a4b\/status<\/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>current_status_seq<\/td><td>int<\/td><td>Current workflow status<\/td><td>&nbsp;<\/td><\/tr><tr><td>status_list<\/td><td>Array<\/td><td>Document status list<\/td><td>&nbsp;<\/td><\/tr><tr><td>status_list[].seq<\/td><td>int<\/td><td>Status sequence<\/td><td>&nbsp;<\/td><\/tr><tr><td>status_list[].workflow_step_type<\/td><td>String<\/td><td>Workflow step type<\/td><td>write(\uc791\uc131), approval(\uacb0\uc81c), internal(\ub0b4\ubd80\uc790 \ucc98\ub9ac), external(\uc678\ubd80\uc790 \ucc98\ub9ac), complete(\uc644\ub8cc)<\/td><\/tr><tr><td>status_list[].workflow_step_name<\/td><td>String<\/td><td>Workflow step name<\/td><td>&nbsp;<\/td><\/tr><tr><td>status_list[].action<\/td><td>String<\/td><td>User action<\/td><td>doc_create(create a document),<br>doc_tempsave (save document as a draft),<br>doc_request_approval (request approval),<br>doc_accept_approval (approve document),<br>doc_reject_approval (reject approval document),<br>doc_request_external (request external user process),<br>doc_remind_external (request external user process again),<br>doc_open_external (open document_external),<br>doc_accept_external (approve document_external),<br>doc_reject_external (reject approval document_external),<br>doc_request_internal (request internal user process),<br>doc_accept_internal (accept document_internal),<br>doc_reject_internal (reject document_internal),<br>doc_tempsave_internal (internal user saves document as a draft),<br>doc_cancel_request (cancel request),<br>doc_reject_request (request for rejection),<br>doc_decline_cancel_request (decline rejection request),<br>doc_delete_request(request for deletion),<br>doc_decline_delete_request (decline deletion request),<br>doc_deleted (delete document),<br>doc_complete (complete document)<\/td><\/tr><tr><td>status_list[].sender<\/td><td>Object<\/td><td>sender name (id \/ email \/ contact)<\/td><td>sender object (includes id, name)<\/td><\/tr><tr><td>sender.id<\/td><td>String<\/td><td>sender id<\/td><td>There may be no id if the document was created by external user<\/td><\/tr><tr><td>sender.name<\/td><td>String<\/td><td>sender name<\/td><td>There may be no name if the document was created by external user<\/td><\/tr><tr><td>status_list[].recipient_list<\/td><td>Array<\/td><td>recipient list<\/td><td>There can be more than one recipient<br>Recipient object (includes id, name)<\/td><\/tr><tr><td>recipient_list[].id<\/td><td>String<\/td><td>recipient id<\/td><td>If the recipient is the external user, id value will be an email or contact<br> If the recipient is a group, there may be no id value.<\/td><\/tr><tr><td>recipient_list[].name<\/td><td>String<\/td><td>recipient name<\/td><td>&nbsp;<\/td><\/tr><tr><td>status_list[].executor<\/td><td>Object<\/td><td>executor info<\/td><td>executor object (includes id, name)<\/td><\/tr><tr><td>executor.id<\/td><td>String<\/td><td>executor id<\/td><td>If the executor is the external user, id value will be an email or contact<\/td><\/tr><tr><td>executor.name<\/td><td>String<\/td><td>executor name<\/td><td>&nbsp;<\/td><\/tr><tr><td>status_list[].execute_date<\/td><td>long<\/td><td>execution time<\/td><td>&nbsp;<\/td><\/tr><tr><td>status_list[].comment<\/td><td>String<\/td><td>comment<\/td><td>&nbsp;<\/td><\/tr><tr><td>status_list[].progress<\/td><td>String<\/td><td>&nbsp;<\/td><td>step_complete(step completed),<br>step_skip(step skip),<br>step_in_process(step in process),<br>step_stand_by(step stand by)<\/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><strong>Name<\/strong><\/td><td><strong>Type<\/strong><\/td><td><strong>Description<\/strong><\/td><td><strong>Miscellaneous<\/strong><\/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\/status 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\"current_status\": 4,\n\"status_list\": [\n{\n\"seq\": 1,\n\"workflow_step_type\": \"write\",\n\"workflow_step_name\": \"Start\",\n\"action\": \"doc_create\",\n\"sender\": {},\n\"recipient_list\": [],\n\"executor\": {\n\"id\": \"windy4788@forcs.com\",\n\"name\": \"John Doe\"\n},\n\"execute_date\": 1556503248076,\n\"comment\": \"\",\n\"progress\": \"step_complete\"\n},\n{\n\"seq\": 2,\n\"workflow_step_type\": \"external\",\n\"workflow_step_name\": \"external user process\",\n\"action\": \"doc_accept_external\",\n\"sender\": {\n\"id\": \"windy4788@forcs.com\",\n\"name\": \"John Doe\"\n},\n\"recipient_list\": [\n{\n\"id\": \"windy4788@nate.com\",\n\"name\": \"Steve Donovan\"\n}\n],\n\"executor\": {\n\"id\": \"windy4788@nate.com\",\n\"name\": \"Steve Donovan\"\n},\n\"execute_date\": 1556503248076,\n\"comment\": \"\",\n\"progress\": \"step_complete\"\n},\n{\n\"seq\": 3,\n\"workflow_step_type\": \"external\",\n\"workflow_step_name\": \"external user process\",\n\"action\": \"doc_accept_external\",\n\"sender\": {\n\"id\": \"windy4788@forcs.com\",\n\"name\": \"John Doe\"\n},\n\"recipient_list\": [\n{\n\"id\": \"010-8946-0159\",\n\"name\": \"Julia Cramer\"\n}\n],\n\"executor\": {\n\"id\": \"010-8946-0159\",\n\"name\": \"Julia Cramer\"\n},\n\"execute_date\": 1556503248076,\n\"comment\": \"\",\n\"progress\": \"step_complete\"\n},\n{\n\"seq\": 4,\n\"workflow_step_type\": \"internal\",\n\"workflow_step_name\": \"Internal user process 1\",\n\"action\": \"\",\n\"sender\": {\n\"id\": \"windy4788@forcs.com\",\n\"name\": \"John Doe\"\n},\n\"recipient_list\": [\n{\n\"id\": \"\",\n\"name\": \"Research Dept.\"\n},\n{\n\"id\": \"windy4788@forcs.com\",\n\"name\": \"John Doe\"\n}\n],\n\"comment\": \"\",\n\"progress\": \"step_in_process\"\n},\n{\n\"seq\": 5,\n\"workflow_step_type\": \"complete\",\n\"workflow_step_name\": \"Complete\",\n\"action\": \"\",\n\"sender\": {\n\"id\": \"windy4788@forcs.com\",\n\"name\": \"John Doe\"\n},\n\"recipient_list\": [],\n\"executor\": {},\n\"execute_date\": -1,\n\"comment\": \"\",\n\"progress\": \"step_stand_by\"\n}\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\/11948"}],"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":2,"href":"https:\/\/www.eformsign.com\/en\/support\/wp-json\/wp\/v2\/manual_documentation\/11948\/revisions"}],"predecessor-version":[{"id":12726,"href":"https:\/\/www.eformsign.com\/en\/support\/wp-json\/wp\/v2\/manual_documentation\/11948\/revisions\/12726"}],"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=11948"}],"wp:term":[{"taxonomy":"manualdocumentationcategory","embeddable":true,"href":"https:\/\/www.eformsign.com\/en\/support\/wp-json\/wp\/v2\/manualdocumentationcategory?post=11948"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}