# API PROBLEM with filter orders by orderStatusId

**URL:** <https://forum.shopware.com/t/api-problem-with-filter-orders-by-orderstatusid/37516>\
**Category:** Programmierung\
**Created:** [16. Juni 2016 um 16:21 UTC](https://forum.shopware.com/t/api-problem-with-filter-orders-by-orderstatusid/37516 "2016-06-16T16:21:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![funked00](https://avatars.discourse-cdn.com/v4/letter/f/d78d45/32.png) [@funked00](https://forum.shopware.com/u/funked00)\
**Post date:** [16. Juni 2016 um 16:21 UTC](https://forum.shopware.com/t/api-problem-with-filter-orders-by-orderstatusid/37516/1 "2016-06-16T16:21:44Z")

</div>

Hi,

I try to get a list of orders \<\> canceld and \<\> completed to sync the stock with a pos system.

But every time I get the error:

```
 {"success":false,"message":"Errormesage: [Semantical Error] line 0, col 131 near 'orderStatusId': Error: Class Shopware\\Models\\Order\\Order has no field or association named orderStatusId"}

```

I use an own perl api, not the php api, so here is the link which is called:

[https://shop.domain:443/api/orders?filter[0][expression]=%3D&filter[0][value]=0&filter[0][property]=orderStatusId](https://shop.domain:443/api/orders?filter%5B0%5D%5Bexpression%5D=%3D&filter%5B0%5D%5Bvalue%5D=0&filter%5B0%5D%5Bproperty%5D=orderStatusId)

decoded:

[https://shop.domain.com:443/api/orders?filter[0][expression]==&filter[0][value]=0&filter[0][property]=orderStatusId](https://shop.domain.com:443/api/orders?filter%5B0%5D%5Bexpression%5D==&filter%5B0%5D%5Bvalue%5D=0&filter%5B0%5D%5Bproperty%5D=orderStatusId)

Other properties works fine. E. g. invoiceAmount:

[https://shop.domain:443/api/orders?filter[0][property]=invoiceAmount&filter[0][value]=10&filter[0][expression]=\>%3D](https://shop.domain:443/api/orders?filter%5B0%5D%5Bproperty%5D=invoiceAmount&filter%5B0%5D%5Bvalue%5D=10&filter%5B0%5D%5Bexpression%5D=%3E%3D)

decoded:

[https://shop.domain:443/api/orders?filter[0][property]=invoiceAmount&filter[0][value]=10&filter[0][expression]=](https://shop.domain:443/api/orders?filter%5B0%5D%5Bproperty%5D=invoiceAmount&filter%5B0%5D%5Bvalue%5D=10&filter%5B0%5D%5Bexpression%5D=)\>=

Any ideas?

&nbsp;

Best regards

Daniel

&nbsp;

&nbsp;

&nbsp;

&nbsp;
