Skip to content

Dynamic Video On Demand API (v032021)

Previous version

This page documents the previous version of the API, v032021. For new integrations, use the current version (v012024).

The Dynamic Video On Demand API lets you integrate with Treepodia's services and create dynamic videos from your own data.

All endpoints use this base URL:

https://api.treepodia.com/rest/vod/v032021

In the endpoints below, replace {uuid} with your Treepodia account UUID.

Authentication

Every API request must be authorized with an access token. Request a token from the authentication service with your Treepodia account credentials.

Endpoint

POST https://api.treepodia.com/rest/vod/v032021/auth
Content-Type: application/json

Request body

Field Type Required Description
email string Yes The email address of your Treepodia account.
password string Yes The password of your Treepodia account.
expirationDate number No When the token should expire, as a Unix timestamp in milliseconds. If omitted, the token expires after 2 weeks.
{
  "email": "you@example.com",
  "password": "your-password",
  "expirationDate": 1646794257759
}

Successful response

{
  "status": "SUCCESS",
  "accessToken": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "expirationDate": 1646794257759
}

List templates

Returns the templates available to your account.

GET https://api.treepodia.com/rest/vod/v032021/acc/{uuid}/templates

Successful response

{
  "templates": [
    {
      "id": 1111111111,
      "name": "Template 1",
      "description": "Template 1 description",
      "thumbnailPath": "https://api.treepodia.com/rest/vod/v032021/acc/YOUR-UUID/templates/1111111111/thumbnail"
    },
    {
      "id": 2222222222,
      "name": "Template 2",
      "description": "Template 2 description",
      "thumbnailPath": "https://api.treepodia.com/rest/vod/v032021/acc/YOUR-UUID/templates/2222222222/thumbnail"
    }
  ]
}

Get template parameters

Returns a template's details and the parameters you need to provide when creating a video from it.

GET https://api.treepodia.com/rest/vod/v032021/acc/{uuid}/templates/{templateId}

The response has the same format as in the current version. See Get template parameters for an example response and a description of the parameter fields and types.

Create a video (immediate response)

Creates a video immediately from a template and your parameter values. Immediate video creation is available for a specific type of Dynamic Video template, and these videos can only be played with the Dynamic Video Player.

POST https://api.treepodia.com/rest/vod/v032021/acc/{uuid}/videos
Content-Type: application/json

In this version, the access token is sent in the request body.

Request body

Field Type Description
accessToken string The token from the authentication service.
sku string The SKU (identifier) of the video.
template integer The ID of the template to use.
temp boolean true for a temporary video, for example a preview on an editor page. Temporary videos are available for less than 24 hours. false to create the final version.
parameters object The values for the template's parameters, keyed by parameter id.
{
  "accessToken": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "sku": "test26",
  "template": 87687687786,
  "temp": false,
  "parameters": {
    "firstName": "Test",
    "lastName": "Last"
  }
}

Successful response

{
  "sku": "test26",
  "videoUUID": "kjashida7asdjahgsdau6tsdas",
  "status": "COMPLETED"
}

Pass the returned videoUUID to the Dynamic Video Player to play the video.

Migrating to v012024

The current version works the same way, with two changes:

  • The base URL is https://api.treepodia.com/rest/vod/v012024.
  • The access token is sent in an Authorization: Bearer <token> header on every request, instead of in the request body.

See the current version for details.