# Order & Customer API Endpoint Error

**URL:** <https://forum.shopware.com/t/order-customer-api-endpoint-error/94996>\
**Category:** Shopware 6 (English)\
**Created:** [27. Juni 2022 um 14:47 UTC](https://forum.shopware.com/t/order-customer-api-endpoint-error/94996 "2022-06-27T14:47:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dominic.coutts](https://avatars.discourse-cdn.com/v4/letter/d/c67d28/32.png) [@dominic.coutts](https://forum.shopware.com/u/dominic.coutts)\
**Post date:** [27. Juni 2022 um 14:47 UTC](https://forum.shopware.com/t/order-customer-api-endpoint-error/94996/1 "2022-06-27T14:47:12Z")

</div>

Just setting up an instance of SW6 for a client but need to integrate with their existing ERP - using Integromat to create the necessary API connections but struggling with the endpoints for Orders and Customers - both constantly error:

„status“: „403“,  
„code“: „CHECKOUT\_\_CUSTOMER\_NOT\_LOGGED\_IN“,  
„title“: „Forbidden“,  
„detail“: „Customer is not logged in.“,

There’s one test customer with one test order and the customer has an account created. Wasted hours on this now. Can anyone shed any light?

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [27. Juni 2022 um 16:45 UTC](https://forum.shopware.com/t/order-customer-api-endpoint-error/94996/2 "2022-06-27T16:45:54Z")

</div>

Guess you are using the storefront api not the admin api. for the storefront api you need the customer session to get the data.

---

<div class="post-metadata">

**Author:** ![dominic.coutts](https://avatars.discourse-cdn.com/v4/letter/d/c67d28/32.png) [@dominic.coutts](https://forum.shopware.com/u/dominic.coutts)\
**Post date:** [28. Juni 2022 um 16:07 UTC](https://forum.shopware.com/t/order-customer-api-endpoint-error/94996/3 "2022-06-28T16:07:18Z")

</div>

I was… however, using the order endpoint in the admin API, I am completely unable to get the line items in the output using the associations request.

{  
„id“: „25d2bf073f08442daa036e9c06e29792“,  
„associations“: {  
„lineItems“: {},  
„addresses“: {},  
„transactions“: {}  
},  
„includes“: {  
„order\_line\_item“: [„id“, „label“, „quantity“]  
}  
}

---

<div class="post-metadata">

**Author:** ![dominic.coutts](https://avatars.discourse-cdn.com/v4/letter/d/c67d28/32.png) [@dominic.coutts](https://forum.shopware.com/u/dominic.coutts)\
**Post date:** [4. Juli 2022 um 13:34 UTC](https://forum.shopware.com/t/order-customer-api-endpoint-error/94996/4 "2022-07-04T13:34:14Z")

</div>

Okay, using a GET request on the Admin API you need to add any filter/association/include requests etc as an HTTP Query String directly to the URL.

I had been adding it as a JSON request. If you’re using Integromat HTTP modules - it doesn’t even seem to recognise the Query String Parameters - so just add straight to the URL.

So for example for this:

{  
associations: {  
lineItems: {  
limit: 50  
}  
}

add this to the end of the URL:

?associations[lineItems][limit]=50

Even if you don’t want to ‚limit‘ or ‚filter‘ or ‚include‘ - you will not get the payload for associations unless you add some parameter - ie this on its own won’t work: ?associations[lineItems]

---

<div class="post-metadata">

**Author:** ![andoh](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@andoh](https://forum.shopware.com/u/andoh)\
**Post date:** [28. Oktober 2022 um 15:12 UTC](https://forum.shopware.com/t/order-customer-api-endpoint-error/94996/5 "2022-10-28T15:12:12Z")

</div>

I am having am issue which i have tired to resolve for some time now, I am using the storefront api to expose endpoints for consumption, currently the official api documentation is guiding me [shopware wishlist](https://shopware.stoplight.io/docs/store-api/b2d281de3cdd6-add-a-product-to-a-wishlist)  
First of all, i made sure i was logged in and provided by the application with a response

```auto
{
    "apiAlias": "array_struct",
    "contextToken": "pUMQzlkGuZcXXwfhbtdiDY8mYbOiDJIN",
    "redirectUrl": null
}

```

And then in the headers of `http://localhost/store-api/customer/wishlist` i am providing these data

```auto
sw-access-key: "i_provided_a_shopware_apikey_here",
sw-context-token: "pUMQzlkGuZcXXwfhbtdiDY8mYbOiDJIN"

```

and the body

```auto
{
  "page": 1,
  "limit": 10
}

```

But still got the error

```auto
{
    "errors": [
        {
            "status": "403",
            "code": "CHECKOUT__CUSTOMER_NOT_LOGGED_IN",
            "title": "Forbidden",
            "detail": "Customer is not logged in.",
            "meta": {
                "parameters": []
            }
        }
    ]
}

```

from postman. Any suggestions and help ?
