0

I am using this

http://domain.com/index.php/rest/V1/orders/7??fields=billing_address,customer_firstname,customer_lastname

it return the billing_address,customer_firstname,customer_lastname of order id 7, I want to get these details of all orders so i try

http://domain.com/index.php/rest/V1/orders?searchCriteria=all

it work return all orders But i want to get specific feilds for example billing_address,customer_firstname,customer_lastname.

How can I get specifics columns of all orders?

1
  • Can you please add proper tags?
    – sv3n
    Commented May 19, 2020 at 3:03

1 Answer 1

1

try this one, the response will have only these fields.

entity_id, billing_address,customer_firstname, and customer_lastname only

http://www.domain.com/rest/V1/orders?
searchCriteria[filter_groups][0][filters][0][field]=entity_id&
searchCriteria[filter_groups][0][filters][0][value]=1&
searchCriteria[filter_groups][0][filters][0][condition_type]=gteq&
searchCriteria[sortOrders][0][field]=increment_id&
fields=items[entity_id,billing_address,customer_firstname,customer_lastname]

check link for a detailed guide

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.