I'm creating custom rest API for getting a list of products. In my module, I have just use the getList function of ProductRepository. I need to pass select specific fields in API. so, how can I get that??

Note: In core API, we can get these response using below URL:


I want to pass these fields programmatically.

  • you can use search Criteria using column name Commented Nov 19, 2018 at 12:10
  • can you explain me , how can i achieve that??
    – Ratna Jain
    Commented Nov 19, 2018 at 12:15

1 Answer 1


you have an API(rest/V1/products) -you can use search Criteria.


you can use search Criteria using Column name


method type : GET

The system creates an array, as shown in the following pseudo-code.

searchCriteria => [
  'filterGroups' => [
    0 => [
      'filters' => [
         0 => [
           'field' => 'name',
           'value' => 'YOUR VALUE',
           'condition_type' => 'eq'
  • I know this..but it's used for add where condition in result & i want to pass specific fields in select criteria.
    – Ratna Jain
    Commented Nov 19, 2018 at 12:24
  • Please elaborate your concern. Commented Nov 20, 2018 at 5:04

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.