Files
OpenSign/assets/js/28b19cd2.40bab2e5.js
T

1 line
14 KiB
JavaScript

"use strict";(self.webpackChunkOpenSign_Docs=self.webpackChunkOpenSign_Docs||[]).push([[5772],{98681:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>b,contentTitle:()=>y,default:()=>w,frontMatter:()=>g,metadata:()=>a,toc:()=>f});const a=JSON.parse('{"id":"API-docs/createdocumentwithtemplateid","title":"Create Document from Template","description":"The Create Document API allows you to generate new documents by just providing template_id instead of uploading a new file(in the form of base64 or binary) every time you need to create a document. Templates for repeatedly used files can be created from user interface at [**Debug UI**](https://app.opensignlabs.com/debugpdf) or using the Create Template API.","source":"@site/docs/API-docs/createdocumentwithtemplateid.api.mdx","sourceDirName":"API-docs","slug":"/API-docs/createdocumentwithtemplateid","permalink":"/docs/API-docs/createdocumentwithtemplateid","draft":false,"unlisted":false,"editUrl":null,"tags":[],"version":"current","frontMatter":{"id":"createdocumentwithtemplateid","title":"Create Document from Template","description":"The Create Document API allows you to generate new documents by just providing template_id instead of uploading a new file(in the form of base64 or binary) every time you need to create a document. Templates for repeatedly used files can be created from user interface at [**Debug UI**](https://app.opensignlabs.com/debugpdf) or using the Create Template API.","sidebar_label":"Create Document from Template","hide_title":true,"hide_table_of_contents":true,"api":"eJztWVtv3LYS/itTvjgJ5F07l/OwT02doMc4xbERO8iDbSwoaXZFmyJVXnatLvatv6Q/rb+kGFLSSnux3YOiLz1AkGSpmeFwbvxmuGKOzy2b3LBPOvMlKmfZXcJytJkRlRNasQm7LhDODHKH0FLBx8tz4FLqpYVae3Aa5qjQEI3CJeStNEhruPfWQWX0QuRCzcFhWUnucCpyEMo65DnoGfhKah4IeBAxExJfCQWuQJhpUxJNyi3+6z1oA6lQ3NSvARdoanCixKCHQsxJmSyqyztFRnDdbGtJGhisiCKXNXiLedjNQsYVpNhw5zAzuqTPBoRyaGY8Q+AObt68+YSpn8PX8zdv7l4VzlV2Mh7zqhrpCpUVcyV5akeZLsc5EVb57DUp7W04/8acr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9BLNzMtQJGcSHwXB1t15s0VeSrRW1mE6Ow+z51zMhSOk3mDWjFc8FVJQyhOZji1Sr2rYEXzbjJOOTBga4wIlVQqQWj8EaK2Be6fLsEd7XSy1eZiRSglwSGm4S3jRIrYsqAquMqqNMfYD1uIq9jWVERaBi5KICeXjbCYyEWCHVs7wzEHJFZ8H0JQA6U1WaC4HC0an1CRZLX1sA5yGEtHFI9Ik3I7gE7Vd4eChNURHbs9jB2CT2IE10U/HUDmkGKb1PHMiw9gkOW4cSBq1h1yP3b2XEirtYsdNqLHvWxLkDFc2TO5jW9q4pjNf06KEPXJej+BW3aorChZvkQJACvVgJ7fqGG66MPuGqRUON1P35XK5U3deD3l+FK7wKWFzveGbh8VQpfrs3Y/XLGEOTWkvZldoFiJr0cqBPceBeNzcTjzO6dpk45XYi/6lyFBZ7N0lH3+8/AkW8G50wpJepX2BwuOfzs8+//fqM8mluyDm3+noZHQSxsHaupKr3lbbTzoBufceAgaJ3JvI//896G98D2ouRWrQxpXkQvVwdsQGN1ttEEvYpP8EdJewgrDE5IatVmSwrzT3o+WfPRoCIncJW3Aj6DYJt2UzKsi7a+VgJLz60jRXr+HAa9Je/dubXtE1H/q8eB0+YL31frW+WyftdU+qRYqzqMDxNcnZSNjBgoRWIsfHLMPKPUnbB1+XF1fXLGHt2LgMz13M8CW9j/Fl1DaObuJzEK2tmORq7kMDwqJMQijck5f68OYhwJvmP3SqvfYY4p54DPqbDrWXYbWK0Gm97ujjp4McjWFbanLO3Xq9/gOU9bR0","sidebar_class_name":"post api-method","info_path":"docs/API-docs/opensign-api-v-1","custom_edit_url":null},"sidebar":"apiSidebar","previous":{"title":"Create Document","permalink":"/docs/API-docs/createdocument"},"next":{"title":"Get Document","permalink":"/docs/API-docs/getdocument"}}');var n=i(74848),s=i(28453),o=i(33617),r=i.n(o),l=i(17543),c=i.n(l),d=i(86013),p=i.n(d),m=i(63723),u=i.n(m),h=(i(18766),i(79329),i(9303));const g={id:"createdocumentwithtemplateid",title:"Create Document from Template",description:"The Create Document API allows you to generate new documents by just providing template_id instead of uploading a new file(in the form of base64 or binary) every time you need to create a document. Templates for repeatedly used files can be created from user interface at [**Debug UI**](https://app.opensignlabs.com/debugpdf) or using the Create Template API.",sidebar_label:"Create Document from Template",hide_title:!0,hide_table_of_contents:!0,api:"eJztWVtv3LYS/itTvjgJ5F07l/OwT02doMc4xbERO8iDbSwoaXZFmyJVXnatLvatv6Q/rb+kGFLSSnux3YOiLz1AkGSpmeFwbvxmuGKOzy2b3LBPOvMlKmfZXcJytJkRlRNasQm7LhDODHKH0FLBx8tz4FLqpYVae3Aa5qjQEI3CJeStNEhruPfWQWX0QuRCzcFhWUnucCpyEMo65DnoGfhKah4IeBAxExJfCQWuQJhpUxJNyi3+6z1oA6lQ3NSvARdoanCixKCHQsxJmSyqyztFRnDdbGtJGhisiCKXNXiLedjNQsYVpNhw5zAzuqTPBoRyaGY8Q+AObt68+YSpn8PX8zdv7l4VzlV2Mh7zqhrpCpUVcyV5akeZLsc5EVb57DUp7W04/8acrU5kztGtYgnTFRlRaHWeswlrFGnOsBSuaI0ncpawihteokNDHlwxxUtkE9azL0uYIA9W3BVs2606vcfMnQfjt4qwhBn82QuDOZs44zFh1tWSxFpRVpII8LGSOkc2mXFpiSArsORssmKurgKlM0LNWcLIbdz1V/CRBykTVv37NC2yt0WVsvX6Lm6L1v2g85pEZVo5VI7+y6tKiiwYZXxvSfVVb8+NujeMLE/GuEtaVeIZyVSGLOsE2sDeEG505sbwmszlsOyvHxBgNB1i98Sb833MMu2d4sqxdcKw5EI+aaJA0Bdwr/H75hdFEkmJDn5q13uNkCIScVVo9Qz16dt39OfdKVuvE+aEC6vDoOtF0/SqMRtRz7TM0VCUPrUDKWJR5dNtA6RaS+RqJyivC2Ghi+utEmMrzMSshmWBrkATlpdcOQjSLZGkCJbqE1FHbUdA9SvHGffSwYJLjyAs3DIK71s2gvNZSMn4RdOPgQo9WuAqB6XhKOw3tT4Ex9G4+Z3qvD7acFrgBhudBe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J3JvI//896G98D2ouRWrQxpXkQvVwdsQGN1ttEEvYpP8EdJewgrDE5IatVmSwrzT3o+WfPRoCIncJW3Aj6DYJt2UzKsi7a+VgJLz60jRXr+HAa9Je/dubXtE1H/q8eB0+YL31frW+WyftdU+qRYqzqMDxNcnZSNjBgoRWIsfHLMPKPUnbB1+XF1fXLGHt2LgMz13M8CW9j/Fl1DaObuJzEK2tmORq7kMDwqJMQijck5f68OYhwJvmP3SqvfYY4p54DPqbDrWXYbWK0Gm97ujjp4McjWFbanLO3Xq9/gOU9bR0",sidebar_class_name:"post api-method",info_path:"docs/API-docs/opensign-api-v-1",custom_edit_url:null},y=void 0,b={},f=[];function j(e){const t={a:"a",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.default,{as:"h1",className:"openapi__heading",children:"Create Document from Template"}),"\n",(0,n.jsx)(r(),{method:"post",path:"/createdocument/{template_id}",context:"endpoint"}),"\n",(0,n.jsxs)(t.p,{children:["The Create Document API allows you to generate new documents by just providing template_id instead of uploading a new file(in the form of base64 or binary) every time you need to create a document. Templates for repeatedly used files can be created from user interface at ",(0,n.jsx)(t.a,{href:"https://app.opensignlabs.com/debugpdf",children:(0,n.jsx)(t.strong,{children:"Debug UI"})})," or using the Create Template API."]}),"\n",(0,n.jsx)(h.default,{id:"request",as:"h2",className:"openapi-tabs__heading",children:"Request"}),"\n",(0,n.jsx)(c(),{parameters:[{name:"template_id",in:"path",description:"objectId of Template",required:!0,style:"simple",explode:!1,schema:{type:"string",format:"string",example:"pH1bhc2hpb"}}]}),"\n",(0,n.jsx)(p(),{title:"Body",body:{content:{"application/json":{schema:{required:["signers"],type:"object",properties:{signers:{type:"array",items:{type:"object",properties:{role:{type:"string",example:"Accoutnant"},email:{type:"string",format:"mail",example:"joe@example.com"},name:{type:"string",example:"joe bee"},phone:{type:"string",example:"123123131"}},title:"createdocumenttemplate_id_Signers"}},folderId:{type:"string",example:""},send_email:{type:"boolean",description:"This parameter allows you to specify whether you want emails to be sent to signers. The default value is \"true\". If the value of this parameter is \"true\" and no 'email_subject'/'email_body' parameters are specified default email templates will be used.\n",example:!0},email_subject:{type:"string",description:"Custom mail subject for signature request. Can include the following {{document_title}} {{sender_name}}, {{sender_mail}}, {{sender_phone}}, {{receiver_name}}, {{receiver_email}}, {{receiver_phone}}, {{expiry_date}}, {{company_name}}, {{signing_url}}.",example:""},email_body:{type:"string",description:"Custom signature request email body. Can include the following {{document_title}} {{sender_name}}, {{sender_mail}}, {{sender_phone}}, {{receiver_name}}, {{receiver_email}}, {{receiver_phone}}, {{expiry_date}}, {{company_name}}, {{signing_url}}.",example:""},sendInOrder:{type:"boolean",description:"If set to 'true', only the first signer will receive the signature request email initially. Emails to subsequent signers will be triggered sequentially, with each sent only after the previous signer has completed their signing. By default, sendInOrder is set to 'true'.",example:!0},timeToCompleteDays:{type:"number",description:"time to complete days is used to calculate expiry date of your document",format:"number",example:15},enableOTP:{type:"boolean",description:"true - this option will enable OTP verification. Users will receive a verification code via email, which they must enter to sign the document. false - this option will disable OTP verification, allowing users to sign the document directly without additional steps.",example:!1},enableTour:{type:"boolean",description:"true - this option will enable a guided tour for signers, providing instructions during the signing process. false - disable the guided tour, ensuring a faster, uninterrupted signing experience.",example:!1},sender_name:{type:"string",description:"The name of the person or organization on whose behalf the email is being sent.",example:"opensign\u2122"},sender_email:{type:"string",description:"The email address of the person or organization that users can reply to.",example:"mailer@opensignlabs.com"},allow_modifications:{type:"boolean",description:"true - Permits signers to add elements such as signatures, initials, stamps, or text on top of existing widgets in the document. false - Restricts signers from adding any additional elements to the document. This is the default value.",example:!1}},title:"createdocument_template_id_body"}}},required:!0}}),"\n",(0,n.jsx)(u(),{id:void 0,label:void 0,responses:{200:{description:"Document created successfully!",content:{"application/json":{schema:{type:"object",properties:{objectId:{type:"string",format:"string",example:"hji2zxcv2P"},signurl:{type:"array",items:{type:"object",properties:{email:{type:"string",format:"string",example:"mail@example.com"},url:{type:"string",format:"string",example:"https://url-to-sign-document.com"}},title:"inline_response_doc_signurl"}},message:{type:"string",format:"string",example:"Document sent successfully!"}},title:"inline_response_doc"}}}},400:{description:"If you haven't add widgets and signers in template or not provide signers along with their roles in body",content:{"application/json":{schema:{type:"object",properties:{error:{type:"string",format:"string",example:"Please setup template properly!"}},title:"inline_response_400_cc"}}}},405:{description:"Invalid API Token!",content:{"application/json":{schema:{type:"object",properties:{error:{type:"string",example:"Invalid API token!"}},xml:{name:"invalidtoken"},title:"invalidtoken"}}}}}})]})}function w(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(j,{...e})}):j(e)}}}]);