1

I am trying this syntax but it returns no results. I am trying to get a single order based on increment_id. I have no issue getting an order thru the entity_id.

/rest/V1/orders?searchCriteria[filterGroups][0][filters][0][field]=increment_id&searchCriteria[filterGroups][0][filters][0][value]=12345

returns

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

Internal ID 12345 is valid, and you can see it's not passed back as filter result.

1 Answer 1

1

Please use this , I have verified it and it's working.

https://yourdomain.com/rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=increment_id&searchCriteria[filter_groups][0][filters][0][value]=2506100006387135&searchCriteria[filter_groups][0][filters][0][condition_type]=eq&searchCriteria[pageSize]=2&searchCriteria[sortOrders][0][field]=created_at&searchCriteria[sortOrders][0][direction]=DESC
7
  • I just tried this but it's still not working. searchCriteria[filter_groups][0][filters][0][field]=increment_id&searchCriteria[filter_groups][0][filters][0][value]=7000000002&searchCriteria[filter_groups][0][filters][0][condition_type]=eq&searchCriteria[pageSize]=2&searchCriteria[sortOrders][0][field]=created_at&searchCriteria[sortOrders][0][direction]=DESC and the result is {"items":[],"search_criteria":{"filter_groups":[{"filters":[{"field":"increment_id","value":null,"condition_type":"eq"}]}]},"total_count":0}
    – andyknas
    Commented Jun 27, 2020 at 21:40
  • It seems there is no record for this increment id. Commented Jun 29, 2020 at 5:49
  • have u made any customization Commented Jun 29, 2020 at 5:49
  • I went back to verify the order ID, still get the error
    – andyknas
    Commented Jun 30, 2020 at 2:09
  • GET /rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=increment_id&searchCriteria[filter_groups][0][filters][0][value]=6000000008&searchCriteria[filter_groups][0][filters][0][condition_type]=eq&searchCriteria[pageSize]=2&searchCriteria[sortOrders][0][field]=created_at&searchCriteria[sortOrders][0][direction]=DESC&Authorisation=Bearer&Accept=application/ and response again is {"items":[],"search_criteria":{"filter_groups":[{"filters":[{"field":"increment_id","value":null,"condition_type":"eq"}]}]},"total_count":0}
    – andyknas
    Commented Jun 30, 2020 at 2:09

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.