Files
OpenSign/assets/js/bbdfc22d.5761ff15.js
T

1 line
10 KiB
JavaScript

"use strict";(self.webpackChunkOpenSign_Docs=self.webpackChunkOpenSign_Docs||[]).push([[1531],{60877:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>j,contentTitle:()=>g,default:()=>Z,frontMatter:()=>h,metadata:()=>x,toc:()=>f});var a=t(85893),l=t(11151),i=t(58219),r=(t(62316),t(51039)),n=t.n(r),o=(t(82723),t(9487)),c=t(41429),m=t(5397),d=t(4667),p=t(9472),u=t(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:"eJztVs1T6zYQ/1f09l0ejElCX3vx6VHKMEwZYAhMDyEHRd7EAlkSkpyPl/H/3lnZTpwEWpjpsVyI93tXu7/dNQQ+85CO4AELq3hAD+MEMvTCSRuk0ZDCQ46sZbNzh5zo7OzuinGlzMKz0qPzLBgmiIlMlD6YQv7kE4UstIYTtsilyJlHN0fGPZuoEq2TOng2NY7NUKPjQeoZy4woCyTGQoacWYcZTqXGjPngShFKh77HHq3RzJdCoPfTUm081WFIoxMWcoyBOgyl055xVmr5WiI7Pm6lr7LjYxZyHpjgmk2QsskomSYe7EQz4cQzOtr1FoWcShJuTPUgAWNjEkZfZZBCXZCWDwlY7niBAR0VfQ2aFwgpLE+4lSfBvKCGBCQVPUeeoYMEHL6W0mEGaXAlJuDDSpGOl4VVZBKXVpkMIZ1y5UlA5FhwSNcQVjZKBif1DCoS5VEppTC1lzPdWy6XS6jGtR/04XeTrUhXGB1QB/rJrVVSxKT6z55aYn3oxEyeUQTK0FEJgkRP3JuY4H4oCUyNK3joUrax+fhjU1UK/MaET5u5U8g9ModziQvGdcYoYRZy6TdPSrb/6Db751xsOq47MFUCj/fXnzWVh2B92u+vTOlkwWfYE6YgWxR0bJeNPe4cX3WVR/Bs8Mes4FJFrQSeTa47hHECy0KRiabhWqMJLBy3tu2uKgEZsPBvBb8NlZw1X427t41XCQQZ1A6poiqoDB2Nx+cqtHz2E356yZd30cyuz71B67je51Sk7NBbo33do78MBvRvD/R2wISQZwM0avUFkv9qQEQc3Y2ULotJHPtNJRoKZRRF3hjrAr3ns7d4B3X6+jXDKS9VOCxRm/F9U5umVL8OfjuszpWecyWziK0PBFtfoq8CQ24I96zxMVUeckihfwCDcQc0GFg61el/bm2vBSfFJ546rM+t7M9PI0x5FKWTYTWk+tYl7KJnZ0qs/BNpTP4VYylyerb7LQJetF3XItgBKLWY9DGY2UOZt4GjwY13oKCDBB+Z9+2U7QwOZT41sUzN499a1EOKmN5yfgqH2196Jn1kt/nUFwAt7T3t3Q1JTKJ/752227Kekh570k96aIq4bWl3K6lffPqkT9jodjqVQnLF/sKJlwHH39qCLBaLg944ijqXMuTlhDm0Zis+i8TYQF2tzccRJBDQFf52OkQ3l6LF4Xdc9aNwv5l9LuLsIxWdZqgm/dhXopIrKZAGajuGZ5d31+x7bwBJp/0/EHL/+ur84mZ4QVZpgOonOu0NegMi0dgVXHccndcXWadts911t4Gx/8+8z5x5DcgEXIa+VVzGtR+fct2g3mh/84wTyAkW0xGs1+Ti0amqIvJriW4F6WicwJw7SfWkryppEYpgMpOeGNnmznv3Ib/dNyfjEXsv0hdcHUDinKuSJKFK1o3AeW3z5IFsbCUO9t1W40wItOEfZcedPXF3O3yABCbN0VnEZQiOL+jw5QtI4QmeIJ7VZCHCfaSvQXE9K+PWg9ou/f0NxD93SA==",sidebar_class_name:"post api-method",info_path:"docs/API-docs/opensign-api-v-1",custom_edit_url:null},g=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 **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:"eJztVs1T6zYQ/1f09l0ejElCX3vx6VHKMEwZYAhMDyEHRd7EAlkSkpyPl/H/3lnZTpwEWpjpsVyI93tXu7/dNQQ+85CO4AELq3hAD+MEMvTCSRuk0ZDCQ46sZbNzh5zo7OzuinGlzMKz0qPzLBgmiIlMlD6YQv7kE4UstIYTtsilyJlHN0fGPZuoEq2TOng2NY7NUKPjQeoZy4woCyTGQoacWYcZTqXGjPngShFKh77HHq3RzJdCoPfTUm081WFIoxMWcoyBOgyl055xVmr5WiI7Pm6lr7LjYxZyHpjgmk2QsskomSYe7EQz4cQzOtr1FoWcShJuTPUgAWNjEkZfZZBCXZCWDwlY7niBAR0VfQ2aFwgpLE+4lSfBvKCGBCQVPUeeoYMEHL6W0mEGaXAlJuDDSpGOl4VVZBKXVpkMIZ1y5UlA5FhwSNcQVjZKBif1DCoS5VEppTC1lzPdWy6XS6jGtR/04XeTrUhXGB1QB/rJrVVSxKT6z55aYn3oxEyeUQTK0FEJgkRP3JuY4H4oCUyNK3joUrax+fhjU1UK/MaET5u5U8g9ModziQvGdcYoYRZy6TdPSrb/6Db751xsOq47MFUCj/fXnzWVh2B92u+vTOlkwWfYE6YgWxR0bJeNPe4cX3WVR/Bs8Mes4FJFrQSeTa47hHECy0KRiabhWqMJLBy3tu2uKgEZsPBvBb8NlZw1X427t41XCQQZ1A6poiqoDB2Nx+cqtHz2E356yZd30cyuz71B67je51Sk7NBbo33do78MBvRvD/R2wISQZwM0avUFkv9qQEQc3Y2ULotJHPtNJRoKZRRF3hjrAr3ns7d4B3X6+jXDKS9VOCxRm/F9U5umVL8OfjuszpWecyWziK0PBFtfoq8CQ24I96zxMVUeckihfwCDcQc0GFg61el/bm2vBSfFJ546rM+t7M9PI0x5FKWTYTWk+tYl7KJnZ0qs/BNpTP4VYylyerb7LQJetF3XItgBKLWY9DGY2UOZt4GjwY13oKCDBB+Z9+2U7QwOZT41sUzN499a1EOKmN5yfgqH2196Jn1kt/nUFwAt7T3t3Q1JTKJ/752227Kekh570k96aIq4bWl3K6lffPqkT9jodjqVQnLF/sKJlwHH39qCLBaLg944ijqXMuTlhDm0Zis+i8TYQF2tzccRJBDQFf52OkQ3l6LF4Xdc9aNwv5l9LuLsIxWdZqgm/dhXopIrKZAGajuGZ5d31+x7bwBJp/0/EHL/+ur84mZ4QVZpgOonOu0NegMi0dgVXHccndcXWadts911t4Gx/8+8z5x5DcgEXIa+VVzGtR+fct2g3mh/84wTyAkW0xGs1+Ti0amqIvJriW4F6WicwJw7SfWkryppEYpgMpOeGNnmznv3Ib/dNyfjEXsv0hdcHUDinKuSJKFK1o3AeW3z5IFsbCUO9t1W40wItOEfZcedPXF3O3yABCbN0VnEZQiOL+jw5QtI4QmeIJ7VZCHCfaSvQXE9K+PWg9ou/f0NxD93SA==",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"}},j={},f=[{value:"Request",id:"request",level:2}];function y(e){const s={h2:"h2",p:"p",strong:"strong",...(0,l.a)(),...e.components},{Details:t}=s;return t||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,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"openapi__heading",children:(0,a.jsx)(s.p,{children:"Create template"})}),"\n",(0,a.jsx)(n(),{method:"post",path:"/createtemplate"}),"\n",(0,a.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,a.jsx)(s.strong,{children:"templateId"})," that can be used to generate documents based on the specified template."]}),"\n",(0,a.jsx)(s.h2,{id:"request",children:"Request"}),"\n",(0,a.jsxs)(t,{style:{marginBottom:"1rem"},className:"openapi-markdown__details","data-collapsed":!1,open:!0,children:[(0,a.jsx)("summary",{style:{},children:(0,a.jsx)("h3",{className:"openapi-markdown__details-summary-header-params",children:(0,a.jsx)(s.p,{children:"Header Parameters"})})}),(0,a.jsx)("div",{children:(0,a.jsx)("ul",{children:(0,a.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,a.jsx)(o.Z,{className:"openapi-tabs__mime",children:(0,a.jsx)(u.default,{label:"application/json",value:"application/json-schema",children:(0,a.jsxs)(t,{style:{},className:"openapi-markdown__details mime","data-collapsed":!1,open:!0,children:[(0,a.jsx)("summary",{style:{},className:"openapi-markdown__details-summary-mime",children:(0,a.jsx)("h3",{className:"openapi-markdown__details-summary-header-body",children:(0,a.jsx)(s.p,{children:"Body"})})}),(0,a.jsx)("div",{style:{textAlign:"left",marginLeft:"1rem"}}),(0,a.jsxs)("ul",{style:{marginLeft:"1rem"},children:[(0,a.jsx)(d.Z,{collapsible:!1,name:"Name",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"sample template"}}),(0,a.jsx)(d.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,a.jsx)(d.Z,{collapsible:!1,name:"Description",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"template description"}}),(0,a.jsx)(d.Z,{collapsible:!1,name:"URL",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"https://yourimage.com"}}),(0,a.jsx)(d.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,a.jsx)(d.Z,{collapsible:!1,name:"folderId",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"xjsba1GaxP"}})]})]})})}),"\n",(0,a.jsx)("div",{children:(0,a.jsx)("div",{children:(0,a.jsxs)(i.Z,{children:[(0,a.jsxs)(u.default,{label:"200",value:"200",children:[(0,a.jsx)("div",{children:(0,a.jsx)(s.p,{children:"Template created successfully!"})}),(0,a.jsx)("div",{children:(0,a.jsx)(o.Z,{className:"openapi-tabs__mime",schemaType:"response",children:(0,a.jsx)(u.default,{label:"application/json",value:"application/json",children:(0,a.jsxs)(p.default,{className:"openapi-tabs__schema",children:[(0,a.jsx)(u.default,{label:"Schema",value:"Schema",children:(0,a.jsxs)(t,{style:{},className:"openapi-markdown__details response","data-collapsed":!1,open:!0,children:[(0,a.jsx)("summary",{style:{},className:"openapi-markdown__details-summary-response",children:(0,a.jsx)("strong",{children:(0,a.jsx)(s.p,{children:"Schema"})})}),(0,a.jsx)("div",{style:{textAlign:"left",marginLeft:"1rem"}}),(0,a.jsxs)("ul",{style:{marginLeft:"1rem"},children:[(0,a.jsx)(d.Z,{collapsible:!1,name:"code",required:!1,schemaName:"number",qualifierMessage:void 0,schema:{type:"number",format:"number"}}),(0,a.jsx)(d.Z,{collapsible:!1,name:"type",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string"}}),(0,a.jsx)(d.Z,{collapsible:!1,name:"message",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string"}})]})]})}),(0,a.jsx)(u.default,{label:"Example (from schema)",value:"Example (from schema)",children:(0,a.jsx)(m.Z,{responseExample:'{\n "code": 0,\n "type": "string",\n "message": "string"\n}',language:"json"})})]})})})})]}),(0,a.jsxs)(u.default,{label:"405",value:"405",children:[(0,a.jsx)("div",{children:(0,a.jsx)(s.p,{children:"Invalid API Token!"})}),(0,a.jsx)("div",{})]})]})})})]})}function Z(e={}){const{wrapper:s}={...(0,l.a)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(y,{...e})}):y(e)}}}]);