# Associationssortierung im GET-Request an der Sales-Channel-Api

**URL:** https://forum.shopware.com/t/associationssortierung-im-get-request-an-der-sales-channel-api/66607
**Category:** Programmierung
**Created:** [30. April 2020 um 08:37 UTC](https://forum.shopware.com/t/associationssortierung-im-get-request-an-der-sales-channel-api/66607 "2020-04-30T08:37:59Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mschradi](https://avatars.discourse-cdn.com/v4/letter/m/df788c/32.png) [@mschradi](https://forum.shopware.com/u/mschradi)
#### Post date: [30. April 2020 um 08:37 UTC](https://forum.shopware.com/t/associationssortierung-im-get-request-an-der-sales-channel-api/66607/1 "2020-04-30T08:37:59Z")

</div>

Hallo zusammen,

ich suche nach einer Möglichkeit in einem GET Request für ein einzelnes Produkt an der Sales-Channel-Api die Associations zu sortieren.&nbsp;

Beispielsweise hätte ich gerne die media associations nach der „position“ sortiert.

> /sales-channel-api/v1/product/{id}?associations[media]

&nbsp;

Da die Docs umgestellt wurden findet man leider nichts mehr zum Thema sortieren mit GET Requests. Danke für eure Unterstützung,

Max

---

<div class="post-metadata">

### Author: ![fl0rian](https://avatars.discourse-cdn.com/v4/letter/f/90db22/32.png) [@fl0rian](https://forum.shopware.com/u/fl0rian)
#### Post date: [30. April 2020 um 10:07 UTC](https://forum.shopware.com/t/associationssortierung-im-get-request-an-der-sales-channel-api/66607/2 "2020-04-30T10:07:19Z")

</div>

Hallo,

ich stehe vor dem gleichen Problem. Das Thema Sortieren ist plötzlich aus den Docs verschwunden.

Die sales-channel-api ist auch per POST-Request erreichbar.&nbsp;

Hier ein Code-Beispiel:

```
            {
                "limit": 10,
                "filter": [
                    {
                        "type": "equals",
                        "field": "product.parentId",
                        "value": null
                    }
                ],
                "sort": [
                    { 
                        "field": "releaseDate", 
                        "order": "DESC",
                        "naturalSorting": true
                    }
                ],
                "associations": {
                    "cover": {
                        "associations": {
                            "media": {
                                "associations": {
                                    "thumbnails": {
                                        "sort": [
                                            {
                                                "field": "width",
                                                "order": "ASC",
                                                "naturalSorting": true
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            }

```

Das ganze einfach im Body übergeben, beim Request.

Ich hoffe das hilft dir weiter.

&nbsp;

Flo
