mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-12 20:57:40 +02:00
1 line
10 KiB
JavaScript
1 line
10 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:()=>v,frontMatter:()=>u,metadata:()=>j,toc:()=>b});var t=a(85893),i=a(11151),l=a(58219),r=(a(62316),a(51039)),n=a.n(r),d=(a(82723),a(9487)),c=a(41429),m=a(5397),o=a(4667),p=a(9472),h=a(85162);const u={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 and **url** to edit template.",sidebar_label:"Create template",hide_title:!0,hide_table_of_contents:!0,api:"eJztVktvGzcQ/ivsnGJh9XCSXvZU1w0Co4FtVA56sA2D2h1pJ+aSNDmrRwT992K4kryy7DaHHHvSat7z8Zsh18B6FiG/hRusvdGMEe4zKDEWgTyTs5DDTYVqp1bnAbXI1dn1hdLGuEVUTcQQFTtViBJV0UR2NX3XE4OKd4EztaioqFTEMEelo5qYBn0gy1FNXVAztBg0k52p0hVNjaJYEFfKByxxShZLFTk0BTcB40B99c6q2BQFxjhtzD5TWwY5mymuMBUakJtgo9KqsfTUoOr1dtYXZa+nuNKsCm3VBKWbUprZ1oOdaiZadM6muNFjQVMS411ibUvV6zXBSEinsCTeKweQgfOpQ2cvSsihRWunhwy8DrpGxiAnsgara4Qcln3tqc/uES1kQHIiFeoSA2QQ8KmhgCXkHBrMIPLKiE+k2hsJiUtvXImQT7WJYlBUWGvI18Arnyw5kJ3BRkx1csqlTBtpZgfL5XIJm/s2D0b+3ZUr8S2cZbQsn3VjmLwOPJy6UPdLzSn6UR43+YYFS5NBUGDCKNopScaX1WQgwTRDDhOyOqykvssExyuF/9Fl6yv6S8evO45pZhPYe50OQa8EZcY6vuKz2WTAxAmlw+N7mAg2yeDwUJIgemdj2/H70Uh+XozYAXWF53tam9UvkHUR194bKhKNht9i2/OPwt2KhX17S9vUEwwCRxPMa0fxzIuK2cd8ONxKmmAGhauhCwpZQxYfdh0/vB+NHj4KLJsMPo5+Pe78ws61oTJN6Y1w/Cd2iyG48O8tddNzm15KXdYJiu0EUmvUjuBBs11522SNXDmZbu9iqkhzBTkMj4Y9rcHtpCfk9/BG1jOys772frAbRaMnUcAeak/D+WkayohFE4hXY4Gj7bi7Kzqs9vQnCq3/c6NIB2SnLjlvu7zyaGVSEkbzUzi+Higqikm9W5XtFSFb/YX34QoVpcg/DE5367Q96oG6s3d27Oq0jmW5G7KPMb+zfXV7NZ1SQdqov3ESifH+3Q65xWJxhNhJ8vlMXDUTFdC7Z/NZEiZYu177PyeQAWOo49V0jGFOxW4I3kg1TMbDLYF1kQiMtSY53a3ot5dOQihDBdqIHcqdfb7+oj4MRpB1yPEDJQ+/XJx/uhx/kqhCr/aITgejwUhEQspa206i8/bK7hCzPFyn+1n8/x3w094B27lkXPLQG022s37bhXH78nVwn0ElGyW/hfVa8n8NZrMR8VODYQX57X0Gcx1IwJZ/m2w31LJhSoqiKPcPgTdP+d1f2+vrRL1V6SOujrbIXJtGLGGTrbcG523M/o3EeLZ47cXw7HRWFOi5Y350Acjq22/Z66vxDWQw2T5M6vTWSa+HFDd7/hRINpt/AGl+1Hs=",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 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 **templateId** 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:"eJztVktvGzcQ/ivsnGJh9XCSXvZU1w0Co4FtVA56sA2D2h1pJ+aSNDmrRwT992K4kryy7DaHHHvSat7z8Zsh18B6FiG/hRusvdGMEe4zKDEWgTyTs5DDTYVqp1bnAbXI1dn1hdLGuEVUTcQQFTtViBJV0UR2NX3XE4OKd4EztaioqFTEMEelo5qYBn0gy1FNXVAztBg0k52p0hVNjaJYEFfKByxxShZLFTk0BTcB40B99c6q2BQFxjhtzD5TWwY5mymuMBUakJtgo9KqsfTUoOr1dtYXZa+nuNKsCm3VBKWbUprZ1oOdaiZadM6muNFjQVMS411ibUvV6zXBSEinsCTeKweQgfOpQ2cvSsihRWunhwy8DrpGxiAnsgara4Qcln3tqc/uES1kQHIiFeoSA2QQ8KmhgCXkHBrMIPLKiE+k2hsJiUtvXImQT7WJYlBUWGvI18Arnyw5kJ3BRkx1csqlTBtpZgfL5XIJm/s2D0b+3ZUr8S2cZbQsn3VjmLwOPJy6UPdLzSn6UR43+YYFS5NBUGDCKNopScaX1WQgwTRDDhOyOqykvssExyuF/9Fl6yv6S8evO45pZhPYe50OQa8EZcY6vuKz2WTAxAmlw+N7mAg2yeDwUJIgemdj2/H70Uh+XozYAXWF53tam9UvkHUR194bKhKNht9i2/OPwt2KhX17S9vUEwwCRxPMa0fxzIuK2cd8ONxKmmAGhauhCwpZQxYfdh0/vB+NHj4KLJsMPo5+Pe78ws61oTJN6Y1w/Cd2iyG48O8tddNzm15KXdYJiu0EUmvUjuBBs11522SNXDmZbu9iqkhzBTkMj4Y9rcHtpCfk9/BG1jOys772frAbRaMnUcAeak/D+WkayohFE4hXY4Gj7bi7Kzqs9vQnCq3/c6NIB2SnLjlvu7zyaGVSEkbzUzi+Higqikm9W5XtFSFb/YX34QoVpcg/DE5367Q96oG6s3d27Oq0jmW5G7KPMb+zfXV7NZ1SQdqov3ESifH+3Q65xWJxhNhJ8vlMXDUTFdC7Z/NZEiZYu177PyeQAWOo49V0jGFOxW4I3kg1TMbDLYF1kQiMtSY53a3ot5dOQihDBdqIHcqdfb7+oj4MRpB1yPEDJQ+/XJx/uhx/kqhCr/aITgejwUhEQspa206i8/bK7hCzPFyn+1n8/x3w094B27lkXPLQG022s37bhXH78nVwn0ElGyW/hfVa8n8NZrMR8VODYQX57X0Gcx1IwJZ/m2w31LJhSoqiKPcPgTdP+d1f2+vrRL1V6SOujrbIXJtGLGGTrbcG523M/o3EeLZ47cXw7HRWFOi5Y350Acjq22/Z66vxDWQw2T5M6vTWSa+HFDd7/hRINpt/AGl+1Hs=",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,i.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:"templateId"})," 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.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)(d.Z,{className:"openapi-tabs__mime",children:(0,t.jsx)(h.default,{label:"multipart/form-data",value:"multipart/form-data-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)(o.Z,{collapsible:!1,name:"file",required:!1,schemaName:"binary",qualifierMessage:void 0,schema:{type:"string",format:"binary"}}),(0,t.jsx)(o.Z,{collapsible:!1,name:"Name",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string"}}),(0,t.jsx)(o.Z,{collapsible:!1,name:"Description",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string"}}),(0,t.jsx)(o.Z,{collapsible:!1,name:"Note",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string"}}),(0,t.jsx)(o.Z,{collapsible:!1,name:"Signers",required:!1,schemaName:"string[]",qualifierMessage:void 0,schema:{type:"array",items:{type:"string"}}})]})]})})}),"\n",(0,t.jsx)("div",{children:(0,t.jsx)("div",{children:(0,t.jsxs)(l.Z,{children:[(0,t.jsxs)(h.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)(d.Z,{className:"openapi-tabs__mime",schemaType:"response",children:(0,t.jsx)(h.default,{label:"application/json",value:"application/json",children:(0,t.jsxs)(p.default,{className:"openapi-tabs__schema",children:[(0,t.jsx)(h.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:"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)(h.default,{label:"Example (from schema)",value:"Example (from schema)",children:(0,t.jsx)(m.Z,{responseExample:'{\n "objectId": 0,\n "url": "https://exampleurl.com"\n}',language:"json"})})]})})})})]}),(0,t.jsxs)(h.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)(d.Z,{className:"openapi-tabs__mime",schemaType:"response",children:(0,t.jsx)(h.default,{label:"application/json",value:"application/json",children:(0,t.jsxs)(p.default,{className:"openapi-tabs__schema",children:[(0,t.jsx)(h.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)(o.Z,{collapsible:!1,name:"error",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",example:"Invalid API token!"}})})]})}),(0,t.jsx)(h.default,{label:"Example (from schema)",value:"Example (from schema)",children:(0,t.jsx)(m.Z,{responseExample:'{\n "error": "Invalid API token!"\n}',language:"json"})})]})})})})]})]})})})]})}function v(e={}){const{wrapper:s}={...(0,i.a)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(f,{...e})}):f(e)}}}]); |