# Render Documents

# API Base URL

The base url for the email validation api is https://api.uberpdf.io/v1

# POST /templates/{ID}/render

This endpoint renders always the latest template revision available.

# Request

{baseUrl}/templates/fe7dbb4c-46fb-4195-a25f-69b0dfba674f/render

# Request Headers

Header Type Description
Authorization string Bearer authentication token. See authentication page for more info.

# Request Body

{
  "placeholders": [
    {
      "search": "{CUSTOMER_FIRSTNAME}",
      "replace": "Max"
    },
    {
      "search": "{CUSTOMER_LASTNAME}",
      "replace": "Mustermann"
    }
  ]
}
Parameter Type Description
placeholders array List of placeholders to search and replace in your template
placeholders.*.search string String to search for
placeholders.*.replace string String you want to replace search with

TIP

UBER PDF allows you to search and replace any text within your Word document. In the given request example, UBER PDF will search your Word document for the strings {CUSTOMER_FIRSTNAME} & {CUSTOMER_LASTNAME} and will replace them with Max & Mustermann. You are free to define your placeholders in any way you prefer or search and replace any text within your Word document before it get's converted into PDF.

# Response

The response body contains the rendered template.

# Response Headers

Name Description
content-type Content-Type of the response. Always application/pdf
content-length Size in bytes of the rendered document

# Code Examples

# POST /revisions/{ID}/render

This endpoint renders a specific template revision.

# Request

{baseUrl}/revisions/6e3aa826-5c26-4346-86e0-9e7a325fde00/render

# Request Headers

Header Type Description
Authorization string Bearer authentication token. See authentication page for more info.

# Request Body

{
  "placeholders": [
    {
      "search": "{CUSTOMER_FIRSTNAME}",
      "replace": "Max"
    },
    {
      "search": "{CUSTOMER_LASTNAME}",
      "replace": "Mustermann"
    }
  ]
}
Parameter Type Description
placeholders array List of placeholders to search and replace in your template
placeholders.*.search string String to search for
placeholders.*.replace string String you want to replace search with

TIP

UBER PDF allows you to search and replace any text within your Word document. In the given request example, UBER PDF will search your Word document for the strings {CUSTOMER_FIRSTNAME} & {CUSTOMER_LASTNAME} and will replace them with Max & Mustermann. You are free to define your placeholders in any way you prefer or search and replace any text within your Word document before it get's converted into PDF.

# Response

The response body contains the rendered template.

# Response Headers

Name Description
content-type Content-Type of the response. Always application/pdf
content-length Size in bytes of the rendered document

# Code Examples

Looking for more code examples? Feel free to drop us a line (hi@uberpdf.io) and we are happy to provide you a code example in your preferred language.