How to get all the product prices in all currencies available in the store via API

By default the product price array contains only the price in the default currency. How do we get via API the price array with all the available currencies for the store.

http://localhost:8000/api/product/ always returns an array of one price: [{the price in the default currency}] not all the prices in all the currencies.

How do we get a JSON with all the prices displayed in this table:

Go to the administration and look up the XHR request that Shopware sends to the API with your browser developer tools.

Thanks Max for the suggestion, I tried by looking up for XHR request when opening that table, but no requests are made, which make me think that table gets calculated somehow with the currencies list.

The administration is an VUE single application script, thus all data are received via XHR requests. I will try to look it up…

That section is pure JavaScript, no XHR.

If the prices are not linked to the currency, then it will be in the product json:

"price": [
                    {
                        "extensions": [],
                        "currencyId": "08e92d4a3c2746e2bf695ab6d4bd2453",
                        "net": 1.0924369747899,
                        "gross": 1.3,
                        "linked": true,
                        "listPrice": null,
                        "percentage": null,
                        "regulationPrice": null
                    },
                    {
                        "extensions": [],
                        "currencyId": "4bcb2e20a87c45a1ab69986608da90fb",
                        "net": 1.0084033613445,
                        "gross": 1.2,
                        "linked": true,
                        "listPrice": null,
                        "percentage": null,
                        "regulationPrice": null
                    },
                    {
                        "extensions": [],
                        "currencyId": "b7d2554b0ce847cd82f3ac9bd1c0dfca",
                        "net": 0.84033613445378,
                        "gross": 1,
                        "linked": true,
                        "listPrice": null,
                        "percentage": null,
                        "regulationPrice": null
                    }
                ],

If it is linked, I guess it uses the price from the product XHR and uses data from the currency XHR, too:

https://dev.local:8890/api/search/currency
{„page“:1,„limit“:500,„total-count-mode“:1}

Looks like you have to do it on your own.

1 „Gefällt mir“

Thanks Max, yes I can see that’s the case. I will have to get the list of currencies and do the corresponding calculations for those linked prices.