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

Forums Forums OroCRM JSON.API: try to get product name

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

  • Creator
  • #27724

    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
  • #27726

    Viacheslav Bemza


    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


    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.