Files
OpenSign/assets/js/bbdfc22d.dc75f692.js
T

1 line
12 KiB
JavaScript

"use strict";(self.webpackChunkOpenSign_Docs=self.webpackChunkOpenSign_Docs||[]).push([[1531],{60877:(e,s,a)=>{a.r(s),a.d(s,{assets:()=>g,contentTitle:()=>x,default:()=>y,frontMatter:()=>h,metadata:()=>j,toc:()=>b});var t=a(85893),l=a(11151),i=a(58219),n=(a(62316),a(51039)),r=a.n(n),m=(a(82723),a(9487)),c=a(41429),p=a(5397),o=a(4667),d=a(9472),u=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 **templateId** that can be used to generate documents based on the specified template.",sidebar_label:"Create template",hide_title:!0,hide_table_of_contents:!0,api:"eJztV0tPIzkQ/iveOg3IJIGZOWyfhmURQjsaEGG0B4hGTnclbXDbxnbnMVH/91W5u5NOAgNIqz0tF5JyVflzPb6qrCCIqYfkDm6xsEoE9DDikKFPnbRBGg0J3ObI2mN25lCQnJ1eXzKhlJl7Vnp0ngXDUjpElpY+mEL+FGOFLLSOOZvnMs2ZRzdDJjwbqxKtkzp4NjGOTVGjE0HqKctMWhZIB3MZcmYdZjiRGjPmgyvTUDr0PfbdGs18mabo/aRU65tqGNJozkKOEajDUDrtmWCllk8lssPDVvsyOzxkIReBpUKzMdJrMnpMgwc7aMaCzoyOfr3FVE4kKTeuesDB2PgIoy8zSKAOSHsOHKxwosCAjoK+Ai0KhAQWR8LKo2AeUQMHSUHPUWTogIPDp1I6zCAJrkQOPiwV2XhZWEUucWGVyRCSiVCeFNIcCwHJCsLSRs3gpJ5CRaoiGiUEU3s51b3FYrGAalTfgz78YbIl2aZGB9SBPgprlUzjo/oPnkpitX+JGT9gGuiFjkIQJHo6/RYfuAuFw8S4QoSuZIPNxw/rqBLwbya82821QuGROZxJnDOhM0YPZiGXfp1S8v1nt9jfd8W64roNU3H4fvP1va7yEKxP+v2lKZ0sxBR7qSnIF4GO5bL2J5wTy67xHTwY/DIthFTRisODyXVHMOKwKBS5aAqudcph7oS1bXVVHGTAwj8HfgOVLmu+Ndc977ziEGRQW6KKoqAydNQe74vQ4sGPxfGFWFxHN9t37jRa5+rdk4qMHXprtK9r9GQwoH87pLdFJsQ8a6JRy9+A/1sNksbWXWvpshjHtl+/+2QwqDgU6L2YPtsDmwi9grl+d6nC66hq8VaOGmQVh9KpX+Noa7mRlK6uwpey1sK+aZKyn719jY6K1Epq/NGm9MfJYPDj9ybPnwaf91N7qWdCySwOhlvi3P8ynZ8Gn9+azi7OUOPcD6GslerZsRWVrryORoEhNzSWrPERugg5JNDfm1JxRDcjKmZ7nVJhba+dHUqMPSW2L6zsz47jFPGYlk6G5ZDiVYekO9w6JGblX0gs9uoIJOSUhpvNgDpvY9QOmL2Z0Y6Mt02BnSHwPK83tP4CU3eI+i10vCHBLV6jl09MDFOTxyuLekiIqQpmx7C/nEnPpI/H7XvqBY12qh3r7QWGDkn+sXfcLjN11ffYvb7XQ1PEZYhWKyX1o0/u9RG7u5pMZCqFYn/j2MuAow9tQObz+V5tHESbCxnycswcWrNRn0ZhLKCu1frLAXAI6Ap/NRmim8m0pZYXrupH5X7TyyKNvYwUdOKRWvRl14hCrmSKRCqbpjq9uP7KPvYGwDvl/wbI/a+XZ+ffhufklRqoTtFxb9AbkIjarhC6c9FZvTB3yjbb3kbWtPT/Fv6eLbwhmYCL0LdKSN2ZWzXr3e0uBiMOOdFicgerFV3x3amqIvFTiW4Jyd2Iw0w4SfGkbxVvGYpoMpOeDrL1Gv5iIj/cNBv9AXsJ6SMu9yhxJlRJmlDxVaNwVvs8uiUfG429+bWxOE1TtOGXuqPOnLi+Gt4Ch3Hzm6CIww2cmNPvEjGHBO7hHuKvHvIQ6T7KV6CEnpZxxEHtl/7+AVe8CCQ=",sidebar_class_name:"post api-method",info_path:"docs/API-docs/opensign-api-v-1",custom_edit_url:null},x=void 0,j={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 **templateId** that can be used to generate documents based on the specified 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 **templateId** that can be used to generate documents based on the specified template.",sidebar_label:"Create template",hide_title:!0,hide_table_of_contents:!0,api:"eJztV0tPIzkQ/iveOg3IJIGZOWyfhmURQjsaEGG0B4hGTnclbXDbxnbnMVH/91W5u5NOAgNIqz0tF5JyVflzPb6qrCCIqYfkDm6xsEoE9DDikKFPnbRBGg0J3ObI2mN25lCQnJ1eXzKhlJl7Vnp0ngXDUjpElpY+mEL+FGOFLLSOOZvnMs2ZRzdDJjwbqxKtkzp4NjGOTVGjE0HqKctMWhZIB3MZcmYdZjiRGjPmgyvTUDr0PfbdGs18mabo/aRU65tqGNJozkKOEajDUDrtmWCllk8lssPDVvsyOzxkIReBpUKzMdJrMnpMgwc7aMaCzoyOfr3FVE4kKTeuesDB2PgIoy8zSKAOSHsOHKxwosCAjoK+Ai0KhAQWR8LKo2AeUQMHSUHPUWTogIPDp1I6zCAJrkQOPiwV2XhZWEUucWGVyRCSiVCeFNIcCwHJCsLSRs3gpJ5CRaoiGiUEU3s51b3FYrGAalTfgz78YbIl2aZGB9SBPgprlUzjo/oPnkpitX+JGT9gGuiFjkIQJHo6/RYfuAuFw8S4QoSuZIPNxw/rqBLwbya82821QuGROZxJnDOhM0YPZiGXfp1S8v1nt9jfd8W64roNU3H4fvP1va7yEKxP+v2lKZ0sxBR7qSnIF4GO5bL2J5wTy67xHTwY/DIthFTRisODyXVHMOKwKBS5aAqudcph7oS1bXVVHGTAwj8HfgOVLmu+Ndc977ziEGRQW6KKoqAydNQe74vQ4sGPxfGFWFxHN9t37jRa5+rdk4qMHXprtK9r9GQwoH87pLdFJsQ8a6JRy9+A/1sNksbWXWvpshjHtl+/+2QwqDgU6L2YPtsDmwi9grl+d6nC66hq8VaOGmQVh9KpX+Noa7mRlK6uwpey1sK+aZKyn719jY6K1Epq/NGm9MfJYPDj9ybPnwaf91N7qWdCySwOhlvi3P8ynZ8Gn9+azi7OUOPcD6GslerZsRWVrryORoEhNzSWrPERugg5JNDfm1JxRDcjKmZ7nVJhba+dHUqMPSW2L6zsz47jFPGYlk6G5ZDiVYekO9w6JGblX0gs9uoIJOSUhpvNgDpvY9QOmL2Z0Y6Mt02BnSHwPK83tP4CU3eI+i10vCHBLV6jl09MDFOTxyuLekiIqQpmx7C/nEnPpI/H7XvqBY12qh3r7QWGDkn+sXfcLjN11ffYvb7XQ1PEZYhWKyX1o0/u9RG7u5pMZCqFYn/j2MuAow9tQObz+V5tHESbCxnycswcWrNRn0ZhLKCu1frLAXAI6Ap/NRmim8m0pZYXrupH5X7TyyKNvYwUdOKRWvRl14hCrmSKRCqbpjq9uP7KPvYGwDvl/wbI/a+XZ+ffhufklRqoTtFxb9AbkIjarhC6c9FZvTB3yjbb3kbWtPT/Fv6eLbwhmYCL0LdKSN2ZWzXr3e0uBiMOOdFicgerFV3x3amqIvFTiW4Jyd2Iw0w4SfGkbxVvGYpoMpOeDrL1Gv5iIj/cNBv9AXsJ6SMu9yhxJlRJmlDxVaNwVvs8uiUfG429+bWxOE1TtOGXuqPOnLi+Gt4Ch3Hzm6CIww2cmNPvEjGHBO7hHuKvHvIQ6T7KV6CEnpZxxEHtl/7+AVe8CCQ=",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 by doctype",permalink:"/docs/API-docs/getdocumentlist"},next:{title:"Get template by ID",permalink:"/docs/API-docs/get-template"}},g={},b=[{value:"Request",id:"request",level:2}];function f(e){const s={h2:"h2",p:"p",strong:"strong",...(0,l.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)(r(),{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:"templateId"})," that can be used to generate documents based on the specified template."]}),"\n",(0,t.jsx)(s.h2,{id:"request",children:"Request"}),"\n",(0,t.jsxs)(a,{style:{marginBottom:"1rem"},className:"openapi-markdown__details","data-collapsed":!1,open:!0,children:[(0,t.jsx)("summary",{style:{},children:(0,t.jsx)("h3",{className:"openapi-markdown__details-summary-header-params",children:(0,t.jsx)(s.p,{children:"Header Parameters"})})}),(0,t.jsx)("div",{children:(0,t.jsx)("ul",{children:(0,t.jsx)(c.Z,{className:"paramsItem",param:{name:"x-api-token",in:"header",required:!0,style:"simple",explode:!1,schema:{type:"string"},example:"opensign.xxxx"}})})})]}),"\n",(0,t.jsx)(m.Z,{className:"openapi-tabs__mime",children:(0,t.jsx)(u.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.jsx)("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)("div",{style:{textAlign:"left",marginLeft:"1rem"}}),(0,t.jsxs)("ul",{style:{marginLeft:"1rem"},children:[(0,t.jsx)(o.Z,{collapsible:!1,name:"Name",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"sample template"}}),(0,t.jsx)(o.Z,{collapsible:!1,name:"Note",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"Please review and sign this document"}}),(0,t.jsx)(o.Z,{collapsible:!1,name:"Description",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"template description"}}),(0,t.jsx)(o.Z,{collapsible:!1,name:"URL",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"https://yourimage.com"}}),(0,t.jsx)(o.Z,{collapsible:!1,name:"signers",required:!1,schemaName:"signers[]",qualifierMessage:void 0,schema:{type:"array",example:["joe@gmail.com","john@gmail.com"],xml:{name:"signers",wrapped:!0},items:{type:"string",example:"joe@example.com",xml:{name:"signers"},title:"signers"}}}),(0,t.jsx)(o.Z,{collapsible:!1,name:"folderId",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"xjsba1GaxP"}})]})]})})}),"\n",(0,t.jsx)("div",{children:(0,t.jsx)("div",{children:(0,t.jsxs)(i.Z,{children:[(0,t.jsxs)(u.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)(u.default,{label:"application/json",value:"application/json",children:(0,t.jsxs)(d.default,{className:"openapi-tabs__schema",children:[(0,t.jsx)(u.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)(o.Z,{collapsible:!1,name:"code",required:!1,schemaName:"number",qualifierMessage:void 0,schema:{type:"number",example:200}}),(0,t.jsx)(o.Z,{collapsible:!1,name:"message",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",example:"Template created successfully!"}}),(0,t.jsx)(o.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:"result"})}),(0,t.jsx)("span",{className:"openapi-schema__name",children:(0,t.jsx)(s.p,{children:"createTemplateResponse"})})]})}),(0,t.jsxs)("div",{style:{marginLeft:"1rem"},children:[(0,t.jsx)(o.Z,{collapsible:!1,name:"objectId",required:!1,schemaName:"number",qualifierMessage:void 0,schema:{type:"number"}}),(0,t.jsx)(o.Z,{collapsible:!1,name:"url",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",example:"https://exampleurl.com"}})]})]})})]})]})}),(0,t.jsx)(u.default,{label:"Example (from schema)",value:"Example (from schema)",children:(0,t.jsx)(p.Z,{responseExample:'{\n "code": 200,\n "message": "Template created successfully!",\n "result": {\n "objectId": 0,\n "url": "https://exampleurl.com"\n }\n}',language:"json"})})]})})})})]}),(0,t.jsxs)(u.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)(u.default,{label:"application/json",value:"application/json",children:(0,t.jsxs)(d.default,{className:"openapi-tabs__schema",children:[(0,t.jsx)(u.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)(o.Z,{collapsible:!1,name:"code",required:!1,schemaName:"number",qualifierMessage:void 0,schema:{type:"number",example:405}}),(0,t.jsx)(o.Z,{collapsible:!1,name:"message",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",example:"Invalid API token!"}})]})]})}),(0,t.jsx)(u.default,{label:"Example (from schema)",value:"Example (from schema)",children:(0,t.jsx)(p.Z,{responseExample:'{\n "code": 405,\n "message": "Invalid API token!"\n}',language:"json"})})]})})})})]})]})})})]})}function y(e={}){const{wrapper:s}={...(0,l.a)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(f,{...e})}):f(e)}}}]);