Merge values and defaulting in templates

Hi,

I am trying to keep my code minimal so I do not have to provide all of the merge fields when I make requests to render videos. If I do not provide a value for the merge field when requesting via the python sdk for example, the request will not go through. Is it possible to set a default for a merge field when I do not provide a value for it in my call ?

If the merge field is for an text (html) asset then I guess you can just pass an empty string. If it is for an image or video src, then yes that will fail validation because the src is a required field.

What is the use case/scenario here where you would omit merge field values. One solution I can think of is having multiple templates for each scenario. If you provide more info I might have more ideas.

Hey @bobble!

I might be a little late to the party, but I think I have a solution that could fix your problem!

I ran into the same issue today when I was creating some code that would input text to use as subtitles. But, I found that the number of subtitle blocks given to me from the srt file kept changing.

To fix this issue, I passed through 0’s for the numbers the api was expecting, and empty spaces (" ") for the text the api was expecting, and it worked!

Hope this helped!