mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-30 21:44:56 +02:00
1 line
14 KiB
JavaScript
1 line
14 KiB
JavaScript
"use strict";(self.webpackChunkOpenSign_Docs=self.webpackChunkOpenSign_Docs||[]).push([[1531],{60877:(e,s,a)=>{a.r(s),a.d(s,{assets:()=>f,contentTitle:()=>u,default:()=>v,frontMatter:()=>h,metadata:()=>x,toc:()=>j});var t=a(85893),r=a(11151),i=a(58219),l=(a(62316),a(51039)),n=a.n(l),m=(a(82723),a(9487)),c=(a(41429),a(5397)),d=a(4667),o=a(9472),p=a(85162);const h={id:"createtemplate",title:"Create Template",description:"The Template Creation API allows users to create customizable templates, which serve as blueprints for generating documents with predefined structures. Upon successful template creation, the API returns a unique **template_id** that can be used to generate documents based on the specified template and **url** to edit template.",sidebar_label:"Create Template",hide_title:!0,hide_table_of_contents:!0,api:"eJztV91v2zYQ/1e4e1oNxd9NCz01C4IiWLEEs4s9OIZBSWeLiUSyJGXHNfS/D0dZsuJkzdzlcXmJfLxv3v3uuAPHVxbCGUwx1xl3aGEeQII2NkI7oSSEME2R1cfs0iAnOru4vWY8y9TGssKiscwpFtMhsriwTuXiO48yZK5WHLBNKuKUWTRrZNyyKCtQGyGdZUtl2AolGu6EXLFExUWOdLARLmXaYIJLITFh1pkidoVB22VftZLMFnGM1i6LrLFUuSGUDJhL0Ttq0BVGWsZZIcW3AlmnU3MvRNLpMJdyx2IuWYQUTkLR7B3CljsRpzMlvWKrMRZLQcy1ZS4T1ukUJiOVimEiXHPYhQCU9iEqeZ1ACFW66nMIwOC3Aq37TSVbCHcQK+lQOvrkWmci9qK9e0vXsgMbp5hz+nJbjRCCiu4xdhCANmTICbR0uhQZtrisM0KuIIClMjl3EAJFdT6GAPCR55qY9ySGMlYJJsyrKANwwr2iq6EcdFn/0eSB9EjlflaNFy2PavSnNLU1lAFYsZJobEsZN4ZvIQDhMLev59mo03MToyLbmHORnSp7rzBC/FQRurHKfWZ5frIT9wpZhD6rOlXyZPnBcDQYDkaDIWnYiGSF7j+kUfNV2wNZ5BGatgcNpfFgQKXp2U8sBMdzTU4/nmhwOB6XAWxPlPpAfm5OFBp9LANITxQan5eHbj3CmUWkku2ivqbyNca6LV5jrBgIwYTBBEJnCvQEq5W01dUO+336dzRensA2YXwD6dn2FwjeCgYrMgHvcSrLAArzYvsdSiV1Ttuw19tTCrPvuFZShMyExEUd8WLY7y/eU1rKAMb9988jv5ZrnonET6ipekD5htGiMcr8OKS2eVeZJ1cfc5+KCkhAVEz+HJ4E26ZXQeboUkWDTSvrPeIuhRB6z+acXwEIame7KvNNeq3jKyFXZ1zrrtIoqfoyHllKdo9r0VsPoJyThrgwwm0nlI4q4sczrsVZ5VALfLT4HQl99vG0uQIQdA0p8oSqoAyAsvznYQhf1bmqh+iLc/GQlONJVw+6J7PreL16YRq1htGsnit+VDST4gXwb0Ks4bxB8xZAt/B5VkPtIDgUCeGhh8PheOwB7sPAQ9booweh8Xk5L+clJW6pfJb3kd9olBOxqtbC9eBZkNNUWCasP67XqWqPpNXvSPrpmkWHRB91B/XKVfVEl93JOzlRuV/ZaAPMhHyw4Z08Y7Ob5VLEgmfsL4yscDj/tS6xzWbzrLTeeZnPwqVFxAxqdWBfeaKvv7ZU8+Md3T+a3N4sJ2jWIq7R4h9M9Txzb9/pPPadXt/qnvTpWIg6LxMxSout3rz4fPuFjbp9CFpd9C9c7n25vrz6Y3JFWqkPqysadPvdvt8BlHU5ly1Dl9VePz3U9dH21YDW/4+Ft3ss7JvS4aPr6YwL2RpUFbTOjp8Q8wBSwt5wBrsd2f9qsrIk8rcCzRbC2TyANTeCsk2/aLeo4I/w4AG3dNvVZZ5NyT6xZ0WFpEfTqAxqiYs4Ru1+yDtvjYfbm8kUAoj2z5xcJSRj+IaeQHwDIdzBHfjnEmmolmvuF6eMy1XhUQsqvfT3N2XBGQs=",sidebar_class_name:"post api-method",info_path:"docs/API-docs/opensign-api-v-1",custom_edit_url:null},u=void 0,x={id:"API-docs/createtemplate",title:"Create Template",description:"The Template Creation API allows users to create customizable templates, which serve as blueprints for generating documents with predefined structures. Upon successful template creation, the API returns a unique **template_id** that can be used to generate documents based on the specified template and **url** to edit template.",source:"@site/docs/API-docs/createtemplate.api.mdx",sourceDirName:"API-docs",slug:"/API-docs/createtemplate",permalink:"/docs/API-docs/createtemplate",draft:!1,unlisted:!1,editUrl:null,tags:[],version:"current",frontMatter:{id:"createtemplate",title:"Create Template",description:"The Template Creation API allows users to create customizable templates, which serve as blueprints for generating documents with predefined structures. Upon successful template creation, the API returns a unique **template_id** that can be used to generate documents based on the specified template and **url** to edit template.",sidebar_label:"Create Template",hide_title:!0,hide_table_of_contents:!0,api:"eJztV91v2zYQ/1e4e1oNxd9NCz01C4IiWLEEs4s9OIZBSWeLiUSyJGXHNfS/D0dZsuJkzdzlcXmJfLxv3v3uuAPHVxbCGUwx1xl3aGEeQII2NkI7oSSEME2R1cfs0iAnOru4vWY8y9TGssKiscwpFtMhsriwTuXiO48yZK5WHLBNKuKUWTRrZNyyKCtQGyGdZUtl2AolGu6EXLFExUWOdLARLmXaYIJLITFh1pkidoVB22VftZLMFnGM1i6LrLFUuSGUDJhL0Ttq0BVGWsZZIcW3AlmnU3MvRNLpMJdyx2IuWYQUTkLR7B3CljsRpzMlvWKrMRZLQcy1ZS4T1ukUJiOVimEiXHPYhQCU9iEqeZ1ACFW66nMIwOC3Aq37TSVbCHcQK+lQOvrkWmci9qK9e0vXsgMbp5hz+nJbjRCCiu4xdhCANmTICbR0uhQZtrisM0KuIIClMjl3EAJFdT6GAPCR55qY9ySGMlYJJsyrKANwwr2iq6EcdFn/0eSB9EjlflaNFy2PavSnNLU1lAFYsZJobEsZN4ZvIQDhMLev59mo03MToyLbmHORnSp7rzBC/FQRurHKfWZ5frIT9wpZhD6rOlXyZPnBcDQYDkaDIWnYiGSF7j+kUfNV2wNZ5BGatgcNpfFgQKXp2U8sBMdzTU4/nmhwOB6XAWxPlPpAfm5OFBp9LANITxQan5eHbj3CmUWkku2ivqbyNca6LV5jrBgIwYTBBEJnCvQEq5W01dUO+336dzRensA2YXwD6dn2FwjeCgYrMgHvcSrLAArzYvsdSiV1Ttuw19tTCrPvuFZShMyExEUd8WLY7y/eU1rKAMb9988jv5ZrnonET6ipekD5htGiMcr8OKS2eVeZJ1cfc5+KCkhAVEz+HJ4E26ZXQeboUkWDTSvrPeIuhRB6z+acXwEIame7KvNNeq3jKyFXZ1zrrtIoqfoyHllKdo9r0VsPoJyThrgwwm0nlI4q4sczrsVZ5VALfLT4HQl99vG0uQIQdA0p8oSqoAyAsvznYQhf1bmqh+iLc/GQlONJVw+6J7PreL16YRq1htGsnit+VDST4gXwb0Ks4bxB8xZAt/B5VkPtIDgUCeGhh8PheOwB7sPAQ9booweh8Xk5L+clJW6pfJb3kd9olBOxqtbC9eBZkNNUWCasP67XqWqPpNXvSPrpmkWHRB91B/XKVfVEl93JOzlRuV/ZaAPMhHyw4Z08Y7Ob5VLEgmfsL4yscDj/tS6xzWbzrLTeeZnPwqVFxAxqdWBfeaKvv7ZU8+Md3T+a3N4sJ2jWIq7R4h9M9Txzb9/pPPadXt/qnvTpWIg6LxMxSout3rz4fPuFjbp9CFpd9C9c7n25vrz6Y3JFWqkPqysadPvdvt8BlHU5ly1Dl9VePz3U9dH21YDW/4+Ft3ss7JvS4aPr6YwL2RpUFbTOjp8Q8wBSwt5wBrsd2f9qsrIk8rcCzRbC2TyANTeCsk2/aLeo4I/w4AG3dNvVZZ5NyT6xZ0WFpEfTqAxqiYs4Ru1+yDtvjYfbm8kUAoj2z5xcJSRj+IaeQHwDIdzBHfjnEmmolmvuF6eMy1XhUQsqvfT3N2XBGQs=",sidebar_class_name:"post api-method",info_path:"docs/API-docs/opensign-api-v-1",custom_edit_url:null},sidebar:"apiSidebar",previous:{title:"Get Document list from status",permalink:"/docs/API-docs/getdocumentlist"},next:{title:"Create Template from binary",permalink:"/docs/API-docs/createtemplatewithbinary"}},f={},j=[{value:"Request",id:"request",level:2}];function b(e){const s={h2:"h2",p:"p",strong:"strong",...(0,r.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,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h1",{className:"openapi__heading",children:(0,t.jsx)(s.p,{children:"Create Template"})}),"\n",(0,t.jsx)(n(),{method:"post",path:"/createtemplate"}),"\n",(0,t.jsxs)(s.p,{children:["The Template Creation API allows users to create customizable templates, which serve as blueprints for generating documents with predefined structures. Upon successful template creation, the API returns a unique ",(0,t.jsx)(s.strong,{children:"template_id"})," that can be used to generate documents based on the specified template and ",(0,t.jsx)(s.strong,{children:"url"})," to edit template."]}),"\n",(0,t.jsx)(s.h2,{id:"request",children:"Request"}),"\n",(0,t.jsx)(m.Z,{className:"openapi-tabs__mime",children:(0,t.jsx)(p.default,{label:"application/json",value:"application/json-schema",children:(0,t.jsxs)(a,{style:{},className:"openapi-markdown__details mime","data-collapsed":!1,open:!0,children:[(0,t.jsxs)("summary",{style:{},className:"openapi-markdown__details-summary-mime",children:[(0,t.jsx)("h3",{className:"openapi-markdown__details-summary-header-body",children:(0,t.jsx)(s.p,{children:"Body"})}),(0,t.jsx)("strong",{className:"openapi-schema__required",children:(0,t.jsx)(s.p,{children:"required"})})]}),(0,t.jsx)("div",{style:{textAlign:"left",marginLeft:"1rem"}}),(0,t.jsxs)("ul",{style:{marginLeft:"1rem"},children:[(0,t.jsx)(d.Z,{collapsible:!1,name:"file",required:!1,schemaName:"base64",qualifierMessage:void 0,schema:{type:"string",format:"base64",example:"base64 encoded file"}}),(0,t.jsx)(d.Z,{collapsible:!1,name:"title",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"sample template"}}),(0,t.jsx)(d.Z,{collapsible:!1,name:"note",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"sample note"}}),(0,t.jsx)(d.Z,{collapsible:!1,name:"description",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"sample description"}}),(0,t.jsx)(d.Z,{collapsible:!0,className:"schemaItem",children:(0,t.jsxs)(a,{style:{},className:"openapi-markdown__details",children:[(0,t.jsx)("summary",{style:{},children:(0,t.jsxs)("span",{className:"openapi-schema__container",children:[(0,t.jsx)("strong",{className:"openapi-schema__property",children:(0,t.jsx)(s.p,{children:"signers"})}),(0,t.jsx)("span",{className:"openapi-schema__name",children:(0,t.jsx)(s.p,{children:"object[]"})})]})}),(0,t.jsxs)("div",{style:{marginLeft:"1rem"},children:[(0,t.jsx)("li",{children:(0,t.jsx)("div",{style:{fontSize:"var(--ifm-code-font-size)",opacity:"0.6",marginLeft:"-.5rem",paddingBottom:".5rem"},children:(0,t.jsx)(s.p,{children:"Array ["})})}),(0,t.jsx)(d.Z,{collapsible:!1,name:"role",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"ceo"}}),(0,t.jsx)(d.Z,{collapsible:!1,name:"email",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"joebee@exampl.com"}}),(0,t.jsx)(d.Z,{collapsible:!1,name:"name",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"joe bee"}}),(0,t.jsx)(d.Z,{collapsible:!1,name:"phone",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"123121312"}}),(0,t.jsx)(d.Z,{collapsible:!0,className:"schemaItem",children:(0,t.jsxs)(a,{style:{},className:"openapi-markdown__details",children:[(0,t.jsx)("summary",{style:{},children:(0,t.jsxs)("span",{className:"openapi-schema__container",children:[(0,t.jsx)("strong",{className:"openapi-schema__property",children:(0,t.jsx)(s.p,{children:"widgets"})}),(0,t.jsx)("span",{className:"openapi-schema__name",children:(0,t.jsx)(s.p,{children:"object[]"})})]})}),(0,t.jsxs)("div",{style:{marginLeft:"1rem"},children:[(0,t.jsx)("li",{children:(0,t.jsx)("div",{style:{fontSize:"var(--ifm-code-font-size)",opacity:"0.6",marginLeft:"-.5rem",paddingBottom:".5rem"},children:(0,t.jsx)(s.p,{children:"Array ["})})}),(0,t.jsx)(d.Z,{collapsible:!1,name:"page",required:!1,schemaName:"number",qualifierMessage:void 0,schema:{type:"number",format:"number",example:1}}),(0,t.jsx)(d.Z,{collapsible:!1,name:"type",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"stamp"}}),(0,t.jsx)(d.Z,{collapsible:!1,name:"x",required:!1,schemaName:"number",qualifierMessage:void 0,schema:{type:"number",format:"number",example:244}}),(0,t.jsx)(d.Z,{collapsible:!1,name:"y",required:!1,schemaName:"number",qualifierMessage:void 0,schema:{type:"number",format:"number",example:71}}),(0,t.jsx)(d.Z,{collapsible:!1,name:"w",required:!1,schemaName:"number",qualifierMessage:void 0,schema:{type:"number",format:"number",example:38}}),(0,t.jsx)(d.Z,{collapsible:!1,name:"h",required:!1,schemaName:"number",qualifierMessage:void 0,schema:{type:"number",format:"number",example:46}}),(0,t.jsx)("li",{children:(0,t.jsx)("div",{style:{fontSize:"var(--ifm-code-font-size)",opacity:"0.6",marginLeft:"-.5rem"},children:(0,t.jsx)(s.p,{children:"]"})})})]})]})}),(0,t.jsx)("li",{children:(0,t.jsx)("div",{style:{fontSize:"var(--ifm-code-font-size)",opacity:"0.6",marginLeft:"-.5rem"},children:(0,t.jsx)(s.p,{children:"]"})})})]})]})})]})]})})}),"\n",(0,t.jsx)("div",{children:(0,t.jsx)("div",{children:(0,t.jsxs)(i.Z,{children:[(0,t.jsxs)(p.default,{label:"200",value:"200",children:[(0,t.jsx)("div",{children:(0,t.jsx)(s.p,{children:"Template created successfully!"})}),(0,t.jsx)("div",{children:(0,t.jsx)(m.Z,{className:"openapi-tabs__mime",schemaType:"response",children:(0,t.jsx)(p.default,{label:"application/json",value:"application/json",children:(0,t.jsxs)(o.default,{className:"openapi-tabs__schema",children:[(0,t.jsx)(p.default,{label:"Schema",value:"Schema",children:(0,t.jsxs)(a,{style:{},className:"openapi-markdown__details response","data-collapsed":!1,open:!0,children:[(0,t.jsx)("summary",{style:{},className:"openapi-markdown__details-summary-response",children:(0,t.jsx)("strong",{children:(0,t.jsx)(s.p,{children:"Schema"})})}),(0,t.jsx)("div",{style:{textAlign:"left",marginLeft:"1rem"}}),(0,t.jsxs)("ul",{style:{marginLeft:"1rem"},children:[(0,t.jsx)(d.Z,{collapsible:!1,name:"objectId",required:!1,schemaName:"number",qualifierMessage:void 0,schema:{type:"number"}}),(0,t.jsx)(d.Z,{collapsible:!1,name:"url",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",example:"https://exampleurl.com"}})]})]})}),(0,t.jsx)(p.default,{label:"Example (from schema)",value:"Example (from schema)",children:(0,t.jsx)(c.Z,{responseExample:'{\n "objectId": 0,\n "url": "https://exampleurl.com"\n}',language:"json"})})]})})})})]}),(0,t.jsxs)(p.default,{label:"405",value:"405",children:[(0,t.jsx)("div",{children:(0,t.jsx)(s.p,{children:"Invalid API Token!"})}),(0,t.jsx)("div",{children:(0,t.jsx)(m.Z,{className:"openapi-tabs__mime",schemaType:"response",children:(0,t.jsx)(p.default,{label:"application/json",value:"application/json",children:(0,t.jsxs)(o.default,{className:"openapi-tabs__schema",children:[(0,t.jsx)(p.default,{label:"Schema",value:"Schema",children:(0,t.jsxs)(a,{style:{},className:"openapi-markdown__details response","data-collapsed":!1,open:!0,children:[(0,t.jsx)("summary",{style:{},className:"openapi-markdown__details-summary-response",children:(0,t.jsx)("strong",{children:(0,t.jsx)(s.p,{children:"Schema"})})}),(0,t.jsx)("div",{style:{textAlign:"left",marginLeft:"1rem"}}),(0,t.jsx)("ul",{style:{marginLeft:"1rem"},children:(0,t.jsx)(d.Z,{collapsible:!1,name:"error",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",example:"Invalid API token!"}})})]})}),(0,t.jsx)(p.default,{label:"Example (from schema)",value:"Example (from schema)",children:(0,t.jsx)(c.Z,{responseExample:'{\n "error": "Invalid API token!"\n}',language:"json"})})]})})})})]})]})})})]})}function v(e={}){const{wrapper:s}={...(0,r.a)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(b,{...e})}):b(e)}}}]); |