---
schema_version: "1"
id: 8086f51f9cbbeac56d5f0c2ac752c20ccae442dabbb714d995727a62c463415a
title: Environments
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/commerce-api/references/generated-api-specs/environments.md
canonical_url: https://developer.salesforce.com/docs/commerce/commerce-api/references/environments
source_site: developer.salesforce.com
content_type: documentation
content_hash: f3b90d8b2d457e377f9fd4acfd42667443ecf91cd919c40dd0693d54c135ed77
products:
  - B2C Commerce API
  - Salesforce APIs
---
Environments

# Environments

[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/storefront/environments-oas-v1-public.yaml)

## API Overview

The Environments API provides B2C Commerce (SCAPI)-native access to Managed Runtime (MRT) environment data for Storefront Next and PWA Kit storefronts. It replaces the Business Manager UI and partial data API setup flow. The B2C CLI and other tooling can use it for end-to-end automation.

*   **Environment tasks** — create, retrieve, list, update (display name and server-side rendering configuration), delete environments belonging to a storefront, and clone or promote them.
*   **Cache invalidations** — trigger a CDN cache invalidation on an environment by path prefix.
*   **Environment variables** — read and merge-update the customer-defined key/value configuration on an environment.
*   **Access control headers** — create, read, and delete header-based access control rules on an environment.
*   **Redirects** — create, list, read, update, delete, and clone URL redirect rules on an environment.

Environment creation and deletion are asynchronous: the API returns immediately with the resource in a non-terminal status, and callers poll the resource by ID to track progress.

### Authentication & Authorization

Requests are authenticated with Account Manager OAuth 2.0 bearer tokens (`AmOAuth2`). Access is governed by the Environments API scopes: `sfcc.storefront.environments` grants read-only access, and `sfcc.storefront.environments.rw` grants read and write access. Read operations (`GET`) accept either scope. Write operations (`POST`, `PATCH`, `PUT`, `DELETE`) require the `.rw` variant.

### Idempotency

*   `POST .../environments`: This operation isn't idempotent, in effect or response. `environmentId` is server-generated, so there is no client-supplied key to reject a retry against. Each call creates a new, distinct environment.
*   `PATCH .../environments/{environmentId}`: This operation is idempotent. It is a partial update — only the supplied fields are changed. Repeating an identical request produces the same resulting state.
*   `DELETE .../environments/{environmentId}`: This operation is idempotent in effect, but not in response code. The first call queues deletion (202). Once deletion completes, retrying returns 404. Deleting an environment that is still `building` or `deleting` returns 409 (`EnvironmentBusyErrorResponse`) rather than queuing a duplicate deletion.
*   `PUT .../environments/{environmentId}/primary`: This operation is idempotent. Setting an already-primary environment as primary again has no effect and returns 200.

### Use Cases

*   Provision a storefront's environments.
*   Clone an existing environment to stand up a new one with matching configuration.
*   Poll environment status during asynchronous provisioning or teardown.
*   Promote an environment to be the storefront's primary environment.
*   Decommission environments belonging to a storefront.
*   Purge stale content from a storefront's CDN after a release.
*   Manage environment variables, access control headers, and redirects as part of storefront development and administration.

**Version:** 1.0.5

## Servers

*   `https://{shortCode}.api.commercecloud.salesforce.com/storefront/environments/v1`
    *   `shortCode (default 123456gf)`

## Security

*   `AmOAuth2` (oauth2) AccountManager OAuth 2.0 bearer token Authentication.
    *   OAuth flow clientCredentials (tokenUrl: https://account.demandware.com/dwsso/oauth2/access\_token)
    *   Scope sfcc.storefront.environments: Read-only access to the Environments API.
    *   Scope sfcc.storefront.environments.rw: Read and write access to the Environments API.

## Operations

### GET Get environments for a storefront.

`GET /organizations/{organizationId}/storefronts/{storefrontId}/environments`

Operation ID: `getEnvironmentsForStorefront`. Security: AmOAuth2 (sfcc.storefront.environments, sfcc.storefront.environments.rw).

Retrieves the list of environments belonging to the specified storefront, ordered by creationDate in ascending order.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `storefrontId` (path, string, required) The storefront identifier that B2C Commerce generates based on the provided storefront name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 20. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `my-storefront-a1b2c3`.
*   `limit` (query, integer (int32)) Number of records to retrieve per request. Must be between 1 (minimum) and 200 (maximum). Defaults to 25.  
    Default: `25`. Minimum: 1. Maximum: 200.
*   `offset` (query, integer (int32)) Used to retrieve the results based on a particular resource offset.  
    Default: `0`. Minimum: 0.

#### Responses

*   **200** List of environments successfully retrieved.
    
    Media type: `application/json`. Schema: `EnvironmentResult`.
    
    _Example: EnvironmentListSuccess_ Successful environment list result
    
    Example of a successful response returning the list of environments for a storefront.
    
    ```
    {
      "limit": 25,
      "offset": 0,
      "total": 1,
      "data": [
        {
          "environmentId": "production-a1b2c3d4",
          "displayName": "Production",
          "status": "ready",
          "isPrimary": true,
          "subdomain": "production",
          "mrtOrigin": "https://production-my-storefront.exp-delivery.com",
          "defaultEcdnHostname": "marketstreetb82739d375a9270f.zzzz-001.my.cc.salesforce.com",
          "creationDate": "2026-04-08T21:47:28.188965Z",
          "lastModified": "2026-04-08T21:47:31.307595Z"
        }
      ]
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** We couldn't find the requested storefront.
    
    Media type: `application/problem+json`. Schema: `StorefrontNotFoundErrorResponse`.
    
    _Example: StorefrontNotFoundErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/storefront-not-found",
      "detail": "We couldn't find storefront my-storefront-a1b2c3.",
      "title": "Storefront Not Found"
    }
    ```
    

### POST Create an environment for a storefront.

`POST /organizations/{organizationId}/storefronts/{storefrontId}/environments`

Operation ID: `createEnvironmentForStorefront`. Security: AmOAuth2 (sfcc.storefront.environments.rw).

Queues creation of a new environment for the specified storefront. Returns immediately with the environment resource in the building status. Poll the environment by ID to track provisioning progress.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `storefrontId` (path, string, required) The storefront identifier that B2C Commerce generates based on the provided storefront name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 20. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `my-storefront-a1b2c3`.

#### Request body (required)

Media type: `application/json`. Schema: `EnvironmentCreateRequest`.

_Example: CreateEnvironment_ Create an environment

Create a new environment for a storefront.

```
{
  "displayName": "Production"
}
```

#### Responses

*   **202** Environment creation successfully queued.
    
    Media type: `application/json`. Schema: `Environment`.
    
    _Example: EnvironmentCreatedSuccess_ Successful environment creation
    
    Example of a successful response when a new environment is queued for creation (202 Accepted).
    
    ```
    {
      "environmentId": "production-a1b2c3d4",
      "displayName": "Production",
      "status": "building",
      "isPrimary": true,
      "subdomain": null,
      "mrtOrigin": null,
      "defaultEcdnHostname": null,
      "creationDate": "2026-04-08T21:47:28.188965Z",
      "lastModified": "2026-04-08T21:47:28.188965Z"
    }
    ```
    
*   **400** Bad Request. The environment creation request body is invalid.
    
    Media type: `application/problem+json`. Schema: `InvalidEnvironmentCreateRequestErrorResponse`.
    
    _Example: InvalidEnvironmentCreateRequestErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-environment-create-request",
      "detail": "The environment creation request body is invalid. A valid displayName is required.",
      "title": "Invalid Environment Create Request"
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** We couldn't find the requested storefront.
    
    Media type: `application/problem+json`. Schema: `StorefrontNotFoundErrorResponse`.
    
    _Example StorefrontNotFoundErrorResponseExample: same as GET /organizations/{organizationId}/storefronts/{storefrontId}/environments 404 response._
    

### POST Clone an environment for a storefront.

`POST /organizations/{organizationId}/storefronts/{storefrontId}/environments/clone`

Operation ID: `cloneEnvironmentForStorefront`. Security: AmOAuth2 (sfcc.storefront.environments.rw).

Queues creation of a new environment for the specified storefront by cloning an existing environment. Returns immediately with the environment resource in the building status. Poll the environment by ID to track provisioning progress. The clone always starts as a non-primary environment.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `storefrontId` (path, string, required) The storefront identifier that B2C Commerce generates based on the provided storefront name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 20. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `my-storefront-a1b2c3`.

#### Request body (required)

Media type: `application/json`. Schema: `EnvironmentCloneRequest`.

_Example: CloneEnvironment_ Clone an environment

Create a new environment by cloning an existing one.

```
{
  "sourceEnvironmentId": "production-a1b2c3d4",
  "displayName": "Production (EU)",
  "cloneEnvironmentVariables": true,
  "cloneRedirects": true
}
```

#### Responses

*   **202** Environment clone successfully queued.
    
    Media type: `application/json`. Schema: `Environment`.
    
    _Example: EnvironmentCloneAcceptedSuccess_ Successful environment clone
    
    Example of a successful response when a new environment is queued for creation via clone (202 Accepted).
    
    ```
    {
      "environmentId": "prod-eu-f9e8d7c6",
      "displayName": "Production (EU)",
      "status": "building",
      "isPrimary": false,
      "subdomain": null,
      "mrtOrigin": null,
      "defaultEcdnHostname": null,
      "creationDate": "2026-04-09T09:45:00.000000Z",
      "lastModified": "2026-04-09T09:45:00.000000Z"
    }
    ```
    
*   **400** Bad Request. The environment clone request body is invalid.
    
    Media type: `application/problem+json`. Schema: `InvalidEnvironmentCloneRequestErrorResponse`.
    
    _Example: InvalidEnvironmentCloneRequestErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-environment-clone-request",
      "detail": "The environment clone request body is invalid. A valid sourceEnvironmentId and displayName are required.",
      "title": "Invalid Environment Clone Request"
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** We couldn't find the storefront or the source environment specified in the clone request.
    
    Media type: `application/problem+json`. Schema: `StorefrontNotFoundErrorResponse | SourceEnvironmentNotFoundErrorResponse`.
    
    One of: `StorefrontNotFoundErrorResponse`, `SourceEnvironmentNotFoundErrorResponse`.
    
    _Example StorefrontNotFoundErrorResponseExample: same as GET /organizations/{organizationId}/storefronts/{storefrontId}/environments 404 response._
    
    _Example: SourceEnvironmentNotFoundErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/source-environment-not-found",
      "detail": "We couldn't find source environment production-a1b2c3d4 for storefront my-storefront-a1b2c3.",
      "title": "Source Environment Not Found"
    }
    ```
    

### GET Get an environment by ID.

`GET /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId}`

Operation ID: `getEnvironmentById`. Security: AmOAuth2 (sfcc.storefront.environments, sfcc.storefront.environments.rw).

Retrieves the details of a specific environment, including its current status.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `storefrontId` (path, string, required) The storefront identifier that B2C Commerce generates based on the provided storefront name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 20. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `my-storefront-a1b2c3`.
*   `environmentId` (path, string, required) The environment identifier that B2C Commerce generates based on the provided display name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 19. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `production-a1b2c3d4`.

#### Responses

*   **200** Environment successfully retrieved.
    
    Media type: `application/json`. Schema: `Environment`.
    
    _Example: EnvironmentSuccess_ Successful environment retrieval
    
    Example of a successful response returning a single environment.
    
    ```
    {
      "environmentId": "production-a1b2c3d4",
      "displayName": "Production",
      "status": "ready",
      "isPrimary": true,
      "subdomain": "production",
      "mrtOrigin": "https://production-my-storefront.exp-delivery.com",
      "defaultEcdnHostname": "marketstreetb82739d375a9270f.zzzz-001.my.cc.salesforce.com",
      "creationDate": "2026-04-08T21:47:28.188965Z",
      "lastModified": "2026-04-08T21:47:31.307595Z"
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** We couldn't find the requested environment.
    
    Media type: `application/problem+json`. Schema: `EnvironmentNotFoundErrorResponse`.
    
    _Example: EnvironmentNotFoundErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/environment-not-found",
      "detail": "We couldn't find environment production-a1b2c3d4 for storefront my-storefront-a1b2c3.",
      "title": "Environment Not Found"
    }
    ```
    

### DELETE Delete an environment.

`DELETE /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId}`

Operation ID: `deleteEnvironment`. Security: AmOAuth2 (sfcc.storefront.environments.rw).

Queues deletion of the environment. Returns immediately with the environment resource in the deleting status. Poll the environment by ID to track deletion progress.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `storefrontId` (path, string, required) The storefront identifier that B2C Commerce generates based on the provided storefront name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 20. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `my-storefront-a1b2c3`.
*   `environmentId` (path, string, required) The environment identifier that B2C Commerce generates based on the provided display name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 19. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `production-a1b2c3d4`.

#### Responses

*   **202** Environment deletion successfully queued.
    
    Media type: `application/json`. Schema: `Environment`.
    
    _Example: EnvironmentDeleteAcceptedSuccess_ Successful environment deletion request
    
    Example of a successful response when an environment is queued for deletion (202 Accepted).
    
    ```
    {
      "environmentId": "production-a1b2c3d4",
      "displayName": "Production",
      "status": "deleting",
      "isPrimary": true,
      "subdomain": "production",
      "mrtOrigin": "https://production-my-storefront.exp-delivery.com",
      "defaultEcdnHostname": "marketstreetb82739d375a9270f.zzzz-001.my.cc.salesforce.com",
      "creationDate": "2026-04-08T21:47:28.188965Z",
      "lastModified": "2026-04-09T09:30:00.000000Z"
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** We couldn't find the requested environment.
    
    Media type: `application/problem+json`. Schema: `EnvironmentNotFoundErrorResponse`.
    
    _Example EnvironmentNotFoundErrorResponseExample: same as GET /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId} 404 response._
    
*   **409** We couldn't delete the environment because it is currently building or already being deleted.
    
    Media type: `application/problem+json`. Schema: `EnvironmentBusyErrorResponse`.
    
    _Example: EnvironmentBusyErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/environment-busy",
      "detail": "Environment 'production-a1b2c3d4' can't be deleted while it is 'building'.",
      "title": "Environment Busy"
    }
    ```
    

### PATCH Update an environment.

`PATCH /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId}`

Operation ID: `updateEnvironment`. Security: AmOAuth2 (sfcc.storefront.environments.rw).

Partially updates the specified environment. Only the supplied fields are changed; at least one field must be provided.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `storefrontId` (path, string, required) The storefront identifier that B2C Commerce generates based on the provided storefront name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 20. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `my-storefront-a1b2c3`.
*   `environmentId` (path, string, required) The environment identifier that B2C Commerce generates based on the provided display name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 19. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `production-a1b2c3d4`.

#### Request body (required)

Media type: `application/json`. Schema: `EnvironmentUpdateRequest`.

_Example: UpdateEnvironment_ Update an environment

Update an environment's display name and server-side rendering configuration.

```
{
  "displayName": "Production (EU)",
  "ssrRegion": "eu_west_1",
  "ssrArchitecture": "arm64",
  "allowCookies": true,
  "preserveProxyUserAgent": false,
  "logLevel": "warn"
}
```

#### Responses

*   **200** Environment successfully updated.
    
    Media type: `application/json`. Schema: `Environment`.
    
    _Example: EnvironmentUpdatedSuccess_ Successful environment update
    
    Example of a successful response after updating an environment.
    
    ```
    {
      "environmentId": "production-a1b2c3d4",
      "displayName": "Production (EU)",
      "status": "ready",
      "isPrimary": true,
      "subdomain": "production",
      "mrtOrigin": "https://production-my-storefront.exp-delivery.com",
      "defaultEcdnHostname": "marketstreetb82739d375a9270f.zzzz-001.my.cc.salesforce.com",
      "creationDate": "2026-04-08T21:47:28.188965Z",
      "lastModified": "2026-04-09T09:00:00.000000Z",
      "ssrRegion": "eu_west_1",
      "ssrArchitecture": "arm64",
      "ssrExternalHostname": "www.customer.com",
      "ssrExternalDomain": "customer.com",
      "ssrWhitelistedIps": null,
      "ssrProxyConfigs": null,
      "isProduction": true,
      "allowCookies": true,
      "preserveProxyUserAgent": false,
      "enableSourceMaps": false,
      "logLevel": "warn",
      "distributedTracing": false,
      "distributedTracingSamplingRate": 0.1,
      "certificateId": 42
    }
    ```
    
*   **400** Bad Request. The environment update request body is invalid — for example a disabled ssrRegion, an ssrArchitecture that isn't enabled or is past end-of-life, an invalid certificateId, an SSR networking field that must be changed in Business Manager, or invalid ssrProxyConfigs (too many proxies, duplicate paths, or an invalid host).
    
    Media type: `application/problem+json`. Schema: `InvalidEnvironmentUpdateRequestErrorResponse | EnvironmentSsrRegionDisabledErrorResponse | EnvironmentSsrArchitectureNotEnabledErrorResponse | EnvironmentSsrArchitectureX86EndOfLifeErrorResponse | EnvironmentCertificateInvalidErrorResponse | EnvironmentSsrFieldBusinessManagerErrorResponse | EnvironmentInvalidProxyConfigErrorResponse`.
    
    One of: `InvalidEnvironmentUpdateRequestErrorResponse`, `EnvironmentSsrRegionDisabledErrorResponse`, `EnvironmentSsrArchitectureNotEnabledErrorResponse`, `EnvironmentSsrArchitectureX86EndOfLifeErrorResponse`, `EnvironmentCertificateInvalidErrorResponse`, `EnvironmentSsrFieldBusinessManagerErrorResponse`, `EnvironmentInvalidProxyConfigErrorResponse`.
    
    _Example: InvalidEnvironmentUpdateRequestErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-environment-update-request",
      "detail": "The environment update request body is invalid.",
      "title": "Invalid Environment Update Request"
    }
    ```
    
    _Example: EnvironmentSsrRegionDisabledErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/environment-ssr-region-disabled",
      "detail": "SSR region 'eu_south_1' is temporarily disabled. Choose a different region.",
      "title": "Environment Ssr Region Disabled"
    }
    ```
    
    _Example: EnvironmentSsrArchitectureNotEnabledErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/environment-ssr-architecture-not-enabled",
      "detail": "The Server-Side Rendering architecture configuration isn't enabled for this organization.",
      "title": "Environment Ssr Architecture Not Enabled"
    }
    ```
    
    _Example: EnvironmentSsrArchitectureX86EndOfLifeErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/environment-ssr-architecture-x86-end-of-life",
      "detail": "x86 is past end-of-life and can no longer be selected. Use arm64.",
      "title": "Environment Ssr Architecture X86 End Of Life"
    }
    ```
    
    _Example: EnvironmentCertificateInvalidErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/environment-certificate-invalid",
      "detail": "The supplied certificateId is invalid for this environment.",
      "title": "Environment Certificate Invalid"
    }
    ```
    
    _Example: EnvironmentSsrFieldBusinessManagerErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/environment-ssr-field-business-manager",
      "detail": "Updates to ssrExternalHostname when the environment uses eCDN must be done in Business Manager.",
      "title": "Environment Ssr Field Business Manager"
    }
    ```
    
    _Example: EnvironmentInvalidProxyConfigErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/environment-invalid-proxy-config",
      "detail": "The ssrProxyConfigs are invalid: The max number of proxies allowed is 8, but 9 given.",
      "title": "Environment Invalid Proxy Config"
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. The requested environment update is not permitted.
    
    Media type: `application/problem+json`. Schema: `EnvironmentUpdateForbiddenErrorResponse`.
    
    _Example: EnvironmentUpdateForbiddenErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/environment-update-forbidden",
      "detail": "The requested environment update is not permitted.",
      "title": "Environment Update Forbidden"
    }
    ```
    
*   **404** We couldn't find the requested environment.
    
    Media type: `application/problem+json`. Schema: `EnvironmentNotFoundErrorResponse`.
    
    _Example EnvironmentNotFoundErrorResponseExample: same as GET /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId} 404 response._
    

### PUT Set an environment as the storefront's primary environment.

`PUT /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId}/primary`

Operation ID: `setPrimaryEnvironment`. Security: AmOAuth2 (sfcc.storefront.environments.rw).

Marks the specified environment as the storefront's primary environment. The environment must have a status of ready or build\_failed. Idempotent — setting an already-primary environment as primary again has no effect.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `storefrontId` (path, string, required) The storefront identifier that B2C Commerce generates based on the provided storefront name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 20. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `my-storefront-a1b2c3`.
*   `environmentId` (path, string, required) The environment identifier that B2C Commerce generates based on the provided display name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 19. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `production-a1b2c3d4`.

#### Responses

*   **200** Environment successfully set as primary.
    
    Media type: `application/json`. Schema: `Environment`.
    
    _Example: EnvironmentSetPrimarySuccess_ Successful primary environment update
    
    Example of a successful response after setting an environment as the storefront's primary environment.
    
    ```
    {
      "environmentId": "staging-e5f6a7b8",
      "displayName": "Staging",
      "status": "ready",
      "isPrimary": true,
      "subdomain": "staging",
      "mrtOrigin": "https://staging-my-storefront.exp-delivery.com",
      "defaultEcdnHostname": "marketstreet4c9b1e7f2a6d3081.zzzz-002.my.cc.salesforce.com",
      "creationDate": "2026-04-09T08:00:00.000000Z",
      "lastModified": "2026-08-20T09:15:00.000000Z"
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** We couldn't find the requested environment.
    
    Media type: `application/problem+json`. Schema: `EnvironmentNotFoundErrorResponse`.
    
    _Example EnvironmentNotFoundErrorResponseExample: same as GET /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId} 404 response._
    
*   **409** We couldn't make the environment primary because of its current status.
    
    Media type: `application/problem+json`. Schema: `PrimaryEnvironmentInvalidStatusErrorResponse`.
    
    _Example: PrimaryEnvironmentInvalidStatusErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/primary-environment-invalid-status",
      "detail": "Environment 'production-a1b2c3d4' can't be made primary while it is 'building'.",
      "title": "Primary Environment Invalid Status"
    }
    ```
    

### POST Trigger a cache invalidation.

`POST /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId}/cache-invalidations`

Operation ID: `createCacheInvalidation`. Security: AmOAuth2 (sfcc.storefront.environments.rw).

Triggers a CDN cache invalidation on the environment for the supplied path prefix. Invalidation is always a wildcard operation — every cached path beginning with the prefix is cleared. The request is fire-and-forget: it returns `202 Accepted` with an empty body and no invalidation id to poll, and the invalidation itself is performed asynchronously. The environment must have an SSR bundle deployed.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `storefrontId` (path, string, required) The storefront identifier that B2C Commerce generates based on the provided storefront name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 20. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `my-storefront-a1b2c3`.
*   `environmentId` (path, string, required) The environment identifier that B2C Commerce generates based on the provided display name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 19. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `production-a1b2c3d4`.

#### Request body (required)

Media type: `application/json`. Schema: `CacheInvalidationRequest`.

_Example: CacheInvalidation_ Trigger a cache invalidation

Invalidate every cached path beginning with `/products/` on the CDN.

```
{
  "pattern": "/products/*"
}
```

#### Responses

*   **202** Cache invalidation accepted. The invalidation is processed asynchronously; no body is returned.
*   **400** Bad Request. The `pattern` is missing or does not start with `/`, or no SSR bundle is deployed to the environment.
    
    Media type: `application/problem+json`. Schema: `CacheInvalidationPatternInvalidErrorResponse | CacheInvalidationNoBundleErrorResponse`.
    
    One of: `CacheInvalidationPatternInvalidErrorResponse`, `CacheInvalidationNoBundleErrorResponse`.
    
    _Example: CacheInvalidationPatternInvalidErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/cache-invalidation-pattern-invalid",
      "detail": "The invalidation pattern is missing or does not start with '/'.",
      "title": "Cache Invalidation Pattern Invalid"
    }
    ```
    
    _Example: CacheInvalidationNoBundleErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/cache-invalidation-no-bundle",
      "detail": "No SSR bundle is deployed to this environment, so there is nothing to invalidate.",
      "title": "Cache Invalidation No Bundle"
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** We couldn't find the requested environment.
    
    Media type: `application/problem+json`. Schema: `EnvironmentNotFoundErrorResponse`.
    
    _Example EnvironmentNotFoundErrorResponseExample: same as GET /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId} 404 response._
    
*   **429** Too Many Requests. The cache invalidation was throttled by the backend rate limits (`CacheInvalidationsPerHour` / `CacheInvalidationsPer5Minutes`). Retry later.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: CacheInvalidationThrottled_ Cache invalidation throttled
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/too-many-requests",
      "title": "Too Many Requests",
      "detail": "The cache invalidation rate limit has been exceeded for this environment. Retry later."
    }
    ```
    

### GET Get environment variables.

`GET /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId}/environment-variables`

Operation ID: `getEnvironmentVariables`. Security: AmOAuth2 (sfcc.storefront.environments, sfcc.storefront.environments.rw).

Retrieves the complete set of environment variables for the environment, as a map keyed by variable name. Values are masked. This is a singleton resource — one set per environment — and is not a paginated collection.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `storefrontId` (path, string, required) The storefront identifier that B2C Commerce generates based on the provided storefront name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 20. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `my-storefront-a1b2c3`.
*   `environmentId` (path, string, required) The environment identifier that B2C Commerce generates based on the provided display name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 19. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `production-a1b2c3d4`.

#### Responses

*   **200** Environment variables successfully retrieved.
    
    Media type: `application/json`. Schema: `EnvironmentVariables`.
    
    _Example: EnvironmentVariablesSuccess_ Successful environment variables retrieval
    
    Example of a successful response returning the full set of environment variables, keyed by name, with masked values.
    
    ```
    {
      "PAYMENT_GATEWAY_API_KEY": {
        "value": "****e5f6",
        "createdBy": "jane.doe@example.com",
        "creationDate": "2026-08-24T09:23:28.872916Z",
        "lastModified": "2026-08-24T10:15:02.111000Z",
        "lastModifiedBy": "john.doe@example.com",
        "publishingStatus": "completed"
      },
      "LOG_LEVEL": {
        "value": "****info",
        "createdBy": "jane.doe@example.com",
        "creationDate": "2026-08-20T08:00:00.000000Z",
        "lastModified": "2026-08-20T08:00:00.000000Z",
        "lastModifiedBy": "jane.doe@example.com",
        "publishingStatus": "pending"
      }
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** We couldn't find the requested environment.
    
    Media type: `application/problem+json`. Schema: `EnvironmentNotFoundErrorResponse`.
    
    _Example EnvironmentNotFoundErrorResponseExample: same as GET /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId} 404 response._
    

### PATCH Update environment variables.

`PATCH /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId}/environment-variables`

Operation ID: `updateEnvironmentVariables`. Security: AmOAuth2 (sfcc.storefront.environments.rw).

Merge-updates the environment variables. Keys present in the payload are created or replaced; a key whose value is `null` is deleted; keys omitted from the payload are preserved. Returns `204 No Content` on success.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `storefrontId` (path, string, required) The storefront identifier that B2C Commerce generates based on the provided storefront name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 20. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `my-storefront-a1b2c3`.
*   `environmentId` (path, string, required) The environment identifier that B2C Commerce generates based on the provided display name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 19. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `production-a1b2c3d4`.

#### Request body (required)

Media type: `application/json`. Schema: `EnvironmentVariablesUpdateRequest`.

_Example: EnvironmentVariablesUpdate_ Merge-update environment variables

Upsert two variables and delete a third. Keys present in the payload are created or replaced; a key whose value is `null` is deleted; omitted keys are preserved.

```
{
  "MAX_CART_ITEMS": {
    "value": 50
  },
  "PAYMENT_GATEWAY_API_KEY": {
    "value": "sk_live_a1b2c3d4e5f6"
  },
  "LEGACY_CHECKOUT_URL": {
    "value": null
  }
}
```

#### Responses

*   **204** Environment variables successfully updated.
*   **400** Bad Request. A variable name is invalid or restricted, or the combined size of all variable values exceeds 32 KB.
    
    Media type: `application/problem+json`. Schema: `EnvironmentVariableNameInvalidErrorResponse | EnvironmentVariableSizeExceededErrorResponse`.
    
    One of: `EnvironmentVariableNameInvalidErrorResponse`, `EnvironmentVariableSizeExceededErrorResponse`.
    
    _Example: EnvironmentVariableNameInvalidErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/environment-variable-name-invalid",
      "detail": "The environment variable name MRT_INTERNAL_FLAG is invalid or restricted.",
      "title": "Environment Variable Name Invalid"
    }
    ```
    
    _Example: EnvironmentVariableSizeExceededErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/environment-variable-size-exceeded",
      "detail": "The combined size of all environment variable values exceeds the 32 KB limit.",
      "title": "Environment Variable Size Exceeded"
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** We couldn't find the requested environment.
    
    Media type: `application/problem+json`. Schema: `EnvironmentNotFoundErrorResponse`.
    
    _Example EnvironmentNotFoundErrorResponseExample: same as GET /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId} 404 response._
    

### GET Get access control headers.

`GET /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId}/access-control-headers`

Operation ID: `getAccessControlHeaders`. Security: AmOAuth2 (sfcc.storefront.environments, sfcc.storefront.environments.rw).

Retrieves a paginated list of access control headers on the environment. Values are masked.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `storefrontId` (path, string, required) The storefront identifier that B2C Commerce generates based on the provided storefront name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 20. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `my-storefront-a1b2c3`.
*   `environmentId` (path, string, required) The environment identifier that B2C Commerce generates based on the provided display name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 19. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `production-a1b2c3d4`.
*   `orderBy` (query, array of string, style: form, explode: false) Attributes to order the returned access control headers by, in priority order, applied left to right. Append `:asc` or `:desc` to set the direction; when omitted, `:asc` is assumed. Sortable attributes: `creation_date`, `id`, `publishing_status`.  
    Items: Pattern: ^(creation\_date|id|publishing\_status)(:(asc|desc))?$. Example: `creation_date:desc`. Maximum items: 3.
    
    _Example_
    
    ```
    [
      "creation_date:desc"
    ]
    ```
    
*   `limit` (query, integer (int32)) Number of records to retrieve per request. Must be between 1 (minimum) and 200 (maximum). Defaults to 25.  
    Default: `25`. Minimum: 1. Maximum: 200.
*   `offset` (query, integer (int32)) Used to retrieve the results based on a particular resource offset.  
    Default: `0`. Minimum: 0.

#### Responses

*   **200** List of access control headers successfully retrieved.
    
    Media type: `application/json`. Schema: `AccessControlHeaderResult`.
    
    _Example: AccessControlHeaderListSuccess_ Successful access control header list result
    
    Example of a successful response returning a paginated list of access control headers.
    
    ```
    {
      "limit": 25,
      "offset": 0,
      "total": 2,
      "data": [
        {
          "id": "ff832a9e-0e55-11ef-8f23-0242ac110002",
          "value": "****************by0z",
          "createdBy": "jane.doe@example.com",
          "creationDate": "2026-08-24T09:23:28.872916Z",
          "publishingStatus": "completed"
        },
        {
          "id": "a1b2c3d4-0e55-11ef-8f23-0242ac110099",
          "value": "****************k9zq",
          "createdBy": "john.doe@example.com",
          "creationDate": "2026-08-22T11:05:10.000000Z",
          "publishingStatus": "pending"
        }
      ]
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** We couldn't find the requested environment.
    
    Media type: `application/problem+json`. Schema: `EnvironmentNotFoundErrorResponse`.
    
    _Example EnvironmentNotFoundErrorResponseExample: same as GET /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId} 404 response._
    

### POST Create an access control header.

`POST /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId}/access-control-headers`

Operation ID: `createAccessControlHeader`. Security: AmOAuth2 (sfcc.storefront.environments.rw).

Creates a header-based access control rule on the environment. The created value is masked in the response.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `storefrontId` (path, string, required) The storefront identifier that B2C Commerce generates based on the provided storefront name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 20. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `my-storefront-a1b2c3`.
*   `environmentId` (path, string, required) The environment identifier that B2C Commerce generates based on the provided display name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 19. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `production-a1b2c3d4`.

#### Request body (required)

Media type: `application/json`. Schema: `AccessControlHeaderCreateRequest`.

_Example: CreateAccessControlHeader_ Create an access control header

Create a header-based access control rule on the environment.

```
{
  "value": "jfoWikeaby0z"
}
```

#### Responses

*   **201** Access control header successfully created.
    
    Media type: `application/json`. Schema: `AccessControlHeader`.
    
    _Example: AccessControlHeaderCreatedSuccess_ Successful access control header creation
    
    Example of a successful response after creating an access control header.
    
    ```
    {
      "id": "ff832a9e-0e55-11ef-8f23-0242ac110002",
      "value": "****************by0z",
      "createdBy": "jane.doe@example.com",
      "creationDate": "2026-08-24T09:23:28.872916Z",
      "publishingStatus": "pending"
    }
    ```
    
*   **400** Bad Request. The per-environment header limit has been reached, or the value is invalid.
    
    Media type: `application/problem+json`. Schema: `AccessControlHeaderLimitReachedErrorResponse | AccessControlHeaderValueInvalidErrorResponse`.
    
    One of: `AccessControlHeaderLimitReachedErrorResponse`, `AccessControlHeaderValueInvalidErrorResponse`.
    
    _Example: AccessControlHeaderLimitReachedErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/access-control-header-limit-reached",
      "detail": "The maximum number of access control headers for this environment has been reached.",
      "title": "Access Control Header Limit Reached"
    }
    ```
    
    _Example: AccessControlHeaderValueInvalidErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/access-control-header-value-invalid",
      "detail": "The supplied access control header value is invalid.",
      "title": "Access Control Header Value Invalid"
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** We couldn't find the requested environment.
    
    Media type: `application/problem+json`. Schema: `EnvironmentNotFoundErrorResponse`.
    
    _Example EnvironmentNotFoundErrorResponseExample: same as GET /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId} 404 response._
    

### GET Get an access control header by ID.

`GET /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId}/access-control-headers/{accessControlHeaderId}`

Operation ID: `getAccessControlHeader`. Security: AmOAuth2 (sfcc.storefront.environments, sfcc.storefront.environments.rw).

Retrieves a single access control header by its identifier. The value is masked.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `storefrontId` (path, string, required) The storefront identifier that B2C Commerce generates based on the provided storefront name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 20. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `my-storefront-a1b2c3`.
*   `environmentId` (path, string, required) The environment identifier that B2C Commerce generates based on the provided display name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 19. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `production-a1b2c3d4`.
*   `accessControlHeaderId` (path, string (uuid), required) The access control header identifier, in UUID format.  
    Example: `ff832a9e-0e55-11ef-8f23-0242ac110002`.

#### Responses

*   **200** Access control header successfully retrieved.
    
    Media type: `application/json`. Schema: `AccessControlHeader`.
    
    _Example: AccessControlHeaderSuccess_ Successful access control header retrieval
    
    Example of a successful response returning a single access control header.
    
    ```
    {
      "id": "ff832a9e-0e55-11ef-8f23-0242ac110002",
      "value": "****************by0z",
      "createdBy": "jane.doe@example.com",
      "creationDate": "2026-08-24T09:23:28.872916Z",
      "publishingStatus": "completed"
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** The requested access control header was not found on the environment.
    
    Media type: `application/problem+json`. Schema: `AccessControlHeaderNotFoundErrorResponse`.
    
    _Example: AccessControlHeaderNotFoundErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/access-control-header-not-found",
      "detail": "We couldn't find access control header ff832a9e-0e55-11ef-8f23-0242ac110002.",
      "title": "Access Control Header Not Found"
    }
    ```
    

### DELETE Delete an access control header.

`DELETE /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId}/access-control-headers/{accessControlHeaderId}`

Operation ID: `deleteAccessControlHeader`. Security: AmOAuth2 (sfcc.storefront.environments.rw).

Deletes an access control header by its identifier.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `storefrontId` (path, string, required) The storefront identifier that B2C Commerce generates based on the provided storefront name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 20. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `my-storefront-a1b2c3`.
*   `environmentId` (path, string, required) The environment identifier that B2C Commerce generates based on the provided display name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 19. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `production-a1b2c3d4`.
*   `accessControlHeaderId` (path, string (uuid), required) The access control header identifier, in UUID format.  
    Example: `ff832a9e-0e55-11ef-8f23-0242ac110002`.

#### Responses

*   **204** Access control header successfully deleted.
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** The requested access control header was not found on the environment.
    
    Media type: `application/problem+json`. Schema: `AccessControlHeaderNotFoundErrorResponse`.
    
    _Example AccessControlHeaderNotFoundErrorResponseExample: same as GET /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId}/access-control-headers/{accessControlHeaderId} 404 response._
    

### GET Get redirects.

`GET /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId}/redirects`

Operation ID: `getRedirects`. Security: AmOAuth2 (sfcc.storefront.environments, sfcc.storefront.environments.rw).

Retrieves a paginated, orderable list of redirects on the environment.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `storefrontId` (path, string, required) The storefront identifier that B2C Commerce generates based on the provided storefront name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 20. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `my-storefront-a1b2c3`.
*   `environmentId` (path, string, required) The environment identifier that B2C Commerce generates based on the provided display name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 19. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `production-a1b2c3d4`.
*   `orderBy` (query, array of string, style: form, explode: false) Attributes to order the returned redirects by, in priority order, applied left to right. Append `:asc` or `:desc` to set the direction; when omitted, `:asc` is assumed. Sortable attributes: `creation_date`, `last_modified`, `source`, `destination`, `last_modified_by`, `http_status_code`, `publishing_status`.  
    Items: Pattern: ^(creation\_date|last\_modified|source|destination|last\_modified\_by|http\_status\_code|publishing\_status)(:(asc|desc))?$. Example: `creation_date:desc`. Maximum items: 7.
    
    _Example_
    
    ```
    [
      "creation_date:desc"
    ]
    ```
    
*   `limit` (query, integer (int32)) Number of records to retrieve per request. Must be between 1 (minimum) and 200 (maximum). Defaults to 25.  
    Default: `25`. Minimum: 1. Maximum: 200.
*   `offset` (query, integer (int32)) Used to retrieve the results based on a particular resource offset.  
    Default: `0`. Minimum: 0.

#### Responses

*   **200** List of redirects successfully retrieved.
    
    Media type: `application/json`. Schema: `RedirectResult`.
    
    _Example: RedirectListSuccess_ Successful redirect list result
    
    Example of a successful response returning a paginated list of redirects.
    
    ```
    {
      "limit": 25,
      "offset": 0,
      "total": 2,
      "data": [
        {
          "redirectId": "3f9b1c2d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
          "source": "/spring",
          "destination": "/summer-newbranding",
          "httpStatusCode": 301,
          "forwardQuerystring": false,
          "forwardWildcard": false,
          "publishingStatus": "completed",
          "createdBy": "john.doe@example.com",
          "lastModifiedBy": "john.doe@example.com",
          "creationDate": "2026-08-24T00:00:00.000Z",
          "lastModified": "2026-08-24T00:00:00.000Z"
        },
        {
          "redirectId": "7c1e2f3a-8b9c-4d5e-6f7a-1b2c3d4e5f6a",
          "source": "/old-page",
          "destination": "/new-page",
          "httpStatusCode": 302,
          "forwardQuerystring": true,
          "forwardWildcard": false,
          "publishingStatus": "pending",
          "createdBy": "jane.doe@example.com",
          "lastModifiedBy": "jane.doe@example.com",
          "creationDate": "2026-08-23T12:30:00.000Z",
          "lastModified": "2026-08-23T12:30:00.000Z"
        }
      ]
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** We couldn't find the requested environment.
    
    Media type: `application/problem+json`. Schema: `EnvironmentNotFoundErrorResponse`.
    
    _Example EnvironmentNotFoundErrorResponseExample: same as GET /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId} 404 response._
    

### POST Create a redirect.

`POST /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId}/redirects`

Operation ID: `createRedirect`. Security: AmOAuth2 (sfcc.storefront.environments.rw).

Creates a redirect on the environment. Returns the created redirect and a `Location` header.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `storefrontId` (path, string, required) The storefront identifier that B2C Commerce generates based on the provided storefront name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 20. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `my-storefront-a1b2c3`.
*   `environmentId` (path, string, required) The environment identifier that B2C Commerce generates based on the provided display name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 19. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `production-a1b2c3d4`.

#### Request body (required)

Media type: `application/json`. Schema: `RedirectCreateRequest`.

_Example: CreateRedirect_ Create a single redirect

Create one redirect rule on the environment.

```
{
  "source": "/spring",
  "destination": "/summer-newbranding",
  "httpStatusCode": 301,
  "forwardQuerystring": false,
  "forwardWildcard": false
}
```

#### Responses

*   **201** Redirect successfully created. Returns the created redirect and a `Location` header.
    
    Headers:
    
    *   `Location` (string (uri)) The URL of the created redirect.  
        Example: `https://123456gf.api.commercecloud.salesforce.com/storefront/environments/v1/organizations/f_ecom_blnd_stg/storefronts/my-storefront/environments/production/redirects/3f9b1c2d-4e5f-6a7b-8c9d-0e1f2a3b4c5d`.
    
    Media type: `application/json`. Schema: `Redirect`.
    
    _Example: RedirectCreatedSuccess_ Successful redirect creation
    
    Example of a successful response after creating a single redirect.
    
    ```
    {
      "redirectId": "3f9b1c2d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
      "source": "/spring",
      "destination": "/summer-newbranding",
      "httpStatusCode": 301,
      "forwardQuerystring": false,
      "forwardWildcard": false,
      "publishingStatus": "pending",
      "createdBy": "john.doe@example.com",
      "lastModifiedBy": "john.doe@example.com",
      "creationDate": "2026-08-24T00:00:00.000Z",
      "lastModified": "2026-08-24T00:00:00.000Z"
    }
    ```
    
*   **400** Bad Request. A duplicate `source`, a redirect loop, or a field validation failure.
    
    Media type: `application/problem+json`. Schema: `RedirectDuplicatePathErrorResponse | RedirectLoopErrorResponse | RedirectValidationErrorResponse`.
    
    One of: `RedirectDuplicatePathErrorResponse`, `RedirectLoopErrorResponse`, `RedirectValidationErrorResponse`.
    
    _Example: RedirectDuplicatePathErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/redirect-duplicate-path",
      "detail": "A redirect already exists for the source path /spring.",
      "title": "Redirect Duplicate Path"
    }
    ```
    
    _Example: RedirectLoopErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/redirect-loop",
      "detail": "The redirect would create a redirect loop.",
      "title": "Redirect Loop"
    }
    ```
    
    _Example: RedirectValidationErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/redirect-validation",
      "detail": "The redirect request failed validation: destination must be a valid path or URL",
      "title": "Redirect Validation"
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** We couldn't find the requested environment.
    
    Media type: `application/problem+json`. Schema: `EnvironmentNotFoundErrorResponse`.
    
    _Example EnvironmentNotFoundErrorResponseExample: same as GET /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId} 404 response._
    

### GET Get a redirect by ID.

`GET /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId}/redirects/{redirectId}`

Operation ID: `getRedirect`. Security: AmOAuth2 (sfcc.storefront.environments, sfcc.storefront.environments.rw).

Retrieves a single redirect by its identifier.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `storefrontId` (path, string, required) The storefront identifier that B2C Commerce generates based on the provided storefront name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 20. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `my-storefront-a1b2c3`.
*   `environmentId` (path, string, required) The environment identifier that B2C Commerce generates based on the provided display name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 19. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `production-a1b2c3d4`.
*   `redirectId` (path, string (uuid), required) The redirect identifier, in UUID format.  
    Example: `3f9b1c2d-4e5f-6a7b-8c9d-0e1f2a3b4c5d`.

#### Responses

*   **200** Redirect successfully retrieved.
    
    Media type: `application/json`. Schema: `Redirect`.
    
    _Example: RedirectSuccess_ Successful redirect retrieval
    
    Example of a successful response returning a single redirect.
    
    ```
    {
      "redirectId": "3f9b1c2d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
      "source": "/spring",
      "destination": "/summer-newbranding",
      "httpStatusCode": 301,
      "forwardQuerystring": false,
      "forwardWildcard": false,
      "publishingStatus": "completed",
      "createdBy": "john.doe@example.com",
      "lastModifiedBy": "john.doe@example.com",
      "creationDate": "2026-08-24T00:00:00.000Z",
      "lastModified": "2026-08-24T00:00:00.000Z"
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** The requested redirect was not found on the environment.
    
    Media type: `application/problem+json`. Schema: `RedirectNotFoundErrorResponse`.
    
    _Example: RedirectNotFoundErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/redirect-not-found",
      "detail": "We couldn't find redirect 3f9b1c2d-4e5f-6a7b-8c9d-0e1f2a3b4c5d.",
      "title": "Redirect Not Found"
    }
    ```
    

### DELETE Delete a redirect.

`DELETE /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId}/redirects/{redirectId}`

Operation ID: `deleteRedirect`. Security: AmOAuth2 (sfcc.storefront.environments.rw).

Deletes a redirect by its identifier.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `storefrontId` (path, string, required) The storefront identifier that B2C Commerce generates based on the provided storefront name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 20. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `my-storefront-a1b2c3`.
*   `environmentId` (path, string, required) The environment identifier that B2C Commerce generates based on the provided display name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 19. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `production-a1b2c3d4`.
*   `redirectId` (path, string (uuid), required) The redirect identifier, in UUID format.  
    Example: `3f9b1c2d-4e5f-6a7b-8c9d-0e1f2a3b4c5d`.

#### Responses

*   **204** Redirect successfully deleted.
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** The requested redirect was not found on the environment.
    
    Media type: `application/problem+json`. Schema: `RedirectNotFoundErrorResponse`.
    
    _Example RedirectNotFoundErrorResponseExample: same as GET /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId}/redirects/{redirectId} 404 response._
    

### PATCH Update a redirect.

`PATCH /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId}/redirects/{redirectId}`

Operation ID: `updateRedirect`. Security: AmOAuth2 (sfcc.storefront.environments.rw).

Partially updates a redirect by its identifier. Only the supplied fields are changed.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `storefrontId` (path, string, required) The storefront identifier that B2C Commerce generates based on the provided storefront name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 20. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `my-storefront-a1b2c3`.
*   `environmentId` (path, string, required) The environment identifier that B2C Commerce generates based on the provided display name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 19. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `production-a1b2c3d4`.
*   `redirectId` (path, string (uuid), required) The redirect identifier, in UUID format.  
    Example: `3f9b1c2d-4e5f-6a7b-8c9d-0e1f2a3b4c5d`.

#### Request body (required)

Media type: `application/json`. Schema: `RedirectUpdateRequest`.

_Example: UpdateRedirect_ Update a redirect

Partially update a redirect; only the supplied fields are changed.

```
{
  "destination": "/summer-2027"
}
```

#### Responses

*   **200** Redirect successfully updated.
    
    Media type: `application/json`. Schema: `Redirect`.
    
    _Example: RedirectUpdatedSuccess_ Successful redirect update
    
    Example of a successful response after partially updating a redirect.
    
    ```
    {
      "redirectId": "3f9b1c2d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
      "source": "/spring",
      "destination": "/summer-2027",
      "httpStatusCode": 301,
      "forwardQuerystring": false,
      "forwardWildcard": false,
      "publishingStatus": "pending",
      "createdBy": "john.doe@example.com",
      "lastModifiedBy": "jane.doe@example.com",
      "creationDate": "2026-08-24T00:00:00.000Z",
      "lastModified": "2026-08-25T08:12:44.000Z"
    }
    ```
    
*   **400** Bad Request. A duplicate `source`, a redirect loop, or a field validation failure.
    
    Media type: `application/problem+json`. Schema: `RedirectDuplicatePathErrorResponse | RedirectLoopErrorResponse | RedirectValidationErrorResponse`.
    
    One of: `RedirectDuplicatePathErrorResponse`, `RedirectLoopErrorResponse`, `RedirectValidationErrorResponse`.
    
    _Example RedirectDuplicatePathErrorResponseExample: same as POST /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId}/redirects 400 response._
    
    _Example RedirectValidationErrorResponseExample: same as POST /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId}/redirects 400 response._
    
    _Example: RedirectLoopErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/redirect-loop",
      "detail": "The redirect would create a redirect loop.",
      "title": "Redirect Loop"
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** The requested redirect was not found on the environment.
    
    Media type: `application/problem+json`. Schema: `RedirectNotFoundErrorResponse`.
    
    _Example RedirectNotFoundErrorResponseExample: same as GET /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId}/redirects/{redirectId} 404 response._
    

### POST Clone redirects from a source environment.

`POST /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId}/redirects/actions/clone`

Operation ID: `cloneRedirects`. Security: AmOAuth2 (sfcc.storefront.environments.rw).

Copies all redirects from a source environment into the environment in the request path. The source environment must differ from the destination environment.

#### Parameters

*   `organizationId` (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).
    
    _Example_
    
    ```
    f_ecom_zzxy_prd
    ```
    
*   `storefrontId` (path, string, required) The storefront identifier that B2C Commerce generates based on the provided storefront name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 20. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `my-storefront-a1b2c3`.
*   `environmentId` (path, string, required) The environment identifier that B2C Commerce generates based on the provided display name. It consists of lowercase letters, numbers, and hyphens only, with no leading or trailing hyphens.  
    Minimum length: 1. Maximum length: 19. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `production-a1b2c3d4`.

#### Request body (required)

Media type: `application/json`. Schema: `RedirectCloneRequest`.

_Example: CloneRedirects_ Clone redirects from a source environment

Copy all redirects from a source environment into this environment.

```
{
  "sourceEnvironmentId": "staging"
}
```

#### Responses

*   **201** Redirects successfully cloned into the destination environment.
*   **400** Bad Request. The source environment must differ from the destination environment.
    
    Media type: `application/problem+json`. Schema: `RedirectCloneSameEnvironmentErrorResponse`.
    
    _Example: RedirectCloneSameEnvironmentErrorResponseExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/redirect-clone-same-environment",
      "detail": "The source environment must differ from the destination environment.",
      "title": "Redirect Clone Same Environment"
    }
    ```
    
*   **401** Your access token is invalid or expired and can’t be used to identify a user.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: UnauthorizedExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
      "title": "Unauthorized",
      "detail": "Unauthorized request"
    }
    ```
    
*   **403** Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.
    
    Media type: `application/problem+json`. Schema: `ErrorResponse`.
    
    _Example: ForbiddenExample_
    
    ```
    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
      "title": "Forbidden",
      "detail": "Access to requested resource forbidden"
    }
    ```
    
*   **404** We couldn't find the requested environment.
    
    Media type: `application/problem+json`. Schema: `EnvironmentNotFoundErrorResponse`.
    
    _Example EnvironmentNotFoundErrorResponseExample: same as GET /organizations/{organizationId}/storefronts/{storefrontId}/environments/{environmentId} 404 response._
    

## Schemas

### OrganizationId

An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f\_ecom\_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).

Type: `string`.

Pattern: ^f\_ecom\_\[a-z\]{4}\_(prd|stg|dev|s\[0-9\]{2}|\[0-9\]{3})$. Example: `f_ecom_zzxy_prd`.

### EnvironmentResult

Result containing a paginated list of environments.

Includes all fields of `PaginatedResultBase`.

*   `data` (_array of Environment_, required) The list of environments belonging to the storefront. This value can be empty.

### ErrorResponse

*   `title` (_string_, required) A short, human-readable summary of the problem type. It will not change from occurrence to occurrence of the problem, except for purposes of localization  
    Maximum length: 256. Example: `You do not have enough credit`.
*   `type` (_string_, required) A URI reference \[RFC3986\] that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML \[W3C.REC-html5-20141028\]). When this member is not present, its value is assumed to be "about:blank". It accepts relative URIs; this means that they must be resolved relative to the document's base URI, as per \[RFC3986\], Section 5.  
    Maximum length: 2048. Example: `NotEnoughMoney`.
*   `detail` (_string_, required) A human-readable explanation specific to this occurrence of the problem.  
    Example: `Your current balance is 30, but that costs 50`.
*   `instance` (_string_) A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. It accepts relative URIs; this means that they must be resolved relative to the document's base URI, as per \[RFC3986\], Section 5.  
    Maximum length: 2048. Example: `/account/12345/msgs/abc`.

### StorefrontNotFoundErrorResponse

Returned when the storefront that the environment belongs to does not exist for this organization.

Includes all fields of `ErrorResponse`.

*   `storefrontId` (_string_) The identifier of the storefront that couldn't be found.  
    Minimum length: 1. Maximum length: 20. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `my-storefront-a1b2c3`.

### EnvironmentCreateRequest

Request body to create an environment for a storefront.

*   `displayName` (_string_, required) The display name for the new environment.  
    Maximum length: 256. Example: `Production`.

### Environment

An environment within Managed Runtime (MRT) where to deploy storefronts to separate phases of your development lifecycle, such as development, staging, or production.

*   `environmentId` (_string_, required) The generated environment identifier. Unique within the storefront, with an auto-generated hash suffix.  
    Minimum length: 1. Maximum length: 19. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `production-a1b2c3d4`.
*   `displayName` (_string_, required) The display name of the environment.  
    Maximum length: 256. Example: `Production`.
*   `status` (_EnvironmentStatus_, required)
*   `isPrimary` (_boolean_, required) Indicates whether the environment is the storefront's primary environment. Only one environment per storefront can be primary.  
    Example: `true`.
*   `subdomain` (_string_, nullable) The subdomain assigned to this environment. The subdomain is available after the environment finishes building and is null before then.  
    Maximum length: 256. Example: `production`.
*   `mrtOrigin` (_string_, nullable) The Managed Runtime origin URL that backs this environment. The origin is available after the environment finishes building and is null before then.  
    Maximum length: 512. Example: `https://production-my-storefront.exp-delivery.com`.
*   `defaultEcdnHostname` (_string_, nullable) The eCDN hostname for the environment's default domain zone, used by the preview link. The eCDN hostname is available after the environment finishes building and is null before then.  
    Maximum length: 256. Example: `marketstreetb82739d375a9270f.zzzz-001.my.cc.salesforce.com`.
*   `creationDate` (_string (date-time)_) The timestamp when the environment was created.  
    Example: `2026-04-08T21:47:28.188965Z`.
*   `lastModified` (_string (date-time)_) The timestamp when the environment was last modified.  
    Example: `2026-04-08T21:47:31.307595Z`.
*   `ssrRegion` (_SsrRegion_)
*   `ssrArchitecture` (_string_, nullable) The architecture for the environment's server-side rendering function. Null when no architecture default is configured.  
    Allowed values: `x86`, `arm64`. Example: `arm64`.
*   `ssrExternalHostname` (_string_, nullable) The full custom hostname used by the environment (e.g. [www.customer.com](http://www.customer.com)). Null when not configured.  
    Maximum length: 128. Example: `www.customer.com`.
*   `ssrExternalDomain` (_string_, nullable) The external domain for the ssrExternalHostname (e.g. customer.com). When omitted it is derived from ssrExternalHostname. Null when not configured.  
    Maximum length: 128. Example: `customer.com`.
*   `ssrWhitelistedIps` (_string_, nullable) A space-separated list of IPv4 or IPv6 CIDR blocks permitted to access the environment. Null or empty allows all IPs.  
    Maximum length: 8192. Example: `192.0.2.0/24 198.51.100.0/24`.
*   `ssrProxyConfigs` (_array of SsrProxyConfig_, nullable) The proxy configurations for the environment. Null when none are configured.  
    Maximum items: 8.
*   `isProduction` (_boolean_) Whether the environment is provisioned with production-tier capacity.  
    Example: `false`.
*   `allowCookies` (_boolean_) Whether cookies are forwarded to and respected from the environment's origin.  
    Example: `true`.
*   `preserveProxyUserAgent` (_boolean_) Whether the end-user's User-Agent header is preserved on requests forwarded through the environment's configured proxies.  
    Example: `false`.
*   `enableSourceMaps` (_boolean_) Whether source maps are enabled for the environment's server-side rendering bundle.  
    Example: `false`.
*   `logLevel` (_string_, nullable) The minimum log level emitted by the environment's server-side rendering function. Null when inherited from the default.  
    Allowed values: `trace`, `debug`, `info`, `warn`, `error`, `fatal`. Example: `warn`.
*   `distributedTracing` (_boolean_) Whether distributed tracing is enabled for the environment.  
    Example: `false`.
*   `distributedTracingSamplingRate` (_number (double)_) The fraction of requests sampled for distributed tracing.  
    Minimum: 0. Maximum: 1. Example: `0.1`.
*   `certificateId` (_integer (int32)_, nullable) The identifier of the certificate associated with the environment's custom domain. Null when using the default Managed Runtime domain.  
    Minimum: 0. Example: `42`.

### InvalidEnvironmentCreateRequestErrorResponse

Returned when the environment creation request body is malformed or missing a valid displayName.

Includes all fields of `ErrorResponse`.

### EnvironmentCloneRequest

Request body to create an environment by cloning an existing one.

*   `sourceEnvironmentId` (_string_, required) The identifier of the environment to clone.  
    Minimum length: 1. Maximum length: 19. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `production-a1b2c3d4`.
*   `displayName` (_string_, required) The display name for the new environment.  
    Maximum length: 256. Example: `Production (EU)`.
*   `cloneEnvironmentVariables` (_boolean_) Indicates whether to copy the source environment's environment variables to the new environment.  
    Default: `false`. Example: `true`.
*   `cloneRedirects` (_boolean_) Indicates whether to copy the source environment's redirects to the new environment.  
    Default: `false`. Example: `true`.
*   `cloneB2cTargetInfo` (_boolean_) Indicates whether to copy the source environment's B2C Commerce target information to the new environment.  
    Default: `true`. Example: `true`.

### InvalidEnvironmentCloneRequestErrorResponse

Returned when the environment clone request body is malformed or missing a valid sourceEnvironmentId or displayName.

Includes all fields of `ErrorResponse`.

### SourceEnvironmentNotFoundErrorResponse

Returned when the sourceEnvironmentId in a clone request does not exist for the specified storefront.

Includes all fields of `ErrorResponse`.

*   `storefrontId` (_string_) The identifier of the storefront the clone was requested under.  
    Minimum length: 1. Maximum length: 20. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `my-storefront-a1b2c3`.
*   `sourceEnvironmentId` (_string_) The identifier of the source environment that couldn't be found.  
    Minimum length: 1. Maximum length: 19. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `production-a1b2c3d4`.

### EnvironmentNotFoundErrorResponse

Returned when the requested environment (or the source environment referenced in a clone request) does not exist for the specified storefront.

Includes all fields of `ErrorResponse`.

*   `storefrontId` (_string_) The identifier of the storefront the environment was requested under.  
    Minimum length: 1. Maximum length: 20. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `my-storefront-a1b2c3`.
*   `environmentId` (_string_) The identifier of the environment that couldn't be found.  
    Minimum length: 1. Maximum length: 19. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `production-a1b2c3d4`.

### EnvironmentBusyErrorResponse

Returned when an environment deletion is requested while the environment is already building or deleting.

Includes all fields of `ErrorResponse`.

*   `environmentId` (_string_) The identifier of the environment.  
    Minimum length: 1. Maximum length: 19. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `production-a1b2c3d4`.
*   `status` (_string_) The environment's current status.  
    Allowed values: `building`, `deleting`. Example: `building`.

### EnvironmentUpdateRequest

Request body to update an environment. Every field is optional and only the supplied fields are changed; at least one field must be provided.

Minimum properties: 1.

*   `displayName` (_string_) The new display name for the environment.  
    Maximum length: 256. Example: `Production`.
*   `ssrRegion` (_SsrRegion_)
*   `ssrArchitecture` (_string_, nullable) The architecture for the environment's server-side rendering function. Set to null to inherit the storefront default.  
    Allowed values: `x86`, `arm64`. Example: `arm64`.
*   `ssrExternalHostname` (_string_, nullable) The full custom hostname used by the environment (e.g. [www.customer.com](http://www.customer.com)). Set to null to clear it.  
    Maximum length: 128. Example: `www.customer.com`.
*   `ssrExternalDomain` (_string_, nullable) The external domain for the ssrExternalHostname (e.g. customer.com). When omitted it is derived from ssrExternalHostname. Set to null to clear it.  
    Maximum length: 128. Example: `customer.com`.
*   `ssrWhitelistedIps` (_string_, nullable) A space-separated list of IPv4 or IPv6 CIDR blocks permitted to access the environment. Set to null or empty to allow all IPs.  
    Maximum length: 8192. Example: `192.0.2.0/24 198.51.100.0/24`.
*   `ssrProxyConfigs` (_array of SsrProxyConfig_, nullable) The proxy configurations for the environment. Set to null to clear them.  
    Maximum items: 8.
*   `isProduction` (_boolean_) Whether the environment is provisioned with production-tier capacity.  
    Example: `false`.
*   `allowCookies` (_boolean_) Whether cookies are forwarded to and respected from the environment's origin.  
    Example: `true`.
*   `preserveProxyUserAgent` (_boolean_) Whether the end-user's User-Agent header is preserved on requests forwarded through the environment's configured proxies.  
    Example: `false`.
*   `enableSourceMaps` (_boolean_) Whether source maps are enabled for the environment's server-side rendering bundle.  
    Example: `false`.
*   `logLevel` (_string_, nullable) The minimum log level emitted by the environment's server-side rendering function. Set to null to inherit the default.  
    Allowed values: `trace`, `debug`, `info`, `warn`, `error`, `fatal`. Example: `warn`.
*   `distributedTracing` (_boolean_) Whether distributed tracing is enabled for the environment.  
    Example: `false`.
*   `distributedTracingSamplingRate` (_number (double)_) The fraction of requests sampled for distributed tracing.  
    Minimum: 0. Maximum: 1. Example: `0.1`.
*   `certificateId` (_integer (int32)_, nullable) The identifier of the certificate to associate with the environment's custom domain. Set to null to remove the certificate association. Not permitted when using the default Managed Runtime domain.  
    Minimum: 0. Example: `42`.

### InvalidEnvironmentUpdateRequestErrorResponse

Returned when the environment update request body is malformed, empty, or contains an unsupported value (for example an invalid ssrRegion, ssrArchitecture, or logLevel).

Includes all fields of `ErrorResponse`.

### EnvironmentSsrRegionDisabledErrorResponse

Returned when the requested ssrRegion is in the temporarily disabled set.

Includes all fields of `ErrorResponse`.

*   `ssrRegion` (_string_) The identifier of the SSR region that is temporarily disabled.  
    Maximum length: 32. Example: `eu_south_1`.

### EnvironmentSsrArchitectureNotEnabledErrorResponse

Returned when the x86 ssrArchitecture is requested but the organization is not permitted to configure the SSR architecture.

Includes all fields of `ErrorResponse`.

### EnvironmentSsrArchitectureX86EndOfLifeErrorResponse

Returned when the x86 ssrArchitecture is requested after its end-of-life date and the organization has no active grace period.

Includes all fields of `ErrorResponse`.

### EnvironmentCertificateInvalidErrorResponse

Returned when the supplied certificateId does not exist for the organization, is not in a validated state, does not match the environment's hostname domain, or is supplied while the environment uses the default Managed Runtime domain.

Includes all fields of `ErrorResponse`.

*   `certificateId` (_integer (int32)_) The identifier of the certificate that was rejected.  
    Minimum: 0. Example: `42`.

### EnvironmentSsrFieldBusinessManagerErrorResponse

Returned when an SSR networking field (ssrExternalHostname, ssrExternalDomain, or ssrWhitelistedIps) is changed on an environment that is served through eCDN, where such changes must be made in Business Manager.

Includes all fields of `ErrorResponse`.

*   `field` (_string_) The name of the SSR field that cannot be changed through this API.  
    Maximum length: 64. Example: `ssrExternalHostname`.

### EnvironmentInvalidProxyConfigErrorResponse

Returned when ssrProxyConfigs fail validation — for example more than the maximum of 8 proxies, duplicate proxy paths, an invalid proxy host, or an unsupported protocol (only https is supported).

Includes all fields of `ErrorResponse`.

*   `reason` (_string_) A human-readable description of the proxy configuration validation failure.  
    Maximum length: 4000. Example: `The max number of proxies allowed is 8, but 9 given.`.

### EnvironmentUpdateForbiddenErrorResponse

Returned when the requested update is not permitted — for example changing allowCookies on a Storefront Next environment (where cookies are always enabled), or changing an SSR networking field on a protected environment.

Includes all fields of `ErrorResponse`.

### PrimaryEnvironmentInvalidStatusErrorResponse

Returned when an environment is set as primary while its status is not ready or build\_failed.

Includes all fields of `ErrorResponse`.

*   `environmentId` (_string_) The identifier of the environment.  
    Minimum length: 1. Maximum length: 19. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `production-a1b2c3d4`.
*   `status` (_string_) The environment's current status.  
    Allowed values: `building`, `deleting`, `deleted`, `delete_failed`. Example: `building`.

### CacheInvalidationRequest

Request body to trigger a CDN cache invalidation on the environment.

*   `pattern` (_string_, required) The path prefix to invalidate. Must start with `/`. Cache invalidation is always a wildcard operation: the CDN clears every cached path that begins with this value (a trailing `*` is always implied), so `/products` and `/products*` invalidate the same paths. If the value contains a `*`, only the portion before the first `*` is used as the prefix and the remainder is ignored. The invalidation is performed asynchronously.  
    Minimum length: 1. Pattern: ^/.\*$. Example: `/products/*`.

### CacheInvalidationPatternInvalidErrorResponse

Returned when the cache invalidation `pattern` is missing or does not start with `/`.

Includes all fields of `ErrorResponse`.

### CacheInvalidationNoBundleErrorResponse

Returned when no SSR bundle is deployed to the environment, so there is nothing to invalidate.

Includes all fields of `ErrorResponse`.

### EnvironmentVariables

The complete set of environment variables for the environment, as a map keyed by variable name. Values are masked. This is a singleton resource (one set per environment) and is not a paginated collection.

Additional properties: `EnvironmentVariableEntry`.

_Example_

```
{
  "PAYMENT_GATEWAY_API_KEY": {
    "value": "****e5f6",
    "createdBy": "jane.doe@example.com",
    "creationDate": "2026-08-24T09:23:28.872916Z",
    "lastModified": "2026-08-24T09:23:28.872916Z",
    "lastModifiedBy": "jane.doe@example.com",
    "publishingStatus": "completed"
  }
}
```

### EnvironmentVariablesUpdateRequest

A merge (upsert) update of environment variables, keyed by variable name. Keys present in the payload are created or replaced; a key whose value is `null` is deleted; keys omitted from the payload are preserved.

Additional properties: `EnvironmentVariableUpdateEntry`.

_Example_

```
{
  "MAX_CART_ITEMS": {
    "value": 50
  },
  "PAYMENT_GATEWAY_API_KEY": {
    "value": "sk_live_a1b2c3d4e5f6"
  },
  "LEGACY_CHECKOUT_URL": {
    "value": null
  }
}
```

### EnvironmentVariableNameInvalidErrorResponse

Returned when an environment variable name is invalid or restricted — for example an `MRT_`\-prefixed name, which is reserved.

Includes all fields of `ErrorResponse`.

*   `name` (_string_) The environment variable name that was rejected.  
    Maximum length: 256. Example: `MRT_INTERNAL_FLAG`.

### EnvironmentVariableSizeExceededErrorResponse

Returned when the combined size of all environment variable values exceeds 32 KB.

Includes all fields of `ErrorResponse`.

### AccessControlHeaderResult

Paginated result containing a list of access control headers.

Includes all fields of `PaginatedResultBase`.

*   `data` (_array of AccessControlHeader_, required) List of access control headers.

### AccessControlHeaderCreateRequest

Request body to create an access control header.

*   `value` (_string_, required) The header value.  
    Minimum length: 9. Maximum length: 127. Example: `jfoWikeaby0z`.

### AccessControlHeader

A header-based access control rule on the environment.

*   `id` (_string (uuid)_) The unique identifier of the access control header, in UUID format.  
    Example: `ff832a9e-0e55-11ef-8f23-0242ac110002`.
*   `value` (_string_) The masked header value. Actual values are never returned in clear text.  
    Maximum length: 127. Example: `****************by0z`.
*   `createdBy` (_string_, nullable) The email address of the user who created the header. Null if no user is associated.  
    Maximum length: 255. Example: `jane.doe@example.com`.
*   `creationDate` (_string (date-time)_) The timestamp when the header was created.  
    Example: `2026-08-24T09:23:28.872916Z`.
*   `publishingStatus` (_PublishingStatus_)

### AccessControlHeaderLimitReachedErrorResponse

Returned when the per-environment access control header limit has been reached.

Includes all fields of `ErrorResponse`.

### AccessControlHeaderValueInvalidErrorResponse

Returned when the supplied access control header value is invalid.

Includes all fields of `ErrorResponse`.

### AccessControlHeaderNotFoundErrorResponse

Returned when the requested access control header does not exist on the environment.

Includes all fields of `ErrorResponse`.

*   `accessControlHeaderId` (_string_) The identifier of the access control header that couldn't be found.  
    Minimum length: 36. Maximum length: 36. Pattern: ^\[0-9a-f\]{8}-\[0-9a-f\]{4}-\[0-9a-f\]{4}-\[0-9a-f\]{4}-\[0-9a-f\]{12}$. Example: `ff832a9e-0e55-11ef-8f23-0242ac110002`.

### RedirectResult

Paginated result containing a list of redirects.

Includes all fields of `PaginatedResultBase`.

*   `data` (_array of Redirect_, required) List of redirects.

### RedirectCreateRequest

Request body to create a single redirect.

*   `source` (_string_, required) The source path that triggers the redirect.  
    Minimum length: 1. Maximum length: 2000. Example: `/spring`.
*   `destination` (_string_, required) The destination path or URL the request is redirected to.  
    Minimum length: 1. Maximum length: 2000. Example: `/summer-newbranding`.
*   `httpStatusCode` (_RedirectHttpStatusCode_)
*   `forwardQuerystring` (_boolean_) Whether the incoming query string is forwarded to the destination.  
    Default: `false`. Example: `false`.
*   `forwardWildcard` (_boolean_) Whether a trailing wildcard match on the source is forwarded to the destination.  
    Default: `false`. Example: `false`.

### Redirect

A URL redirect rule on the environment.

*   `redirectId` (_string (uuid)_) The unique identifier of the redirect, in UUID format.  
    Example: `3f9b1c2d-4e5f-6a7b-8c9d-0e1f2a3b4c5d`.
*   `source` (_string_) The source path that triggers the redirect.  
    Minimum length: 1. Maximum length: 2000. Example: `/spring`.
*   `destination` (_string_) The destination path or URL the request is redirected to.  
    Minimum length: 1. Maximum length: 2000. Example: `/summer-newbranding`.
*   `httpStatusCode` (_RedirectHttpStatusCode_)
*   `forwardQuerystring` (_boolean_) Whether the incoming query string is forwarded to the destination.  
    Example: `false`.
*   `forwardWildcard` (_boolean_) Whether a trailing wildcard match on the source is forwarded to the destination.  
    Example: `false`.
*   `publishingStatus` (_PublishingStatus_)
*   `createdBy` (_string_, nullable) The email address of the user who created the redirect. Null if no user is associated.  
    Maximum length: 255. Example: `john.doe@example.com`.
*   `lastModifiedBy` (_string_, nullable) The email address of the user who last modified the redirect. Null if no user is associated.  
    Maximum length: 255. Example: `john.doe@example.com`.
*   `creationDate` (_string (date-time)_) The timestamp when the redirect was created.  
    Example: `2026-08-24T00:00:00.000Z`.
*   `lastModified` (_string (date-time)_) The timestamp when the redirect was last modified.  
    Example: `2026-08-24T00:00:00.000Z`.

### RedirectDuplicatePathErrorResponse

Returned when the payload contains a `source` path that already has a redirect on the environment.

Includes all fields of `ErrorResponse`.

*   `source` (_string_) The duplicate source path.  
    Maximum length: 2000. Example: `/spring`.

### RedirectLoopErrorResponse

Returned when the redirect would create a loop (the destination resolves back to the source).

Includes all fields of `ErrorResponse`.

### RedirectValidationErrorResponse

Returned when a redirect field fails validation — for example a malformed `source` or `destination`.

Includes all fields of `ErrorResponse`.

*   `reason` (_string_) A human-readable description of the validation failure.  
    Maximum length: 4000. Example: `destination must be a valid path or URL`.

### RedirectNotFoundErrorResponse

Returned when the requested redirect does not exist on the environment.

Includes all fields of `ErrorResponse`.

*   `redirectId` (_string_) The identifier of the redirect that couldn't be found.  
    Minimum length: 36. Maximum length: 36. Pattern: ^\[0-9a-f\]{8}-\[0-9a-f\]{4}-\[0-9a-f\]{4}-\[0-9a-f\]{4}-\[0-9a-f\]{12}$. Example: `3f9b1c2d-4e5f-6a7b-8c9d-0e1f2a3b4c5d`.

### RedirectUpdateRequest

Request body to partially update a redirect. Only the supplied fields are changed.

Minimum properties: 1.

*   `source` (_string_) The source path that triggers the redirect.  
    Minimum length: 1. Maximum length: 2000. Example: `/spring`.
*   `destination` (_string_) The destination path or URL the request is redirected to.  
    Minimum length: 1. Maximum length: 2000. Example: `/summer-2027`.
*   `httpStatusCode` (_RedirectHttpStatusCode_)
*   `forwardQuerystring` (_boolean_) Whether the incoming query string is forwarded to the destination.  
    Example: `false`.
*   `forwardWildcard` (_boolean_) Whether a trailing wildcard match on the source is forwarded to the destination.  
    Example: `false`.

### RedirectCloneRequest

Request body to clone all redirects from a source environment into this environment.

*   `sourceEnvironmentId` (_string_, required) The identifier of the environment to copy redirects from. Must differ from the environment in the request path.  
    Minimum length: 1. Maximum length: 19. Pattern: ^\[a-z0-9\]+(?:-+\[a-z0-9\]+)\*$. Example: `staging`.

### RedirectCloneSameEnvironmentErrorResponse

Returned when a redirect clone request names a source environment that is the same as the destination environment in the request path.

Includes all fields of `ErrorResponse`.

### PaginatedResultBase

Schema defining generic pageable result. Each response schema of a resource requiring pagination should extend this schema. If you use this extend this schema directly, it needs to be defined what data is returned. Allowed names for the data field is `data`.

Includes all fields of `ResultBase`.

*   `offset` (_Offset_, required)

### EnvironmentStatus

The current provisioning or lifecycle status of the environment.

Type: `string`.

Allowed values: `building`, `ready`, `build_failed`, `deleting`, `deleted`, `delete_failed`. Example: `ready`.

### SsrRegion

The AWS region for the server-side rendering function of the environment. Each value corresponds to the AWS region of the same name with underscores substituted for hyphens (for example, `us_east_2` is the AWS region `us-east-2`).

Type: `string`.

Allowed values: `us_east_1`, `us_east_2`, `us_west_1`, `us_west_2`, `ap_south_1`, `ap_south_2`, `ap_northeast_2`, `ap_southeast_1`, `ap_southeast_2`, `ap_southeast_3`, `ap_northeast_1`, `ap_northeast_3`, `ca_central_1`, `eu_central_1`, `eu_central_2`, `eu_west_1`, `eu_west_2`, `eu_west_3`, `eu_north_1`, `eu_south_1`, `sa_east_1`. Example: `us_east_2`.

### SsrProxyConfig

A single proxy configuration entry for the environment, defined by its `path`, `host`, and `protocol`.

*   `path` (_string_) The request path prefix routed to the proxy origin.  
    Maximum length: 2048. Example: `/api`.
*   `host` (_string_) The proxy origin host.  
    Maximum length: 255. Example: `api.example.com`.
*   `protocol` (_string_) The protocol used to reach the proxy origin. Only `https` is supported.  
    Allowed values: `https`. Example: `https`.

### EnvironmentVariableEntry

A single environment variable's masked value and audit metadata.

*   `value` (_string_, nullable) The masked variable value. Actual values are never returned in clear text.  
    Maximum length: 32768. Example: `****e5f6`.
*   `createdBy` (_string_, nullable) The email address of the user who created the variable. Null if no user is associated.  
    Maximum length: 255. Example: `jane.doe@example.com`.
*   `creationDate` (_string (date-time)_) The timestamp when the variable was created.  
    Example: `2026-08-24T09:23:28.872916Z`.
*   `lastModified` (_string (date-time)_) The timestamp when the variable was last modified.  
    Example: `2026-08-24T10:15:02.111000Z`.
*   `lastModifiedBy` (_string_, nullable) The email address of the user who last modified the variable. Null if no user is associated.  
    Maximum length: 255. Example: `john.doe@example.com`.
*   `publishingStatus` (_PublishingStatus_)

### EnvironmentVariableUpdateEntry

The desired value for a single environment variable in a merge update. Set `value` to `null` to delete the variable.

*   `value` (_string | number_, required) The new variable value. Accepts a string or a number (numbers are stored as strings). Set to `null` to delete the variable. The combined size of all variable values must not exceed 32 KB.
    
    One of: `string`, `number`.
    
    *   _string_
        
        Type: `string`.
        
        Maximum length: 32768. Example: `sk_live_a1b2c3d4e5f6`.
        
    *   _number_
        
        Type: `number`.
        
        Example: `50`.
        

### PublishingStatus

The publishing status of the resource on the environment.

Type: `string`.

Allowed values: `pending`, `completed`, `failed`. Example: `pending`.

### RedirectHttpStatusCode

The HTTP status code returned for the redirect.

Type: `integer (int32)`.

Allowed values: `301`, `302`. Default: `301`. Example: `301`.

### ResultBase

Schema defining generic list result. Each response schema of a resource requiring a list response should extend this schema. Additionally it needs to be defined what data is returned.

*   `limit` (_integer (int32)_, required) Maximum records to retrieve per request. The limit with its constraints (minimum, maximum, default) is defined by the request parameter `limit` of the endpoint returning this schema.  
    Example: `10`.
*   `total` (_Total_, required)

### Offset

The zero-based index of the first hit/data to include in the result.

Type: `integer (int32)`.

Default: `0`. Minimum: 0. Example: `0`.

### Total

The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated.

Type: `integer (int32)`.

Default: `0`. Minimum: 0. Example: `10`.