Skip to content

Customer Search by ID does not work in REST API #7530

@VanceBerisford

Description

@VanceBerisford

I have a list of customers that I am trying to pull data for all at once. I build a search filter with the contion_type="in", field="id", and value=my list of customers. I get an error that the field id does not exist.

Preconditions

  1. Magento 2.1.2
  2. REST API

Steps to reproduce

  1. Acquire token for token-based REST authorization
  2. Make GET request to /rest/V1/customers/search?searchCriteria[filter_groups][0][filters][0][field]=id&searchCriteria[filter_groups][0][filters][0][value]=1,2&searchCriteria[filter_groups][0][filters][0][condition_type]=in

Expected result

  1. This should return a list of customers with an id in {1,2}

Actual result

{
"message": "Invalid attribute name: %1",
"parameters": [
"id"
]
}

I have tried other terms for id, such as customer_id, customerID, custID, etc. with no change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: Framework/WebapiUSE ONLY for FRAMEWORK RELATED BUG! E.g If bug related to Catalog WEB API use just CatalogIssue: Format is validGate 1 Passed. Automatic verification of issue format passedbug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions