We use JSON:API specification on our API. Currently having issues with formatting the filter params to the specification using Flurl in C#.
Example:
var url = await Helpers.GetAPIPath()
.AppendPathSegment("orders")
.WithOAuthBearerToken(Helpers.GetAPIToken())
.SetQueryParams(new {
filters = "[work_orders]=true,[status]=pending_approval",
include = "shipping-address,inventory-items.part"
}).GetAsync();
This produces /orders?filters[work_orders]=true,[status]=pending_approval&include=shipping-address,inventory-items.part
Here's documentation on a JSON:API request with multiple filters https://jsonapi.org/recommendations/#filtering
How can I structure the filters similar to filter[work_orders]=true,filter[status]=pending_approval for the JSON:API specification?
Any help is much appreciated!
?filter[work_orders]=true&filter[status]=pending_approval. Using a&to separate query params and not,.