'API URL Query to filter the response

So I'm trying to filter the response of my API GET query and can't seem to find a way to access deep enough in Json.

My response is like:

{
    "orders": [
        {
            "id": "7e35583d-2309-4775-a993-d2277539da2f",
            "updated_at": "2022-05-13T22:12:35.426Z",
            "created_at": "2022-05-13T22:11:40.194Z",
            "properties_attributes": {
                "sublocacao": "Sim_Subloc"
            },
            "price_in_cents": 13500,
            "grand_total_in_cents": 0,
            "grand_total_with_tax_in_cents": 0,
            "tax_in_cents": 0,
.
.
.

And I want to show only responses that have the properties_attributes": {"sublocacao": "Sim_Subloc"}. The others orders id's that doesn't have this property I don't want to show on the result.

I've tried:

https://apixxxxx.com/api/1/orders?sort=number_desc&statuses[]=reserved&properties_attributes=%7B%22sublocacao%22%3A%22Sim_Subloc%22%7D

Without avail. There isn’t (at least on the documentation) an endpoint for this filter, so I'm trying to filter by myself. Any hopes of getting it right? thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source