TaggingFilterCondition Search filter using AdminWebApi SalesOrder

I am investigating how I can search for orders based on a tag using AdminWebApi’s SalesOrder search function. I found the following post that provides and example of how to filter results based on a DateRange:

But if I want to filter on a tag, how might I do that? I’ve tried a filter that looks like the following (with several variations of the operator), but that does not appear to work as expected:

{
    "take": 10,
    "skip": 0,
    "filter": [
        {
            "must": [
                {
                    "$type": "Litium.Data.Queryable.Conditions.TaggingFilterCondition, Litium.Abstractions",
                    "operator": "Equal",
                    "value": "test"
                }
            ]
        }
    ]
}

Litium version: 8.17.1

giphy-3431489583

When I check the code I see 2 things.

  1. operator have no affect, otherwise it should “eq” for equal
  2. value should be an array of strings
    so test
{
    "take": 10,
    "skip": 0,
    "filter": [
        {
            "must": [
                {
                    "$type": "Litium.Data.Queryable.Conditions.TaggingFilterCondition, Litium.Abstractions",
                    "operator": "eq",
                    "value": [ "test" ]
                }
            ]
        }
    ]
}
1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.

The operator is implemented in Litium 8.19 and is tracked by Bug Details - 70172 - Operator parameter is not being used when filtering Orders by Tag in Admin Web API