Those who know me and follow me are used to seeing me publish several resources, including whitepapers. But this one is different! Typically, when it comes to whitepapers or books, I usually release them through BizTalk360 or Serveless360, a partnership I have had for many years, and you should expect to find them more often in the future. However, this is the first whitepaper I have published under the DevScope umbrella, and I could not be prouder of the result.

Note: not only am I proud of the end result of this whitepaper, which I personally find very useful, but I’m also in love with my new corporate photo!
📝 One-Minute Brief
Learn how to use Liquid filters in Azure API Management to transform request and response payloads without external services. This article explains practical transformation scenarios, key Liquid functions, and how API Management policies can reshape messages efficiently while keeping integrations lightweight and maintainable.
I typically write about “stuff” I work on on a daily basis, and for the past few months, I have been working a lot with Liquid Template to perform transformations on API Management. Liquid is an open-source template language created by Shopify and written in Ruby. It is the backbone of Shopify themes and is used to load dynamic content on storefronts. However, Azure API Management uses a subset of Liquid templating language to transform the body of a request or response: DotLiquid.

If it is true that we can find excellent Shopify documentation, the same may not be that simple for DotLiquid, and I struggle a little to get decent examples of how to use Liquid Filters in API Management, and that was the main reason why I decided to write this whitepaper.
What is DotLiquid?
DotLiquid is a deviation from Shopify’s original Liquid template language. It is a .NET port of the popular Shopify’s Liquid templating language. It is a separate project that aims to retain the same template syntax as the original while using .NET coding conventions where possible. However, they are not entirely the same. In some cases, they have different behaviors.
Liquid uses a combination of objects, tags, and filters inside template files to display dynamic content.
Where:
- Objects contain the content that Liquid displays on a page. Objects and variables are displayed when enclosed in double curly braces: {{ and }}.
Hi my name is {{ author.name }}
- Tags create the logic and control flow for templates. The curly brace percentage delimiters {% and %} and the text that they surround do not produce any visible output when the template is rendered. This lets you assign variables and create conditions or loops without showing any of the Liquid logic on the page.
{% if author %}
Hi my name is {{ author.name }}!
{% endif %}
- Filters change the output of a Liquid object or variable. They are used within double curly braces {{ }} and variable assignment and are separated by a pipe character |.
{{ "Sandro" | Append: " Pereira" }}
In this whitepaper, I’m going to focus on the DotLiquid Filters you can use on API Management to transform the body of a request or response.
What is a liquid filter?
As mentioned above, Filters change the output of a Liquid object or variable. They are used within double curly braces {{ }} and variable assignment and are separated by a pipe character |. They are like functions in C# code or Functoids in BizTalk Server maps.
If we apply, for example, the Append filter like:
{% assign myvariable = "Sandro" %}
{{ myvariable | Append: " Pereira" }}
The end result will be: Sandro Pereira
We can also apply multiple filters on one output, which are applied from left to right. Like a PowerShell pipeline. A PowerShell pipeline is a series of commands connected by pipeline operators (|). Each pipeline operator sends the results of the preceding command to the next command. Filters use the same concept. For example:
"Name": "{{ "Sandro Pereira" | Split: " " | Last }}"
The end result here will be: “Name”: “Pereira.”
Download
You can see the official release announcement here: Download Sandro Pereira’s whitepaper on Liquid Filters.
You can download, for free, the Using Liquid filters in API Management to transform messages whitepaper here:
Hope you find this helpful! If you liked the content or found it useful and would like to support me in writing more, consider buying (or helping to buy) a Star Wars Lego set for my son.