Update a site's Magento store mapping
Changes which store an existing served address shows, without adding or removing domains. Omitted choices stay as they are; null removes an explicit choice, and point_base_urls explicitly moves the selected stores' base URLs even from another host.
Path parameters
The id of a site row. A website's production site and each of its environments has its own id. Digits only. At least 1.
Body
Omitted keeps the choice; null returns to Magento's default.
The domains_version from the stores read. At least 0.
A partial mapping of served hostnames to store choices. Omitted hosts keep their choices; null uses the default without removing the domain or making it redirect.
The nginx_version from the stores read. At least 0.
Explicitly move these stores' base URLs here, including values on another host. Ask the person first. Up to 10 items.
Returns
200 Nothing differed. No operation was started; the stores are returned again.
201 Follow the magento_stores_change operation until the store mapping and store addresses finish.
Fields of the 200 answer
Fields
Addresses without their own store choice, including the platform address.
The explicit default, or Magento's default website when none was selected.
At least 0.
At least 0.
Format: date-time.
Extra store addresses set up by support. Non-empty makes customer store changes read-only.
Non-blocking warnings such as base_url_elsewhere, base_url_host_unchosen, store_codes_in_urls and store_not_shown.
Fields of each item
Fields of each item
The base URL is on a host not showing this store.
The base URL is on the site's preview address, primary domain or its www form and can move automatically with a store domain.
Fields of each item
The base URL is on a host not showing this store.
The base URL is on the site's preview address, primary domain or its www form and can move automatically with a store domain.
Fields of the 201 answer
A change the Control Panel is making or has made. A save or an action that starts work answers one in operation; read it again by id with GET / until status is completed or failed. Both answers have this shape; the few endpoints that answer a different one say so.
Fields
The cluster the operation runs on.
Why the operation failed, in plain words. Null unless status is failed.
A stable code for the failure.
True when the change applies without a maintenance window.
What the operation did differently on purpose. Empty when nothing.
Fields of each item
Who asked for the change.
Present on some site creations and copies.
Always null here. A one-time result is read once with the reveal endpoint.
nonependingavailableviewedWhat a retry needs first, if anything.
Who revealed a one-time result and when, when there was one.
siteclusterbatchThe website the operation belongs to. Null for a cluster's own operation.
Where a change is. completed and failed are final; every other status means the change is still running and blocks another change to the same site.
pendingcommittedrolling_outexecutingcompletedfailedThe key of the step the operation is at. Null once it has completed.
Fields of each item
One of done, current, todo, failed or skipped.
The kind of change, such as crons_change or redirects_change.
If it is refused
| Status | Reason | What to do |
|---|---|---|
401 | none | 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. |
422 | domains_locked | The site's domains cannot be changed at the moment. Read the message: take the site live first, or wait for the change in progress. |
422 | feature_off | This feature is not on for your organisation yet. |
422 | invalid | Fix the field named in field; errors says why. |
422 | nginx_invalid | These nginx rules cannot be saved: fix the errors shown. |
422 | nginx_rules_locked | Corefinity has locked this environment's nginx rules. Contact support to change them. |
422 | nginx_rules_not_adopted | This site's nginx rules need a one-off update before a store can be mapped. Save them once in the Nginx tab. |
422 | store_code_format | Magento store codes with capital letters cannot be used for an address yet. Rename the code in Magento to lower case. |
422 | store_host_not_served | This address does not show its own store on this site yet. Add it as an alias that shows a store first. |
422 | store_inactive | The store view, or the website's default store view, is switched off in Magento. Switch it on first, or choose another. |
422 | store_mapping_foreign | Your nginx rules already set the Magento store outside the Control Panel's store mapping. Remove that from the Nginx tab first. |
422 | store_unknown | Magento has no website or store view with that code. Read the current stores and choose one of their codes. |
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. |
Reasons are listed by name in Errors and refusals.
The same task elsewhere
curl -X PUT https://manage.corefinity.com/api/corestack/sites/1042/magento/store-mapping \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"domains_version": 0,
"nginx_version": 0
}'use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->put('https://manage.corefinity.com/api/corestack/sites/1042/magento/store-mapping', [
'domains_version' => 0,
'nginx_version' => 0,
]);
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/corestack/sites/1042/magento/store-mapping', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
domains_version: 0,
nginx_version: 0,
}),
});
// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);import os
import requests
res = requests.put(
"https://manage.corefinity.com/api/corestack/sites/1042/magento/store-mapping",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
json={
"domains_version": 0,
"nginx_version": 0,
},
)
data = res.json() if res.content else None{
"operation": null,
"stores": {
"default_hosts": [
"shop.example.com"
],
"default_store": null,
"domains_version": 0,
"nginx_version": 0,
"read_at": "2026-11-11T12:00:00Z",
"store_hosts": [],
"warnings": [],
"websites": []
}
}{
"operation": {
"completed_at": null,
"created_at": "2026-11-11T12:00:00Z",
"error": null,
"id": 901,
"scope": "site",
"status": "pending",
"status_label": "Saving change",
"steps": [
{
"key": "checked",
"label": "Stores checked",
"state": "done"
},
{
"key": "store_mapping",
"label": "Store mapping saved",
"state": "current"
},
{
"key": "store_base_urls",
"label": "Store addresses updated",
"state": "todo"
}
],
"type": "magento_stores_change",
"type_label": "Magento stores change"
}
}{
"message": "Unauthenticated."
}{
"code": "company_unavailable",
"message": "Your company is unavailable.",
"reason": "company_unavailable"
}{
"code": "feature_off",
"message": "Not found.",
"reason": "feature_off"
}{
"code": "stale",
"message": "This site changed in the meantime. Reload.",
"reason": "stale"
}{
"code": "domains_locked",
"message": "This site's domains are managed by staff. Contact support.",
"reason": "domains_locked"
}{
"code": "rate_limited",
"message": "Too many requests. Try again in 60 seconds.",
"reason": "rate_limited",
"retry_after_seconds": 60
}{
"code": "stores_unreadable",
"message": "Magento's stores could not be read. Try again in a moment.",
"reason": "stores_unreadable"
}{
"code": "switched_off",
"message": "Site commands are switched off at the moment",
"reason": "switched_off"
}Try it is off for this endpointIt has not been cleared for the console. Copy the request and run it yourself when you are sure.