{"id":12895,"date":"2020-01-03T16:16:23","date_gmt":"2020-01-03T07:16:23","guid":{"rendered":"https:\/\/www.eformsign.com\/en\/support\/?post_type=manual_documentation&#038;p=12895"},"modified":"2020-01-03T16:16:23","modified_gmt":"2020-01-03T07:16:23","slug":"attachment-download","status":"publish","type":"manual_documentation","link":"https:\/\/www.eformsign.com\/en\/support\/documentation\/open-api\/attachment-download\/","title":{"rendered":"2.3.8 OPA_008 Downloading Files Attached to Documents"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>API for downloading files attached to documents.<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>Rest API<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"\"><tbody><tr><td> domain\/v1.0\/api\/documents\/{DOCUMENT_ID}\/download_attach_files <\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4>Example<\/h4>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"\"><tbody><tr><td>https:\/\/kr-api.eformsign.com\/v1.0\/api\/<em>00a1ad0a-6e73-42fd-a4e4-4a1bf4c51f5a<\/em>\/documents\/<em>d803930e2094464aab548c340f7c8a4b<\/em>\/download_attach_files<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>Method<\/h2>\n\n\n\n<p>&#8211; GET<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>Request Header<\/h2>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table class=\"\"><tbody><tr><td><strong>Name<\/strong><\/td><td><strong>Type<\/strong><\/td><td><strong>Description<\/strong><\/td><td><strong>Remark<\/strong><\/td><\/tr><tr><td>access_token<\/td><td>String<\/td><td>Access token<\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>QueryString<\/h2>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table class=\"\"><tbody><tr><td><strong>Name<\/strong><\/td><td><strong>Type<\/strong><\/td><td><strong>Description<\/strong><\/td><td><strong>Remark<\/strong><\/td><\/tr><tr><td><\/td><td><\/td><td><\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>Request Body<\/h2>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table class=\"\"><tbody><tr><td><strong>Name<\/strong><\/td><td><strong>Type<\/strong><\/td><td><strong>Description<\/strong><\/td><td><strong>Remark<\/strong><\/td><\/tr><tr><td><\/td><td><\/td><td><\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>Response Header<\/h2>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table class=\"\"><tbody><tr><td><strong>Name<\/strong><\/td><td><strong>Type<\/strong><\/td><td><strong>Description<\/strong><\/td><td><strong>Remark<\/strong><\/td><\/tr><tr><td>Content-Type<\/td><td>String<\/td><td>Content-Type<\/td><td>application\/zip<\/td><\/tr><tr><td>Content-disposition<\/td><td>String<\/td><td>Content-disposition<\/td><td>Example: attachment; filename={document_id}.zip;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>Response Body<\/h2>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table class=\"\"><tbody><tr><td><strong>Name<\/strong><\/td><td><strong>Type<\/strong><\/td><td><strong>Description<\/strong><\/td><td><strong>Remark<\/strong><\/td><\/tr><tr><td><\/td><td><\/td><td><\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>Fail Response Body<\/h2>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table class=\"\"><tbody><tr><td><strong>Name<\/strong><\/td><td><strong>Type<\/strong><\/td><td><strong>Description<\/strong><\/td><td><strong>Remark<\/strong><\/td><\/tr><tr><td>error<\/td><td>Object<\/td><td>Detailed information of error<\/td><td>Error object (including code and messages) only displayed when there&#8217;s an error <\/td><\/tr><tr><td>error.code<\/td><td>String<\/td><td>Error<\/td><td><\/td><\/tr><tr><td>error.message<\/td><td>String<\/td><td>Error message<\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\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\/download_attach_files 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<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Response<\/strong><\/p>\n\n\n\n<p>&#8211; On success<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>HTTPS\/1.1 200 OK\nContent-Type: application\/zip\nContent-disposition : attachment; filename={document_id}.zip;<\/code><\/pre>\n\n\n\n<p>&#8211; On failure<\/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\": \"4031234\",\n\"message\": \"invalid api key\"\n}\n}<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"author":2,"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\/12895"}],"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\/2"}],"version-history":[{"count":2,"href":"https:\/\/www.eformsign.com\/en\/support\/wp-json\/wp\/v2\/manual_documentation\/12895\/revisions"}],"predecessor-version":[{"id":12900,"href":"https:\/\/www.eformsign.com\/en\/support\/wp-json\/wp\/v2\/manual_documentation\/12895\/revisions\/12900"}],"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=12895"}],"wp:term":[{"taxonomy":"manualdocumentationcategory","embeddable":true,"href":"https:\/\/www.eformsign.com\/en\/support\/wp-json\/wp\/v2\/manualdocumentationcategory?post=12895"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}