---
title: "List a site's Magento stores"
url: https://docs.corefinity.com/api/reference/domains/list-site-magento-stores
type: endpoint
last_updated: 2026-11-13
feature: magento-stores
related:
  - https://docs.corefinity.com/guides/sites/go-live/magento-stores.md
  - https://docs.corefinity.com/mcp/tools/corestack_site_magento_stores_list.md
---
# List a site's Magento stores

Reads Magento's websites, store views, base URLs and mapped addresses. The result may be reused for 60 seconds; a save checks Magento again.

```http
GET /api/corestack/sites/{site}/magento/stores
```

- Scope: `read`
- Two-factor: required on your account (all)
- Rate limit: 120 a minute
- Try it in the console: off. It has not been cleared for the console. Copy the request and run it yourself when you are sure.

## Path parameters

- `site` (integer, required): The id of a site row. A website's production site and each of its environments has its own id. Digits only.

## Request

### curl

```bash
curl https://manage.corefinity.com/api/corestack/sites/1042/magento/stores \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
```

### PHP

```php
use Illuminate\Support\Facades\Http;

$response = Http::withToken(env('COREFINITY_TOKEN'))
    ->acceptJson()
    ->get('https://manage.corefinity.com/api/corestack/sites/1042/magento/stores');

$data = $response->json();
```

### Node

```javascript
const res = await fetch('https://manage.corefinity.com/api/corestack/sites/1042/magento/stores', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
    Accept: 'application/json',
  },
});

// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);
```

### Python

```python
import os
import requests

res = requests.get(
    "https://manage.corefinity.com/api/corestack/sites/1042/magento/stores",
    headers={
        "Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
        "Accept": "application/json",
    },
)

data = res.json() if res.content else None
```

## Responses

### 200 The stores, their addresses, both versions and any warnings.

```json
{
  "default_hosts": [
    "shop.example.com"
  ],
  "default_store": {
    "code": "base",
    "type": "website"
  },
  "domains_version": 0,
  "nginx_version": 0,
  "read_at": "2026-11-11T12:00:00Z",
  "store_hosts": [],
  "warnings": [],
  "websites": [
    {
      "active": true,
      "base_url": "https://shop.example.com/",
      "base_url_elsewhere": false,
      "base_url_own": true,
      "code": "base",
      "default_group_id": 1,
      "id": 1,
      "is_default": true,
      "name": "Main shop",
      "shown_on": [
        "shop.example.com"
      ],
      "store_views": [
        {
          "active": true,
          "base_url": "https://shop.example.com/",
          "base_url_elsewhere": true,
          "base_url_own": true,
          "code": "default",
          "group_id": 1,
          "id": 1,
          "is_active": true,
          "name": "English",
          "shown_on": [],
          "website_id": 1
        }
      ]
    }
  ]
}
```

### 401 No token, or a token that is not valid.

```json
{
  "message": "Unauthenticated."
}
```

### 403 The token lacks the scope (`scope_required`, with the `scope` to use), or your company requires two-factor authentication and you have not set it up. For routes outside Managed Clusters.

```json
{
  "code": "company_unavailable",
  "message": "Your company is unavailable.",
  "reason": "company_unavailable"
}
```

### 404 The site is missing or not yours to see, the feature is unavailable (`feature_off`), or this is not Magento 2 (`not_magento`).

```json
{
  "code": "feature_off",
  "message": "Not found.",
  "reason": "feature_off"
}
```

### 409 The site cannot take the change or read now. A write may answer managed_elsewhere, stale, busy, deleted, provisioning, removed, restore_running or store_hosts; a read may answer not_running, command_running or exec_unresolved. An edited store mapping answers store_mapping_unreadable. Read both versions again after stale.

```json
{
  "code": "stale",
  "message": "This site changed in the meantime. Reload.",
  "reason": "stale"
}
```

### 429 Too many requests (`rate_limited`). Wait for the number of seconds in `Retry-After`, which `retry_after_seconds` repeats.

```json
{
  "code": "rate_limited",
  "message": "Too many requests. Try again in 60 seconds.",
  "reason": "rate_limited",
  "retry_after_seconds": 60
}
```

### 502 Magento's stores could not be read (`stores_unreadable`). Try again in a moment.

```json
{
  "code": "stores_unreadable",
  "message": "Magento's stores could not be read. Try again in a moment.",
  "reason": "stores_unreadable"
}
```

### 503 Corefinity has switched commands on sites off for the moment (`switched_off`). Try again later.

```json
{
  "code": "switched_off",
  "message": "Site commands are switched off at the moment",
  "reason": "switched_off"
}
```

## If it is refused

| Status | Reason | What to do |
|---|---|---|
| 401 |  | Send a valid token as `Authorization: Bearer <token>`. |
| 403 | `company_unavailable` | Your company is unavailable. |
| 403 | `scope_required` | Use a token with the scope named in `scope`. |
| 403 | `two_factor_required` | Turn on two-factor on your account, then send again. |
| 404 | `feature_off` | This feature is not on for your organisation yet. |
| 404 | `not_magento` | Only a Magento 2 site has Magento stores. Choose a Magento 2 site. |
| 409 | `stale` | What you read has changed since you read it. Read it again, then send the change with its new version or quote. |
| 409 | `store_hosts` | This site serves extra Magento stores on their own addresses. Ask Corefinity support to change its domains. |
| 409 | `store_mapping_unreadable` | The store mapping in this site's nginx rules has been edited by hand. Remove the edit in the Nginx tab, or ask Corefinity support. |
| 429 | `rate_limited` | Wait for the seconds in `Retry-After`. |
| 502 | `stores_unreadable` | Magento's stores could not be read. Try again in a moment. |
| 503 | `switched_off` | Corefinity has switched this action off for the moment. Try again later. |

## The same task elsewhere

- Guide: [Magento stores on separate domains](https://docs.corefinity.com/guides/sites/go-live/magento-stores.md)
- MCP tool: [`corestack_site_magento_stores_list`](https://docs.corefinity.com/mcp/tools/corestack_site_magento_stores_list.md)
