PATCH
/
api
/
v1
/
templates
/
{id}
curl --request PATCH \
  --url https://vortexpdf.com/api/v1/templates/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "template": {
    "content": "<h1>Invoice</h1><p>This is a sample invoice template</p>",
    "name": "Invoice Template",
    "preview_context": {
      "amount": 1000,
      "customer": "Acme Inc."
    }
  }
}'
{
  "data": {
    "content": "<h1>Invoice</h1><p>This is a sample invoice template</p>",
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "inserted_at": "2020-01-01T00:00:00Z",
    "name": "Invoice Template",
    "preview_context": {
      "amount": 1000,
      "customer": "Acme Inc."
    },
    "updated_at": "2020-01-01T00:00:00Z"
  }
}

Authorizations

Authorization
string
header
required

Manage your API keys at https://vortexpdf.com/api-keys

Path Parameters

id
string
required

Template ID

Body

application/json
Template params

PATCH body for updating a template

template
object
required
Example:
{
  "content": "<h1>Invoice</h1><p>This is a sample invoice template</p>",
  "name": "Invoice Template",
  "preview_context": { "amount": 1000, "customer": "Acme Inc." }
}

Response

200
application/json
Template response

Response schema for a single template

data
object
required

A template object

Example:
{
  "content": "<h1>Invoice</h1><p>This is a sample invoice template</p>",
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "inserted_at": "2020-01-01T00:00:00Z",
  "name": "Invoice Template",
  "preview_context": { "amount": 1000, "customer": "Acme Inc." },
  "updated_at": "2020-01-01T00:00:00Z"
}