0

Doing an order search via API as follows:

{{magentoEndpoint}}/rest/default/V1/orders?searchCriteria[filterGroups][0][filters][0][field]=status&searchCriteria[filterGroups][0][filters][0][value]=pending&searchCriteria[filterGroups][0][filters][0][condition_type]=eq

However, the following results come back:

{
    "items": [],
    "search_criteria": {
        "filter_groups": [
            {
                "filters": [
                    {
                        "field": "status",
                        "value": "",
                        "condition_type": "eq"
                    }
                ]
            }
        ]
    },
    "total_count": 0
}

As you can see, the value parameter didn't come through. Can anyone tell why? Is there some trick to searching orders by status?

1 Answer 1

0

Turns out the key was the order of the parameters. When I changed it to field, then condition_type, then value in the querystring, it worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.