mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-07 02:07:40 +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:()=>b,frontMatter:()=>h,metadata:()=>x,toc:()=>j});var i=a(85893),t=a(11151),r=a(58219),l=(a(62316),a(51039)),n=a.n(l),c=(a(82723),a(9487)),m=(a(41429),a(5397)),o=a(4667),p=a(9472),d=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 .",sidebar_label:"Create Template",hide_title:!0,hide_table_of_contents:!0,api:"eJztV21v2zYQ/ivcfVoNxW9xXyAMQ9+7oMUSLCn2wTECijpZTCSSJak4nqH/Phxl2bKTNnXRb9uXRD7eHe+Ox+c5rsDzuYN4ChdYmoJ7dDCLIEUnrDReagUxXOTI2mX2xiInOXt1dsJ4UeiFY5VD65jXTNAiMlE5r0v5D08KZL51HLFFLkXOHNpbZNyxpKjQWKm8Y5m2bI4KLfdSzVmqRVUiLSykz5mxmGImFabMeVsJX1l0ffbZaMVcJQQ6l1XFZqcmDKlVxHyOIVCLvrLKMc4qJb9UyHq9VvtKpr0e8zn3THDFEqR0UspmHRB2wkk4rWkVHDuDQmaSlNud++xSXape77MpNE/ZUlfMpBmTik1TTKo5O3v7fvZr7r1x8WDgPJ9LNT/ixvS1QeXkXBU8cX2hywE5KLMByUoprObGDIIPk2ZPWI4Wg3uKObV8wRYynaN3jKuUCW2WTOgjbWWquMeIGT5HpqoyQct0RuGXfcYLpzdOgg3l92xCGmdv3/d6lwoi0CYci1YnKcTQHHGbMERg8UuFzr/W6RLiFQitPCpPn9yYQopgOrh21EorcCLHktOXXxqEGHRyjcJDBMbSRl6io9VMFtjRct5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PwCIkjWr7tSp2Rj+YJefnwBMVzCJYRXInlo3hQ8zIsFV/MqQCs0folpeOXzXZq6CTS1/uigM1fLTpS7/NWkQn8psQcNfqOW/ojL3zfqzcpXDda1bbXpCGd1Xf8LTwfpAA==",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 .",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 .",sidebar_label:"Create Template",hide_title:!0,hide_table_of_contents:!0,api:"eJztV21v2zYQ/ivcfVoNxW9xXyAMQ9+7oMUSLCn2wTECijpZTCSSJak4nqH/Phxl2bKTNnXRb9uXRD7eHe+Ox+c5rsDzuYN4ChdYmoJ7dDCLIEUnrDReagUxXOTI2mX2xiInOXt1dsJ4UeiFY5VD65jXTNAiMlE5r0v5D08KZL51HLFFLkXOHNpbZNyxpKjQWKm8Y5m2bI4KLfdSzVmqRVUiLSykz5mxmGImFabMeVsJX1l0ffbZaMVcJQQ6l1XFZqcmDKlVxHyOIVCLvrLKMc4qJb9UyHq9VvtKpr0e8zn3THDFEqR0UspmHRB2wkk4rWkVHDuDQmaSlNud++xSXape77MpNE/ZUlfMpBmTik1TTKo5O3v7fvZr7r1x8WDgPJ9LNT/ixvS1QeXkXBU8cX2hywE5KLMByUoprObGDIIPk2ZPWI4Wg3uKObV8wRYynaN3jKuUCW2WTOgjbWWquMeIGT5HpqoyQct0RuGXfcYLpzdOgg3l92xCGmdv3/d6lw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iyAnvoinsFqRz8+2qGsSf6nQEtnMIrjlVlKHBKqJWsgmDLvBJXVo04BHF7Q/qRdVg/57DFtHrcUrIdD4b+p2Ke3s9PwCIkjWr7tSp2Rj+YJefnwBMVzCJYRXInlo3hQ8zIsFV/MqQCs0folpeOXzXZq6CTS1/uigM1fLTpS7/NWkQn8psQcNfqOW/ojL3zfqzcpXDda1bbXpCGd1Xf8LTwfpAA==",sidebar_class_name:"post api-method",info_path:"docs/API-docs/opensign-api-v-1",custom_edit_url:null},sidebar:"apiSidebar",previous:{title:"Draft Template",permalink:"/docs/API-docs/drafttemplate"},next:{title:"Create Template from binary",permalink:"/docs/API-docs/createtemplatewithbinary"}},f={},j=[{value:"Request",id:"request",level:2}];function g(e){const s={a:"a",h2:"h2",p:"p",strong:"strong",...(0,t.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,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h1",{className:"openapi__heading",children:(0,i.jsx)(s.p,{children:"Create Template"})}),"\n",(0,i.jsx)(n(),{method:"post",path:"/createtemplate"}),"\n",(0,i.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,i.jsx)(s.strong,{children:"template_id"})," that can be used to generate documents based on the specified template ."]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsxs)(s.strong,{children:["Upload you pdf in ",(0,i.jsx)(s.a,{href:"https://staging-app.opensignlabs.com/loadmf/signmicroapp/debugpdf",children:"debug PDF"})," here you can draw widgets and copy co-oridnate, page number of them. also you can copy base64 of PDF"]})}),"\n",(0,i.jsx)(s.h2,{id:"request",children:"Request"}),"\n",(0,i.jsx)(c.Z,{className:"openapi-tabs__mime",children:(0,i.jsx)(d.default,{label:"application/json",value:"application/json-schema",children:(0,i.jsxs)(a,{style:{},className:"openapi-markdown__details mime","data-collapsed":!1,open:!0,children:[(0,i.jsxs)("summary",{style:{},className:"openapi-markdown__details-summary-mime",children:[(0,i.jsx)("h3",{className:"openapi-markdown__details-summary-header-body",children:(0,i.jsx)(s.p,{children:"Body"})}),(0,i.jsx)("strong",{className:"openapi-schema__required",children:(0,i.jsx)(s.p,{children:"required"})})]}),(0,i.jsx)("div",{style:{textAlign:"left",marginLeft:"1rem"}}),(0,i.jsxs)("ul",{style:{marginLeft:"1rem"},children:[(0,i.jsx)(o.Z,{collapsible:!1,name:"file",required:!1,schemaName:"base64",qualifierMessage:void 0,schema:{type:"string",format:"base64",example:"base64 encoded file"}}),(0,i.jsx)(o.Z,{collapsible:!1,name:"title",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"sample template"}}),(0,i.jsx)(o.Z,{collapsible:!1,name:"note",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"sample note"}}),(0,i.jsx)(o.Z,{collapsible:!1,name:"description",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"sample description"}}),(0,i.jsx)(o.Z,{collapsible:!0,className:"schemaItem",children:(0,i.jsxs)(a,{style:{},className:"openapi-markdown__details",children:[(0,i.jsx)("summary",{style:{},children:(0,i.jsxs)("span",{className:"openapi-schema__container",children:[(0,i.jsx)("strong",{className:"openapi-schema__property",children:(0,i.jsx)(s.p,{children:"signers"})}),(0,i.jsx)("span",{className:"openapi-schema__name",children:(0,i.jsx)(s.p,{children:"object[]"})})]})}),(0,i.jsxs)("div",{style:{marginLeft:"1rem"},children:[(0,i.jsx)("li",{children:(0,i.jsx)("div",{style:{fontSize:"var(--ifm-code-font-size)",opacity:"0.6",marginLeft:"-.5rem",paddingBottom:".5rem"},children:(0,i.jsx)(s.p,{children:"Array ["})})}),(0,i.jsx)(o.Z,{collapsible:!1,name:"role",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"ceo"}}),(0,i.jsx)(o.Z,{collapsible:!1,name:"email",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"joebee@exampl.com"}}),(0,i.jsx)(o.Z,{collapsible:!1,name:"name",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"joe bee"}}),(0,i.jsx)(o.Z,{collapsible:!1,name:"phone",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"123121312"}}),(0,i.jsx)(o.Z,{collapsible:!0,className:"schemaItem",children:(0,i.jsxs)(a,{style:{},className:"openapi-markdown__details",children:[(0,i.jsx)("summary",{style:{},children:(0,i.jsxs)("span",{className:"openapi-schema__container",children:[(0,i.jsx)("strong",{className:"openapi-schema__property",children:(0,i.jsx)(s.p,{children:"widgets"})}),(0,i.jsx)("span",{className:"openapi-schema__name",children:(0,i.jsx)(s.p,{children:"object[]"})})]})}),(0,i.jsxs)("div",{style:{marginLeft:"1rem"},children:[(0,i.jsx)("li",{children:(0,i.jsx)("div",{style:{fontSize:"var(--ifm-code-font-size)",opacity:"0.6",marginLeft:"-.5rem",paddingBottom:".5rem"},children:(0,i.jsx)(s.p,{children:"Array ["})})}),(0,i.jsx)(o.Z,{collapsible:!1,name:"type",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",format:"string",example:"stamp"}}),(0,i.jsx)(o.Z,{collapsible:!1,name:"page",required:!1,schemaName:"number",qualifierMessage:void 0,schema:{type:"number",format:"number",example:1}}),(0,i.jsx)(o.Z,{collapsible:!1,name:"x",required:!1,schemaName:"number",qualifierMessage:void 0,schema:{type:"number",format:"number",example:244}}),(0,i.jsx)(o.Z,{collapsible:!1,name:"y",required:!1,schemaName:"number",qualifierMessage:void 0,schema:{type:"number",format:"number",example:71}}),(0,i.jsx)(o.Z,{collapsible:!1,name:"w",required:!1,schemaName:"number",qualifierMessage:void 0,schema:{type:"number",format:"number",example:38}}),(0,i.jsx)(o.Z,{collapsible:!1,name:"h",required:!1,schemaName:"number",qualifierMessage:void 0,schema:{type:"number",format:"number",example:46}}),(0,i.jsx)("li",{children:(0,i.jsx)("div",{style:{fontSize:"var(--ifm-code-font-size)",opacity:"0.6",marginLeft:"-.5rem"},children:(0,i.jsx)(s.p,{children:"]"})})})]})]})}),(0,i.jsx)("li",{children:(0,i.jsx)("div",{style:{fontSize:"var(--ifm-code-font-size)",opacity:"0.6",marginLeft:"-.5rem"},children:(0,i.jsx)(s.p,{children:"]"})})})]})]})})]})]})})}),"\n",(0,i.jsx)("div",{children:(0,i.jsx)("div",{children:(0,i.jsxs)(r.Z,{children:[(0,i.jsxs)(d.default,{label:"200",value:"200",children:[(0,i.jsx)("div",{children:(0,i.jsx)(s.p,{children:"Template created successfully!"})}),(0,i.jsx)("div",{children:(0,i.jsx)(c.Z,{className:"openapi-tabs__mime",schemaType:"response",children:(0,i.jsx)(d.default,{label:"application/json",value:"application/json",children:(0,i.jsxs)(p.default,{className:"openapi-tabs__schema",children:[(0,i.jsx)(d.default,{label:"Schema",value:"Schema",children:(0,i.jsxs)(a,{style:{},className:"openapi-markdown__details response","data-collapsed":!1,open:!0,children:[(0,i.jsx)("summary",{style:{},className:"openapi-markdown__details-summary-response",children:(0,i.jsx)("strong",{children:(0,i.jsx)(s.p,{children:"Schema"})})}),(0,i.jsx)("div",{style:{textAlign:"left",marginLeft:"1rem"}}),(0,i.jsxs)("ul",{style:{marginLeft:"1rem"},children:[(0,i.jsx)(o.Z,{collapsible:!1,name:"objectId",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",example:"Bh2Hspnmch"}}),(0,i.jsx)(o.Z,{collapsible:!1,name:"message",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",example:"Template created successfully!"}})]})]})}),(0,i.jsx)(d.default,{label:"Example (from schema)",value:"Example (from schema)",children:(0,i.jsx)(m.Z,{responseExample:'{\n "objectId": "Bh2Hspnmch",\n "message": "Template created successfully!"\n}',language:"json"})})]})})})})]}),(0,i.jsxs)(d.default,{label:"405",value:"405",children:[(0,i.jsx)("div",{children:(0,i.jsx)(s.p,{children:"Invalid API Token!"})}),(0,i.jsx)("div",{children:(0,i.jsx)(c.Z,{className:"openapi-tabs__mime",schemaType:"response",children:(0,i.jsx)(d.default,{label:"application/json",value:"application/json",children:(0,i.jsxs)(p.default,{className:"openapi-tabs__schema",children:[(0,i.jsx)(d.default,{label:"Schema",value:"Schema",children:(0,i.jsxs)(a,{style:{},className:"openapi-markdown__details response","data-collapsed":!1,open:!0,children:[(0,i.jsx)("summary",{style:{},className:"openapi-markdown__details-summary-response",children:(0,i.jsx)("strong",{children:(0,i.jsx)(s.p,{children:"Schema"})})}),(0,i.jsx)("div",{style:{textAlign:"left",marginLeft:"1rem"}}),(0,i.jsx)("ul",{style:{marginLeft:"1rem"},children:(0,i.jsx)(o.Z,{collapsible:!1,name:"error",required:!1,schemaName:"string",qualifierMessage:void 0,schema:{type:"string",example:"Invalid API token!"}})})]})}),(0,i.jsx)(d.default,{label:"Example (from schema)",value:"Example (from schema)",children:(0,i.jsx)(m.Z,{responseExample:'{\n "error": "Invalid API token!"\n}',language:"json"})})]})})})})]})]})})})]})}function b(e={}){const{wrapper:s}={...(0,t.a)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(g,{...e})}):g(e)}}}]); |