CreateFileFromDocId

Method : Post

Interface Function

step 1: Getting the documents by the "DocId" and "FormAlias".

step 2: Creating a word/excel/pdf file according to the returned document in step 1 and the document template which code is "TemplateCode".

Request Parameter
Parameter Required Type Remarks
FormAlias Yes String Form alias, the identity of the form
DocId Yes String The document id, according the DocId and FormAlias to get the input document
TemplateCode Yes String Word/Excel file template code
FileName No String Generated file name, if it's null,it will be assigned by the value of the file name of the corresponding template
TransferPdf No Bool true:the generated file format is PDF;
false:the generated file format is same with the corresponding template's file format;
Return Data Type(Data)

StatusCode: 200 if success, others if fail.

Info: the value will not be empty if error occurs, it shows the error message.

Data (string): the created file id.

public class ResultMsg
{
  public int StatusCode { get; set; }
  public string Info { get; set; }
  public object Data { get; set; }
}
Input Sample
{
    "FormAlias": "Eason",
    "DocId" : "7b2e1cb9-5ecd-46e2-abef-494eb11c2554",
    "TemplateCode" : "ABC",
    "FileName": "report information",
    "TransferPdf": true
}
Return Sample
{
  "StatusCode": 200,
  "Info": "",
  "Data": "cf49a2bc-ee10-455c-9ac2-facf7dcd2a00"
}
© Digital Maker Product Team all right reserved,powered by Gitbook该文件修订时间: 2023-02-02 10:40:12

results matching ""

    No results matching ""