{
  "openapi" : "3.0.1",
  "info" : {
    "title" : "Docmosis Cloud - API",
    "description" : "# Introduction\n\n## Overview\n\nDocmosis Cloud Service provides an easy way to generate dynamic documents from virtually any application.\n\nThis Cloud API documentation contains details of all available endpoints and allows live requests to the API to be executed.\n\n### Related Reading\n\nRead more about _[features of the Docmosis Cloud](https://www.docmosis.com/products/cloud/)_. \n\nDownload the full _[Cloud Documentation](https://resources.docmosis.com/documentation/cloud/latest)_. \n\n## Key Concepts\n\n### HTTP Methods\n\nAll requests to the Cloud API should be made using the HTTPS POST method.\n\n### Content-Type\n\nThe content-type varies depending on the service being used.  All services accept multi-part/form-data.  The Render service is the most versatile and can also accept application/json, application/xml and application/x-www-form-urlencoded.\n\n### Parameters\n\nRequests must include the API access key in either the header or body parameters.  All other parameters should be body parameters.  The API does not use query string parameters.\n\n### Character Encoding\n\nAll data passed to the Cloud API should be UTF-8 encoded. If data is passed containing special characters, it must be UTF-8 encoded, otherwise unexpected characters may appear in resulting documents.\n\n### Fonts in Templates\n\nTemplates should only use fonts that are available on the Cloud Service. If fonts are used which are not installed, unexpected font substitutions may occur in PDF documents or inaccurate page references when using indexes or tables of content.\n\nPlease see _[DWS4 Font List](https://resources.docmosis.com/content/faq/is-there-a-list-of-fonts-for-docmosis-cloud-dws4)_ for a list of available fonts.\n\n### Production vs Development Mode\n\nSome API endpoints provide the option to operate in a forgiving manner (development mode) or in a very strict manner (production mode).\n\nThe intention is that, in development mode, requests to the endpoints will succeed even if errors are detected, helping users to locate the error and make the necessary adjustments.\n\nIn production mode, requests will fail with diagnostic information returned in the response to the calling application.\n\n\n# The Service API\n\n## Endpoint URLs and Processing Locations\n\nWhen calling the API the Base URL determines the location that will process the request.\n\nThe available locations are:\n\n| **Location** | **Base URL** |\n| --- | --- |\n| United States | https://<area>us1.dws4.docmosis.com/api/ |\n| Europe | https://<area>eu1.dws4.docmosis.com/api/ |\n| Australia | https://<area>au1.dws4.docmosis.com/api/ |\n\nEach processing location is independent of the others and each Cloud Account has access to all locations.\n\nEach location has its own templates and all processing is confined to that location to support data-sovereignty and privacy requirements as well as optimizing performance.\n\nFor example, to upload a template to the Cloud Service in the US and then render it, these two API URLs would be used:\n\nhttps://**us1**.dws4.docmosis.com/api/**uploadTemplate**\n\nhttps://**us1**.dws4.docmosis.com/api/**render**\n\nSince each Docmosis location is independent of the others the templates must be stored in the same location as the location being used for rendering.\n\n## Response Codes and Messages\n\nFor every request made to the Cloud API, the first action should be to check the response status code to determine whether the call succeeded or failed. The choice can then be made whether to check for further information in the response body.\n\nThe API returns status codes as follows:\n\n| **Status Code** | **Definition** |\n| --- | --- |\n| 200 | Successful operation |\n| 400 | The request is not valid or indicates a not-ready status. |\n| 500 | A server error has occurred |\n| 404 | Invalid URL (not found) |\n| 429 | Too many requests |\n\nOther 4\\*\\* and 5\\*\\* response codes may also occur. Applications should always confirm that they received a 200 response before assuming success and processing the result.\n\nThe Cloud Service also returns information about the result in JSON or XML as follows:\n\n| **Field** | **Value** |\n| --- | --- |\n| Succeeded | &quot;true&quot; or &quot;false&quot;. |\n| shortMsg | A short message about the result. In the case of an error this will be a short error message. It may be blank in the case of a successful operation. |\n| longMsg | A more descriptive message about the result. In the case of an error this will be a long error message. It may be blank. |\n\nEach service may also return additional information in the response information, as indicated in the sections to follow.\n\nIn the case of some errors, the response body will NOT include the data structure containing &quot;succeeded&quot;, &quot;shortMsg&quot; etc. This is because some errors indicate the call failed to even reach the Cloud Service. For example, a status code 404 indicates a bad URL in which case the status code alone is enough to indicate the nature of the problem.\n\n\n## Troubleshooting\n\nThere are many resources available on the [Docmosis Resources website](https://resources.docmosis.com) including FAQs, examples and tutorials that may help with troubleshooting problems.\n# Important Render Parameters\n## Sending Data\n\nThe “data” parameter should contain the data, that will be merged with the template, in JSON or XML format.\n\n## Sending Data as Parameters\n\nBy default, only the parameters listed below should be included when calling the Render service. This is known as “strict” mode and sending unknown parameters to the service will result in an error.\n\nThe parameter \"strictParams\" can be set to \"false\" to disable this behavior.\n\nIn this case unknown parameters will be treated as data and will be merged with the template.\n\n## Output Format\n\nThe format of the generated document will be determined by:\n\n•\tThe parameter \"outputName\" and the file extension used in the file name. Eg “resume.pdf” will result in a PDF file being generated.\n\n•\tThe parameter \"outputFormat\".\n\nNote: the parameter \"outputFormat\" will override any format implied by \"outputName\".\n\n## Dev/Prod Mode\n\nThe Render service works in production mode by default.  Any errors that occur during the document generation process are considered fatal and the call will fail.\n\nThis may be overridden by setting the “devMode” parameter to “true”.  In this case the service will do its best to generate a document and where possible errors will be highlighted in the generated document.\n\n## Sending Images\n\nInserting an image in to a document requires two things:\n\n•\tThe template requires a “placeholder image”, that controls where the image will appear.\n\n•\tThe data determines what image is to appear.\n\nPlease refer to the [sending image data FAQ](https://resources.docmosis.com/content/faq/how-to-send-image-data-or-retrieve-images-from-a-file-or-url) for more information.\n\n## Document Delivery\n\nThe “storeTo” parameter controls how the generated document will be delivered.\n\nIf no value is provided for “storeTo”, the default behavior is “stream”. In this case the document will be returned in the response to the calling application. The calling application can read the returned binary or base64 encoded stream to obtain the document.\n\nThe service can deliver the generated document: via email; to an AWS S3 bucket; or to several destinations at once, and optionally send different formats for delivery to each destination.\n\nAs a simple example try setting “storeTo” to: “mailto:bob@example.com”. This indicates the generated document should be sent to the email address provided.\n",
    "termsOfService" : "https://www.docmosis.com/company/legal-privacy-policy/",
    "contact" : {
      "url" : "https://www.docmosis.com/support/"
    },
    "license" : {
      "name" : "Docmosis - Cloud Services Agreement",
      "url" : "https://www.docmosis.com/company/legal-privacy-policy/"
    },
    "version" : "dws4"
  },
  "externalDocs" : {
    "description" : "Cloud DWS4 Web Services Guide - This manual is intended to be a complete reference for software developers and integrators for making the most of Docmosis Cloud services. This manual covers the complete Docmosis Cloud services REST-based API.",
    "url" : "https://resources.docmosis.com/content/documentation/cloud-dws4-web-services-guide"
  },
  "servers" : [ {
    "url" : "https://us1.dws4.docmosis.com/api",
    "description" : "United States (N. Virginia)"
  }, {
    "url" : "https://au1.dws4.docmosis.com/api",
    "description" : "Australia (Sydney)"
  }, {
    "url" : "https://eu1.dws4.docmosis.com/api",
    "description" : "Europe (Frankfurt)"
  } ],
  "security" : [ {
    "accessKeyAuthorization" : [ ]
  } ],
  "tags" : [ {
    "name" : "Generate"
  }, {
    "name" : "Convert"
  }, {
    "name" : "Templates"
  }, {
    "name" : "Images"
  }, {
    "name" : "Admin"
  } ],
  "paths" : {
    "/environment/ready" : {
      "post" : {
        "tags" : [ "Admin" ],
        "summary" : "Environment Ready",
        "description" : "The Environment Ready service provides the ability to check whether an environment is ready to service document requests.  This service is suitable for linking to automated monitoring systems for important Docmosis Environments.\nThis service confirms whether the Environment is active and within quota limits. Note: Environments may be over quota (ie. hard limit is not applied) and still operational, in which case this service will indicate the environment is ready, even though over quota.\nConsider creating an API Key in the Environment specifically for use with this service.\nresponse code: 200 means ready\nresponse code: 400 means not ready",
        "operationId" : "accountEnvironmentReady",
        "requestBody" : {
          "content" : {
            "multipart/form-data" : {
              "schema" : {
                "$ref" : "#/components/schemas/AccountReadyRequest"
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/AccountReadyRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "$ref" : "#/components/responses/200"
          },
          "400" : {
            "$ref" : "#/components/responses/400"
          },
          "404" : {
            "$ref" : "#/components/responses/404"
          },
          "415" : {
            "$ref" : "#/components/responses/415"
          },
          "500" : {
            "$ref" : "#/components/responses/500"
          }
        },
        "x-codeSamples" : [ {
          "lang" : "Shell",
          "label" : "Curl",
          "source" : "curl --request POST \\\n--url https://us1.dws4.docmosis.com/api/environment/ready \\\n--form 'accessKey='"
        }, {
          "lang" : "Java",
          "label" : "Java",
          "source" : "//This example uses the Apache HttpClient (v5) library\n\nHttpClient client = HttpClientBuilder.create().build();\nHttpPost request = new HttpPost(\"https://us1.dws4.docmosis.com/api/environment/ready\");\n\nString accessKey = \"\";\n\nMultipartEntityBuilder builder = MultipartEntityBuilder.create();\nbuilder.addTextBody(\"accessKey\", accessKey);\nHttpEntity payLoad = builder.build();\nrequest.setEntity(payLoad);\n\nclient.execute(request, response -> {\n    System.out.println(EntityUtils.toString(response.getEntity()));\n    EntityUtils.consume(response.getEntity());\n    return null;\n});"
        }, {
          "lang" : "C#",
          "label" : "C#",
          "source" : "HttpClient client = new HttpClient();\n\nstring accessKey = \"\";\n\nMultipartFormDataContent content = new MultipartFormDataContent();\ncontent.Add(new StringContent(accessKey), \"accessKey\");\n\nusing (HttpResponseMessage response = await client.PostAsync(\"https://us1.dws4.docmosis.com/api/environment/ready\", content)) {\n    string responseString = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(responseString);\n}"
        }, {
          "lang" : "Python",
          "label" : "Python",
          "source" : "import requests\n\naccessKey = ''\n\npayload = {\n    'accessKey' : accessKey\n}\n\nresponse = requests.post('https://us1.dws4.docmosis.com/api/environment/ready', stream=True, data=payload)\n\nprint(response.text)"
        }, {
          "lang" : "PHP",
          "label" : "Php",
          "source" : "<?php\n\n$accessKey = \"\";\n\n$request = array(\n    \"accessKey\" => $accessKey\n);\n\n$headers = array(\"Content-Type: multipart/form-data\");\n\n$curl = curl_init(\"https://us1.dws4.docmosis.com/api/environment/ready\");\n\ncurl_setopt($curl, CURLOPT_HEADER, 0);\ncurl_setopt($curl, CURLOPT_POST, 1);\ncurl_setopt($curl, CURLOPT_POSTFIELDS, $request);\ncurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\n\necho $response;\n\n?>"
        }, {
          "lang" : "JavaScript",
          "label" : "Node.js",
          "source" : "const formData = new FormData();\nformData.append(\"accessKey\", \"\");\n\nconst options = {\n    method: \"POST\",\n    body : formData\n};\n\nfetch(\"https://us1.dws4.docmosis.com/api/environment/ready\", options)\n    .then(response => {\n        return response.text().then(body => {\n            console.log(body);\n        })\n    });"
        } ]
      }
    },
    "/environment/summary" : {
      "post" : {
        "tags" : [ "Admin" ],
        "summary" : "Environment Summary",
        "description" : "The Environment Summary service returns details about an environment including plan information, status and quotas.  It is for information purposes and not intended for monitoring.\nNote: this service returns a 200 response even if the event is not ready which is different from the \"ready\" service endpoint.",
        "operationId" : "accountEnvironmentSummary",
        "requestBody" : {
          "content" : {
            "multipart/form-data" : {
              "schema" : {
                "$ref" : "#/components/schemas/AccountSummaryRequest"
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/AccountSummaryRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "Request succeeded",
            "headers" : {
              "X-Docmosis-Server" : {
                "$ref" : "#/components/headers/X-Docmosis-Server"
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AccountSummaryResponse"
                },
                "examples" : {
                  "Example Response" : {
                    "description" : "Example Response",
                    "value" : {
                      "succeeded" : true,
                      "shortMsg" : "environment is ready",
                      "accountEnvironmentSummary" : {
                        "accountEnvDetails" : {
                          "auditInfo" : {
                            "lastUpdatedByUser" : "John Smith",
                            "lastUpdatedTime" : 1678334445203
                          },
                          "isActivated" : true,
                          "isDeleted" : false,
                          "isDisabled" : false,
                          "name" : "Development"
                        },
                        "pageQuota" : {
                          "isHardLimited" : false,
                          "pctUsed" : 20.0,
                          "pctUsedStr" : "20%",
                          "quota" : 5000,
                          "used" : 1000
                        },
                        "plan" : {
                          "name" : "Business-01"
                        },
                        "ready" : true
                      }
                    }
                  }
                }
              }
            }
          },
          "400" : {
            "$ref" : "#/components/responses/400"
          },
          "404" : {
            "$ref" : "#/components/responses/404"
          },
          "415" : {
            "$ref" : "#/components/responses/415"
          },
          "500" : {
            "$ref" : "#/components/responses/500"
          }
        },
        "x-codeSamples" : [ {
          "lang" : "Shell",
          "label" : "Curl",
          "source" : "curl --request POST \\\n--url https://us1.dws4.docmosis.com/api/environment/summary \\\n--form 'accessKey='"
        }, {
          "lang" : "Java",
          "label" : "Java",
          "source" : "//This example uses the Apache HttpClient (v5) library\n\nHttpClient client = HttpClientBuilder.create().build();\nHttpPost request = new HttpPost(\"https://us1.dws4.docmosis.com/api/environment/summary\");\n\nString accessKey = \"\";\n\nMultipartEntityBuilder builder = MultipartEntityBuilder.create();\nbuilder.addTextBody(\"accessKey\", accessKey);\nHttpEntity payLoad = builder.build();\nrequest.setEntity(payLoad);\n\nclient.execute(request, response -> {\n    System.out.println(EntityUtils.toString(response.getEntity()));\n    EntityUtils.consume(response.getEntity());\n    return null;\n});"
        }, {
          "lang" : "C#",
          "label" : "C#",
          "source" : "HttpClient client = new HttpClient();\n\nstring accessKey = \"\";\n\nMultipartFormDataContent content = new MultipartFormDataContent();\ncontent.Add(new StringContent(accessKey), \"accessKey\");\n\nusing (HttpResponseMessage response = await client.PostAsync(\"https://us1.dws4.docmosis.com/api/environment/summary\", content)) {\n    string responseString = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(responseString);\n}"
        }, {
          "lang" : "Python",
          "label" : "Python",
          "source" : "import requests\n\naccessKey = ''\n\npayload = {\n    'accessKey' : accessKey\n}\n\nresponse = requests.post('https://us1.dws4.docmosis.com/api/environment/summary', stream=True, data=payload)\n\nprint(response.text)"
        }, {
          "lang" : "PHP",
          "label" : "Php",
          "source" : "<?php\n\n$accessKey = \"\";\n\n$request = array(\n    \"accessKey\" => $accessKey\n);\n\n$headers = array(\"Content-Type: multipart/form-data\");\n\n$curl = curl_init(\"https://us1.dws4.docmosis.com/api/environment/summary\");\n\ncurl_setopt($curl, CURLOPT_HEADER, 0);\ncurl_setopt($curl, CURLOPT_POST, 1);\ncurl_setopt($curl, CURLOPT_POSTFIELDS, $request);\ncurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\n\necho $response;\n\n?>"
        }, {
          "lang" : "JavaScript",
          "label" : "Node.js",
          "source" : "const formData = new FormData();\nformData.append(\"accessKey\", \"\");\n\nconst options = {\n    method: \"POST\",\n    body : formData\n};\n\nfetch(\"https://us1.dws4.docmosis.com/api/environment/summary\", options)\n    .then(response => {\n        return response.text().then(body => {\n            console.log(body);\n        })\n    });"
        } ]
      }
    },
    "/ping" : {
      "get" : {
        "tags" : [ "Admin" ],
        "summary" : "Ping",
        "description" : "The Ping service provides a direct check that the Docmosis Cloud services are online and there is at least one Docmosis server listening. This is useful for diagnosing reachability issues. For automated monitoring purposes see the Environment Ready service.",
        "operationId" : "pingGet",
        "responses" : {
          "200" : {
            "description" : "Request succeeded"
          },
          "400" : {
            "description" : "Bad Request."
          },
          "404" : {
            "$ref" : "#/components/responses/404"
          },
          "415" : {
            "$ref" : "#/components/responses/415"
          },
          "500" : {
            "$ref" : "#/components/responses/500"
          }
        },
        "security" : [ ],
        "x-codeSamples" : [ {
          "lang" : "Shell",
          "label" : "Curl",
          "source" : "curl --request GET \\\n--url https://us1.dws4.docmosis.com/api/ping"
        }, {
          "lang" : "Java",
          "label" : "Java",
          "source" : "URL url = new URL(\"https://us1.dws4.docmosis.com/api/ping\");\nHttpURLConnection connection = (HttpURLConnection) url.openConnection();\nconnection.setRequestMethod(\"GET\");\nSystem.out.println(connection.getResponseCode());"
        }, {
          "lang" : "C#",
          "label" : "C#",
          "source" : "HttpClient client = new HttpClient();\nusing (HttpResponseMessage response = await client.GetAsync(\"https://us1.dws4.docmosis.com/api/ping\")) {\nConsole.WriteLine(response.StatusCode);"
        }, {
          "lang" : "Python",
          "label" : "Python",
          "source" : "import requests\n\nresponse = requests.get('https://us1.dws4.docmosis.com/api/ping')\nprint(response.status_code)"
        }, {
          "lang" : "PHP",
          "label" : "Php",
          "source" : "<?php\n\n$curl = curl_init(\"https://us1.dws4.docmosis.com/api/ping\");\n\ncurl_setopt($curl, CURLOPT_HEADER, 1);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($curl);\n$httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\ncurl_close($curl);\n\necho $httpcode;\n\n?>"
        }, {
          "lang" : "JavaScript",
          "label" : "Node.js",
          "source" : "fetch(\"https://us1.dws4.docmosis.com/api/ping\")\n    .then(response => {\n        console.log(response.status);\n    });"
        } ]
      }
    },
    "/convert" : {
      "post" : {
        "tags" : [ "Convert" ],
        "summary" : "Convert",
        "description" : "The Convert service allows files to be converted between formats.  The process is a simple conversion with no concept of templates and data.  It applies to spreadsheet, presentation and drawing types of document.",
        "operationId" : "convert",
        "requestBody" : {
          "content" : {
            "multipart/form-data" : {
              "schema" : {
                "$ref" : "#/components/schemas/ConvertRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "Request succeeded",
            "headers" : {
              "X-Docmosis-PagesRendered" : {
                "$ref" : "#/components/headers/X-Docmosis-PagesRendered"
              },
              "X-Docmosis-Server" : {
                "$ref" : "#/components/headers/X-Docmosis-Server"
              },
              "X-Docmosis-BytesOutput" : {
                "description" : "Number of bytes output.",
                "style" : "simple",
                "schema" : {
                  "type" : "string"
                }
              }
            },
            "content" : {
              "application/octet-stream" : {
                "schema" : {
                  "type" : "string",
                  "format" : "binary"
                }
              }
            }
          },
          "400" : {
            "$ref" : "#/components/responses/400"
          },
          "404" : {
            "$ref" : "#/components/responses/404"
          },
          "415" : {
            "$ref" : "#/components/responses/415"
          },
          "500" : {
            "$ref" : "#/components/responses/500"
          }
        },
        "x-codeSamples" : [ {
          "lang" : "Shell",
          "label" : "Curl",
          "source" : "curl --request POST \\\n--url https://us1.dws4.docmosis.com/api/convert \\\n--form 'file=@MyFile.docx' \\\n--form 'outputName=output.pdf' \\\n--form 'accessKey=' \\\n--output 'output.pdf'"
        }, {
          "lang" : "Java",
          "label" : "Java",
          "source" : "//This example uses the Apache HttpClient (v5) library\n\nHttpClient client = HttpClientBuilder.create().build();\nHttpPost request = new HttpPost(\"https://us1.dws4.docmosis.com/api/convert\");\n\nFile file = new File(\"MyFile.docx\");\nString outputName = \"output.pdf\";\nString accessKey = \"\";\n\nMultipartEntityBuilder builder = MultipartEntityBuilder.create();\nbuilder.addBinaryBody(\"file\", file);\nbuilder.addTextBody(\"outputName\", outputName);\nbuilder.addTextBody(\"accessKey\", accessKey);\nHttpEntity payLoad = builder.build();\nrequest.setEntity(payLoad);\n\nclient.execute(request, response -> {\n    if (response.getCode() == HttpStatus.SC_OK) {\n        File outputFile = new File(\"output.pdf\");\n        FileOutputStream outstream = new FileOutputStream(outputFile);\n        response.getEntity().writeTo(outstream);\n        System.out.println(\"File saved to:\" + outputFile.getAbsolutePath());\n    } else {\n        System.out.println(EntityUtils.toString(response.getEntity()));\n    }\n    EntityUtils.consume(response.getEntity());\n    return null;\n});"
        }, {
          "lang" : "C#",
          "label" : "C#",
          "source" : "HttpClient client = new HttpClient();\n\nFileInfo file = new FileInfo(\"MyFile.docx\");\nstring outputName = \"output.pdf\";\nstring accessKey = \"\";\n\nMultipartFormDataContent content = new MultipartFormDataContent();\ncontent.Add(new StreamContent(file.OpenRead()), \"file\", file.Name);\ncontent.Add(new StringContent(outputName), \"outputName\");\ncontent.Add(new StringContent(accessKey), \"accessKey\");\n\nusing (HttpResponseMessage response = await client.PostAsync(\"https://us1.dws4.docmosis.com/api/convert\", content)) {\n    if (response.StatusCode == HttpStatusCode.OK) {\n        using (FileStream outputFile = File.Create(\"output.pdf\")) {\n            using (Stream outputStream = await response.Content.ReadAsStreamAsync()) {\n                await outputStream.CopyToAsync(outputFile);\n                Console.WriteLine(\"File saved to:\" + outputFile.Name);\n            }\n        }\n    } else {\n        string responseString = await response.Content.ReadAsStringAsync();\n        Console.WriteLine(responseString);\n    }\n}"
        }, {
          "lang" : "Python",
          "label" : "Python",
          "source" : "import requests\n\nfile = 'MyFile.docx'\noutputName = 'output.pdf'\naccessKey = ''\n\npayload = {\n    'outputName' : outputName,\n    'accessKey' : accessKey\n}\n\nfiles = {'file': open(file, 'rb')}\n\nresponse = requests.post('https://us1.dws4.docmosis.com/api/convert', stream=True, data=payload, files=files)\n\nif response.status_code == 200:\n    with open('output.pdf', 'wb') as fd:\n        for chunk in response.iter_content(4096):\n            fd.write(chunk)\n    print('Saved to output.pdf')\nelse:\n    print(response.text)"
        }, {
          "lang" : "PHP",
          "label" : "Php",
          "source" : "<?php\n\n$file = curl_file_create(\"full/path/to/MyFile.docx\", null, \"MyFile.docx\");\n$outputName = \"output.pdf\";\n$accessKey = \"\";\n\n$request = array(\n    \"file\" => $file,\n    \"outputName\" => $outputName,\n    \"accessKey\" => $accessKey\n);\n\n$headers = array(\"Content-Type: multipart/form-data\");\n\n$curl = curl_init(\"https://us1.dws4.docmosis.com/api/convert\");\n\ncurl_setopt($curl, CURLOPT_HEADER, 0);\ncurl_setopt($curl, CURLOPT_POST, 1);\ncurl_setopt($curl, CURLOPT_POSTFIELDS, $request);\ncurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\n\nif ($status === 200) {\n    $outputFile = file_put_contents(\"output.pdf\", $response);\n    echo \"Saved to output.pdf\";\n} else {\n    echo $response;\n}\n\n?>"
        }, {
          "lang" : "JavaScript",
          "label" : "Node.js",
          "source" : "const fs = require(\"fs\");\nconst { Readable } = require(\"node:stream\");\n\nconst formData = new FormData();\nformData.append(\"file\", new Blob([fs.readFileSync(\"MyFile.docx\")]));\nformData.append(\"outputName\", \"output.pdf\");\nformData.append(\"accessKey\", \"\");\n\nconst options = {\n    method: \"POST\",\n    body : formData\n};\n\nfetch(\"https://us1.dws4.docmosis.com/api/convert\", options)\n    .then(response => {\n        if (response.ok) {\n            const destination = fs.createWriteStream(\"output.pdf\");\n            Readable.fromWeb(response.body).pipe(destination);\n            console.log(\"Saved to output.pdf\");\n        } else {\n            return response.text().then(body => {\n                console.log(body);\n            })\n        }\n    });"
        } ]
      }
    },
    "/deleteImage" : {
      "post" : {
        "tags" : [ "Images" ],
        "summary" : "Delete Image",
        "description" : "The Delete Image service deletes the specified image.  Multiple imageName parameters can be specified to delete multiple images.",
        "operationId" : "deleteImage",
        "requestBody" : {
          "content" : {
            "multipart/form-data" : {
              "schema" : {
                "$ref" : "#/components/schemas/DeleteImageRequest"
              },
              "encoding" : {
                "imageName" : {
                  "explode" : true
                }
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/DeleteImageRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "$ref" : "#/components/responses/200"
          },
          "400" : {
            "$ref" : "#/components/responses/400"
          },
          "404" : {
            "$ref" : "#/components/responses/404"
          },
          "415" : {
            "$ref" : "#/components/responses/415"
          },
          "500" : {
            "$ref" : "#/components/responses/500"
          }
        },
        "x-codeSamples" : [ {
          "lang" : "Shell",
          "label" : "Curl",
          "source" : "curl --request POST \\\n--url https://us1.dws4.docmosis.com/api/deleteImage \\\n--form 'imageName=/MyImageFolder/MyImage.png' \\\n--form 'accessKey='"
        }, {
          "lang" : "Java",
          "label" : "Java",
          "source" : "//This example uses the Apache HttpClient (v5) library\n\nHttpClient client = HttpClientBuilder.create().build();\nHttpPost request = new HttpPost(\"https://us1.dws4.docmosis.com/api/deleteImage\");\n\nString[] imageName = new String[] {\"/MyImageFolder/MyImage.png\"};\nString accessKey = \"\";\n\nMultipartEntityBuilder builder = MultipartEntityBuilder.create();\nbuilder.addTextBody(\"imageName\", imageName[0]);\nbuilder.addTextBody(\"accessKey\", accessKey);\nHttpEntity payLoad = builder.build();\nrequest.setEntity(payLoad);\n\nclient.execute(request, response -> {\n    System.out.println(EntityUtils.toString(response.getEntity()));\n    EntityUtils.consume(response.getEntity());\n    return null;\n});"
        }, {
          "lang" : "C#",
          "label" : "C#",
          "source" : "HttpClient client = new HttpClient();\n\nstring[] imageName = new string[] {\"/MyImageFolder/MyImage.png\"};\nstring accessKey = \"\";\n\nMultipartFormDataContent content = new MultipartFormDataContent();\ncontent.Add(new StringContent(imageName[0]), \"imageName\");\ncontent.Add(new StringContent(accessKey), \"accessKey\");\n\nusing (HttpResponseMessage response = await client.PostAsync(\"https://us1.dws4.docmosis.com/api/deleteImage\", content)) {\n    string responseString = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(responseString);\n}"
        }, {
          "lang" : "Python",
          "label" : "Python",
          "source" : "import requests\n\nimageName = [ '/MyImageFolder/MyImage.png' ]\naccessKey = ''\n\npayload = {\n    'imageName' : imageName[0],\n    'accessKey' : accessKey\n}\n\nresponse = requests.post('https://us1.dws4.docmosis.com/api/deleteImage', stream=True, data=payload)\n\nprint(response.text)"
        }, {
          "lang" : "PHP",
          "label" : "Php",
          "source" : "<?php\n\n$imageName = array( \"/MyImageFolder/MyImage.png\" );\n$accessKey = \"\";\n\n$request = array(\n    \"imageName\" => $imageName[0],\n    \"accessKey\" => $accessKey\n);\n\n$headers = array(\"Content-Type: multipart/form-data\");\n\n$curl = curl_init(\"https://us1.dws4.docmosis.com/api/deleteImage\");\n\ncurl_setopt($curl, CURLOPT_HEADER, 0);\ncurl_setopt($curl, CURLOPT_POST, 1);\ncurl_setopt($curl, CURLOPT_POSTFIELDS, $request);\ncurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\n\necho $response;\n\n?>"
        }, {
          "lang" : "JavaScript",
          "label" : "Node.js",
          "source" : "const formData = new FormData();\nformData.append(\"imageName\", \"/MyImageFolder/MyImage.png\");\nformData.append(\"accessKey\", \"\");\n\nconst options = {\n    method: \"POST\",\n    body : formData\n};\n\nfetch(\"https://us1.dws4.docmosis.com/api/deleteImage\", options)\n    .then(response => {\n        return response.text().then(body => {\n            console.log(body);\n        })\n    });"
        } ]
      }
    },
    "/getImage" : {
      "post" : {
        "tags" : [ "Images" ],
        "summary" : "Get Image",
        "description" : "The Get Image service retrieves the image that was originally uploaded.  Multiple imageName parameters can be specified to download in a zip file (up to 100).",
        "operationId" : "getImage",
        "requestBody" : {
          "content" : {
            "multipart/form-data" : {
              "schema" : {
                "$ref" : "#/components/schemas/GetImageRequest"
              },
              "encoding" : {
                "imageName" : {
                  "explode" : true
                }
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/GetImageRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "The body of the response will contain the binary stream for the image. A zip is returned if requesting multiple images.",
            "headers" : {
              "X-Docmosis-Server" : {
                "$ref" : "#/components/headers/X-Docmosis-Server"
              }
            },
            "content" : {
              "application/octet-stream" : {
                "schema" : {
                  "type" : "string",
                  "format" : "binary"
                }
              }
            }
          },
          "400" : {
            "$ref" : "#/components/responses/400"
          },
          "404" : {
            "$ref" : "#/components/responses/404"
          },
          "415" : {
            "$ref" : "#/components/responses/415"
          },
          "500" : {
            "$ref" : "#/components/responses/500"
          }
        },
        "x-codeSamples" : [ {
          "lang" : "Shell",
          "label" : "Curl",
          "source" : "curl --request POST \\\n--url https://us1.dws4.docmosis.com/api/getImage \\\n--form 'imageName=/MyImageFolder/MyImage.png' \\\n--form 'accessKey=' \\\n--output 'MyImage.png'"
        }, {
          "lang" : "Java",
          "label" : "Java",
          "source" : "//This example uses the Apache HttpClient (v5) library\n\nHttpClient client = HttpClientBuilder.create().build();\nHttpPost request = new HttpPost(\"https://us1.dws4.docmosis.com/api/getImage\");\n\nString[] imageName = new String[] {\"/MyImageFolder/MyImage.png\"};\nString accessKey = \"\";\n\nMultipartEntityBuilder builder = MultipartEntityBuilder.create();\nbuilder.addTextBody(\"imageName\", imageName[0]);\nbuilder.addTextBody(\"accessKey\", accessKey);\nHttpEntity payLoad = builder.build();\nrequest.setEntity(payLoad);\n\nclient.execute(request, response -> {\n    if (response.getCode() == HttpStatus.SC_OK) {\n        File outputFile = new File(\"MyImage.png\");\n        FileOutputStream outstream = new FileOutputStream(outputFile);\n        response.getEntity().writeTo(outstream);\n        System.out.println(\"File saved to:\" + outputFile.getAbsolutePath());\n    } else {\n        System.out.println(EntityUtils.toString(response.getEntity()));\n    }\n    EntityUtils.consume(response.getEntity());\n    return null;\n});"
        }, {
          "lang" : "C#",
          "label" : "C#",
          "source" : "HttpClient client = new HttpClient();\n\nstring[] imageName = new string[] {\"/MyImageFolder/MyImage.png\"};\nstring accessKey = \"\";\n\nMultipartFormDataContent content = new MultipartFormDataContent();\ncontent.Add(new StringContent(imageName[0]), \"imageName\");\ncontent.Add(new StringContent(accessKey), \"accessKey\");\n\nusing (HttpResponseMessage response = await client.PostAsync(\"https://us1.dws4.docmosis.com/api/getImage\", content)) {\n    if (response.StatusCode == HttpStatusCode.OK) {\n        using (FileStream outputFile = File.Create(\"MyImage.png\")) {\n            using (Stream outputStream = await response.Content.ReadAsStreamAsync()) {\n                await outputStream.CopyToAsync(outputFile);\n                Console.WriteLine(\"File saved to:\" + outputFile.Name);\n            }\n        }\n    } else {\n        string responseString = await response.Content.ReadAsStringAsync();\n        Console.WriteLine(responseString);\n    }\n}"
        }, {
          "lang" : "Python",
          "label" : "Python",
          "source" : "import requests\n\nimageName = [ '/MyImageFolder/MyImage.png' ]\naccessKey = ''\n\npayload = {\n    'imageName' : imageName[0],\n    'accessKey' : accessKey\n}\n\nresponse = requests.post('https://us1.dws4.docmosis.com/api/getImage', stream=True, data=payload)\n\nif response.status_code == 200:\n    with open('MyImage.png', 'wb') as fd:\n        for chunk in response.iter_content(4096):\n            fd.write(chunk)\n    print('Saved to MyImage.png')\nelse:\n    print(response.text)"
        }, {
          "lang" : "PHP",
          "label" : "Php",
          "source" : "<?php\n\n$imageName = array( \"/MyImageFolder/MyImage.png\" );\n$accessKey = \"\";\n\n$request = array(\n    \"imageName\" => $imageName[0],\n    \"accessKey\" => $accessKey\n);\n\n$headers = array(\"Content-Type: multipart/form-data\");\n\n$curl = curl_init(\"https://us1.dws4.docmosis.com/api/getImage\");\n\ncurl_setopt($curl, CURLOPT_HEADER, 0);\ncurl_setopt($curl, CURLOPT_POST, 1);\ncurl_setopt($curl, CURLOPT_POSTFIELDS, $request);\ncurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\n\nif ($status === 200) {\n    $outputFile = file_put_contents(\"MyImage.png\", $response);\n    echo \"Saved to MyImage.png\";\n} else {\n    echo $response;\n}\n\n?>"
        }, {
          "lang" : "JavaScript",
          "label" : "Node.js",
          "source" : "const fs = require(\"fs\");\nconst { Readable } = require(\"node:stream\");\n\nconst formData = new FormData();\nformData.append(\"imageName\", \"/MyImageFolder/MyImage.png\");\nformData.append(\"accessKey\", \"\");\n\nconst options = {\n    method: \"POST\",\n    body : formData\n};\n\nfetch(\"https://us1.dws4.docmosis.com/api/getImage\", options)\n    .then(response => {\n        if (response.ok) {\n            const destination = fs.createWriteStream(\"MyImage.png\");\n            Readable.fromWeb(response.body).pipe(destination);\n            console.log(\"Saved to MyImage.png\");\n        } else {\n            return response.text().then(body => {\n                console.log(body);\n            })\n        }\n    });"
        } ]
      }
    },
    "/listImages" : {
      "post" : {
        "tags" : [ "Images" ],
        "summary" : "List Images",
        "description" : "The List Images service lists the images available.",
        "operationId" : "listImage",
        "requestBody" : {
          "content" : {
            "multipart/form-data" : {
              "schema" : {
                "$ref" : "#/components/schemas/ListImagesRequest"
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ListImagesRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "Request succeeded",
            "headers" : {
              "X-Docmosis-Server" : {
                "$ref" : "#/components/headers/X-Docmosis-Server"
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ListImagesResponse"
                }
              }
            }
          },
          "400" : {
            "$ref" : "#/components/responses/400"
          },
          "404" : {
            "$ref" : "#/components/responses/404"
          },
          "415" : {
            "$ref" : "#/components/responses/415"
          },
          "500" : {
            "$ref" : "#/components/responses/500"
          }
        },
        "x-codeSamples" : [ {
          "lang" : "Shell",
          "label" : "Curl",
          "source" : "curl --request POST \\\n--url https://us1.dws4.docmosis.com/api/listImages \\\n--form 'accessKey='"
        }, {
          "lang" : "Java",
          "label" : "Java",
          "source" : "//This example uses the Apache HttpClient (v5) library\n\nHttpClient client = HttpClientBuilder.create().build();\nHttpPost request = new HttpPost(\"https://us1.dws4.docmosis.com/api/listImages\");\n\nString accessKey = \"\";\n\nMultipartEntityBuilder builder = MultipartEntityBuilder.create();\nbuilder.addTextBody(\"accessKey\", accessKey);\nHttpEntity payLoad = builder.build();\nrequest.setEntity(payLoad);\n\nclient.execute(request, response -> {\n    System.out.println(EntityUtils.toString(response.getEntity()));\n    EntityUtils.consume(response.getEntity());\n    return null;\n});"
        }, {
          "lang" : "C#",
          "label" : "C#",
          "source" : "HttpClient client = new HttpClient();\n\nstring accessKey = \"\";\n\nMultipartFormDataContent content = new MultipartFormDataContent();\ncontent.Add(new StringContent(accessKey), \"accessKey\");\n\nusing (HttpResponseMessage response = await client.PostAsync(\"https://us1.dws4.docmosis.com/api/listImages\", content)) {\n    string responseString = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(responseString);\n}"
        }, {
          "lang" : "Python",
          "label" : "Python",
          "source" : "import requests\n\naccessKey = ''\n\npayload = {\n    'accessKey' : accessKey\n}\n\nresponse = requests.post('https://us1.dws4.docmosis.com/api/listImages', stream=True, data=payload)\n\nprint(response.text)"
        }, {
          "lang" : "PHP",
          "label" : "Php",
          "source" : "<?php\n\n$accessKey = \"\";\n\n$request = array(\n    \"accessKey\" => $accessKey\n);\n\n$headers = array(\"Content-Type: multipart/form-data\");\n\n$curl = curl_init(\"https://us1.dws4.docmosis.com/api/listImages\");\n\ncurl_setopt($curl, CURLOPT_HEADER, 0);\ncurl_setopt($curl, CURLOPT_POST, 1);\ncurl_setopt($curl, CURLOPT_POSTFIELDS, $request);\ncurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\n\necho $response;\n\n?>"
        }, {
          "lang" : "JavaScript",
          "label" : "Node.js",
          "source" : "const formData = new FormData();\nformData.append(\"accessKey\", \"\");\n\nconst options = {\n    method: \"POST\",\n    body : formData\n};\n\nfetch(\"https://us1.dws4.docmosis.com/api/listImages\", options)\n    .then(response => {\n        return response.text().then(body => {\n            console.log(body);\n        })\n    });"
        } ]
      }
    },
    "/uploadImage" : {
      "post" : {
        "tags" : [ "Images" ],
        "summary" : "Upload Image",
        "description" : "The Upload Image service works the same as the Upload Template service, but is significantly simpler since there are few options to set.  \n\nUploading images creates \"stock\" images that data can reference when generating documents and Docmosis will take care of placing them into the document.  This saves bandwidth and time when rendering the same images frequently.  An alternative to uploading \"stock\" images is to place the images into the template and selectively filter them out using conditional sections.",
        "operationId" : "uploadImage",
        "requestBody" : {
          "content" : {
            "multipart/form-data" : {
              "schema" : {
                "$ref" : "#/components/schemas/UploadImageRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "The response is an indicator of success or failure plus any further helpful information.  When the upload is successful, details are returned under the “imageDetails” key.",
            "headers" : {
              "X-Docmosis-Server" : {
                "$ref" : "#/components/headers/X-Docmosis-Server"
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/UploadImageResponse"
                }
              }
            }
          },
          "400" : {
            "$ref" : "#/components/responses/400"
          },
          "404" : {
            "$ref" : "#/components/responses/404"
          },
          "415" : {
            "$ref" : "#/components/responses/415"
          },
          "500" : {
            "$ref" : "#/components/responses/500"
          }
        },
        "x-codeSamples" : [ {
          "lang" : "Shell",
          "label" : "Curl",
          "source" : "curl --request POST \\\n--url https://us1.dws4.docmosis.com/api/uploadImage \\\n--form 'imageFile=@MyImage.png' \\\n--form 'accessKey='"
        }, {
          "lang" : "Java",
          "label" : "Java",
          "source" : "//This example uses the Apache HttpClient (v5) library\n\nHttpClient client = HttpClientBuilder.create().build();\nHttpPost request = new HttpPost(\"https://us1.dws4.docmosis.com/api/uploadImage\");\n\nFile imageFile = new File(\"MyImage.png\");\nString accessKey = \"\";\n\nMultipartEntityBuilder builder = MultipartEntityBuilder.create();\nbuilder.addBinaryBody(\"imageFile\", imageFile);\nbuilder.addTextBody(\"accessKey\", accessKey);\nHttpEntity payLoad = builder.build();\nrequest.setEntity(payLoad);\n\nclient.execute(request, response -> {\n    System.out.println(EntityUtils.toString(response.getEntity()));\n    EntityUtils.consume(response.getEntity());\n    return null;\n});"
        }, {
          "lang" : "C#",
          "label" : "C#",
          "source" : "HttpClient client = new HttpClient();\n\nFileInfo imageFile = new FileInfo(\"MyImage.png\");\nstring accessKey = \"\";\n\nMultipartFormDataContent content = new MultipartFormDataContent();\ncontent.Add(new StreamContent(imageFile.OpenRead()), \"imageFile\", imageFile.Name);\ncontent.Add(new StringContent(accessKey), \"accessKey\");\n\nusing (HttpResponseMessage response = await client.PostAsync(\"https://us1.dws4.docmosis.com/api/uploadImage\", content)) {\n    string responseString = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(responseString);\n}"
        }, {
          "lang" : "Python",
          "label" : "Python",
          "source" : "import requests\n\nimageFile = 'MyImage.png'\naccessKey = ''\n\npayload = {\n    'accessKey' : accessKey\n}\n\nfiles = {'imageFile': open(imageFile, 'rb')}\n\nresponse = requests.post('https://us1.dws4.docmosis.com/api/uploadImage', stream=True, data=payload, files=files)\n\nprint(response.text)"
        }, {
          "lang" : "PHP",
          "label" : "Php",
          "source" : "<?php\n\n$imageFile = curl_file_create(\"full/path/to/MyImage.png\", null, \"MyImage.png\");\n$accessKey = \"\";\n\n$request = array(\n    \"imageFile\" => $imageFile,\n    \"accessKey\" => $accessKey\n);\n\n$headers = array(\"Content-Type: multipart/form-data\");\n\n$curl = curl_init(\"https://us1.dws4.docmosis.com/api/uploadImage\");\n\ncurl_setopt($curl, CURLOPT_HEADER, 0);\ncurl_setopt($curl, CURLOPT_POST, 1);\ncurl_setopt($curl, CURLOPT_POSTFIELDS, $request);\ncurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\n\necho $response;\n\n?>"
        }, {
          "lang" : "JavaScript",
          "label" : "Node.js",
          "source" : "const fs = require(\"fs\");\nconst { Readable } = require(\"node:stream\");\n\nconst formData = new FormData();\nformData.append(\"imageFile\", new Blob([fs.readFileSync(\"MyImage.png\")]));\nformData.append(\"accessKey\", \"\");\n\nconst options = {\n    method: \"POST\",\n    body : formData\n};\n\nfetch(\"https://us1.dws4.docmosis.com/api/uploadImage\", options)\n    .then(response => {\n        return response.text().then(body => {\n            console.log(body);\n        })\n    });"
        } ]
      }
    },
    "/render" : {
      "post" : {
        "tags" : [ "Generate" ],
        "summary" : "Render",
        "description" : "The Render service is the document generation ‘work-horse’, and it is expected to be the main service that will be used. \nApplications call the Render service with data and instructions indicating: which template to use, the formats required, where to send the result, and more.\n\nSee notes above for more details on important parameters.\n",
        "operationId" : "render",
        "requestBody" : {
          "content" : {
            "multipart/form-data" : {
              "schema" : {
                "$ref" : "#/components/schemas/RenderRequest"
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RenderRequest"
              },
              "examples" : {
                "JSON Render to File" : {
                  "description" : "Example JSON Render Request which returns a file",
                  "value" : {
                    "accessKey" : "",
                    "templateName" : "/WelcomeTemplate.docx",
                    "outputName" : "output.pdf",
                    "data" : {
                      "title" : "Hello from OpenApi",
                      "messages" : [ {
                        "msg" : "This cloud experience is better than I thought."
                      }, {
                        "msg" : "The sun is shining."
                      }, {
                        "msg" : "Right, now back to work."
                      } ]
                    }
                  }
                },
                "JSON Render to S3 Bucket" : {
                  "description" : "Example JSON Render Request which stores the result in an S3 Bucket",
                  "value" : {
                    "accessKey" : "",
                    "templateName" : "/WelcomeTemplate.docx",
                    "outputName" : "output.pdf",
                    "storeTo" : "s3:my.amazon.bucket,mydocument1.pdf",
                    "data" : {
                      "title" : "Hello from OpenApi",
                      "messages" : [ {
                        "msg" : "This cloud experience is better than I thought."
                      }, {
                        "msg" : "The sun is shining."
                      }, {
                        "msg" : "Right, now back to work."
                      } ]
                    }
                  }
                },
                "JSON Render to Email" : {
                  "description" : "Example JSON Render Request which sends the result via email",
                  "value" : {
                    "accessKey" : "",
                    "templateName" : "/WelcomeTemplate.docx",
                    "outputName" : "output.pdf",
                    "storeTo" : "mailto:email@example.com",
                    "mailSubject" : "Email from Docmosis Web Services",
                    "mailBodyText" : "Hi You,\n\nPlease find attached your rendered Document from Docmosis Web Services.\n\nHave a nice day!\n\nRegards,\nDocmosis",
                    "data" : {
                      "title" : "Hello from OpenApi",
                      "messages" : [ {
                        "msg" : "This cloud experience is better than I thought."
                      }, {
                        "msg" : "The sun is shining."
                      }, {
                        "msg" : "Right, now back to work."
                      } ]
                    }
                  }
                }
              }
            },
            "application/xml" : {
              "schema" : {
                "$ref" : "#/components/schemas/RenderRequest"
              },
              "examples" : {
                "XML Render to File" : {
                  "description" : "Example XML Render Request which returns a file",
                  "value" : "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<render accessKey=\"\" templateName=\"/WelcomeTemplate.docx\" outputName=\"output.pdf\">\n  <data>\n    <title>Hello from OpenApi</title>\n    <messages>\n      <msg>This cloud experience is better than I thought.</msg>\n    </messages>\n    <messages>\n      <msg>The sun is shining.</msg>\n    </messages>\n    <messages>\n      <msg>Right, now back to work.</msg>\n    </messages>\n  </data>\n</render>"
                },
                "XML Render to S3 Bucket" : {
                  "description" : "Example XML Render Request which stores the result in an S3 Bucket",
                  "value" : "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<render accessKey=\"\" templateName=\"/WelcomeTemplate.docx\" outputName=\"output.pdf\" storeTo=\"s3:my.amazon.bucket,mydocument1.pdf\">\n  <data>\n    <title>Hello from OpenApi</title>\n    <messages>\n      <msg>This cloud experience is better than I thought.</msg>\n    </messages>\n    <messages>\n      <msg>The sun is shining.</msg>\n    </messages>\n    <messages>\n      <msg>Right, now back to work.</msg>\n    </messages>\n  </data>\n</render>"
                },
                "XML Render to Email" : {
                  "description" : "Example XML Render Request which sends the result via email",
                  "value" : "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<render accessKey=\"\" templateName=\"/WelcomeTemplate.docx\" outputName=\"output.pdf\" storeTo=\"mailto:email@example.com\" mailSubject=\"Email from Docmosis Web Services\"><mailBodyText>Hi You,\n\nPlease find attached your rendered Document from Docmosis Web Services.\n\nHave a nice day!\n\nRegards,\nDocmosis</mailBodyText>\n  <data>\n    <title>Hello from OpenApi</title>\n    <messages>\n      <msg>This cloud experience is better than I thought.</msg>\n    </messages>\n    <messages>\n      <msg>The sun is shining.</msg>\n    </messages>\n    <messages>\n      <msg>Right, now back to work.</msg>\n    </messages>\n  </data>\n</render>"
                }
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "If storeTo includes \"stream\" then the body of the response is the binary document stream. If storeTo excludes \"stream\" then the body of the response is a JSON or XML object.",
            "headers" : {
              "X-Docmosis-PagesRendered" : {
                "$ref" : "#/components/headers/X-Docmosis-PagesRendered"
              },
              "X-Docmosis-Zip-Created" : {
                "$ref" : "#/components/headers/X-Docmosis-Zip-Created"
              },
              "X-Docmosis-Server" : {
                "$ref" : "#/components/headers/X-Docmosis-Server"
              },
              "X-Docmosis-Document-Errors-Detected" : {
                "$ref" : "#/components/headers/X-Docmosis-Document-Errors-Detected"
              },
              "Retry-After" : {
                "$ref" : "#/components/headers/Retry-After"
              },
              "X-Docmosis-Queue-Available-Pct" : {
                "$ref" : "#/components/headers/X-Docmosis-Queue-Available-Pct"
              },
              "X-Docmosis-Queue-Rejected" : {
                "$ref" : "#/components/headers/X-Docmosis-Queue-Rejected"
              },
              "X-Docmosis-Queue-Delay-Seconds" : {
                "$ref" : "#/components/headers/X-Docmosis-Queue-Delay-Seconds"
              },
              "X-Docmosis-RequestId" : {
                "$ref" : "#/components/headers/X-Docmosis-RequestId"
              }
            },
            "content" : {
              "application/octet-stream" : {
                "schema" : {
                  "type" : "string",
                  "format" : "binary"
                }
              },
              "application/json" : {
                "schema" : {
                  "oneOf" : [ {
                    "$ref" : "#/components/schemas/Response"
                  }, {
                    "$ref" : "#/components/schemas/RenderResponse"
                  } ]
                }
              },
              "application/xml" : {
                "schema" : {
                  "oneOf" : [ {
                    "$ref" : "#/components/schemas/Response"
                  }, {
                    "$ref" : "#/components/schemas/RenderResponse"
                  } ]
                }
              }
            }
          },
          "400" : {
            "description" : "Bad Request.",
            "headers" : {
              "X-Docmosis-Server" : {
                "$ref" : "#/components/headers/X-Docmosis-Server"
              },
              "Retry-After" : {
                "$ref" : "#/components/headers/Retry-After"
              },
              "X-Docmosis-Queue-Available-Pct" : {
                "$ref" : "#/components/headers/X-Docmosis-Queue-Available-Pct"
              },
              "X-Docmosis-Queue-Rejected" : {
                "$ref" : "#/components/headers/X-Docmosis-Queue-Rejected"
              },
              "X-Docmosis-Queue-Delay-Seconds" : {
                "$ref" : "#/components/headers/X-Docmosis-Queue-Delay-Seconds"
              },
              "X-Docmosis-RequestId" : {
                "$ref" : "#/components/headers/X-Docmosis-RequestId"
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "oneOf" : [ {
                    "$ref" : "#/components/schemas/Response"
                  }, {
                    "$ref" : "#/components/schemas/RenderResponse"
                  } ]
                }
              },
              "application/xml" : {
                "schema" : {
                  "oneOf" : [ {
                    "$ref" : "#/components/schemas/Response"
                  }, {
                    "$ref" : "#/components/schemas/RenderResponse"
                  } ]
                }
              }
            }
          },
          "404" : {
            "$ref" : "#/components/responses/404"
          },
          "415" : {
            "$ref" : "#/components/responses/415"
          },
          "500" : {
            "$ref" : "#/components/responses/500"
          }
        },
        "x-codeSamples" : [ {
          "lang" : "Shell",
          "label" : "Curl",
          "source" : "curl --request POST \\\n--url https://us1.dws4.docmosis.com/api/render \\\n--header 'Content-Type: application/json' \\\n--data '\n{\n  \"outputName\": \"output.pdf\",\n  \"templateName\": \"/WelcomeTemplate.docx\",\n  \"data\": {\n    \"title\": \"Hello from OpenApi\",\n    \"messages\": [\n      {\n        \"msg\": \"This cloud experience is better than I thought.\"\n      },\n      {\n        \"msg\": \"The sun is shining.\"\n      },\n      {\n        \"msg\": \"Right, now back to work.\"\n      }\n    ]\n  },\n  \"accessKey\": \"\"\n}\n' \\\n--output 'output.pdf'"
        }, {
          "lang" : "Java",
          "label" : "Java",
          "source" : "//This example uses the Apache HttpClient (v5) library\n\nHttpClient client = HttpClientBuilder.create().build();\nHttpPost request = new HttpPost(\"https://us1.dws4.docmosis.com/api/render\");\nrequest.addHeader(\"content-type\", \"application/json\");\n\nString json = \n\"{\" +\n \"  \\\"outputName\\\": \\\"output.pdf\\\",\" +\n \"  \\\"templateName\\\": \\\"/WelcomeTemplate.docx\\\",\" +\n \"  \\\"data\\\": {\" +\n \"    \\\"title\\\": \\\"Hello from OpenApi\\\",\" +\n \"    \\\"messages\\\": [\" +\n \"      {\" +\n \"        \\\"msg\\\": \\\"This cloud experience is better than I thought.\\\"\" +\n \"      },\" +\n \"      {\" +\n \"        \\\"msg\\\": \\\"The sun is shining.\\\"\" +\n \"      },\" +\n \"      {\" +\n \"        \\\"msg\\\": \\\"Right, now back to work.\\\"\" +\n \"      }\" +\n \"    ]\" +\n \"  },\" +\n \"  \\\"accessKey\\\": \\\"\\\"\" +\n \"}\";\nHttpEntity payLoad = new StringEntity(json);\nrequest.setEntity(payLoad);\n\nclient.execute(request, response -> {\n    if (response.getCode() == HttpStatus.SC_OK) {\n        File outputFile = new File(\"output.pdf\");\n        FileOutputStream outstream = new FileOutputStream(outputFile);\n        response.getEntity().writeTo(outstream);\n        System.out.println(\"File saved to:\" + outputFile.getAbsolutePath());\n    } else {\n        System.out.println(EntityUtils.toString(response.getEntity()));\n    }\n    EntityUtils.consume(response.getEntity());\n    return null;\n});"
        }, {
          "lang" : "C#",
          "label" : "C#",
          "source" : "HttpClient client = new HttpClient();\n\nstring json = \n\"{\" +\n \"  \\\"outputName\\\": \\\"output.pdf\\\",\" +\n \"  \\\"templateName\\\": \\\"/WelcomeTemplate.docx\\\",\" +\n \"  \\\"data\\\": {\" +\n \"    \\\"title\\\": \\\"Hello from OpenApi\\\",\" +\n \"    \\\"messages\\\": [\" +\n \"      {\" +\n \"        \\\"msg\\\": \\\"This cloud experience is better than I thought.\\\"\" +\n \"      },\" +\n \"      {\" +\n \"        \\\"msg\\\": \\\"The sun is shining.\\\"\" +\n \"      },\" +\n \"      {\" +\n \"        \\\"msg\\\": \\\"Right, now back to work.\\\"\" +\n \"      }\" +\n \"    ]\" +\n \"  },\" +\n \"  \\\"accessKey\\\": \\\"\\\"\" +\n \"}\";\n\nStringContent content = new StringContent(json, Encoding.UTF8, \"application/json\");\n\nusing (HttpResponseMessage response = await client.PostAsync(\"https://us1.dws4.docmosis.com/api/render\", content)) {\n    if (response.StatusCode == HttpStatusCode.OK) {\n        using (FileStream outputFile = File.Create(\"output.pdf\")) {\n            using (Stream outputStream = await response.Content.ReadAsStreamAsync()) {\n                await outputStream.CopyToAsync(outputFile);\n                Console.WriteLine(\"File saved to:\" + outputFile.Name);\n            }\n        }\n    } else {\n        string responseString = await response.Content.ReadAsStringAsync();\n        Console.WriteLine(responseString);\n    }\n}"
        }, {
          "lang" : "Python",
          "label" : "Python",
          "source" : "import requests\n\njson = {\n  'outputName': 'output.pdf',\n  'templateName': '/WelcomeTemplate.docx',\n  'data': {\n    'title': 'Hello from OpenApi',\n    'messages': [\n      {\n        'msg': 'This cloud experience is better than I thought.'\n      },\n      {\n        'msg': 'The sun is shining.'\n      },\n      {\n        'msg': 'Right, now back to work.'\n      }\n    ]\n  },\n  'accessKey': ''\n}\n\nheaders = {'content-type': 'application/json'}\n\nresponse = requests.post('https://us1.dws4.docmosis.com/api/render', stream=True, headers=headers, json=json)\n\nif response.status_code == 200:\n    with open('output.pdf', 'wb') as fd:\n        for chunk in response.iter_content(4096):\n            fd.write(chunk)\n    print('Saved to output.pdf')\nelse:\n    print(response.text)"
        }, {
          "lang" : "PHP",
          "label" : "Php",
          "source" : "<?php\n\n$json = json_decode('{\n  \"outputName\": \"output.pdf\",\n  \"templateName\": \"/WelcomeTemplate.docx\",\n  \"data\": {\n    \"title\": \"Hello from OpenApi\",\n    \"messages\": [\n      {\n        \"msg\": \"This cloud experience is better than I thought.\"\n      },\n      {\n        \"msg\": \"The sun is shining.\"\n      },\n      {\n        \"msg\": \"Right, now back to work.\"\n      }\n    ]\n  },\n  \"accessKey\": \"\"\n}');\n\n$request = json_encode($json);\n\n$headers = array(\"Content-Type: application/json\");\n\n$curl = curl_init(\"https://us1.dws4.docmosis.com/api/render\");\n\ncurl_setopt($curl, CURLOPT_HEADER, 0);\ncurl_setopt($curl, CURLOPT_POST, 1);\ncurl_setopt($curl, CURLOPT_POSTFIELDS, $request);\ncurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\n\nif ($status === 200) {\n    $outputFile = file_put_contents(\"output.pdf\", $response);\n    echo \"Saved to output.pdf\";\n} else {\n    echo $response;\n}\n\n?>"
        }, {
          "lang" : "JavaScript",
          "label" : "Node.js",
          "source" : "const fs = require(\"fs\");\nconst { Readable } = require(\"node:stream\");\n\nconst options = {\n    method: \"POST\",\n    headers: {\n        \"Content-Type\": \"application/json\"\n    },\n    body : JSON.stringify({\n        outputName : \"output.pdf\",\n        templateName : \"/WelcomeTemplate.docx\",\n        data : {\n              \"title\": \"Hello from OpenApi\",\n              \"messages\": [\n                {\n                  \"msg\": \"This cloud experience is better than I thought.\"\n                },\n                {\n                  \"msg\": \"The sun is shining.\"\n                },\n                {\n                  \"msg\": \"Right, now back to work.\"\n                }\n              ]\n            },\n        accessKey : \"\"\n    })\n};\n\nfetch(\"https://us1.dws4.docmosis.com/api/render\", options)\n    .then(response => {\n        if (response.ok) {\n            const destination = fs.createWriteStream(\"output.pdf\");\n            Readable.fromWeb(response.body).pipe(destination);\n            console.log(\"Saved to output.pdf\");\n        } else {\n            return response.text().then(body => {\n                console.log(body);\n            })\n        }\n    });"
        } ]
      }
    },
    "/getRenderQueue" : {
      "post" : {
        "tags" : [ "Admin" ],
        "summary" : "Get Render Queue",
        "description" : "The Get Render Queue service returns info about the current status of the render queue for the specified Environment.",
        "operationId" : "getRenderQueue",
        "requestBody" : {
          "content" : {
            "multipart/form-data" : {
              "schema" : {
                "$ref" : "#/components/schemas/RenderQueueRequest"
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RenderQueueRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "Request succeeded",
            "headers" : {
              "X-Docmosis-Server" : {
                "$ref" : "#/components/headers/X-Docmosis-Server"
              },
              "X-Docmosis-Queue-Available-Pct" : {
                "$ref" : "#/components/headers/X-Docmosis-Queue-Available-Pct"
              },
              "X-Docmosis-Queue-Delay-Seconds" : {
                "$ref" : "#/components/headers/X-Docmosis-Queue-Delay-Seconds"
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RenderQueueResponse"
                }
              }
            }
          },
          "400" : {
            "$ref" : "#/components/responses/400"
          },
          "404" : {
            "$ref" : "#/components/responses/404"
          },
          "415" : {
            "$ref" : "#/components/responses/415"
          },
          "500" : {
            "$ref" : "#/components/responses/500"
          }
        },
        "x-codeSamples" : [ {
          "lang" : "Shell",
          "label" : "Curl",
          "source" : "curl --request POST \\\n--url https://us1.dws4.docmosis.com/api/getRenderQueue \\\n--form 'accessKey='"
        }, {
          "lang" : "Java",
          "label" : "Java",
          "source" : "//This example uses the Apache HttpClient (v5) library\n\nHttpClient client = HttpClientBuilder.create().build();\nHttpPost request = new HttpPost(\"https://us1.dws4.docmosis.com/api/getRenderQueue\");\n\nString accessKey = \"\";\n\nMultipartEntityBuilder builder = MultipartEntityBuilder.create();\nbuilder.addTextBody(\"accessKey\", accessKey);\nHttpEntity payLoad = builder.build();\nrequest.setEntity(payLoad);\n\nclient.execute(request, response -> {\n    System.out.println(EntityUtils.toString(response.getEntity()));\n    EntityUtils.consume(response.getEntity());\n    return null;\n});"
        }, {
          "lang" : "C#",
          "label" : "C#",
          "source" : "HttpClient client = new HttpClient();\n\nstring accessKey = \"\";\n\nMultipartFormDataContent content = new MultipartFormDataContent();\ncontent.Add(new StringContent(accessKey), \"accessKey\");\n\nusing (HttpResponseMessage response = await client.PostAsync(\"https://us1.dws4.docmosis.com/api/getRenderQueue\", content)) {\n    string responseString = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(responseString);\n}"
        }, {
          "lang" : "Python",
          "label" : "Python",
          "source" : "import requests\n\naccessKey = ''\n\npayload = {\n    'accessKey' : accessKey\n}\n\nresponse = requests.post('https://us1.dws4.docmosis.com/api/getRenderQueue', stream=True, data=payload)\n\nprint(response.text)"
        }, {
          "lang" : "PHP",
          "label" : "Php",
          "source" : "<?php\n\n$accessKey = \"\";\n\n$request = array(\n    \"accessKey\" => $accessKey\n);\n\n$headers = array(\"Content-Type: multipart/form-data\");\n\n$curl = curl_init(\"https://us1.dws4.docmosis.com/api/getRenderQueue\");\n\ncurl_setopt($curl, CURLOPT_HEADER, 0);\ncurl_setopt($curl, CURLOPT_POST, 1);\ncurl_setopt($curl, CURLOPT_POSTFIELDS, $request);\ncurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\n\necho $response;\n\n?>"
        }, {
          "lang" : "JavaScript",
          "label" : "Node.js",
          "source" : "const formData = new FormData();\nformData.append(\"accessKey\", \"\");\n\nconst options = {\n    method: \"POST\",\n    body : formData\n};\n\nfetch(\"https://us1.dws4.docmosis.com/api/getRenderQueue\", options)\n    .then(response => {\n        return response.text().then(body => {\n            console.log(body);\n        })\n    });"
        } ]
      }
    },
    "/getRenderTags" : {
      "post" : {
        "tags" : [ "Admin" ],
        "summary" : "Get Render Tags",
        "description" : "The Get Render Tags service allows statistics to be retrieved on renders that were tagged with user-defined phrases (“tags”).   The statistics include page counts and document counts that have been collected against the tags, aggregated monthly.  This may be useful for reporting the level of activity of a group of users, or a feature.",
        "operationId" : "getRenderTags",
        "requestBody" : {
          "content" : {
            "multipart/form-data" : {
              "schema" : {
                "$ref" : "#/components/schemas/GetRenderTagsRequest"
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/GetRenderTagsRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "Request succeeded",
            "headers" : {
              "X-Docmosis-Server" : {
                "$ref" : "#/components/headers/X-Docmosis-Server"
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GetRenderTagsResponse"
                },
                "examples" : {
                  "Example Response" : {
                    "description" : "Example Response",
                    "value" : {
                      "succeeded" : true,
                      "renderTags" : [ {
                        "year" : "2017",
                        "month" : "8",
                        "tags" : [ {
                          "name" : "abc",
                          "countPages" : "0",
                          "countDocuments" : "0"
                        }, {
                          "name" : "def",
                          "countPages" : "0",
                          "countDocuments" : "0"
                        }, {
                          "name" : "abc;def",
                          "countPages" : "0",
                          "countDocuments" : "0"
                        } ]
                      }, {
                        "year" : "2017",
                        "month" : "9",
                        "tags" : [ {
                          "name" : "abc",
                          "countPages" : "6",
                          "countDocuments" : "4"
                        }, {
                          "name" : "def",
                          "countPages" : "4",
                          "countDocuments" : "2"
                        }, {
                          "name" : "abc;def",
                          "countPages" : "2",
                          "countDocuments" : "1"
                        } ]
                      } ]
                    }
                  }
                }
              }
            }
          },
          "400" : {
            "$ref" : "#/components/responses/400"
          },
          "404" : {
            "$ref" : "#/components/responses/404"
          },
          "415" : {
            "$ref" : "#/components/responses/415"
          },
          "500" : {
            "$ref" : "#/components/responses/500"
          }
        },
        "x-codeSamples" : [ {
          "lang" : "Shell",
          "label" : "Curl",
          "source" : "curl --request POST \\\n--url https://us1.dws4.docmosis.com/api/getRenderTags \\\n--form 'tags=abc;def' \\\n--form 'accessKey='"
        }, {
          "lang" : "Java",
          "label" : "Java",
          "source" : "//This example uses the Apache HttpClient (v5) library\n\nHttpClient client = HttpClientBuilder.create().build();\nHttpPost request = new HttpPost(\"https://us1.dws4.docmosis.com/api/getRenderTags\");\n\nString tags = \"abc;def\";\nString accessKey = \"\";\n\nMultipartEntityBuilder builder = MultipartEntityBuilder.create();\nbuilder.addTextBody(\"tags\", tags);\nbuilder.addTextBody(\"accessKey\", accessKey);\nHttpEntity payLoad = builder.build();\nrequest.setEntity(payLoad);\n\nclient.execute(request, response -> {\n    System.out.println(EntityUtils.toString(response.getEntity()));\n    EntityUtils.consume(response.getEntity());\n    return null;\n});"
        }, {
          "lang" : "C#",
          "label" : "C#",
          "source" : "HttpClient client = new HttpClient();\n\nstring tags = \"abc;def\";\nstring accessKey = \"\";\n\nMultipartFormDataContent content = new MultipartFormDataContent();\ncontent.Add(new StringContent(tags), \"tags\");\ncontent.Add(new StringContent(accessKey), \"accessKey\");\n\nusing (HttpResponseMessage response = await client.PostAsync(\"https://us1.dws4.docmosis.com/api/getRenderTags\", content)) {\n    string responseString = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(responseString);\n}"
        }, {
          "lang" : "Python",
          "label" : "Python",
          "source" : "import requests\n\ntags = 'abc;def'\naccessKey = ''\n\npayload = {\n    'tags' : tags,\n    'accessKey' : accessKey\n}\n\nresponse = requests.post('https://us1.dws4.docmosis.com/api/getRenderTags', stream=True, data=payload)\n\nprint(response.text)"
        }, {
          "lang" : "PHP",
          "label" : "Php",
          "source" : "<?php\n\n$tags = \"abc;def\";\n$accessKey = \"\";\n\n$request = array(\n    \"tags\" => $tags,\n    \"accessKey\" => $accessKey\n);\n\n$headers = array(\"Content-Type: multipart/form-data\");\n\n$curl = curl_init(\"https://us1.dws4.docmosis.com/api/getRenderTags\");\n\ncurl_setopt($curl, CURLOPT_HEADER, 0);\ncurl_setopt($curl, CURLOPT_POST, 1);\ncurl_setopt($curl, CURLOPT_POSTFIELDS, $request);\ncurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\n\necho $response;\n\n?>"
        }, {
          "lang" : "JavaScript",
          "label" : "Node.js",
          "source" : "const formData = new FormData();\nformData.append(\"tags\", \"abc;def\");\nformData.append(\"accessKey\", \"\");\n\nconst options = {\n    method: \"POST\",\n    body : formData\n};\n\nfetch(\"https://us1.dws4.docmosis.com/api/getRenderTags\", options)\n    .then(response => {\n        return response.text().then(body => {\n            console.log(body);\n        })\n    });"
        } ]
      }
    },
    "/deleteTemplate" : {
      "post" : {
        "tags" : [ "Templates" ],
        "summary" : "Delete Template",
        "description" : "The Delete Template service deletes the specified template.  Multiple templateName parameters can be specified to delete multiple templates.",
        "operationId" : "deleteTemplate",
        "requestBody" : {
          "content" : {
            "multipart/form-data" : {
              "schema" : {
                "$ref" : "#/components/schemas/DeleteTemplateRequest"
              },
              "encoding" : {
                "templateName" : {
                  "explode" : true
                }
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/DeleteTemplateRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "$ref" : "#/components/responses/200"
          },
          "400" : {
            "$ref" : "#/components/responses/400"
          },
          "404" : {
            "$ref" : "#/components/responses/404"
          },
          "415" : {
            "$ref" : "#/components/responses/415"
          },
          "500" : {
            "$ref" : "#/components/responses/500"
          }
        },
        "x-codeSamples" : [ {
          "lang" : "Shell",
          "label" : "Curl",
          "source" : "curl --request POST \\\n--url https://us1.dws4.docmosis.com/api/deleteTemplate \\\n--form 'templateName=/MyFolder/MyTemplate.docx' \\\n--form 'accessKey='"
        }, {
          "lang" : "Java",
          "label" : "Java",
          "source" : "//This example uses the Apache HttpClient (v5) library\n\nHttpClient client = HttpClientBuilder.create().build();\nHttpPost request = new HttpPost(\"https://us1.dws4.docmosis.com/api/deleteTemplate\");\n\nString[] templateName = new String[] {\"/MyFolder/MyTemplate.docx\"};\nString accessKey = \"\";\n\nMultipartEntityBuilder builder = MultipartEntityBuilder.create();\nbuilder.addTextBody(\"templateName\", templateName[0]);\nbuilder.addTextBody(\"accessKey\", accessKey);\nHttpEntity payLoad = builder.build();\nrequest.setEntity(payLoad);\n\nclient.execute(request, response -> {\n    System.out.println(EntityUtils.toString(response.getEntity()));\n    EntityUtils.consume(response.getEntity());\n    return null;\n});"
        }, {
          "lang" : "C#",
          "label" : "C#",
          "source" : "HttpClient client = new HttpClient();\n\nstring[] templateName = new string[] {\"/MyFolder/MyTemplate.docx\"};\nstring accessKey = \"\";\n\nMultipartFormDataContent content = new MultipartFormDataContent();\ncontent.Add(new StringContent(templateName[0]), \"templateName\");\ncontent.Add(new StringContent(accessKey), \"accessKey\");\n\nusing (HttpResponseMessage response = await client.PostAsync(\"https://us1.dws4.docmosis.com/api/deleteTemplate\", content)) {\n    string responseString = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(responseString);\n}"
        }, {
          "lang" : "Python",
          "label" : "Python",
          "source" : "import requests\n\ntemplateName = [ '/MyFolder/MyTemplate.docx' ]\naccessKey = ''\n\npayload = {\n    'templateName' : templateName[0],\n    'accessKey' : accessKey\n}\n\nresponse = requests.post('https://us1.dws4.docmosis.com/api/deleteTemplate', stream=True, data=payload)\n\nprint(response.text)"
        }, {
          "lang" : "PHP",
          "label" : "Php",
          "source" : "<?php\n\n$templateName = array( \"/MyFolder/MyTemplate.docx\" );\n$accessKey = \"\";\n\n$request = array(\n    \"templateName\" => $templateName[0],\n    \"accessKey\" => $accessKey\n);\n\n$headers = array(\"Content-Type: multipart/form-data\");\n\n$curl = curl_init(\"https://us1.dws4.docmosis.com/api/deleteTemplate\");\n\ncurl_setopt($curl, CURLOPT_HEADER, 0);\ncurl_setopt($curl, CURLOPT_POST, 1);\ncurl_setopt($curl, CURLOPT_POSTFIELDS, $request);\ncurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\n\necho $response;\n\n?>"
        }, {
          "lang" : "JavaScript",
          "label" : "Node.js",
          "source" : "const formData = new FormData();\nformData.append(\"templateName\", \"/MyFolder/MyTemplate.docx\");\nformData.append(\"accessKey\", \"\");\n\nconst options = {\n    method: \"POST\",\n    body : formData\n};\n\nfetch(\"https://us1.dws4.docmosis.com/api/deleteTemplate\", options)\n    .then(response => {\n        return response.text().then(body => {\n            console.log(body);\n        })\n    });"
        } ]
      }
    },
    "/getTemplateDetails" : {
      "post" : {
        "tags" : [ "Templates" ],
        "summary" : "Get Template Details",
        "description" : "The Get Template Details service retrieves the details of a template that was originally uploaded, but not the template itself.",
        "operationId" : "getTemplateDetails",
        "requestBody" : {
          "content" : {
            "multipart/form-data" : {
              "schema" : {
                "$ref" : "#/components/schemas/GetTemplateDetailsRequest"
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/GetTemplateDetailsRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "Request succeeded",
            "headers" : {
              "X-Docmosis-Server" : {
                "$ref" : "#/components/headers/X-Docmosis-Server"
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GetTemplateDetailsResponse"
                }
              }
            }
          },
          "400" : {
            "$ref" : "#/components/responses/400"
          },
          "404" : {
            "$ref" : "#/components/responses/404"
          },
          "415" : {
            "$ref" : "#/components/responses/415"
          },
          "500" : {
            "$ref" : "#/components/responses/500"
          }
        },
        "x-codeSamples" : [ {
          "lang" : "Shell",
          "label" : "Curl",
          "source" : "curl --request POST \\\n--url https://us1.dws4.docmosis.com/api/getTemplateDetails \\\n--form 'templateName=/WelcomeTemplate.docx' \\\n--form 'accessKey='"
        }, {
          "lang" : "Java",
          "label" : "Java",
          "source" : "//This example uses the Apache HttpClient (v5) library\n\nHttpClient client = HttpClientBuilder.create().build();\nHttpPost request = new HttpPost(\"https://us1.dws4.docmosis.com/api/getTemplateDetails\");\n\nString templateName = \"/WelcomeTemplate.docx\";\nString accessKey = \"\";\n\nMultipartEntityBuilder builder = MultipartEntityBuilder.create();\nbuilder.addTextBody(\"templateName\", templateName);\nbuilder.addTextBody(\"accessKey\", accessKey);\nHttpEntity payLoad = builder.build();\nrequest.setEntity(payLoad);\n\nclient.execute(request, response -> {\n    System.out.println(EntityUtils.toString(response.getEntity()));\n    EntityUtils.consume(response.getEntity());\n    return null;\n});"
        }, {
          "lang" : "C#",
          "label" : "C#",
          "source" : "HttpClient client = new HttpClient();\n\nstring templateName = \"/WelcomeTemplate.docx\";\nstring accessKey = \"\";\n\nMultipartFormDataContent content = new MultipartFormDataContent();\ncontent.Add(new StringContent(templateName), \"templateName\");\ncontent.Add(new StringContent(accessKey), \"accessKey\");\n\nusing (HttpResponseMessage response = await client.PostAsync(\"https://us1.dws4.docmosis.com/api/getTemplateDetails\", content)) {\n    string responseString = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(responseString);\n}"
        }, {
          "lang" : "Python",
          "label" : "Python",
          "source" : "import requests\n\ntemplateName = '/WelcomeTemplate.docx'\naccessKey = ''\n\npayload = {\n    'templateName' : templateName,\n    'accessKey' : accessKey\n}\n\nresponse = requests.post('https://us1.dws4.docmosis.com/api/getTemplateDetails', stream=True, data=payload)\n\nprint(response.text)"
        }, {
          "lang" : "PHP",
          "label" : "Php",
          "source" : "<?php\n\n$templateName = \"/WelcomeTemplate.docx\";\n$accessKey = \"\";\n\n$request = array(\n    \"templateName\" => $templateName,\n    \"accessKey\" => $accessKey\n);\n\n$headers = array(\"Content-Type: multipart/form-data\");\n\n$curl = curl_init(\"https://us1.dws4.docmosis.com/api/getTemplateDetails\");\n\ncurl_setopt($curl, CURLOPT_HEADER, 0);\ncurl_setopt($curl, CURLOPT_POST, 1);\ncurl_setopt($curl, CURLOPT_POSTFIELDS, $request);\ncurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\n\necho $response;\n\n?>"
        }, {
          "lang" : "JavaScript",
          "label" : "Node.js",
          "source" : "const formData = new FormData();\nformData.append(\"templateName\", \"/WelcomeTemplate.docx\");\nformData.append(\"accessKey\", \"\");\n\nconst options = {\n    method: \"POST\",\n    body : formData\n};\n\nfetch(\"https://us1.dws4.docmosis.com/api/getTemplateDetails\", options)\n    .then(response => {\n        return response.text().then(body => {\n            console.log(body);\n        })\n    });"
        } ]
      }
    },
    "/getTemplate" : {
      "post" : {
        "tags" : [ "Templates" ],
        "summary" : "Get Template",
        "description" : "The Get Template service retrieves the template that was originally uploaded.\n\nMultiple templateName parameters can be specified to download multiple templates in one zip response (up to 100 in one request).",
        "operationId" : "getTemplate",
        "requestBody" : {
          "content" : {
            "multipart/form-data" : {
              "schema" : {
                "$ref" : "#/components/schemas/GetTemplateRequest"
              },
              "encoding" : {
                "templateName" : {
                  "explode" : true
                }
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/GetTemplateRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "The body of the response will contain the binary stream for the template. A zip is returned if requesting multiple templates.",
            "headers" : {
              "X-Docmosis-Server" : {
                "$ref" : "#/components/headers/X-Docmosis-Server"
              }
            },
            "content" : {
              "application/octet-stream" : {
                "schema" : {
                  "type" : "string",
                  "format" : "binary"
                }
              }
            }
          },
          "400" : {
            "$ref" : "#/components/responses/400"
          },
          "404" : {
            "$ref" : "#/components/responses/404"
          },
          "415" : {
            "$ref" : "#/components/responses/415"
          },
          "500" : {
            "$ref" : "#/components/responses/500"
          }
        },
        "x-codeSamples" : [ {
          "lang" : "Shell",
          "label" : "Curl",
          "source" : "curl --request POST \\\n--url https://us1.dws4.docmosis.com/api/getTemplate \\\n--form 'templateName=/WelcomeTemplate.docx' \\\n--form 'accessKey=' \\\n--output 'MyTemplate.docx'"
        }, {
          "lang" : "Java",
          "label" : "Java",
          "source" : "//This example uses the Apache HttpClient (v5) library\n\nHttpClient client = HttpClientBuilder.create().build();\nHttpPost request = new HttpPost(\"https://us1.dws4.docmosis.com/api/getTemplate\");\n\nString[] templateName = new String[] {\"/WelcomeTemplate.docx\"};\nString accessKey = \"\";\n\nMultipartEntityBuilder builder = MultipartEntityBuilder.create();\nbuilder.addTextBody(\"templateName\", templateName[0]);\nbuilder.addTextBody(\"accessKey\", accessKey);\nHttpEntity payLoad = builder.build();\nrequest.setEntity(payLoad);\n\nclient.execute(request, response -> {\n    if (response.getCode() == HttpStatus.SC_OK) {\n        File outputFile = new File(\"MyTemplate.docx\");\n        FileOutputStream outstream = new FileOutputStream(outputFile);\n        response.getEntity().writeTo(outstream);\n        System.out.println(\"File saved to:\" + outputFile.getAbsolutePath());\n    } else {\n        System.out.println(EntityUtils.toString(response.getEntity()));\n    }\n    EntityUtils.consume(response.getEntity());\n    return null;\n});"
        }, {
          "lang" : "C#",
          "label" : "C#",
          "source" : "HttpClient client = new HttpClient();\n\nstring[] templateName = new string[] {\"/WelcomeTemplate.docx\"};\nstring accessKey = \"\";\n\nMultipartFormDataContent content = new MultipartFormDataContent();\ncontent.Add(new StringContent(templateName[0]), \"templateName\");\ncontent.Add(new StringContent(accessKey), \"accessKey\");\n\nusing (HttpResponseMessage response = await client.PostAsync(\"https://us1.dws4.docmosis.com/api/getTemplate\", content)) {\n    if (response.StatusCode == HttpStatusCode.OK) {\n        using (FileStream outputFile = File.Create(\"MyTemplate.docx\")) {\n            using (Stream outputStream = await response.Content.ReadAsStreamAsync()) {\n                await outputStream.CopyToAsync(outputFile);\n                Console.WriteLine(\"File saved to:\" + outputFile.Name);\n            }\n        }\n    } else {\n        string responseString = await response.Content.ReadAsStringAsync();\n        Console.WriteLine(responseString);\n    }\n}"
        }, {
          "lang" : "Python",
          "label" : "Python",
          "source" : "import requests\n\ntemplateName = [ '/WelcomeTemplate.docx' ]\naccessKey = ''\n\npayload = {\n    'templateName' : templateName[0],\n    'accessKey' : accessKey\n}\n\nresponse = requests.post('https://us1.dws4.docmosis.com/api/getTemplate', stream=True, data=payload)\n\nif response.status_code == 200:\n    with open('MyTemplate.docx', 'wb') as fd:\n        for chunk in response.iter_content(4096):\n            fd.write(chunk)\n    print('Saved to MyTemplate.docx')\nelse:\n    print(response.text)"
        }, {
          "lang" : "PHP",
          "label" : "Php",
          "source" : "<?php\n\n$templateName = array( \"/WelcomeTemplate.docx\" );\n$accessKey = \"\";\n\n$request = array(\n    \"templateName\" => $templateName[0],\n    \"accessKey\" => $accessKey\n);\n\n$headers = array(\"Content-Type: multipart/form-data\");\n\n$curl = curl_init(\"https://us1.dws4.docmosis.com/api/getTemplate\");\n\ncurl_setopt($curl, CURLOPT_HEADER, 0);\ncurl_setopt($curl, CURLOPT_POST, 1);\ncurl_setopt($curl, CURLOPT_POSTFIELDS, $request);\ncurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\n\nif ($status === 200) {\n    $outputFile = file_put_contents(\"MyTemplate.docx\", $response);\n    echo \"Saved to MyTemplate.docx\";\n} else {\n    echo $response;\n}\n\n?>"
        }, {
          "lang" : "JavaScript",
          "label" : "Node.js",
          "source" : "const fs = require(\"fs\");\nconst { Readable } = require(\"node:stream\");\n\nconst formData = new FormData();\nformData.append(\"templateName\", \"/WelcomeTemplate.docx\");\nformData.append(\"accessKey\", \"\");\n\nconst options = {\n    method: \"POST\",\n    body : formData\n};\n\nfetch(\"https://us1.dws4.docmosis.com/api/getTemplate\", options)\n    .then(response => {\n        if (response.ok) {\n            const destination = fs.createWriteStream(\"MyTemplate.docx\");\n            Readable.fromWeb(response.body).pipe(destination);\n            console.log(\"Saved to MyTemplate.docx\");\n        } else {\n            return response.text().then(body => {\n                console.log(body);\n            })\n        }\n    });"
        } ]
      }
    },
    "/getSampleData" : {
      "post" : {
        "tags" : [ "Generate" ],
        "summary" : "Get Sample Data",
        "description" : "The Get Sample Data service allows sample data to be generated for a template based on the current structures in the template. The sample data can be created in JSON or XML format which can then be fed back to the Render service to generate populated documents.\n\nThe service creates values like “value1”, “value2” for each field element.\n\nIf the template has an error in it, Docmosis will generate a blank data set.\n\n",
        "operationId" : "getSampleData",
        "requestBody" : {
          "content" : {
            "multipart/form-data" : {
              "schema" : {
                "$ref" : "#/components/schemas/GetSampleDataRequest"
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/GetSampleDataRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "Request succeeded",
            "headers" : {
              "X-Docmosis-Server" : {
                "$ref" : "#/components/headers/X-Docmosis-Server"
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GetSampleDataResponse"
                }
              }
            }
          },
          "400" : {
            "$ref" : "#/components/responses/400"
          },
          "404" : {
            "$ref" : "#/components/responses/404"
          },
          "415" : {
            "$ref" : "#/components/responses/415"
          },
          "500" : {
            "$ref" : "#/components/responses/500"
          }
        },
        "x-codeSamples" : [ {
          "lang" : "Shell",
          "label" : "Curl",
          "source" : "curl --request POST \\\n--url https://us1.dws4.docmosis.com/api/getSampleData \\\n--form 'templateName=/WelcomeTemplate.docx' \\\n--form 'accessKey='"
        }, {
          "lang" : "Java",
          "label" : "Java",
          "source" : "//This example uses the Apache HttpClient (v5) library\n\nHttpClient client = HttpClientBuilder.create().build();\nHttpPost request = new HttpPost(\"https://us1.dws4.docmosis.com/api/getSampleData\");\n\nString templateName = \"/WelcomeTemplate.docx\";\nString accessKey = \"\";\n\nMultipartEntityBuilder builder = MultipartEntityBuilder.create();\nbuilder.addTextBody(\"templateName\", templateName);\nbuilder.addTextBody(\"accessKey\", accessKey);\nHttpEntity payLoad = builder.build();\nrequest.setEntity(payLoad);\n\nclient.execute(request, response -> {\n    System.out.println(EntityUtils.toString(response.getEntity()));\n    EntityUtils.consume(response.getEntity());\n    return null;\n});"
        }, {
          "lang" : "C#",
          "label" : "C#",
          "source" : "HttpClient client = new HttpClient();\n\nstring templateName = \"/WelcomeTemplate.docx\";\nstring accessKey = \"\";\n\nMultipartFormDataContent content = new MultipartFormDataContent();\ncontent.Add(new StringContent(templateName), \"templateName\");\ncontent.Add(new StringContent(accessKey), \"accessKey\");\n\nusing (HttpResponseMessage response = await client.PostAsync(\"https://us1.dws4.docmosis.com/api/getSampleData\", content)) {\n    string responseString = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(responseString);\n}"
        }, {
          "lang" : "Python",
          "label" : "Python",
          "source" : "import requests\n\ntemplateName = '/WelcomeTemplate.docx'\naccessKey = ''\n\npayload = {\n    'templateName' : templateName,\n    'accessKey' : accessKey\n}\n\nresponse = requests.post('https://us1.dws4.docmosis.com/api/getSampleData', stream=True, data=payload)\n\nprint(response.text)"
        }, {
          "lang" : "PHP",
          "label" : "Php",
          "source" : "<?php\n\n$templateName = \"/WelcomeTemplate.docx\";\n$accessKey = \"\";\n\n$request = array(\n    \"templateName\" => $templateName,\n    \"accessKey\" => $accessKey\n);\n\n$headers = array(\"Content-Type: multipart/form-data\");\n\n$curl = curl_init(\"https://us1.dws4.docmosis.com/api/getSampleData\");\n\ncurl_setopt($curl, CURLOPT_HEADER, 0);\ncurl_setopt($curl, CURLOPT_POST, 1);\ncurl_setopt($curl, CURLOPT_POSTFIELDS, $request);\ncurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\n\necho $response;\n\n?>"
        }, {
          "lang" : "JavaScript",
          "label" : "Node.js",
          "source" : "const formData = new FormData();\nformData.append(\"templateName\", \"/WelcomeTemplate.docx\");\nformData.append(\"accessKey\", \"\");\n\nconst options = {\n    method: \"POST\",\n    body : formData\n};\n\nfetch(\"https://us1.dws4.docmosis.com/api/getSampleData\", options)\n    .then(response => {\n        return response.text().then(body => {\n            console.log(body);\n        })\n    });"
        } ]
      }
    },
    "/getTemplateStructure" : {
      "post" : {
        "tags" : [ "Templates" ],
        "summary" : "Get Template Structure",
        "description" : "The Get Template Structure service retrieves the structure of a template that has been uploaded. The structure returned describes fields, repeating and conditional sections etc. The primary purpose of this method is to allow automated processing based on what is currently in a template (such as creating dynamic data forms etc).",
        "operationId" : "getTemplateStructure",
        "requestBody" : {
          "content" : {
            "multipart/form-data" : {
              "schema" : {
                "$ref" : "#/components/schemas/GetTemplateStructureRequest"
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/GetTemplateStructureRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "Request succeeded",
            "headers" : {
              "X-Docmosis-Server" : {
                "$ref" : "#/components/headers/X-Docmosis-Server"
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GetTemplateStructureResponse"
                }
              }
            }
          },
          "400" : {
            "$ref" : "#/components/responses/400"
          },
          "404" : {
            "$ref" : "#/components/responses/404"
          },
          "415" : {
            "$ref" : "#/components/responses/415"
          },
          "500" : {
            "$ref" : "#/components/responses/500"
          }
        },
        "x-codeSamples" : [ {
          "lang" : "Shell",
          "label" : "Curl",
          "source" : "curl --request POST \\\n--url https://us1.dws4.docmosis.com/api/getTemplateStructure \\\n--form 'templateName=/WelcomeTemplate.docx' \\\n--form 'accessKey='"
        }, {
          "lang" : "Java",
          "label" : "Java",
          "source" : "//This example uses the Apache HttpClient (v5) library\n\nHttpClient client = HttpClientBuilder.create().build();\nHttpPost request = new HttpPost(\"https://us1.dws4.docmosis.com/api/getTemplateStructure\");\n\nString templateName = \"/WelcomeTemplate.docx\";\nString accessKey = \"\";\n\nMultipartEntityBuilder builder = MultipartEntityBuilder.create();\nbuilder.addTextBody(\"templateName\", templateName);\nbuilder.addTextBody(\"accessKey\", accessKey);\nHttpEntity payLoad = builder.build();\nrequest.setEntity(payLoad);\n\nclient.execute(request, response -> {\n    System.out.println(EntityUtils.toString(response.getEntity()));\n    EntityUtils.consume(response.getEntity());\n    return null;\n});"
        }, {
          "lang" : "C#",
          "label" : "C#",
          "source" : "HttpClient client = new HttpClient();\n\nstring templateName = \"/WelcomeTemplate.docx\";\nstring accessKey = \"\";\n\nMultipartFormDataContent content = new MultipartFormDataContent();\ncontent.Add(new StringContent(templateName), \"templateName\");\ncontent.Add(new StringContent(accessKey), \"accessKey\");\n\nusing (HttpResponseMessage response = await client.PostAsync(\"https://us1.dws4.docmosis.com/api/getTemplateStructure\", content)) {\n    string responseString = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(responseString);\n}"
        }, {
          "lang" : "Python",
          "label" : "Python",
          "source" : "import requests\n\ntemplateName = '/WelcomeTemplate.docx'\naccessKey = ''\n\npayload = {\n    'templateName' : templateName,\n    'accessKey' : accessKey\n}\n\nresponse = requests.post('https://us1.dws4.docmosis.com/api/getTemplateStructure', stream=True, data=payload)\n\nprint(response.text)"
        }, {
          "lang" : "PHP",
          "label" : "Php",
          "source" : "<?php\n\n$templateName = \"/WelcomeTemplate.docx\";\n$accessKey = \"\";\n\n$request = array(\n    \"templateName\" => $templateName,\n    \"accessKey\" => $accessKey\n);\n\n$headers = array(\"Content-Type: multipart/form-data\");\n\n$curl = curl_init(\"https://us1.dws4.docmosis.com/api/getTemplateStructure\");\n\ncurl_setopt($curl, CURLOPT_HEADER, 0);\ncurl_setopt($curl, CURLOPT_POST, 1);\ncurl_setopt($curl, CURLOPT_POSTFIELDS, $request);\ncurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\n\necho $response;\n\n?>"
        }, {
          "lang" : "JavaScript",
          "label" : "Node.js",
          "source" : "const formData = new FormData();\nformData.append(\"templateName\", \"/WelcomeTemplate.docx\");\nformData.append(\"accessKey\", \"\");\n\nconst options = {\n    method: \"POST\",\n    body : formData\n};\n\nfetch(\"https://us1.dws4.docmosis.com/api/getTemplateStructure\", options)\n    .then(response => {\n        return response.text().then(body => {\n            console.log(body);\n        })\n    });"
        } ]
      }
    },
    "/listTemplates" : {
      "post" : {
        "tags" : [ "Templates" ],
        "summary" : "List Templates",
        "description" : "The List Templates service lists the templates available.",
        "operationId" : "listTemplates",
        "requestBody" : {
          "content" : {
            "multipart/form-data" : {
              "schema" : {
                "$ref" : "#/components/schemas/ListTemplatesRequest"
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ListTemplatesRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "Request succeeded",
            "headers" : {
              "X-Docmosis-Server" : {
                "$ref" : "#/components/headers/X-Docmosis-Server"
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ListTemplatesResponse"
                }
              }
            }
          },
          "400" : {
            "$ref" : "#/components/responses/400"
          },
          "404" : {
            "$ref" : "#/components/responses/404"
          },
          "415" : {
            "$ref" : "#/components/responses/415"
          },
          "500" : {
            "$ref" : "#/components/responses/500"
          }
        },
        "x-codeSamples" : [ {
          "lang" : "Shell",
          "label" : "Curl",
          "source" : "curl --request POST \\\n--url https://us1.dws4.docmosis.com/api/listTemplates \\\n--form 'accessKey='"
        }, {
          "lang" : "Java",
          "label" : "Java",
          "source" : "//This example uses the Apache HttpClient (v5) library\n\nHttpClient client = HttpClientBuilder.create().build();\nHttpPost request = new HttpPost(\"https://us1.dws4.docmosis.com/api/listTemplates\");\n\nString accessKey = \"\";\n\nMultipartEntityBuilder builder = MultipartEntityBuilder.create();\nbuilder.addTextBody(\"accessKey\", accessKey);\nHttpEntity payLoad = builder.build();\nrequest.setEntity(payLoad);\n\nclient.execute(request, response -> {\n    System.out.println(EntityUtils.toString(response.getEntity()));\n    EntityUtils.consume(response.getEntity());\n    return null;\n});"
        }, {
          "lang" : "C#",
          "label" : "C#",
          "source" : "HttpClient client = new HttpClient();\n\nstring accessKey = \"\";\n\nMultipartFormDataContent content = new MultipartFormDataContent();\ncontent.Add(new StringContent(accessKey), \"accessKey\");\n\nusing (HttpResponseMessage response = await client.PostAsync(\"https://us1.dws4.docmosis.com/api/listTemplates\", content)) {\n    string responseString = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(responseString);\n}"
        }, {
          "lang" : "Python",
          "label" : "Python",
          "source" : "import requests\n\naccessKey = ''\n\npayload = {\n    'accessKey' : accessKey\n}\n\nresponse = requests.post('https://us1.dws4.docmosis.com/api/listTemplates', stream=True, data=payload)\n\nprint(response.text)"
        }, {
          "lang" : "PHP",
          "label" : "Php",
          "source" : "<?php\n\n$accessKey = \"\";\n\n$request = array(\n    \"accessKey\" => $accessKey\n);\n\n$headers = array(\"Content-Type: multipart/form-data\");\n\n$curl = curl_init(\"https://us1.dws4.docmosis.com/api/listTemplates\");\n\ncurl_setopt($curl, CURLOPT_HEADER, 0);\ncurl_setopt($curl, CURLOPT_POST, 1);\ncurl_setopt($curl, CURLOPT_POSTFIELDS, $request);\ncurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\n\necho $response;\n\n?>"
        }, {
          "lang" : "JavaScript",
          "label" : "Node.js",
          "source" : "const formData = new FormData();\nformData.append(\"accessKey\", \"\");\n\nconst options = {\n    method: \"POST\",\n    body : formData\n};\n\nfetch(\"https://us1.dws4.docmosis.com/api/listTemplates\", options)\n    .then(response => {\n        return response.text().then(body => {\n            console.log(body);\n        })\n    });"
        } ]
      }
    },
    "/uploadTemplate" : {
      "post" : {
        "tags" : [ "Templates" ],
        "summary" : "Upload Template",
        "description" : "The Upload Template service uploads a template to be later rendered into documents.  When a template is uploaded, Docmosis analyses it and will report any errors in the template at this time.\n\nDocmosis has a special capability to report errors in the template within rendered documents.  This means that when a document is rendered the error can be seen AND its location in the template.  By default this capability is enabled (devMode=true) to assist with development.  Any template uploaded in development mode with errors will not render unless the render also uses development mode.\n\nTemplates can also be uploaded in bulk using The Upload Template Batch service (“/uploadTemplateBatch” endpoint)",
        "operationId" : "uploadTemplate",
        "requestBody" : {
          "content" : {
            "multipart/form-data" : {
              "schema" : {
                "$ref" : "#/components/schemas/UploadTemplateRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "The response is an indicator of success or failure plus any further helpful information.  When the upload is successful, details are returned under the “templateDetails” key.",
            "headers" : {
              "X-Docmosis-Server" : {
                "$ref" : "#/components/headers/X-Docmosis-Server"
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/UploadTemplateResponse"
                }
              }
            }
          },
          "400" : {
            "$ref" : "#/components/responses/400"
          },
          "404" : {
            "$ref" : "#/components/responses/404"
          },
          "415" : {
            "$ref" : "#/components/responses/415"
          },
          "500" : {
            "$ref" : "#/components/responses/500"
          }
        },
        "x-codeSamples" : [ {
          "lang" : "Shell",
          "label" : "Curl",
          "source" : "curl --request POST \\\n--url https://us1.dws4.docmosis.com/api/uploadTemplate \\\n--form 'templateFile=@MyTemplate.docx' \\\n--form 'accessKey='"
        }, {
          "lang" : "Java",
          "label" : "Java",
          "source" : "//This example uses the Apache HttpClient (v5) library\n\nHttpClient client = HttpClientBuilder.create().build();\nHttpPost request = new HttpPost(\"https://us1.dws4.docmosis.com/api/uploadTemplate\");\n\nFile templateFile = new File(\"MyTemplate.docx\");\nString accessKey = \"\";\n\nMultipartEntityBuilder builder = MultipartEntityBuilder.create();\nbuilder.addBinaryBody(\"templateFile\", templateFile);\nbuilder.addTextBody(\"accessKey\", accessKey);\nHttpEntity payLoad = builder.build();\nrequest.setEntity(payLoad);\n\nclient.execute(request, response -> {\n    System.out.println(EntityUtils.toString(response.getEntity()));\n    EntityUtils.consume(response.getEntity());\n    return null;\n});"
        }, {
          "lang" : "C#",
          "label" : "C#",
          "source" : "HttpClient client = new HttpClient();\n\nFileInfo templateFile = new FileInfo(\"MyTemplate.docx\");\nstring accessKey = \"\";\n\nMultipartFormDataContent content = new MultipartFormDataContent();\ncontent.Add(new StreamContent(templateFile.OpenRead()), \"templateFile\", templateFile.Name);\ncontent.Add(new StringContent(accessKey), \"accessKey\");\n\nusing (HttpResponseMessage response = await client.PostAsync(\"https://us1.dws4.docmosis.com/api/uploadTemplate\", content)) {\n    string responseString = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(responseString);\n}"
        }, {
          "lang" : "Python",
          "label" : "Python",
          "source" : "import requests\n\ntemplateFile = 'MyTemplate.docx'\naccessKey = ''\n\npayload = {\n    'accessKey' : accessKey\n}\n\nfiles = {'templateFile': open(templateFile, 'rb')}\n\nresponse = requests.post('https://us1.dws4.docmosis.com/api/uploadTemplate', stream=True, data=payload, files=files)\n\nprint(response.text)"
        }, {
          "lang" : "PHP",
          "label" : "Php",
          "source" : "<?php\n\n$templateFile = curl_file_create(\"full/path/to/MyTemplate.docx\", null, \"MyTemplate.docx\");\n$accessKey = \"\";\n\n$request = array(\n    \"templateFile\" => $templateFile,\n    \"accessKey\" => $accessKey\n);\n\n$headers = array(\"Content-Type: multipart/form-data\");\n\n$curl = curl_init(\"https://us1.dws4.docmosis.com/api/uploadTemplate\");\n\ncurl_setopt($curl, CURLOPT_HEADER, 0);\ncurl_setopt($curl, CURLOPT_POST, 1);\ncurl_setopt($curl, CURLOPT_POSTFIELDS, $request);\ncurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\n\necho $response;\n\n?>"
        }, {
          "lang" : "JavaScript",
          "label" : "Node.js",
          "source" : "const fs = require(\"fs\");\nconst { Readable } = require(\"node:stream\");\n\nconst formData = new FormData();\nformData.append(\"templateFile\", new Blob([fs.readFileSync(\"MyTemplate.docx\")]));\nformData.append(\"accessKey\", \"\");\n\nconst options = {\n    method: \"POST\",\n    body : formData\n};\n\nfetch(\"https://us1.dws4.docmosis.com/api/uploadTemplate\", options)\n    .then(response => {\n        return response.text().then(body => {\n            console.log(body);\n        })\n    });"
        } ]
      }
    },
    "/uploadTemplateBatchCancel" : {
      "post" : {
        "tags" : [ "Templates" ],
        "summary" : "Upload Template Batch Cancel",
        "description" : "The Upload Template Batch Cancel service allows a currently running Upload Template Batch job to be cancelled.  This service will return failure only if there was an error cancelling the job.  If the job is already completed (so the cancel has no effect), this will return success and the message will indicate that it was already finished.",
        "operationId" : "uploadTemplateBatchCancel",
        "requestBody" : {
          "content" : {
            "multipart/form-data" : {
              "schema" : {
                "$ref" : "#/components/schemas/UploadTemplateBatchCancelRequest"
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UploadTemplateBatchCancelRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "$ref" : "#/components/responses/200"
          },
          "400" : {
            "$ref" : "#/components/responses/400"
          },
          "404" : {
            "$ref" : "#/components/responses/404"
          },
          "415" : {
            "$ref" : "#/components/responses/415"
          },
          "500" : {
            "$ref" : "#/components/responses/500"
          }
        },
        "x-codeSamples" : [ {
          "lang" : "Shell",
          "label" : "Curl",
          "source" : "curl --request POST \\\n--url https://us1.dws4.docmosis.com/api/uploadTemplateBatchCancel \\\n--form 'userJobId=ABCDE' \\\n--form 'accessKey='"
        }, {
          "lang" : "Java",
          "label" : "Java",
          "source" : "//This example uses the Apache HttpClient (v5) library\n\nHttpClient client = HttpClientBuilder.create().build();\nHttpPost request = new HttpPost(\"https://us1.dws4.docmosis.com/api/uploadTemplateBatchCancel\");\n\nString userJobId = \"ABCDE\";\nString accessKey = \"\";\n\nMultipartEntityBuilder builder = MultipartEntityBuilder.create();\nbuilder.addTextBody(\"userJobId\", userJobId);\nbuilder.addTextBody(\"accessKey\", accessKey);\nHttpEntity payLoad = builder.build();\nrequest.setEntity(payLoad);\n\nclient.execute(request, response -> {\n    System.out.println(EntityUtils.toString(response.getEntity()));\n    EntityUtils.consume(response.getEntity());\n    return null;\n});"
        }, {
          "lang" : "C#",
          "label" : "C#",
          "source" : "HttpClient client = new HttpClient();\n\nstring userJobId = \"ABCDE\";\nstring accessKey = \"\";\n\nMultipartFormDataContent content = new MultipartFormDataContent();\ncontent.Add(new StringContent(userJobId), \"userJobId\");\ncontent.Add(new StringContent(accessKey), \"accessKey\");\n\nusing (HttpResponseMessage response = await client.PostAsync(\"https://us1.dws4.docmosis.com/api/uploadTemplateBatchCancel\", content)) {\n    string responseString = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(responseString);\n}"
        }, {
          "lang" : "Python",
          "label" : "Python",
          "source" : "import requests\n\nuserJobId = 'ABCDE'\naccessKey = ''\n\npayload = {\n    'userJobId' : userJobId,\n    'accessKey' : accessKey\n}\n\nresponse = requests.post('https://us1.dws4.docmosis.com/api/uploadTemplateBatchCancel', stream=True, data=payload)\n\nprint(response.text)"
        }, {
          "lang" : "PHP",
          "label" : "Php",
          "source" : "<?php\n\n$userJobId = \"ABCDE\";\n$accessKey = \"\";\n\n$request = array(\n    \"userJobId\" => $userJobId,\n    \"accessKey\" => $accessKey\n);\n\n$headers = array(\"Content-Type: multipart/form-data\");\n\n$curl = curl_init(\"https://us1.dws4.docmosis.com/api/uploadTemplateBatchCancel\");\n\ncurl_setopt($curl, CURLOPT_HEADER, 0);\ncurl_setopt($curl, CURLOPT_POST, 1);\ncurl_setopt($curl, CURLOPT_POSTFIELDS, $request);\ncurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\n\necho $response;\n\n?>"
        }, {
          "lang" : "JavaScript",
          "label" : "Node.js",
          "source" : "const formData = new FormData();\nformData.append(\"userJobId\", \"ABCDE\");\nformData.append(\"accessKey\", \"\");\n\nconst options = {\n    method: \"POST\",\n    body : formData\n};\n\nfetch(\"https://us1.dws4.docmosis.com/api/uploadTemplateBatchCancel\", options)\n    .then(response => {\n        return response.text().then(body => {\n            console.log(body);\n        })\n    });"
        } ]
      }
    },
    "/uploadTemplateBatch" : {
      "post" : {
        "tags" : [ "Templates" ],
        "summary" : "Upload Template Batch",
        "description" : "The Upload Template Batch service uploads multiple templates contained in a Zip file. \n\nThe zip file may be a simple list of templates or may have templates organized into folders.    The folder structure of the zip file will be replicated in the cloud Environment.  The upload is additive meaning the templates will be added to those already in the Environment and will overwrite any existing template in the same location with the same name.\n\nThis service, unlike most other services, runs asynchronously.  A “job” is launched to perform the processing which could potentially take significant time.  The caller can then check on the status of the job or cancel it using the appropriate end points described below.\n\nJobs are assigned a “userJobId” either by the caller or automatically.  This id can be used to query the status of the job or to cancel a running job.\n\nIn terms of concurrent batch uploads, the following rules apply:\n\n•\tUploads to different Docmosis Regions may occur concurrently (since the templates are independent) as long as there is not another job running with the same userJobId (if specified).\n\n•\tUploads to the same region may occur concurrently provided:\n\n-\tThe userJobId (if provided) is unique against any other currently running job (in any region)\n\n-\tThere is no overlap to where the templates are being stored (ie the explicit or implied intoFolder).\n\nLimitations to the size of the upload and the number of templates apply.  Contact Docmosis support for zip files larger than 50Mb or with more than 1000 templates.\n\nThe zip is assessed in step one and the process will be terminated before any templates are affected if a problem with the zip is detected.  The following tests are included: zip too large or with too many entries, any entries with invalid paths (references to drives or parent folders), any entries that look like scripts, executables, archives, etc.",
        "operationId" : "uploadTemplateBatch",
        "requestBody" : {
          "content" : {
            "multipart/form-data" : {
              "schema" : {
                "$ref" : "#/components/schemas/UploadTemplateBatchRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "The response is an indicator of success or failure plus any further helpful information.  When the upload is successful, job details are returned under the “jobStatus” key.",
            "headers" : {
              "X-Docmosis-Server" : {
                "$ref" : "#/components/headers/X-Docmosis-Server"
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/UploadTemplateBatchResponse"
                }
              }
            }
          },
          "400" : {
            "$ref" : "#/components/responses/400"
          },
          "404" : {
            "$ref" : "#/components/responses/404"
          },
          "415" : {
            "$ref" : "#/components/responses/415"
          },
          "500" : {
            "$ref" : "#/components/responses/500"
          }
        },
        "x-codeSamples" : [ {
          "lang" : "Shell",
          "label" : "Curl",
          "source" : "curl --request POST \\\n--url https://us1.dws4.docmosis.com/api/uploadTemplateBatch \\\n--form 'templateZip=@MyTemplates.zip' \\\n--form 'accessKey='"
        }, {
          "lang" : "Java",
          "label" : "Java",
          "source" : "//This example uses the Apache HttpClient (v5) library\n\nHttpClient client = HttpClientBuilder.create().build();\nHttpPost request = new HttpPost(\"https://us1.dws4.docmosis.com/api/uploadTemplateBatch\");\n\nFile templateZip = new File(\"MyTemplates.zip\");\nString accessKey = \"\";\n\nMultipartEntityBuilder builder = MultipartEntityBuilder.create();\nbuilder.addBinaryBody(\"templateZip\", templateZip);\nbuilder.addTextBody(\"accessKey\", accessKey);\nHttpEntity payLoad = builder.build();\nrequest.setEntity(payLoad);\n\nclient.execute(request, response -> {\n    System.out.println(EntityUtils.toString(response.getEntity()));\n    EntityUtils.consume(response.getEntity());\n    return null;\n});"
        }, {
          "lang" : "C#",
          "label" : "C#",
          "source" : "HttpClient client = new HttpClient();\n\nFileInfo templateZip = new FileInfo(\"MyTemplates.zip\");\nstring accessKey = \"\";\n\nMultipartFormDataContent content = new MultipartFormDataContent();\ncontent.Add(new StreamContent(templateZip.OpenRead()), \"templateZip\", templateZip.Name);\ncontent.Add(new StringContent(accessKey), \"accessKey\");\n\nusing (HttpResponseMessage response = await client.PostAsync(\"https://us1.dws4.docmosis.com/api/uploadTemplateBatch\", content)) {\n    string responseString = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(responseString);\n}"
        }, {
          "lang" : "Python",
          "label" : "Python",
          "source" : "import requests\n\ntemplateZip = 'MyTemplates.zip'\naccessKey = ''\n\npayload = {\n    'accessKey' : accessKey\n}\n\nfiles = {'templateZip': open(templateZip, 'rb')}\n\nresponse = requests.post('https://us1.dws4.docmosis.com/api/uploadTemplateBatch', stream=True, data=payload, files=files)\n\nprint(response.text)"
        }, {
          "lang" : "PHP",
          "label" : "Php",
          "source" : "<?php\n\n$templateZip = curl_file_create(\"full/path/to/MyTemplates.zip\", null, \"MyTemplates.zip\");\n$accessKey = \"\";\n\n$request = array(\n    \"templateZip\" => $templateZip,\n    \"accessKey\" => $accessKey\n);\n\n$headers = array(\"Content-Type: multipart/form-data\");\n\n$curl = curl_init(\"https://us1.dws4.docmosis.com/api/uploadTemplateBatch\");\n\ncurl_setopt($curl, CURLOPT_HEADER, 0);\ncurl_setopt($curl, CURLOPT_POST, 1);\ncurl_setopt($curl, CURLOPT_POSTFIELDS, $request);\ncurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\n\necho $response;\n\n?>"
        }, {
          "lang" : "JavaScript",
          "label" : "Node.js",
          "source" : "const fs = require(\"fs\");\nconst { Readable } = require(\"node:stream\");\n\nconst formData = new FormData();\nformData.append(\"templateZip\", new Blob([fs.readFileSync(\"MyTemplates.zip\")]));\nformData.append(\"accessKey\", \"\");\n\nconst options = {\n    method: \"POST\",\n    body : formData\n};\n\nfetch(\"https://us1.dws4.docmosis.com/api/uploadTemplateBatch\", options)\n    .then(response => {\n        return response.text().then(body => {\n            console.log(body);\n        })\n    });"
        } ]
      }
    },
    "/uploadTemplateBatchStatus" : {
      "post" : {
        "tags" : [ "Templates" ],
        "summary" : "Upload Template Batch Status",
        "description" : "The Upload Template Batch Status service reports on a currently or previously running Upload Template Batch job.  In the response, the “jobStatus” payload contains multiple items to establish the status of the job.  Perhaps the most important data items for managing the job are “isEnded” and the “errorsDetected” field of the “jobResult” field.\n\nWhen the job is completed, successfully or not, the jobStatus will contain the jobResult which has the details of the level of success of the entire batch.",
        "operationId" : "uploadTemplateBatchStatus",
        "requestBody" : {
          "content" : {
            "multipart/form-data" : {
              "schema" : {
                "$ref" : "#/components/schemas/UploadTemplateBatchStatusRequest"
              }
            },
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UploadTemplateBatchStatusRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "Request succeeded",
            "headers" : {
              "X-Docmosis-Server" : {
                "$ref" : "#/components/headers/X-Docmosis-Server"
              }
            },
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/UploadTemplateBatchResponse"
                }
              }
            }
          },
          "400" : {
            "$ref" : "#/components/responses/400"
          },
          "404" : {
            "$ref" : "#/components/responses/404"
          },
          "415" : {
            "$ref" : "#/components/responses/415"
          },
          "500" : {
            "$ref" : "#/components/responses/500"
          }
        },
        "x-codeSamples" : [ {
          "lang" : "Shell",
          "label" : "Curl",
          "source" : "curl --request POST \\\n--url https://us1.dws4.docmosis.com/api/uploadTemplateBatchStatus \\\n--form 'userJobId=ABCDE' \\\n--form 'accessKey='"
        }, {
          "lang" : "Java",
          "label" : "Java",
          "source" : "//This example uses the Apache HttpClient (v5) library\n\nHttpClient client = HttpClientBuilder.create().build();\nHttpPost request = new HttpPost(\"https://us1.dws4.docmosis.com/api/uploadTemplateBatchStatus\");\n\nString userJobId = \"ABCDE\";\nString accessKey = \"\";\n\nMultipartEntityBuilder builder = MultipartEntityBuilder.create();\nbuilder.addTextBody(\"userJobId\", userJobId);\nbuilder.addTextBody(\"accessKey\", accessKey);\nHttpEntity payLoad = builder.build();\nrequest.setEntity(payLoad);\n\nclient.execute(request, response -> {\n    System.out.println(EntityUtils.toString(response.getEntity()));\n    EntityUtils.consume(response.getEntity());\n    return null;\n});"
        }, {
          "lang" : "C#",
          "label" : "C#",
          "source" : "HttpClient client = new HttpClient();\n\nstring userJobId = \"ABCDE\";\nstring accessKey = \"\";\n\nMultipartFormDataContent content = new MultipartFormDataContent();\ncontent.Add(new StringContent(userJobId), \"userJobId\");\ncontent.Add(new StringContent(accessKey), \"accessKey\");\n\nusing (HttpResponseMessage response = await client.PostAsync(\"https://us1.dws4.docmosis.com/api/uploadTemplateBatchStatus\", content)) {\n    string responseString = await response.Content.ReadAsStringAsync();\n    Console.WriteLine(responseString);\n}"
        }, {
          "lang" : "Python",
          "label" : "Python",
          "source" : "import requests\n\nuserJobId = 'ABCDE'\naccessKey = ''\n\npayload = {\n    'userJobId' : userJobId,\n    'accessKey' : accessKey\n}\n\nresponse = requests.post('https://us1.dws4.docmosis.com/api/uploadTemplateBatchStatus', stream=True, data=payload)\n\nprint(response.text)"
        }, {
          "lang" : "PHP",
          "label" : "Php",
          "source" : "<?php\n\n$userJobId = \"ABCDE\";\n$accessKey = \"\";\n\n$request = array(\n    \"userJobId\" => $userJobId,\n    \"accessKey\" => $accessKey\n);\n\n$headers = array(\"Content-Type: multipart/form-data\");\n\n$curl = curl_init(\"https://us1.dws4.docmosis.com/api/uploadTemplateBatchStatus\");\n\ncurl_setopt($curl, CURLOPT_HEADER, 0);\ncurl_setopt($curl, CURLOPT_POST, 1);\ncurl_setopt($curl, CURLOPT_POSTFIELDS, $request);\ncurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\ncurl_setopt($curl, CURLOPT_FOLLOWLOCATION, 0);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n$response = curl_exec($curl);\n\ncurl_close($curl);\n\necho $response;\n\n?>"
        }, {
          "lang" : "JavaScript",
          "label" : "Node.js",
          "source" : "const formData = new FormData();\nformData.append(\"userJobId\", \"ABCDE\");\nformData.append(\"accessKey\", \"\");\n\nconst options = {\n    method: \"POST\",\n    body : formData\n};\n\nfetch(\"https://us1.dws4.docmosis.com/api/uploadTemplateBatchStatus\", options)\n    .then(response => {\n        return response.text().then(body => {\n            console.log(body);\n        })\n    });"
        } ]
      }
    }
  },
  "components" : {
    "schemas" : {
      "AccountReadyRequest" : {
        "type" : "object",
        "properties" : {
          "accessKey" : {
            "type" : "string",
            "description" : "The unique API key identifying the Environment. This can be found in the API Keys area in the Cloud Console.\n\nNote the accessKey can be alternatively provided using a http header."
          }
        },
        "description" : "Account Ready Request Model"
      },
      "AccountEnvironmentSummaryPublic" : {
        "type" : "object",
        "properties" : {
          "ready" : {
            "type" : "string",
            "description" : "Whether the environment is ready to create documents."
          },
          "accountEnvDetails" : {
            "$ref" : "#/components/schemas/accountEnvDetails"
          },
          "pageQuota" : {
            "$ref" : "#/components/schemas/PageQuota"
          },
          "plan" : {
            "$ref" : "#/components/schemas/Plan"
          }
        },
        "description" : "The details of a Docmosis Cloud environment."
      },
      "AccountSummaryResponse" : {
        "type" : "object",
        "properties" : {
          "succeeded" : {
            "type" : "boolean",
            "description" : "\"true\" or \"false\"."
          },
          "shortMsg" : {
            "type" : "string",
            "description" : "A short message about the result.  In the case of an error this will be a short error message.  It may be blank in the case of a successful operation."
          },
          "longMsg" : {
            "type" : "string",
            "description" : "A more descriptive message about the result.  In the case of an error this will be a long error message.  It may be blank."
          },
          "accountEnvironmentSummary" : {
            "$ref" : "#/components/schemas/AccountEnvironmentSummaryPublic"
          }
        },
        "description" : "Account Summary Response Model"
      },
      "AuditInfo" : {
        "type" : "object",
        "properties" : {
          "lastUpdatedTime" : {
            "type" : "integer",
            "format" : "int64"
          },
          "lastUpdatedByAccessKey" : {
            "type" : "string"
          },
          "lastUpdatedByUser" : {
            "type" : "string"
          }
        },
        "description" : "Audit Info Model"
      },
      "PageQuota" : {
        "type" : "object",
        "properties" : {
          "used" : {
            "type" : "string",
            "description" : "Pages rendered this month."
          },
          "quota" : {
            "type" : "string",
            "description" : "Monthly page quota."
          },
          "pctUsed" : {
            "type" : "string",
            "description" : "Quota used as a percentage."
          },
          "pctUsedStr" : {
            "type" : "string",
            "description" : "Quota used as a string."
          },
          "isHardLimited" : {
            "type" : "string",
            "description" : "Whether the account is blocked because of over-quota."
          }
        }
      },
      "Plan" : {
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "The name of the plan."
          }
        }
      },
      "accountEnvDetails" : {
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "The user label"
          },
          "description" : {
            "type" : "string",
            "description" : "The user description"
          },
          "isActivated" : {
            "type" : "string",
            "description" : "Is the environment activated."
          },
          "isDisabled" : {
            "type" : "boolean",
            "description" : "Has the environment been disabled."
          },
          "isDeleted" : {
            "type" : "boolean",
            "description" : "Has the environment been deleted."
          },
          "auditInfo" : {
            "$ref" : "#/components/schemas/AuditInfo"
          }
        }
      },
      "AccountSummaryRequest" : {
        "type" : "object",
        "properties" : {
          "accessKey" : {
            "type" : "string",
            "description" : "The unique API key identifying the Environment. This can be found in the API Keys area in the Cloud Console.\n\nNote the accessKey can be alternatively provided using a http header."
          }
        },
        "description" : "Account Summary Request Model"
      },
      "StatusObject" : {
        "type" : "object",
        "properties" : {
          "ready" : {
            "type" : "boolean",
            "description" : "Whether the service is ready to create documents."
          },
          "message" : {
            "type" : "string",
            "description" : "Message regarding service status."
          }
        },
        "description" : "Status of Services"
      },
      "ConvertRequest" : {
        "required" : [ "file", "outputName" ],
        "type" : "object",
        "properties" : {
          "accessKey" : {
            "type" : "string",
            "description" : "The unique API key identifying the Environment. This can be found in the API Keys area in the Cloud Console.\n\nNote the accessKey can be alternatively provided using a http header."
          },
          "file" : {
            "type" : "string",
            "description" : "The file to convert.",
            "format" : "binary"
          },
          "outputName" : {
            "type" : "string",
            "description" : "The name of the new file to create.  The extension is used to determine the type of file to create.  For example, “result.pdf” causes a PDF document to be created.",
            "example" : "output.pdf"
          }
        },
        "description" : "Convert Request Model"
      },
      "DeleteImageRequest" : {
        "required" : [ "imageName" ],
        "type" : "object",
        "properties" : {
          "accessKey" : {
            "type" : "string",
            "description" : "The unique API key identifying the Environment. This can be found in the API Keys area in the Cloud Console.\n\nNote the accessKey can be alternatively provided using a http header."
          },
          "imageName" : {
            "minItems" : 1,
            "type" : "array",
            "items" : {
              "type" : "string",
              "description" : "The name of the image. This parameter can be specified multiple times to delete multiple files.",
              "example" : "/MyImageFolder/MyImage.png"
            }
          }
        },
        "description" : "Delete Image Request Model"
      },
      "GetImageRequest" : {
        "required" : [ "imageName" ],
        "type" : "object",
        "properties" : {
          "accessKey" : {
            "type" : "string",
            "description" : "The unique API key identifying the Environment. This can be found in the API Keys area in the Cloud Console.\n\nNote the accessKey can be alternatively provided using a http header."
          },
          "imageName" : {
            "maxItems" : 100,
            "minItems" : 1,
            "type" : "array",
            "items" : {
              "type" : "string",
              "description" : "The name of the image. This parameter can be specified multiple times to download multiple images (up to 100) in a zip file.",
              "example" : "/MyImageFolder/MyImage.png"
            }
          }
        },
        "description" : "Get Image Request Model"
      },
      "ImageDetails" : {
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "the template file name"
          },
          "lastModifiedMillisSinceEpoch" : {
            "type" : "integer",
            "description" : "last modified in milliseconds",
            "format" : "int64"
          },
          "lastModifiedISO8601" : {
            "type" : "string",
            "description" : "last modified yyyy-MMdd'T'HH:mm:ssZ",
            "format" : "date-time"
          },
          "sizeBytes" : {
            "type" : "integer",
            "description" : "the size in bytes",
            "format" : "int64"
          },
          "md5" : {
            "type" : "string",
            "description" : "the md5 hash code for the template"
          }
        },
        "description" : "The details of an uploaded image."
      },
      "ListImagesResponse" : {
        "type" : "object",
        "properties" : {
          "succeeded" : {
            "type" : "boolean",
            "description" : "\"true\" or \"false\"."
          },
          "shortMsg" : {
            "type" : "string",
            "description" : "A short message about the result.  In the case of an error this will be a short error message.  It may be blank in the case of a successful operation."
          },
          "longMsg" : {
            "type" : "string",
            "description" : "A more descriptive message about the result.  In the case of an error this will be a long error message.  It may be blank."
          },
          "imageListStale" : {
            "type" : "boolean",
            "description" : "\"true\" or \"false\". If Docmosis detects changes to the image list are in progress (such as updates or deletions) this flag will be set to \"true\" to indicate the list is not necessarily up to date.  This is only ever expected to be \"true\" for a short period after deletes or updates."
          },
          "imageList" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ImageDetails"
            }
          }
        },
        "description" : "List Images Response Model"
      },
      "ListImagesRequest" : {
        "type" : "object",
        "properties" : {
          "accessKey" : {
            "type" : "string",
            "description" : "The unique API key identifying the Environment. This can be found in the API Keys area in the Cloud Console.\n\nNote the accessKey can be alternatively provided using a http header."
          },
          "folder" : {
            "type" : "string",
            "description" : "An optional starting folder (path). If not specified, all images will be listed."
          },
          "includeSubFolders" : {
            "type" : "string",
            "description" : "An optional specification as to whether the list will include items within sub-folders. Defaults to true. \"y\", \"yes\" and \"true\" are all positive indicators."
          }
        },
        "description" : "List Images Request Model"
      },
      "UploadImageResponse" : {
        "type" : "object",
        "properties" : {
          "succeeded" : {
            "type" : "boolean",
            "description" : "\"true\" or \"false\"."
          },
          "shortMsg" : {
            "type" : "string",
            "description" : "A short message about the result.  In the case of an error this will be a short error message.  It may be blank in the case of a successful operation."
          },
          "longMsg" : {
            "type" : "string",
            "description" : "A more descriptive message about the result.  In the case of an error this will be a long error message.  It may be blank."
          },
          "imageDetails" : {
            "$ref" : "#/components/schemas/ImageDetails"
          }
        },
        "description" : "Upload Image Response Model"
      },
      "UploadImageRequest" : {
        "required" : [ "imageFile" ],
        "type" : "object",
        "properties" : {
          "accessKey" : {
            "type" : "string",
            "description" : "The unique API key identifying the Environment. This can be found in the API Keys area in the Cloud Console.\n\nNote the accessKey can be alternatively provided using a http header."
          },
          "imageFile" : {
            "type" : "string",
            "description" : "The file stream of the image.",
            "format" : "binary"
          },
          "imageName" : {
            "type" : "string",
            "description" : "An overriding name for the image which may include a path (e.g. project1/stock/logo1.jpg)."
          },
          "imageDescription" : {
            "type" : "string",
            "description" : "A short description for the image."
          },
          "normalizeImageName" : {
            "type" : "string",
            "description" : "If set to \"y\", \"yes\" or \"true\" the image name given with be NFC normalized (Unicode NFC normalization).  The default is false."
          }
        },
        "description" : "Upload Image Request Model"
      },
      "Response" : {
        "type" : "object",
        "properties" : {
          "succeeded" : {
            "type" : "boolean",
            "description" : "\"true\" or \"false\"."
          },
          "shortMsg" : {
            "type" : "string",
            "description" : "A short message about the result.  In the case of an error this will be a short error message.  It may be blank in the case of a successful operation."
          },
          "longMsg" : {
            "type" : "string",
            "description" : "A more descriptive message about the result.  In the case of an error this will be a long error message.  It may be blank."
          }
        },
        "description" : "Generic Response from Docmosis Web Services."
      },
      "RenderResponse" : {
        "type" : "object",
        "properties" : {
          "succeeded" : {
            "type" : "boolean",
            "description" : "\"true\" or \"false\"."
          },
          "shortMsg" : {
            "type" : "string",
            "description" : "A short message about the result.  In the case of an error this will be a short error message.  It may be blank in the case of a successful operation."
          },
          "longMsg" : {
            "type" : "string",
            "description" : "A more descriptive message about the result.  In the case of an error this will be a long error message.  It may be blank."
          },
          "requestId" : {
            "type" : "string",
            "description" : "Returned if the original request provided a requestId."
          },
          "webHooks" : {
            "$ref" : "#/components/schemas/RenderWebHookResults"
          },
          "queue" : {
            "$ref" : "#/components/schemas/queue"
          }
        },
        "description" : "Generic Response from Docmosis Web Services."
      },
      "RenderWebHookResults" : {
        "type" : "object",
        "properties" : {
          "webHookResults" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/WebHookResults"
            }
          }
        },
        "description" : "Webhook information. Returned if one or more webhooks were called in the storeTo parameter."
      },
      "ResponseHeaders" : {
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string"
          },
          "value" : {
            "type" : "string"
          }
        },
        "description" : "An array of response headers from the webhook. Requested in the webhook definition."
      },
      "ResponseParams" : {
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string"
          },
          "value" : {
            "type" : "string"
          }
        },
        "description" : "An array of response parameters from the webhook. Requested in the webhook definition."
      },
      "WebHookResults" : {
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "The name of the webhook."
          },
          "succeeded" : {
            "type" : "boolean",
            "description" : "\"true\" or \"false\"."
          },
          "msg" : {
            "type" : "string",
            "description" : "Message about the result of the webhook."
          },
          "statusCode" : {
            "type" : "integer",
            "description" : "Status code of the webhook.",
            "format" : "int32"
          },
          "startTime" : {
            "type" : "integer",
            "description" : "Webhook start time.",
            "format" : "int64"
          },
          "endTime" : {
            "type" : "integer",
            "description" : "Webhook end time.",
            "format" : "int64"
          },
          "responseParams" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ResponseParams"
            }
          },
          "responseHeaders" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ResponseHeaders"
            }
          }
        }
      },
      "queue" : {
        "type" : "object",
        "properties" : {
          "rejected" : {
            "type" : "boolean",
            "description" : "Indicates whether rejection has occurred (because queue is at capacity)"
          },
          "availablePct" : {
            "type" : "integer",
            "description" : "Indicates % of queue available for current server.",
            "format" : "int32"
          },
          "delaySeconds" : {
            "type" : "integer",
            "description" : "A suggested back off time in seconds.",
            "format" : "int64"
          }
        },
        "description" : "The current render queue state"
      },
      "Data" : {
        "type" : "object",
        "additionalProperties" : true,
        "description" : "The Data that will populate the document.  This may be either XML or JSON format.  The type of data given determines the format of the response.\n\n",
        "example" : {
          "title" : "Hello from OpenApi",
          "messages" : [ {
            "msg" : "This cloud experience is better than I thought."
          }, {
            "msg" : "The sun is shining."
          }, {
            "msg" : "Right, now back to work."
          } ]
        }
      },
      "RenderRequest" : {
        "required" : [ "outputName", "templateName" ],
        "type" : "object",
        "properties" : {
          "accessKey" : {
            "type" : "string",
            "description" : "The unique API key identifying the Environment. This can be found in the API Keys area in the Cloud Console.\n\nNote the accessKey can be alternatively provided using a http header."
          },
          "templateName" : {
            "type" : "string",
            "description" : "The name of the template to use.  The template must have been uploaded previously with the Upload Template service or via the Cloud Console.\n\nMultiple templates can be specified using the ; character to separate the templates. With multiple template names, a single outputName for PDF output results in a single combined PDF. In all other cases, a ZIP file will be returned containing each rendered document.",
            "example" : "/WelcomeTemplate.docx"
          },
          "outputName" : {
            "type" : "string",
            "description" : "The name to give the rendered document.  If no format is specified (see outputFormat), the format of the resulting document is derived from the extension of this name.  For example, \"resume1.pdf\" implies a PDF format document.    The name may be supplied without an extension (eg \"resume1\") and the outputFormat parameter will specify the format(s) to return.\n\nIf multiple template names are specified, multiple (matching) output names can be specified to create a zip of named outputs.",
            "example" : "output.pdf"
          },
          "data" : {
            "$ref" : "#/components/schemas/Data"
          },
          "devMode" : {
            "type" : "string",
            "description" : "Document generation can be used in development mode or production mode.  If set to \"y\", \"yes\" or \"true\" this operation will work in \"dev\" mode, meaning that if something is incorrect in the template, data or instructions, Docmosis will do its best to produce a document.  Such a document may contain errors such as missing images and data, and wherever possible, Docmosis will highlight problems to indicate the failure.\n\nIn production mode, errors in document rendering will result in a failure result only, and no document will be produced. The production mode is to ensure that a bad document is never produced/delivered to a recipient. The default mode is production (that is, devMode is off).  Default = false."
          },
          "storeTo" : {
            "type" : "string",
            "description" : "Specify where to send the resulting document.  If no specification is given, \"stream\" is assumed and the result will be streamed back to the requester, otherwise the ‘;’ semi-colon delimited list of destinations will receive the result.\n\nValid options are stream, mailto, s3.  Default = stream.\n\nSee the \"Document Delivery\" above for more details."
          },
          "outputFormat" : {
            "type" : "string",
            "description" : "The format(s) of the rendered document.  This can be a single format, or a ‘;’ semi-colon delimited list.  Multiple formats imply a zip file and outputName will have .zip appended as required.  Files inside zip will be named using outputName and will have the format-specific extension appended as required.  Valid options are PDF, DOCX, ODT, TXT.\n\nNote that the header X-Docmosis-Zip-Created (described below) will indicate if a zip file has been created and returned."
          },
          "requestId" : {
            "type" : "string",
            "description" : "Any string to identify this job. This string will be returned in responses."
          },
          "mailSubject" : {
            "type" : "string",
            "description" : "If sending email, this will be used as the subject line of the email."
          },
          "mailBodyHtml" : {
            "type" : "string",
            "description" : "If sending email, this will be used as the body of the email and will be sent as html format."
          },
          "mailBodyText" : {
            "type" : "string",
            "description" : "If sending email, this will be used as the body of the email and will be sent as text."
          },
          "mailNoZipAttachments" : {
            "type" : "boolean",
            "description" : "If this is set to true, any email attachments will be attached as individual files rather than as a single zip (when multiple formats are being used).  Default = false."
          },
          "mailGatewayName" : {
            "type" : "string",
            "description" : "Nominate the custom mail gateway to use for mailTo directives."
          },
          "sourceId" : {
            "type" : "string",
            "description" : "Any ID to associate with this render.  This could be a device id, a project code or any meaningful piece of data to associate with this render.  This value can be reported later with associated monthly counts.  Limited to 150 characters."
          },
          "stylesInText" : {
            "type" : "boolean",
            "description" : "If set to \"y\", \"yes\" or \"true\", data will be parsed looking for html-like mark-up.   The following mark-up is supported:\n\n-\tBold eg \"this is \\<b\\>bold\\</b\\>\".\n\n-\tItalics eg \"this is \\<i\\>italics\\</i\\>\".\n\n-\tUnderline eg \"this is \\<u\\>underline\\</u\\>\".\n\n-\tCell Colouring  e.g. \"\\<bgcolor=\"#ff0000\"/\\>\".\n\nThe bgcolor mark-up must be at the beginning of the data value and the template field must be inside a table-cell to take effect."
          },
          "strictParams" : {
            "type" : "boolean",
            "description" : "If false, unknown parameters in the request are allowed and will be added to the data available to the template (taking precedence over matching values passed via the data parameter).  If true, the Render service will return an error if a parameter is specified that is not expected.  Default = true."
          },
          "tags" : {
            "type" : "string",
            "description" : "A semi-colon delimited list of tags to record against this render.  The tags can be later queried (using the getRenderTags end point) to retrieve stats such as page-counts and document-counts related to the tags."
          },
          "passwordProtect" : {
            "type" : "string",
            "description" : "If specified, this parameter will set the password for PDF and DOCX files created by the render.  The password is used when opening the document.  Use with care as setting the password means the recipient must know the password to read the document.  Note: pdfArchiveMode will disable any password setting for PDF documents."
          },
          "pdfWatermark" : {
            "type" : "string",
            "description" : "If specified, PDF documents will have the specified text added as a watermark across the document."
          },
          "pdfWatermarkColor" : {
            "type" : "string",
            "description" : "If a watermark is specified, this font color will be used. Must be a valid hexadecimal color, eg \"#FF0000\" for red."
          },
          "pdfWatermarkFontSize" : {
            "type" : "integer",
            "description" : "If a watermark is specified, this font size will be used.",
            "format" : "int32"
          },
          "pdfWatermarkFontName" : {
            "type" : "string",
            "description" : "If a watermark is specified, this font will be used. If the font doesn’t exist on the server then the default watermark font will be used."
          },
          "pdfWatermarkRotation" : {
            "type" : "integer",
            "description" : "If a watermark is specified, this rotation angle will be used. This must be a value between 0 and 360.",
            "format" : "int32"
          },
          "pdfArchiveMode" : {
            "type" : "boolean",
            "description" : "Create pdf documents in PDF-A mode for long term storage.  Note this setting disables certain PDF features such as password protection and external hyperlinks.  Default = false.  Deprecated - use pdfVersion instead."
          },
          "pdfVersion" : {
            "type" : "string",
            "description" : "Create pdf documents in a specified version.  Archive versions available are A-1b, A-2b, A-3b (Note:features such as password protection and external hyperlinks are disabled by archivemode versions).  Default = system normal level (eg PDF 1.6)."
          },
          "pdfUniversalAccessibility" : {
            "type" : "boolean",
            "description" : "Create pdf documents with universal accessibility settings.  Default = false.\nNote that when set to true, a document will be generated even if there are accessibility problems within the template. Items to check include:\n- The document title is set.\n- The document language is set, or all styles in use have the language property set.\n- All images, graphics, OLE objects have an alternate (alt) text or a title.\n- Tables do not contain split or merged cells.\n- Only integrated numbering is used, no manual numbering. For example, do not type \"1.\", \"2.\", \"3.\" at the beginning of paragraphs.\n- Hyperlink texts without the underlying hyperlinks.\n- The contrast between text and the background meets the WCAG specification.\n- No blinking text.\n- No footnotes or endnotes.\n- Headings must increase sequentially with no skips, for example, there cannot be a Heading 1, Heading 3, and no Heading 2.\n- Text does not convey additional meaning with (direct) formatting."
          },
          "pdfTagged" : {
            "type" : "boolean",
            "description" : "If specified, the PDF documents will have extra information inserted to assist with low-vision readability tools.  The alt-text for images in particular becomes “readable”.  Default = false."
          },
          "pdfSkipEmptyPages" : {
            "type" : "boolean",
            "description" : "If false, blank pages due to odd/even breaks will be included in the PDF.  Default = false."
          },
          "pdfCreateForm" : {
            "type" : "boolean",
            "description" : "If true, form controls will be be modifiable in the result pdf (where possible).  Default = false."
          },
          "streamResultInResponse" : {
            "type" : "boolean",
            "description" : "If set to \"y\", \"yes\" or \"true\", the streamed result will be base64 encoded and included in the JSON or XML response under the key “resultFile”.  Note this only applies if the request includes (or implies) a “stream” result (see the storeTo parameter above).  Default = false."
          },
          "pdfRestrictPassword" : {
            "type" : "string",
            "description" : "Set the password for further security restrictions.  Setting this also enables the further restrictions."
          },
          "pdfRestrictPrinting" : {
            "type" : "integer",
            "description" : "Restrict printing of the created PDF:\n\n-\t0 = cannot be printed\n\n-\t1 = print only low resolution\n\n-\t2 = print in full quality\n\nRequires that “pdfRestrictPassword” has been set.  Default = 2.",
            "format" : "int32",
            "enum" : [ 0, 1, 2 ],
            "default" : 2
          },
          "pdfRestrictEditing" : {
            "type" : "integer",
            "description" : "Restrict editing of the created PDF:\n\n-\t0 = no edits allowed\n\n-\t1 = pages can be inserted and rotated\n\n-\t2 = form fields can be filled in\n\n-\t3 = form fields can be filled and comments can be added\n\n-\t4 = above 1-3 enabled, but page extraction disabled\n\nRequires that “pdfRestrictPassword” has been set.  Default = 4.",
            "format" : "int32",
            "enum" : [ 0, 1, 2, 3, 4 ],
            "default" : 4
          },
          "pdfRestrictCopy" : {
            "type" : "boolean",
            "description" : "Set whether copy of PDF content is disabled.\n“true” or “y” disables the copy.\\n\nRequires that “pdfRestrictPassword” has been set."
          },
          "pdfRestrictAllowAccessibilty" : {
            "type" : "boolean",
            "description" : "Set whether content can be extracted by accessibility applications.\n“true” or “y” disables the accessibility access.\n\nRequires that “pdfRestrictPassword” has been set and also pdfRestrictCopy must be set."
          },
          "pdfEInvoiceSpec" : {
            "type" : "string",
            "description" : "The eInvoice Specification to use if creating an eInvoice.  For example:\n- ZUGFeRDv2 (Uses EN 16931 profile)\n\n- ZUGFeRDv1 (Uses COMFORT profile)\n\n- Order-Xv1 (Uses COMFORT profile)\n\n- Factur-X-v1-EN16931\n\nThe pdfEInvoiceAttachment must also be provided and pdfVersion must be set to PDF/A-3B."
          },
          "pdfEInvoiceAttachment" : {
            "type" : "string",
            "description" : "The xml eInvoice file in base64 format. The provided xml is expected to be valid and conforming to the specification provided in pdfEInvoiceSpec."
          },
          "compressSingleFormat" : {
            "type" : "boolean",
            "description" : "Optionally choose to zip the result when a single output document is produced.  The zip archive will contain a document in the specified format with a name based on outputName + outputFormat.  The resulting zip file name will be the outputName with the .zip extension appended as required.  This option is ignored if more than one outputFormat is specified.  Positive values are \"y\", \"yes\" and \"true\" (case-insensitive). Default = false."
          }
        },
        "description" : "Render Request Model"
      },
      "RenderQueueResponse" : {
        "type" : "object",
        "properties" : {
          "succeeded" : {
            "type" : "boolean"
          },
          "shortMsg" : {
            "type" : "string"
          },
          "longMsg" : {
            "type" : "string"
          },
          "queue" : {
            "$ref" : "#/components/schemas/queue"
          }
        },
        "description" : "Render Queue Response Model"
      },
      "RenderQueueRequest" : {
        "type" : "object",
        "properties" : {
          "accessKey" : {
            "type" : "string",
            "description" : "The unique API key identifying the Environment. This can be found in the API Keys area in the Cloud Console.\n\nNote the accessKey can be alternatively provided using a http header."
          }
        },
        "description" : "Render Queue Request Model"
      },
      "GetRenderTagsResponse" : {
        "type" : "object",
        "properties" : {
          "succeeded" : {
            "type" : "boolean",
            "description" : "\"true\" or \"false\"."
          },
          "shortMsg" : {
            "type" : "string",
            "description" : "A short message about the result.  In the case of an error this will be a short error message.  It may be blank in the case of a successful operation."
          },
          "longMsg" : {
            "type" : "string",
            "description" : "A more descriptive message about the result.  In the case of an error this will be a long error message.  It may be blank."
          },
          "renderTags" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/RenderTags"
            }
          }
        },
        "description" : "Get Render Tags Response Model"
      },
      "RenderTagStats" : {
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "The tag."
          },
          "countPages" : {
            "type" : "integer",
            "description" : "The number of pages rendered for this tag in the year and month.",
            "format" : "int64"
          },
          "countDocuments" : {
            "type" : "integer",
            "description" : "The number of documents rendered against this tag in the year and month.",
            "format" : "int64"
          }
        },
        "description" : "An array of RenderTagStats objects."
      },
      "RenderTags" : {
        "type" : "object",
        "properties" : {
          "year" : {
            "type" : "integer",
            "description" : "The year.",
            "format" : "int32"
          },
          "month" : {
            "maximum" : 12,
            "minimum" : 1,
            "type" : "integer",
            "description" : "The month number.",
            "format" : "int32"
          },
          "tags" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/RenderTagStats"
            }
          }
        },
        "description" : "An array of RenderTags objects.\n\nFor each tag queried, there will be an entry for that tag in the year and month.  There will also be a “combined” result showing the statistics for the combined set of tags queried.  This combined tag will report the stats that match all of the tags specified in the call to the getRenderTags request (that is, it will return the stats only for renders that included all the tags)."
      },
      "GetRenderTagsRequest" : {
        "required" : [ "tags" ],
        "type" : "object",
        "properties" : {
          "accessKey" : {
            "type" : "string",
            "description" : "The unique API key identifying the Environment. This can be found in the API Keys area in the Cloud Console.\n\nNote the accessKey can be alternatively provided using a http header."
          },
          "tags" : {
            "type" : "string",
            "description" : "The tags to query.  This can be a single tag or a list of tags separated by the ; (semicolon) character.",
            "example" : "abc;def"
          },
          "year" : {
            "type" : "string",
            "description" : "The year on which to report statistics.  Defaults to the current year."
          },
          "month" : {
            "maximum" : 12,
            "minimum" : 1,
            "type" : "string",
            "description" : "The month on which to report statistics (1=Jan). Defaults to the current month."
          },
          "nMonths" : {
            "type" : "string",
            "description" : "The number of months on which to report statistics.  Defaults to 1.  If more than one month is being reported, the months prior to the specified year and month are included.  In other words, this call always reports up to the specified month."
          },
          "padBlanks" : {
            "type" : "string",
            "description" : "If true (or ‘y’), zero values will be included where no data exists.  This may make parsing the returned result easier since it will always contain values for the tags requested over the given time period by padding the data with zero-values as required.\nDefaults to false."
          }
        },
        "description" : "Get Render Tags Request Model"
      },
      "DeleteTemplateRequest" : {
        "required" : [ "templateName" ],
        "type" : "object",
        "properties" : {
          "accessKey" : {
            "type" : "string",
            "description" : "The unique API key identifying the Environment. This can be found in the API Keys area in the Cloud Console.\n\nNote the accessKey can be alternatively provided using a http header."
          },
          "templateName" : {
            "minItems" : 1,
            "type" : "array",
            "items" : {
              "type" : "string",
              "description" : "The name of the template. This parameter can be specified multiple times to delete multiple files.",
              "example" : "/MyFolder/MyTemplate.docx"
            }
          }
        },
        "description" : "Delete Template Request Model"
      },
      "GetTemplateDetailsResponse" : {
        "type" : "object",
        "properties" : {
          "succeeded" : {
            "type" : "boolean",
            "description" : "\"true\" or \"false\"."
          },
          "shortMsg" : {
            "type" : "string",
            "description" : "A short message about the result.  In the case of an error this will be a short error message.  It may be blank in the case of a successful operation."
          },
          "longMsg" : {
            "type" : "string",
            "description" : "A more descriptive message about the result.  In the case of an error this will be a long error message.  It may be blank."
          },
          "templateDetails" : {
            "$ref" : "#/components/schemas/TemplateDetails"
          }
        },
        "description" : "Get Template Details Response Model"
      },
      "TemplateDetails" : {
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "the template file name"
          },
          "lastModifiedMillisSinceEpoch" : {
            "type" : "integer",
            "description" : "last modified in milliseconds",
            "format" : "int64"
          },
          "lastModifiedISO8601" : {
            "type" : "string",
            "description" : "last modified yyyy-MMdd'T'HH:mm:ssZ",
            "format" : "date-time"
          },
          "sizeBytes" : {
            "type" : "integer",
            "description" : "the size in bytes",
            "format" : "int64"
          },
          "md5" : {
            "type" : "string",
            "description" : "the md5 hash code for the template"
          },
          "templatePlainTextFieldPrefix" : {
            "type" : "string",
            "description" : "the prefix used when it was uploaded"
          },
          "templatePlainTextFieldSuffix" : {
            "type" : "string",
            "description" : "the suffix used when it was uploaded"
          },
          "templateHasErrors" : {
            "type" : "boolean",
            "description" : "the dev mode setting used when it was uploaded"
          },
          "templateDevMode" : {
            "type" : "boolean",
            "description" : "true if the uploaded template has errors"
          },
          "templateDescription" : {
            "type" : "string",
            "description" : "the description uploaded with the template if any"
          }
        },
        "description" : "The details of an uploaded template."
      },
      "GetTemplateDetailsRequest" : {
        "required" : [ "templateName" ],
        "type" : "object",
        "properties" : {
          "accessKey" : {
            "type" : "string",
            "description" : "The unique API key identifying the Environment. This can be found in the API Keys area in the Cloud Console.\n\nNote the accessKey can be alternatively provided using a http header."
          },
          "templateName" : {
            "type" : "string",
            "description" : "The name of the template.",
            "example" : "/WelcomeTemplate.docx"
          },
          "stringify" : {
            "type" : "string",
            "description" : "If set to \"y\", \"yes\" or \"true\" then the json result will be stringified, otherwise the json response object will be sent in full.",
            "default" : "false"
          }
        },
        "description" : "Get Template Details Request Model"
      },
      "GetTemplateRequest" : {
        "required" : [ "templateName" ],
        "type" : "object",
        "properties" : {
          "accessKey" : {
            "type" : "string",
            "description" : "The unique API key identifying the Environment. This can be found in the API Keys area in the Cloud Console.\n\nNote the accessKey can be alternatively provided using a http header."
          },
          "templateName" : {
            "maxItems" : 100,
            "minItems" : 1,
            "type" : "array",
            "items" : {
              "type" : "string",
              "description" : "The name of the template.  This parameter can be specified multiple times to download multiple templates (up to 100) in a zip file.",
              "example" : "/WelcomeTemplate.docx"
            }
          }
        },
        "description" : "Get Template Request Model"
      },
      "GetSampleDataResponse" : {
        "type" : "object",
        "properties" : {
          "succeeded" : {
            "type" : "boolean",
            "description" : "\"true\" or \"false\"."
          },
          "shortMsg" : {
            "type" : "string",
            "description" : "A short message about the result.  In the case of an error this will be a short error message.  It may be blank in the case of a successful operation."
          },
          "longMsg" : {
            "type" : "string",
            "description" : "A more descriptive message about the result.  In the case of an error this will be a long error message.  It may be blank."
          },
          "templateSampleData" : {
            "type" : "object",
            "description" : "JSON or XML formatted sample data that can be used to populate the template. Will be a String if stringify=true or requesting xml."
          },
          "templateDetails" : {
            "$ref" : "#/components/schemas/GetSampleDataTemplateDetails"
          }
        },
        "description" : "Get Sample Data Response Model"
      },
      "GetSampleDataTemplateDetails" : {
        "type" : "object",
        "properties" : {
          "templateHasErrors" : {
            "type" : "boolean",
            "description" : "true or false."
          },
          "templateFirstError" : {
            "type" : "string",
            "description" : "A string of the first error message in the template if errors are present."
          }
        },
        "description" : "A JSON structure providing details of errors in the template."
      },
      "GetSampleDataRequest" : {
        "required" : [ "templateName" ],
        "type" : "object",
        "properties" : {
          "accessKey" : {
            "type" : "string",
            "description" : "The unique API key identifying the Environment. This can be found in the API Keys area in the Cloud Console.\n\nNote the accessKey can be alternatively provided using a http header."
          },
          "templateName" : {
            "type" : "string",
            "description" : "The name of the template.",
            "example" : "/WelcomeTemplate.docx"
          },
          "stringify" : {
            "type" : "string",
            "description" : "If set to \"y\", \"yes\" or \"true\" then the json result will be stringified, otherwise the json response object will be sent in full.",
            "default" : "false"
          },
          "format" : {
            "type" : "string",
            "description" : "If blank or “json”, JSON format data will be returned.  Otherwise XML format data will be returned.",
            "enum" : [ "json", "xml" ],
            "default" : "json"
          }
        },
        "description" : "Get Sample Data Request Model"
      },
      "GetTemplateStructureResponse" : {
        "type" : "object",
        "properties" : {
          "succeeded" : {
            "type" : "boolean"
          },
          "shortMsg" : {
            "type" : "string"
          },
          "longMsg" : {
            "type" : "string"
          },
          "templateHasErrors" : {
            "type" : "boolean",
            "description" : "true if errors are detected in the template"
          },
          "templateErrorMessage" : {
            "type" : "string",
            "description" : "The first error message if templateHasErrors is true"
          },
          "templateStructure" : {
            "type" : "array",
            "items" : {
              "type" : "object",
              "description" : "A JSON format description of the template structure.  Will be a String if stringify=true. Template elements are returned in an array, for example:\n\n“templateStructure”:[\n{\"type\":\"field\", \"fieldIdx\":0, \"text\":\"name\", \"dataRefs\":[\"name\"]},\n{\"type\":\"field\", \"fieldIdx\":1, \"text\":\"address\", \"dataRefs\":[\"address\"]}\n]\n\nThe above example show two fields were found and each correlates with a lookup on a single data item (“dataRefs”).  A template element such as an expression-field may correlate with multiple data references.  For example, the template expression:\n\n\\<\\<{firstName + ‘ ‘ + lastName}\\>\\>\n\nis reported as a field with two dataRefs:\n\n{\"type\":\"field\", \"fieldIdx\":2, \"text\":\"{firstName + ' ' + lastName}\", \"dataRefs\":[\"firstName\",\"lastName\"]}\n\n\n\nThe types reported are: “field”, “repeat”, “condition”, “image”, “templateRef” corresponding to matching structures in the template.  Each type has it’s own index which is global to the document.  “text” shows the string as presented in the template and dataRefs reports the identified data elements correlated to the template element.\n\nThe result also indicates the nesting of elements.  The template content:\n\n\\<\\<cs_hasPeople\\>\\>\n\n\\<\\<rs_people\\>\\>\n\n\\<\\<name\\>\\>\n\n\\<\\<es_\\>\\>\n\n\\<\\<es_\\>\\>\n\nWould be expressed as:\n\n[\n      {\n        \"type\": \"condition\", \"conditionIdx\": 0, \"text\": \"cs_hasPeople\",\n        \"dataRefs\": [\"hasPeople\"],\n        \"contains\": [\n          {\n            \"type\": \"repeat\", \"repeatIdx\": 0, \"text\": \"rs_people\",\n            \"dataRefs\": [\"people\"],\n            \"contains\": [\n              {\n                \"type\": \"field\", \"fieldIdx\": 0, \"text\": \"name\",\n                \"dataRefs\": [\"name\"]\n              }\n            ]\n          }\n        ]\n      }\n    ]"
            }
          }
        },
        "description" : "Get Template Structure Response Model"
      },
      "GetTemplateStructureRequest" : {
        "required" : [ "templateName" ],
        "type" : "object",
        "properties" : {
          "accessKey" : {
            "type" : "string",
            "description" : "The unique API key identifying the Environment. This can be found in the API Keys area in the Cloud Console.\n\nNote the accessKey can be alternatively provided using a http header."
          },
          "templateName" : {
            "type" : "string",
            "description" : "The name of the template.",
            "example" : "/WelcomeTemplate.docx"
          },
          "stringify" : {
            "type" : "string",
            "description" : "If set to \"y\", \"yes\" or \"true\" then the json result will be stringified, otherwise the json response object will be sent in full.",
            "default" : "false"
          }
        },
        "description" : "Get Template Structure Request Model"
      },
      "ListTemplatesResponse" : {
        "type" : "object",
        "properties" : {
          "succeeded" : {
            "type" : "boolean",
            "description" : "\"true\" or \"false\"."
          },
          "shortMsg" : {
            "type" : "string",
            "description" : "A short message about the result.  In the case of an error this will be a short error message.  It may be blank in the case of a successful operation."
          },
          "longMsg" : {
            "type" : "string",
            "description" : "A more descriptive message about the result.  In the case of an error this will be a long error message.  It may be blank."
          },
          "templateListStale" : {
            "type" : "boolean",
            "description" : "\"true\" or \"false\". If Docmosis detects changes to the template list are in progress (such as updates or deletions) this flag will be set to \"true\" to indicate the list is not necessarily up to date.  This is only ever expected to be \"true\" for a short period after deletes or updates."
          },
          "nextPageToken" : {
            "type" : "string",
            "description" : "If returned, this specifies the token to use in the next call to listTemplates (parameter pageToken)  to get the next page of results.  This element is not present if the request was not-paged or there are no further pages."
          },
          "pageSize" : {
            "type" : "integer",
            "description" : "The size of pages when paging is active.  Default is 1000 (which is also the maximum supported).  Since the list returns folder names as items, the folders themselves count in the page size.",
            "format" : "int64"
          },
          "templateList" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/TemplateDetails"
            }
          }
        },
        "description" : "List Templates Response Model"
      },
      "ListTemplatesRequest" : {
        "type" : "object",
        "properties" : {
          "accessKey" : {
            "type" : "string",
            "description" : "The unique API key identifying the Environment. This can be found in the API Keys area in the Cloud Console.\n\nNote the accessKey can be alternatively provided using a http header."
          },
          "includeDetail" : {
            "type" : "string",
            "description" : "Include extra detail about templates (if true extra details (such as whether the template has errors) is obtained but listing is much slower).  Default=false."
          },
          "folder" : {
            "type" : "string",
            "description" : "An optional starting folder (path). If not specified, all templates in will be listed."
          },
          "includeSubFolders" : {
            "type" : "string",
            "description" : "An optional specification as to whether the list will include items within sub-folders. Defaults to true. \"y\", \"yes\" and \"true\" are all positive indicators."
          },
          "paging" : {
            "type" : "string",
            "description" : "Whether or not to return results in pages.  Default=false.  If true, pages of 1000 records are returned."
          },
          "pageToken" : {
            "type" : "string",
            "description" : "When paging is true, this token identifies the next page to retrieve.  The page token is null for the first page.  When the first page response returns, it contains the token required to request the next page."
          },
          "pageSize" : {
            "type" : "string",
            "description" : "The size of pages when paging is active.  Default is 1000 (which is also the maximum supported).  Since the list returns folder names as items, the folders themselves count in the page size."
          }
        },
        "description" : "List Templates Request Model"
      },
      "UploadTemplateResponse" : {
        "type" : "object",
        "properties" : {
          "succeeded" : {
            "type" : "boolean",
            "description" : "\"true\" or \"false\"."
          },
          "shortMsg" : {
            "type" : "string",
            "description" : "A short message about the result.  In the case of an error this will be a short error message.  It may be blank in the case of a successful operation."
          },
          "longMsg" : {
            "type" : "string",
            "description" : "A more descriptive message about the result.  In the case of an error this will be a long error message.  It may be blank."
          },
          "templateDetails" : {
            "$ref" : "#/components/schemas/TemplateDetails"
          }
        },
        "description" : "Upload Template Response Model"
      },
      "UploadTemplateRequest" : {
        "required" : [ "templateFile" ],
        "type" : "object",
        "properties" : {
          "accessKey" : {
            "type" : "string",
            "description" : "The unique API key identifying the Environment. This can be found in the API Keys area in the Cloud Console.\n\nNote the accessKey can be alternatively provided using a http header."
          },
          "templateFile" : {
            "type" : "string",
            "description" : "The template file to upload.",
            "format" : "binary"
          },
          "fieldDelimPrefix" : {
            "type" : "string",
            "description" : "If using plain text mark-up in templates this specifies the prefix delimiter identifying a field.\n\nThe default is ‘<<’."
          },
          "fieldDelimSuffix" : {
            "type" : "string",
            "description" : "This is the closing delimiter for plain text fields.\n\nThe default is ‘>>’."
          },
          "normalizeTemplateName" : {
            "type" : "string",
            "description" : "If set to \"y\", \"yes\" or \"true\" the template name given will be NFC normalized (Unicode NFC normalization).  The default is false."
          },
          "templateName" : {
            "type" : "string",
            "description" : "An optional, overriding name, which may include a path."
          },
          "templateDescription" : {
            "type" : "string",
            "description" : "A description for the template."
          },
          "devMode" : {
            "type" : "string",
            "description" : "If set to \"y\", \"yes\" or \"true\" the upload is run in developer mode, meaning that if errors are detected in the template the upload still succeeds.  This allows later render requests to optionally display the errors in the template in a rendered document (using the Render service’s own devMode flag).  In a production setting, a devMode of true for upload is perfectly valid since the devMode of the Render service has the final say as to whether a document is produced.\nDefaults to \"true\"."
          },
          "keepPrevOnFail" : {
            "type" : "string",
            "description" : "If set to \"y\", \"yes\" or \"true\" the previous template of the same name will be left in place if the uploaded template has errors.  If not specified (or \"n\", \"no\" or \"false\") the original template is always removed, even if this uploaded template has errors.\n\nThis only has effect when devMode is disabled (since devMode is intended to allow templates with errors to be displayed by Docmosis).\n\nThis parameter means that in production mode (non-developer mode) template uploads will not replace a working template with a bad template.\n\nDefaults to \"false\"."
          }
        },
        "description" : "Upload Template Request Model"
      },
      "UploadTemplateBatchCancelRequest" : {
        "required" : [ "userJobId" ],
        "type" : "object",
        "properties" : {
          "accessKey" : {
            "type" : "string",
            "description" : "The unique API key identifying the Environment. This can be found in the API Keys area in the Cloud Console.\n\nNote the accessKey can be alternatively provided using a http header."
          },
          "userJobId" : {
            "type" : "string",
            "description" : "The identifier for the batch upload job.",
            "example" : "ABCDE"
          }
        },
        "description" : "Upload Template Batch Cancel Request Model"
      },
      "JobStatus" : {
        "type" : "object",
        "properties" : {
          "userJobId" : {
            "type" : "string",
            "description" : "An identifier for the batch upload job which can be used to check the status of the job or to cancel the job. If no id was provided in the request a generated one is returned."
          },
          "isEnded" : {
            "type" : "boolean",
            "description" : "\"true\" or \"false\"."
          },
          "status" : {
            "type" : "string",
            "description" : "The current status of the job."
          },
          "type" : {
            "type" : "string",
            "description" : "The type of job being run."
          },
          "processingMsg" : {
            "type" : "string",
            "description" : "A message about the template processing."
          },
          "startedTime" : {
            "type" : "integer",
            "description" : "Started time in milliseconds (Epoch time).",
            "format" : "int64"
          },
          "finishedTime" : {
            "type" : "integer",
            "description" : "Finished time in milliseconds (Epoch time). 0 if job is ongoing.",
            "format" : "int64"
          },
          "duration" : {
            "type" : "integer",
            "description" : "Duration of job in milliseconds (Epoch time).",
            "format" : "int64"
          },
          "pctComplete" : {
            "type" : "integer",
            "description" : "Percentage complete, 0 – 100.",
            "format" : "int32"
          },
          "jobResult" : {
            "$ref" : "#/components/schemas/UploadTemplateBatchJobResult"
          }
        },
        "description" : "The details a Job running on Docmosis Cloud"
      },
      "UploadTemplateBatchJobResult" : {
        "type" : "object",
        "properties" : {
          "errorsDetected" : {
            "type" : "boolean",
            "description" : "true if any of the uploaded templates have errors"
          },
          "uploadedIntoFolder" : {
            "type" : "string",
            "description" : "the provided folder path to upload the templates to."
          },
          "devMode" : {
            "type" : "boolean",
            "description" : "the dev mode setting used when it was uploaded."
          },
          "uploadedTotalCount" : {
            "type" : "integer",
            "description" : "total number of templates uploaded.",
            "format" : "int32"
          },
          "processedWithErrorsCount" : {
            "type" : "integer",
            "description" : "number of uploaded templates processed with errors.",
            "format" : "int32"
          },
          "processedWithoutErrorsCount" : {
            "type" : "integer",
            "description" : "number of uploaded templates processed without errors.",
            "format" : "int32"
          }
        },
        "description" : "The result of an Upload Template Batch Job"
      },
      "UploadTemplateBatchResponse" : {
        "type" : "object",
        "properties" : {
          "succeeded" : {
            "type" : "boolean",
            "description" : "\"true\" or \"false\"."
          },
          "shortMsg" : {
            "type" : "string",
            "description" : "A short message about the result.  In the case of an error this will be a short error message.  It may be blank in the case of a successful operation."
          },
          "longMsg" : {
            "type" : "string",
            "description" : "A more descriptive message about the result.  In the case of an error this will be a long error message.  It may be blank."
          },
          "jobStatus" : {
            "$ref" : "#/components/schemas/JobStatus"
          }
        },
        "description" : "Upload Template Batch Response Model"
      },
      "UploadTemplateBatchRequest" : {
        "required" : [ "templateZip" ],
        "type" : "object",
        "properties" : {
          "accessKey" : {
            "type" : "string",
            "description" : "The unique API key identifying the Environment. This can be found in the API Keys area in the Cloud Console.\n\nNote the accessKey can be alternatively provided using a http header."
          },
          "templateZip" : {
            "type" : "string",
            "description" : "The template files to upload. This can include folders which will be created in the cloud account.\n\nThe zip is discarded at the end of the process, only the uploaded templates persist.",
            "format" : "binary"
          },
          "fieldDelimPrefix" : {
            "type" : "string",
            "description" : "If using plain text mark-up in templates this specifies the prefix delimiter identifying a field.\n\nThe default is ‘<<’."
          },
          "fieldDelimSuffix" : {
            "type" : "string",
            "description" : "This is the closing delimiter for plain text fields.\n\nThe default is ‘>>’."
          },
          "normalizeTemplateName" : {
            "type" : "string",
            "description" : "If set to \"y\", \"yes\" or \"true\" the template name given will be NFC normalized (Unicode NFC normalization).  The default is false."
          },
          "userJobId" : {
            "type" : "string",
            "description" : "An identifier for the batch upload job which can be used to check the status of the job or to cancel the job. If no id is provided a unique one will be generated and returned in the response message.\n\nMaximum of 40 characters.\n\nThe jobId can be reused.  When checking on the status of a job, only the latest version of the job with the id is considered."
          },
          "intoFolder" : {
            "type" : "string",
            "description" : "The path to the folder to upload the templates to. If no path is provided the templates will be uploaded to the ‘root’ directory."
          },
          "devMode" : {
            "type" : "string",
            "description" : "If set to \"y\", \"yes\" or \"true\" the upload is run in developer mode, meaning each template will be uploaded in Developer mode (errors allowed) and the job will complete if possible.\n\nDefaults to \"true\"."
          },
          "keepPrevOnFail" : {
            "type" : "string",
            "description" : "If set to \"y\", \"yes\" or \"true\" the previous template of the same name will be left in place if the uploaded template has errors.  If not specified (or \"n\", \"no\" or \"false\") the original template is always removed, even if this uploaded template has errors.\n\nThis only has effect when devMode is disabled (since devMode is intended to allow templates with errors to be displayed by Docmosis).\n\nThis parameter means that in production mode (non-developer mode) template uploads will not replace a working template with a bad template.\n\nIn a batch of templates, this setting will only affect the last template processed because a failure processing the template will abort the batch job.\n\nDefaults to \"false\"."
          }
        },
        "description" : "Upload Template Batch Request Model"
      },
      "UploadTemplateBatchStatusRequest" : {
        "required" : [ "userJobId" ],
        "type" : "object",
        "properties" : {
          "accessKey" : {
            "type" : "string",
            "description" : "The unique API key identifying the Environment. This can be found in the API Keys area in the Cloud Console.\n\nNote the accessKey can be alternatively provided using a http header."
          },
          "userJobId" : {
            "type" : "string",
            "description" : "The identifier for the batch upload job.",
            "example" : "ABCDE"
          }
        },
        "description" : "Upload Template Batch Status Request Model"
      }
    },
    "responses" : {
      "200" : {
        "description" : "Request succeeded",
        "headers" : {
          "X-Docmosis-Server" : {
            "$ref" : "#/components/headers/X-Docmosis-Server"
          }
        },
        "content" : {
          "application/json" : {
            "schema" : {
              "$ref" : "#/components/schemas/Response"
            }
          }
        }
      },
      "400" : {
        "description" : "Bad Request.",
        "headers" : {
          "X-Docmosis-Server" : {
            "$ref" : "#/components/headers/X-Docmosis-Server"
          }
        },
        "content" : {
          "application/json" : {
            "schema" : {
              "$ref" : "#/components/schemas/Response"
            }
          }
        }
      },
      "404" : {
        "description" : "Check the url."
      },
      "415" : {
        "description" : "The content type is unsupported."
      },
      "500" : {
        "description" : "An unexpected error has occurred. The error has been logged and is being investigated."
      }
    },
    "headers" : {
      "X-Docmosis-Server" : {
        "description" : "An identifier for this service.",
        "style" : "simple",
        "schema" : {
          "type" : "string"
        }
      },
      "X-Docmosis-RequestId" : {
        "description" : "Returned if the original request provided a requestId.",
        "style" : "simple",
        "schema" : {
          "type" : "string"
        }
      },
      "X-Docmosis-PagesRendered" : {
        "description" : "The number of pages rendered",
        "style" : "simple",
        "schema" : {
          "type" : "string"
        }
      },
      "X-Docmosis-Document-Errors-Detected" : {
        "description" : "Whether or not errors were detected in the document rendering.  This is useful in “dev mode” to be able to quickly determine whether the document created is known to have errors.",
        "style" : "simple",
        "schema" : {
          "type" : "string"
        }
      },
      "X-Docmosis-Zip-Created" : {
        "description" : "Set to true if the result being returned is a zip file.",
        "style" : "simple",
        "schema" : {
          "type" : "string"
        }
      },
      "X-Docmosis-Queue-Rejected" : {
        "description" : "Set to true if queue rejection has occurred (because queue is at capacity)",
        "style" : "simple",
        "schema" : {
          "type" : "string"
        }
      },
      "X-Docmosis-Queue-Available-Pct" : {
        "description" : "Estimated % of queue available.",
        "style" : "simple",
        "schema" : {
          "type" : "string"
        }
      },
      "X-Docmosis-Queue-Delay-Seconds" : {
        "description" : "A suggested back off time in seconds.",
        "style" : "simple",
        "schema" : {
          "type" : "string"
        }
      },
      "Retry-After" : {
        "description" : "A suggested back off time in seconds. Identical to header:X-Docmosis-Queue-Delay-Seconds",
        "style" : "simple",
        "schema" : {
          "type" : "string"
        }
      }
    },
    "securitySchemes" : {
      "accessKeyAuthorization" : {
        "type" : "apiKey",
        "description" : "The unique API key identifying the Environment. This can be found in the API Keys area in the Cloud Console.  This can be provided in either the Request Header or the Request Body.",
        "name" : "accessKey",
        "in" : "header"
      }
    }
  }
}