Files
OpenSign/assets/js/bbdfc22d.0130c100.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:()=>f,contentTitle:()=>x,default:()=>y,frontMatter:()=>h,metadata:()=>j,toc:()=>g});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),o=a(5397),p=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/iveOs0gkwRm5rB9mll2hNAiQITRHiBCTnclbXDbxnbnMVH/91W5u5NOAgNIqz0tF5JyVflzPb6qrCCIqYfkFm6wsEoE9DDikKFPnbRBGg0J3OTI2mN24lCQnH27OmNCKTP3rPToPAuGpXSILC19MIX8KcYKWWgdczbPZZozj26GTHg2ViVaJ3XwbGIcm6JGJ4LUU5aZtCyQDuYy5Mw6zHAiNWbMB1emoXToe+yHNZr5Mk3R+0mp1jfVMKTRnIUcI1CHoXTaM8FKLZ9KZAcHrfZZdnDAQi4CS4VmY6TXZPSYBg920IwFnRkd/XqLqZxIUm5c9YCDsfERRp9lkEAdkPYcOFjhRIEBHQV9BVoUCAksDoWVh8E8ogYOkoKeo8jQAQeHT6V0mEESXIkcfFgqsvGysIpc4sIqkyEkE6E8KaQ5FgKSFYSljZrBST2FilRFNEoIpvZyqnuLxWIB1ai+B334w2RLsk2NDqgDfRTWKpnGR/UfPJXEav8SM37ANNALHYUgSPR0ehEfuAuFw8S4QoSuZIPNxw/rqBLwCxPe7eZKofDIHM4kzpnQGaMHs5BLv04p+f6zW+zvu2Jdcd2GqTj8uD5/r6s8BOuTfn9pSicLMcVeagryRaBjuaz9CefEsmt8Cw8Gv04LIVW04vBgct0RjDgsCkUumoJrnXKYO2FtW10VBxmw8M+B30Cly5pvzXXPO684BBnUlqiiKKgMHbXH+yK0ePBjcXQqFlfRzfadO43WuXr3pCJjh94a7esaPR4M6N8O6W2RCTHPmmjU8jfg/1aDpLF111q6LMax7dfvPh4MKg4Fei+mz/bAJkKvYK7fXarwOqpavJWjBlnFoXTq1zjaWm4kpaursOpkRWolNd63ebg/Hgzuf79v4L2q2GTx8+DLfuLO9EwomUXavyFG/S+T9Xnw5a3J6uIMNc79spa1Uj0ZtqLSldfRKDDkhoaONT5CFyGHBPp7MygO4GYAxVyuEyas7bWTQYmxp7T1hZX92VGcER7T0smwHFK86pB0R1eHoqz8C4mjXh1whJzScL0ZP9/bGLXjY28itAPhbRy/Q/HPs3ZD2i/wcIeG30K2G4rbYi16+cTEMDV5vLSoh4SYqmB2BPurl/RM+njcvqdev2hj2rHeXk/okOSfekftqlJXfY/d6Ts9NEVcdWhxUlI/+uROH7Lby8lEplIo9jeOvQw4+tAGZD6f79XGx2hzKkNejplDazbq0yiMBdS1Wn/5CBwCusJfToboZjJtieOFq/pRud/0skhjLyMFnTi+Fn3dNaKQK5mi9thpqm+nV+fsU28AvFP+b4DcPz87+X4x/E5eqYHqFB31Br0BiajtCqE7F53U63CnbLPtXWNNS//v2O/ZsRuSCbgIfauE1J2pVLPe7e7YH3HIiRaTW1it6IofTlUViZ9KdEtIbkccZsJJiid9q3jLUESTmfR0kK2X7BcT+eG62dc/speQPuJyjxJnQpWkCRVfNQontc/DG/Kx0dibXxuLb2mKNvxSd9SZE1eXwxvgMG42/iION3BiTr86xBwSuIM7iL9pyEOk+yhfgRJ6WsYRB7Vf+vsHohb7lQ==",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/iveOs0gkwRm5rB9mll2hNAiQITRHiBCTnclbXDbxnbnMVH/91W5u5NOAgNIqz0tF5JyVflzPb6qrCCIqYfkFm6wsEoE9DDikKFPnbRBGg0J3OTI2mN24lCQnH27OmNCKTP3rPToPAuGpXSILC19MIX8KcYKWWgdczbPZZozj26GTHg2ViVaJ3XwbGIcm6JGJ4LUU5aZtCyQDuYy5Mw6zHAiNWbMB1emoXToe+yHNZr5Mk3R+0mp1jfVMKTRnIUcI1CHoXTaM8FKLZ9KZAcHrfZZdnDAQi4CS4VmY6TXZPSYBg920IwFnRkd/XqLqZxIUm5c9YCDsfERRp9lkEAdkPYcOFjhRIEBHQV9BVoUCAksDoWVh8E8ogYOkoKeo8jQAQeHT6V0mEESXIkcfFgqsvGysIpc4sIqkyEkE6E8KaQ5FgKSFYSljZrBST2FilRFNEoIpvZyqnuLxWIB1ai+B334w2RLsk2NDqgDfRTWKpnGR/UfPJXEav8SM37ANNALHYUgSPR0ehEfuAuFw8S4QoSuZIPNxw/rqBLwCxPe7eZKofDIHM4kzpnQGaMHs5BLv04p+f6zW+zvu2Jdcd2GqTj8uD5/r6s8BOuTfn9pSicLMcVeagryRaBjuaz9CefEsmt8Cw8Gv04LIVW04vBgct0RjDgsCkUumoJrnXKYO2FtW10VBxmw8M+B30Cly5pvzXXPO684BBnUlqiiKKgMHbXH+yK0ePBjcXQqFlfRzfadO43WuXr3pCJjh94a7esaPR4M6N8O6W2RCTHPmmjU8jfg/1aDpLF111q6LMax7dfvPh4MKg4Fei+mz/bAJkKvYK7fXarwOqpavJWjBlnFoXTq1zjaWm4kpaursOpkRWolNd63ebg/Hgzuf79v4L2q2GTx8+DLfuLO9EwomUXavyFG/S+T9Xnw5a3J6uIMNc79spa1Uj0ZtqLSldfRKDDkhoaONT5CFyGHBPp7MygO4GYAxVyuEyas7bWTQYmxp7T1hZX92VGcER7T0smwHFK86pB0R1eHoqz8C4mjXh1whJzScL0ZP9/bGLXjY28itAPhbRy/Q/HPs3ZD2i/wcIeG30K2G4rbYi16+cTEMDV5vLSoh4SYqmB2BPurl/RM+njcvqdev2hj2rHeXk/okOSfekftqlJXfY/d6Ts9NEVcdWhxUlI/+uROH7Lby8lEplIo9jeOvQw4+tAGZD6f79XGx2hzKkNejplDazbq0yiMBdS1Wn/5CBwCusJfToboZjJtieOFq/pRud/0skhjLyMFnTi+Fn3dNaKQK5mi9thpqm+nV+fsU28AvFP+b4DcPz87+X4x/E5eqYHqFB31Br0BiajtCqE7F53U63CnbLPtXWNNS//v2O/ZsRuSCbgIfauE1J2pVLPe7e7YH3HIiRaTW1it6IofTlUViZ9KdEtIbkccZsJJiid9q3jLUESTmfR0kK2X7BcT+eG62dc/speQPuJyjxJnQpWkCRVfNQontc/DG/Kx0dibXxuLb2mKNvxSd9SZE1eXwxvgMG42/iION3BiTr86xBwSuIM7iL9pyEOk+yhfgRJ6WsYRB7Vf+vsHohb7lQ==",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"}},f={},g=[{value:"Request",id:"request",level:2}];function b(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)(p.Z,{collapsible:!1,name:"Name",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"sample template"}}),(0,t.jsx)(p.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)(p.Z,{collapsible:!1,name:"Description",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"template description"}}),(0,t.jsx)(p.Z,{collapsible:!1,name:"URL",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"https://yourimage.com"}}),(0,t.jsx)(p.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)(p.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)(p.Z,{collapsible:!1,name:"code",required:!1,schemaName:"number",qualifierMessage:void 0,schema:{type:"number",example:200}}),(0,t.jsx)(p.Z,{collapsible:!1,name:"message",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",example:"Template created successfully!"}}),(0,t.jsx)(p.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:"object"})})]})}),(0,t.jsxs)("div",{style:{marginLeft:"1rem"},children:[(0,t.jsx)(p.Z,{collapsible:!1,name:"objectId",required:!1,schemaName:"number",qualifierMessage:void 0,schema:{type:"number"}}),(0,t.jsx)(p.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)(o.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)(p.Z,{collapsible:!1,name:"code",required:!1,schemaName:"number",qualifierMessage:void 0,schema:{type:"number",example:405}}),(0,t.jsx)(p.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)(o.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)(b,{...e})}):b(e)}}}]);