ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 2 replies, has 2 voices, and was last updated by alexandre.pinheiro-da-silva alexandre.pinheiro-da-silva 3 weeks, 5 days ago.

  • Creator
    Topic
  • #39262

    Hello
    i’m using the JSON.API and I try to get Products with an PHP script.
    Query: GET /admin/api/products
    The Result is:

    I need to get the Name of the Product Entity and i dont know how to get it.
    When i use the Export Funktion the collumn name in the .csv is “names.default.value

    Anybody can help?
    Many thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #39282

    Hello.

    Name it’s localized field, so product has relation to collection of names. If you need to get entity with relations – use ?include= parameter to specify what relations do you want.
    So in your case, the query should be: GET /admin/api/products?include=names

    You can see more detailed information about relations in JSON API format here http://jsonapi.org/format/#fetching-includes

    #39298

    Hello,
    thanks for your reply.
    I did GET /admin/api/products?include=names
    But my response still dont get me a name.
    The ?include=names doesn’t make any changes.
    Is this a Bug or am I doing something wrong?
    My Response is:

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.