CorefinityCorefinityDocs
Open the Control PanelControl Panel
Magento stores · 1 of 2

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.

PUT/api/corestack/sites/{site}/magento/store-mapping

Path parameters

siteintegerRequired

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

defaultobject or any or null

Omitted keeps the choice; null returns to Magento's default.

domains_versionintegerRequired

The domains_version from the stores read. At least 0.

hostsobject

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.

nginx_versionintegerRequired

The nginx_version from the stores read. At least 0.

point_base_urlsarray of strings

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
operationany or nullRequired
storesobjectRequired
Fields
default_hostsarray of stringsRequired

Addresses without their own store choice, including the platform address.

default_storeobject or any or nullRequired

The explicit default, or Magento's default website when none was selected.

domains_versionintegerRequired

At least 0.

nginx_versionintegerRequired

At least 0.

read_atstringRequired

Format: date-time.

store_hostsarray of stringsRequired

Extra store addresses set up by support. Non-empty makes customer store changes read-only.

warningsarray of objectsRequired

Non-blocking warnings such as base_url_elsewhere, base_url_host_unchosen, store_codes_in_urls and store_not_shown.

Fields of each item
messagestringRequired
reasonstringRequired
websitesarray of objectsRequired
Fields of each item
activebooleanRequired
base_urlstring or nullRequired
base_url_elsewherebooleanRequired

The base URL is on a host not showing this store.

base_url_ownbooleanRequired

The base URL is on the site's preview address, primary domain or its www form and can move automatically with a store domain.

codestringRequired
idintegerRequired
namestringRequired
shown_onarray of stringsRequired
default_group_idintegerRequired
is_defaultbooleanRequired
store_viewsarray of objectsRequired
Fields of each item
activebooleanRequired
base_urlstring or nullRequired
base_url_elsewherebooleanRequired

The base URL is on a host not showing this store.

base_url_ownbooleanRequired

The base URL is on the site's preview address, primary domain or its www form and can move automatically with a store domain.

codestringRequired
idintegerRequired
namestringRequired
shown_onarray of stringsRequired
group_idintegerRequired
is_activebooleanRequired
website_idintegerRequired
Fields of the 201 answer
operationobjectRequired

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 /corestack/operations/{operation} until status is completed or failed. Both answers have this shape; the few endpoints that answer a different one say so.

Fields
applied_atstring or null
can_retryboolean or null
clusterobject or any or null

The cluster the operation runs on.

committed_atstring or null
completed_atstring or nullRequired
created_atstring or nullRequired
environmentobject or any or null
errorstring or nullRequired

Why the operation failed, in plain words. Null unless status is failed.

failure_reasonstring or null

A stable code for the failure.

from_versionstring or null
hotboolean or null

True when the change applies without a maintenance window.

idintegerRequired
installobject or null
labelstring or null
notesarray of objects

What the operation did differently on purpose. Empty when nothing.

Fields of each item
codestringRequired
textstringRequired
parent_operation_idinteger or null
requested_byany

Who asked for the change.

reset_targetany

Present on some site creations and copies.

resultany

Always null here. A one-time result is read once with the reveal endpoint.

result_statestring
nonependingavailableviewed
retried_by_operation_idinteger or null
retries_operation_idinteger or null
retry_requiresany

What a retry needs first, if anything.

revealedany

Who revealed a one-time result and when, when there was one.

scopestringRequired
siteclusterbatch
siteobject or any or null

The website the operation belongs to. Null for a cluster's own operation.

statusstringRequired

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_outexecutingcompletedfailed
status_labelstringRequired
stepstring or null

The key of the step the operation is at. Null once it has completed.

stepsarray of objectsRequired
Fields of each item
keystring
labelstring
statestring

One of done, current, todo, failed or skipped.

subjectobject or null
summarystring or null
to_versionstring or null
typestringRequired

The kind of change, such as crons_change or redirects_change.

type_labelstringRequired

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403company_unavailableYour company is unavailable.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404feature_offThis feature is not on for your organisation yet.
404not_magentoOnly a Magento 2 site has Magento stores. Choose a Magento 2 site.
409staleWhat you read has changed since you read it. Read it again, then send the change with its new version or quote.
409store_hostsThis site serves extra Magento stores on their own addresses. Ask Corefinity support to change its domains.
409store_mapping_unreadableThe store mapping in this site's nginx rules has been edited by hand. Remove the edit in the Nginx tab, or ask Corefinity support.
422domains_lockedThe site's domains cannot be changed at the moment. Read the message: take the site live first, or wait for the change in progress.
422feature_offThis feature is not on for your organisation yet.
422invalidFix the field named in field; errors says why.
422nginx_invalidThese nginx rules cannot be saved: fix the errors shown.
422nginx_rules_lockedCorefinity has locked this environment's nginx rules. Contact support to change them.
422nginx_rules_not_adoptedThis site's nginx rules need a one-off update before a store can be mapped. Save them once in the Nginx tab.
422store_code_formatMagento store codes with capital letters cannot be used for an address yet. Rename the code in Magento to lower case.
422store_host_not_servedThis address does not show its own store on this site yet. Add it as an alias that shows a store first.
422store_inactiveThe store view, or the website's default store view, is switched off in Magento. Switch it on first, or choose another.
422store_mapping_foreignYour nginx rules already set the Magento store outside the Control Panel's store mapping. Remove that from the Nginx tab first.
422store_unknownMagento has no website or store view with that code. Read the current stores and choose one of their codes.
429rate_limitedWait for the seconds in Retry-After.
502stores_unreadableMagento's stores could not be read. Try again in a moment.
503switched_offCorefinity 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
  }'
{
  "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": []
  }
}
Try it

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.

Was this helpful?
Open in ClaudeOpen in ChatGPT