Files
OpenSign/assets/js/28b19cd2.125130af.js
T

1 line
13 KiB
JavaScript

"use strict";(self.webpackChunkOpenSign_Docs=self.webpackChunkOpenSign_Docs||[]).push([[6033],{99442:(e,s,a)=>{a.r(s),a.d(s,{assets:()=>f,contentTitle:()=>u,default:()=>b,frontMatter:()=>x,metadata:()=>j,toc:()=>g});var l=a(85893),n=a(11151),i=a(58219),t=(a(62316),a(51039)),r=a.n(t),m=(a(82723),a(9487)),d=a(41429),c=a(5397),o=a(4667),p=a(9472),h=a(85162);const x={id:"createdocumentwithtemplateid",title:"Create Document from Template",description:"The Create Document API allows you to generate new documents by providing template_id.",sidebar_label:"Create Document from Template",hide_title:!0,hide_table_of_contents:!0,api:"eJy9V21v2zYQ/ivsfVkDKH5L+0UYhmZZ0AUtlqDJsA+OYdDSSWJCkSxJ2fEM/ffhKMmWnbcF6AYYtkQ+PN7dc2/egOe5g3gKv+mkKlF5B7MIUnSJFcYLrSCGmwLZmUXukXUodnp1wbiUeuXYWlfMa5ajQksYhSuWdtLYYs2M1UuRCpUzj6WR3ONcpAOIQBs6IbS6SCGGJFzRnVwJX3RwkUIEhlteokdL6m5A8RIhhp5EiECQuob7Ag5t0Is7TPxFynTGbtozEIHF75WwmELsbYUROL+WJNaJ0kgC4IOROkWIMy4dAZICSw7xBvzaBKS3QuUQQaZtyX1/BR94kBKD+X28KJJJYRZQ17PmWnT+V52uSVSilUfl6ZEbI0USnDK8c6T65vGdjTHkE0su9AJdwIlcBfdsgdxavia/eCzd6wKsJm0fm7Yz5DRJdOUVVx7qCLDkQr7oiwDoC7jT+Kl9GyS6JCkNky/deqeRLRAJbAqtXkGPJyf0ORlDXUfghQ+r+9HVC5v5deu2+nn4vI9fEGsBvB89YcEZrVzjzcloRD/7cXihmKuSBJ1jHTgk0EpIyXL0rLKSCbXbFFnY5xYZl06zhmSCdMox7Qu0K+GQaSXXQUoX7hEr0TnHc4rlHxRmney3JkFxJyZ/PyTLyRURWdmXI+cpAd4bFw+HB/FDFpKBb5S2LWUufDWkZJWU63d7gSOUFArnHSHzyWg0nxD/dQQfnqS4YazgS1Q/ecbTlK1EmqN3jKu0JdARg11UMW2Z0r4tlLiFcKlVzqgSMl+gsIwSNJwMMfjDGEVrtX2r/64kcofMoa/MzpJG8Gs+/DAazcdbH358Kk2WXIo0tJkbfY/q3f9g7c62/vW+uZ5UfShDzLatRzSgsA97xvbXGyMdJpUVfh1a18MxN+K42Y+nM2oIJfpCUxM02gWNqYfFMNwvQ8NNrw7VQGLtsmuIIaG2OeI8z4XKj7kxA21QUUhJvnCUNENuxHA5Brq4U+yanNf4Z0+9XSsx4gtSzLXW91Ft4y2Qp2iDp4iTb7smd955ttekpl2/6TeVbU951Ci2F3fNYNsL+gV/VpMumQ6Kt3xcGlRU4wOby/Gj0eCmEI4JF7Y7T4fIYpm27OA0W3CHKdOKMjJs0vrJYMycwURkbVAO2K26Vde6RFY5zCrJpFD3Lr5Vx2x6mWUiEVyyv3DhhMfZ+4611Wr1iK2jcOaz8EW1YBaN3sHzsBgo7Z/avhxBBB5t6S6za7RLkXRV9JmrhgE8bFONJyHVOkLapU+Hhyj0pUhQOewlx+nnq6/sZDCCqBeY/0Ll4deLs/M/rs9JKoV2Q9F4MBqMQvvXzpdc9S46HEwzq8v+hLfHdW/U+u+m2jZhPD74oZFcqF67a/J6ejBeQARxf5CdRVBQHYinsNlQwP1pZV3T8vcKLRWRWQRLbgVfUIRPN5AKR8/pdk591uz339qh5Yg9MxM/qX9XBRSVgCWXFb1BBPe4PpjCQw62pYBUaxBnjQLHNyRnJ+FRHa+j7sRpkqDxL2L7hfPq8voGIli0I3UZhnawfEVTPl9BDLdwC+FPB0lo5l1a34DkKq/CBAGNXKpgvCKm+uXvPpS/9oEse9In+3WxMYW+ybAnD/xMQfcF179s4c3Oswda33Zo4mdW1/U/JrnFVA==",sidebar_class_name:"post api-method",info_path:"docs/API-docs/opensign-api-v-1",custom_edit_url:null},u=void 0,j={id:"API-docs/createdocumentwithtemplateid",title:"Create Document from Template",description:"The Create Document API allows you to generate new documents by providing template_id.",source:"@site/docs/API-docs/createdocumentwithtemplateid.api.mdx",sourceDirName:"API-docs",slug:"/API-docs/createdocumentwithtemplateid",permalink:"/docs/API-docs/createdocumentwithtemplateid",draft:!1,unlisted:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"createdocumentwithtemplateid",title:"Create Document from Template",description:"The Create Document API allows you to generate new documents by providing template_id.",sidebar_label:"Create Document from Template",hide_title:!0,hide_table_of_contents:!0,api:"eJy9V21v2zYQ/ivsfVkDKH5L+0UYhmZZ0AUtlqDJsA+OYdDSSWJCkSxJ2fEM/ffhKMmWnbcF6AYYtkQ+PN7dc2/egOe5g3gKv+mkKlF5B7MIUnSJFcYLrSCGmwLZmUXukXUodnp1wbiUeuXYWlfMa5ajQksYhSuWdtLYYs2M1UuRCpUzj6WR3ONcpAOIQBs6IbS6SCGGJFzRnVwJX3RwkUIEhlteokdL6m5A8RIhhp5EiECQuob7Ag5t0Is7TPxFynTGbtozEIHF75WwmELsbYUROL+WJNaJ0kgC4IOROkWIMy4dAZICSw7xBvzaBKS3QuUQQaZtyX1/BR94kBKD+X28KJJJYRZQ17PmWnT+V52uSVSilUfl6ZEbI0USnDK8c6T65vGdjTHkE0su9AJdwIlcBfdsgdxavia/eCzd6wKsJm0fm7Yz5DRJdOUVVx7qCLDkQr7oiwDoC7jT+Kl9GyS6JCkNky/deqeRLRAJbAqtXkGPJyf0ORlDXUfghQ+r+9HVC5v5deu2+nn4vI9fEGsBvB89YcEZrVzjzcloRD/7cXihmKuSBJ1jHTgk0EpIyXL0rLKSCbXbFFnY5xYZl06zhmSCdMox7Qu0K+GQaSXXQUoX7hEr0TnHc4rlHxRmney3JkFxJyZ/PyTLyRURWdmXI+cpAd4bFw+HB/FDFpKBb5S2LWUufDWkZJWU63d7gSOUFArnHSHzyWg0nxD/dQQfnqS4YazgS1Q/ecbTlK1EmqN3jKu0JdARg11UMW2Z0r4tlLiFcKlVzqgSMl+gsIwSNJwMMfjDGEVrtX2r/64kcofMoa/MzpJG8Gs+/DAazcdbH358Kk2WXIo0tJkbfY/q3f9g7c62/vW+uZ5UfShDzLatRzSgsA97xvbXGyMdJpUVfh1a18MxN+K42Y+nM2oIJfpCUxM02gWNqYfFMNwvQ8NNrw7VQGLtsmuIIaG2OeI8z4XKj7kxA21QUUhJvnCUNENuxHA5Brq4U+yanNf4Z0+9XSsx4gtSzLXW91Ft4y2Qp2iDp4iTb7smd955ttekpl2/6TeVbU951Ci2F3fNYNsL+gV/VpMumQ6Kt3xcGlRU4wOby/Gj0eCmEI4JF7Y7T4fIYpm27OA0W3CHKdOKMjJs0vrJYMycwURkbVAO2K26Vde6RFY5zCrJpFD3Lr5Vx2x6mWUiEVyyv3DhhMfZ+4611Wr1iK2jcOaz8EW1YBaN3sHzsBgo7Z/avhxBBB5t6S6za7RLkXRV9JmrhgE8bFONJyHVOkLapU+Hhyj0pUhQOewlx+nnq6/sZDCCqBeY/0Ll4deLs/M/rs9JKoV2Q9F4MBqMQvvXzpdc9S46HEwzq8v+hLfHdW/U+u+m2jZhPD74oZFcqF67a/J6ejBeQARxf5CdRVBQHYinsNlQwP1pZV3T8vcKLRWRWQRLbgVfUIRPN5AKR8/pdk591uz339qh5Yg9MxM/qX9XBRSVgCWXFb1BBPe4PpjCQw62pYBUaxBnjQLHNyRnJ+FRHa+j7sRpkqDxL2L7hfPq8voGIli0I3UZhnawfEVTPl9BDLdwC+FPB0lo5l1a34DkKq/CBAGNXKpgvCKm+uXvPpS/9oEse9In+3WxMYW+ybAnD/xMQfcF179s4c3Oswda33Zo4mdW1/U/JrnFVA==",sidebar_class_name:"post api-method",info_path:"docs/API-docs/opensign-api-v-1",custom_edit_url:null},sidebar:"apiSidebar",previous:{title:"Create Document from binary",permalink:"/docs/API-docs/createdocumentwithbinary"},next:{title:"Get Document from ID",permalink:"/docs/API-docs/getdocument"}},f={},g=[{value:"Request",id:"request",level:2}];function y(e){const s={h2:"h2",p:"p",...(0,n.a)(),...e.components},{Details:a}=s;return a||function(e,s){throw new Error("Expected "+(s?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h1",{className:"openapi__heading",children:(0,l.jsx)(s.p,{children:"Create Document from Template"})}),"\n",(0,l.jsx)(r(),{method:"post",path:"/createdocument/{template_id}"}),"\n",(0,l.jsx)(s.p,{children:"The Create Document API allows you to generate new documents by providing template_id."}),"\n",(0,l.jsx)(s.h2,{id:"request",children:"Request"}),"\n",(0,l.jsxs)(a,{style:{marginBottom:"1rem"},className:"openapi-markdown__details","data-collapsed":!1,open:!0,children:[(0,l.jsx)("summary",{style:{},children:(0,l.jsx)("h3",{className:"openapi-markdown__details-summary-header-params",children:(0,l.jsx)(s.p,{children:"Path Parameters"})})}),(0,l.jsx)("div",{children:(0,l.jsx)("ul",{children:(0,l.jsx)(d.Z,{className:"paramsItem",param:{name:"template_id",in:"path",description:"objectId of Template",required:!0,style:"simple",explode:!1,schema:{type:"string",format:"string",example:"pH1bhc2hpb"}}})})})]}),"\n",(0,l.jsx)(m.Z,{className:"openapi-tabs__mime",children:(0,l.jsx)(h.default,{label:"application/json",value:"application/json-schema",children:(0,l.jsxs)(a,{style:{},className:"openapi-markdown__details mime","data-collapsed":!1,open:!0,children:[(0,l.jsxs)("summary",{style:{},className:"openapi-markdown__details-summary-mime",children:[(0,l.jsx)("h3",{className:"openapi-markdown__details-summary-header-body",children:(0,l.jsx)(s.p,{children:"Body"})}),(0,l.jsx)("strong",{className:"openapi-schema__required",children:(0,l.jsx)(s.p,{children:"required"})})]}),(0,l.jsx)("div",{style:{textAlign:"left",marginLeft:"1rem"}}),(0,l.jsx)("ul",{style:{marginLeft:"1rem"},children:(0,l.jsx)(o.Z,{collapsible:!0,className:"schemaItem",children:(0,l.jsxs)(a,{style:{},className:"openapi-markdown__details",children:[(0,l.jsx)("summary",{style:{},children:(0,l.jsxs)("span",{className:"openapi-schema__container",children:[(0,l.jsx)("strong",{className:"openapi-schema__property",children:(0,l.jsx)(s.p,{children:"signers"})}),(0,l.jsx)("span",{className:"openapi-schema__name",children:(0,l.jsx)(s.p,{children:"object[]"})})]})}),(0,l.jsxs)("div",{style:{marginLeft:"1rem"},children:[(0,l.jsx)("li",{children:(0,l.jsx)("div",{style:{fontSize:"var(--ifm-code-font-size)",opacity:"0.6",marginLeft:"-.5rem",paddingBottom:".5rem"},children:(0,l.jsx)(s.p,{children:"Array ["})})}),(0,l.jsx)(o.Z,{collapsible:!1,name:"role",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",example:"Accoutnant"}}),(0,l.jsx)(o.Z,{collapsible:!1,name:"email",required:!1,schemaName:"mail",qualifierMessage:void 0,schema:{type:"string",format:"mail",example:"joe@example.com"}}),(0,l.jsx)(o.Z,{collapsible:!1,name:"name",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",example:"joe bee"}}),(0,l.jsx)(o.Z,{collapsible:!1,name:"phone",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",example:"123123131"}}),(0,l.jsx)("li",{children:(0,l.jsx)("div",{style:{fontSize:"var(--ifm-code-font-size)",opacity:"0.6",marginLeft:"-.5rem"},children:(0,l.jsx)(s.p,{children:"]"})})})]})]})})})]})})}),"\n",(0,l.jsx)("div",{children:(0,l.jsx)("div",{children:(0,l.jsxs)(i.Z,{children:[(0,l.jsxs)(h.default,{label:"200",value:"200",children:[(0,l.jsx)("div",{children:(0,l.jsx)(s.p,{children:"In success response you will get url in response if you are also signer in document otherwise only get objectId, messsage"})}),(0,l.jsx)("div",{children:(0,l.jsx)(m.Z,{className:"openapi-tabs__mime",schemaType:"response",children:(0,l.jsx)(h.default,{label:"application/json",value:"application/json",children:(0,l.jsxs)(p.default,{className:"openapi-tabs__schema",children:[(0,l.jsx)(h.default,{label:"Schema",value:"Schema",children:(0,l.jsxs)(a,{style:{},className:"openapi-markdown__details response","data-collapsed":!1,open:!0,children:[(0,l.jsx)("summary",{style:{},className:"openapi-markdown__details-summary-response",children:(0,l.jsx)("strong",{children:(0,l.jsx)(s.p,{children:"Schema"})})}),(0,l.jsx)("div",{style:{textAlign:"left",marginLeft:"1rem"}}),(0,l.jsxs)("ul",{style:{marginLeft:"1rem"},children:[(0,l.jsx)(o.Z,{collapsible:!1,name:"objectId",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"hji2zxcv2P"}}),(0,l.jsx)(o.Z,{collapsible:!1,name:"url",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"https://example.com"}}),(0,l.jsx)(o.Z,{collapsible:!1,name:"message",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"Document sent successfully!"}})]})]})}),(0,l.jsx)(h.default,{label:"Example (from schema)",value:"Example (from schema)",children:(0,l.jsx)(c.Z,{responseExample:'{\n "objectId": "hji2zxcv2P",\n "url": "https://example.com",\n "message": "Document sent successfully!"\n}',language:"json"})})]})})})})]}),(0,l.jsxs)(h.default,{label:"400",value:"400",children:[(0,l.jsx)("div",{children:(0,l.jsx)(s.p,{children:"If you haven't add widgets and signers in template or not provide signers along with their roles in body"})}),(0,l.jsx)("div",{children:(0,l.jsx)(m.Z,{className:"openapi-tabs__mime",schemaType:"response",children:(0,l.jsx)(h.default,{label:"application/json",value:"application/json",children:(0,l.jsxs)(p.default,{className:"openapi-tabs__schema",children:[(0,l.jsx)(h.default,{label:"Schema",value:"Schema",children:(0,l.jsxs)(a,{style:{},className:"openapi-markdown__details response","data-collapsed":!1,open:!0,children:[(0,l.jsx)("summary",{style:{},className:"openapi-markdown__details-summary-response",children:(0,l.jsx)("strong",{children:(0,l.jsx)(s.p,{children:"Schema"})})}),(0,l.jsx)("div",{style:{textAlign:"left",marginLeft:"1rem"}}),(0,l.jsx)("ul",{style:{marginLeft:"1rem"},children:(0,l.jsx)(o.Z,{collapsible:!1,name:"error",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"Please setup template properly!"}})})]})}),(0,l.jsx)(h.default,{label:"Example (from schema)",value:"Example (from schema)",children:(0,l.jsx)(c.Z,{responseExample:'{\n "error": "Please setup template properly!"\n}',language:"json"})})]})})})})]}),(0,l.jsxs)(h.default,{label:"405",value:"405",children:[(0,l.jsx)("div",{children:(0,l.jsx)(s.p,{children:"Invalid API Token!"})}),(0,l.jsx)("div",{children:(0,l.jsx)(m.Z,{className:"openapi-tabs__mime",schemaType:"response",children:(0,l.jsx)(h.default,{label:"application/json",value:"application/json",children:(0,l.jsxs)(p.default,{className:"openapi-tabs__schema",children:[(0,l.jsx)(h.default,{label:"Schema",value:"Schema",children:(0,l.jsxs)(a,{style:{},className:"openapi-markdown__details response","data-collapsed":!1,open:!0,children:[(0,l.jsx)("summary",{style:{},className:"openapi-markdown__details-summary-response",children:(0,l.jsx)("strong",{children:(0,l.jsx)(s.p,{children:"Schema"})})}),(0,l.jsx)("div",{style:{textAlign:"left",marginLeft:"1rem"}}),(0,l.jsx)("ul",{style:{marginLeft:"1rem"},children:(0,l.jsx)(o.Z,{collapsible:!1,name:"error",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",example:"Invalid API token!"}})})]})}),(0,l.jsx)(h.default,{label:"Example (from schema)",value:"Example (from schema)",children:(0,l.jsx)(c.Z,{responseExample:'{\n "error": "Invalid API token!"\n}',language:"json"})})]})})})})]})]})})})]})}function b(e={}){const{wrapper:s}={...(0,n.a)(),...e.components};return s?(0,l.jsx)(s,{...e,children:(0,l.jsx)(y,{...e})}):y(e)}}}]);