1

I want to integrate shopware in my application and I have a problem with the api.

I used dockware.io solution to get started with shopware and create a demo store. I was able to create customers and products and place orders.

But while I request the order through the API, I am not able to get lineItems of the order, it is always null. I have the same problem with the deliveries attribute. Here is a screenshot of the response to my request.

enter image description here

Why am I not receiving the items in the reply? Is there any other request I can make to receive them?

halfer
  • 19,824
  • 17
  • 99
  • 186

1 Answers1

3

You need to add the lineItems association in the request body of your API request. Same for the deliveries association and so on.

{
    "associations": {
        "lineItems": [],
        "deliveries": []
    }
}
dneustadt
  • 12,015
  • 1
  • 12
  • 18