0 Replies Latest reply on Jun 4, 2021 7:37 AM by Alex _

    REST API - Get entity fields from a subentity

    Alex _ Guru

      Hi All,
      I'm trying to create an api request that returns all subentity records based on the value of an entity attribute.

      For example all the suppliers code for the item with EAN equals to "123".

      When I build the request i can use root entity field in "query" parameter in order to build the return conditions but i cannot use the same field in "fields" parameter to get back their values.

      For better understanding my problem i report the query I'm trying to create:


      http://HOST:1512/rest/V2.0/list/Article/MySubentity/bySearch?query=Article.EAN contains "1234"&fields=MySubentity.customField,Article.EAN


      This request returns the folowing error message:

      Fields: The field 'Article.EAN' does not have the entity 'MySubentity' as parent.


      Could you help me to undestand why this happens?