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

**URL:** https://forum.shopware.com/t/how-to-get-all-the-product-prices-in-all-currencies-available-in-the-store-via-api/101369
**Category:** Shopware 6 (English)
**Created:** [25. September 2023 um 12:36 UTC](https://forum.shopware.com/t/how-to-get-all-the-product-prices-in-all-currencies-available-in-the-store-via-api/101369 "2023-09-25T12:36:21Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![terexa](https://avatars.discourse-cdn.com/v4/letter/t/8c91f0/32.png) [@terexa](https://forum.shopware.com/u/terexa)
#### Post date: [25. September 2023 um 12:36 UTC](https://forum.shopware.com/t/how-to-get-all-the-product-prices-in-all-currencies-available-in-the-store-via-api/101369/1 "2023-09-25T12:36:21Z")

</div>

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/](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:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/3X/d/f/dfa1539113d52538a8bef90293322b816cc1013b.jpeg)

---

<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: [25. September 2023 um 13:40 UTC](https://forum.shopware.com/t/how-to-get-all-the-product-prices-in-all-currencies-available-in-the-store-via-api/101369/2 "2023-09-25T13:40:19Z")

</div>

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

---

<div class="post-metadata">

### Author: ![terexa](https://avatars.discourse-cdn.com/v4/letter/t/8c91f0/32.png) [@terexa](https://forum.shopware.com/u/terexa)
#### Post date: [25. September 2023 um 14:00 UTC](https://forum.shopware.com/t/how-to-get-all-the-product-prices-in-all-currencies-available-in-the-store-via-api/101369/3 "2023-09-25T14:00:01Z")

</div>

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.

---

<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: [25. September 2023 um 14:37 UTC](https://forum.shopware.com/t/how-to-get-all-the-product-prices-in-all-currencies-available-in-the-store-via-api/101369/4 "2023-09-25T14:37:17Z")

</div>

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

---

<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: [25. September 2023 um 14:53 UTC](https://forum.shopware.com/t/how-to-get-all-the-product-prices-in-all-currencies-available-in-the-store-via-api/101369/5 "2023-09-25T14:53:20Z")

</div>

That section is pure JavaScript, no XHR.

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

```auto
"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](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.

---

<div class="post-metadata">

### Author: ![terexa](https://avatars.discourse-cdn.com/v4/letter/t/8c91f0/32.png) [@terexa](https://forum.shopware.com/u/terexa)
#### Post date: [25. September 2023 um 15:30 UTC](https://forum.shopware.com/t/how-to-get-all-the-product-prices-in-all-currencies-available-in-the-store-via-api/101369/6 "2023-09-25T15:30:34Z")

</div>

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.
