# API getCountry wirft 404 (Not Found)

**URL:** https://forum.shopware.com/t/api-getcountry-wirft-404-not-found/64502
**Category:** Allgemein
**Created:** [5. Februar 2020 um 13:39 UTC](https://forum.shopware.com/t/api-getcountry-wirft-404-not-found/64502 "2020-02-05T13:39:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![FloC3](https://avatars.discourse-cdn.com/v4/letter/f/838e76/32.png) [@FloC3](https://forum.shopware.com/u/FloC3)
#### Post date: [5. Februar 2020 um 13:39 UTC](https://forum.shopware.com/t/api-getcountry-wirft-404-not-found/64502/1 "2020-02-05T13:39:13Z")

</div>

Hallo,

laut [Doku](https://docs.shopware.com/en/shopware-platform-dev-en/api/sales-channel-cart-api?category=shopware-platform-dev-en/api&_ga=2.224433882.1535027707.1580805365-1448006319.1562854152#full-example)kann man eine Länder-ID über die API aus dem Shop so abholen:

```
function getCountry(iso3) {
        const url = `${baseUrl}/sales-channel-api/v1/sales-channel/countries?filter[iso3]=${iso3}`;
        return fetch(url, { method: 'GET', headers })
            .then((resp) => resp.json())
            .then(({ data }) => data[0]);
    }

```

wenn ich das mache, erhalte ich aber einen 404 (Not Found) … Wieso?

andere Calls wie der hier funktionieren tadellos …

```
function getCategory(categoryId) {
    return fetch(BASE_URL + '/sales-channel-api/v1/category/'+categoryId + "?associations[media][]", { headers })
        .then((resp) => resp.json())
}

```

ist mein Call nun falsch oder die Doku?

---

<div class="post-metadata">

### Author: ![FloC3](https://avatars.discourse-cdn.com/v4/letter/f/838e76/32.png) [@FloC3](https://forum.shopware.com/u/FloC3)
#### Post date: [5. Februar 2020 um 13:45 UTC](https://forum.shopware.com/t/api-getcountry-wirft-404-not-found/64502/2 "2020-02-05T13:45:33Z")

</div>

EDIT:

konnte es mittlerweile mit einem anderen Call von [hier](https://docs.shopware.com/en/shopware-platform-dev-en/api/sales-channel-context-api?category=shopware-platform-dev-en/api)lösen

```
function getCountry(iso3) {
    const url = `${BASE_URL}/sales-channel-api/v1/country?filter[iso3]=${iso3}`;
    return fetch(url, { method: 'GET', headers })
        .then((resp) => resp.json())
        .then(({ data }) => data);
}

```

ist die andere Doku dann falsch?
