1.0.2
API Overview
The Storefronts API provides B2C Commerce API (SCAPI)-native access to B2C storefront data for Storefront Next and PWA Kit. It replaces the Business Manager UI and partially data API setup flow. The B2C CLI and other tooling can use it for end-to-end automation. The Storefronts API provides full provisioning for Storefront Next and partial administration tasks for PWA Kit.
- Storefronts — create, retrieve, list, update (site assignment), and delete storefronts at the organization level.
Storefront 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. See the Environments API for managing a storefront's environments.
Authentication & Authorization
Requests are authenticated with Account Manager OAuth 2.0 bearer tokens (AmOAuth2). Access is governed by the Storefronts API scopes: sfcc.storefront.storefronts grants read-only access, and sfcc.storefront.storefronts.rw grants read and write access. Read operations (GET) accept either scope. Write operations (POST, PATCH, DELETE) require sfcc.storefront.storefronts.rw.
Idempotency
POST /storefronts: This operation is idempotent in effect but not in response code while the storefront record exists. The API rejects the requested storefrontName immediately if a record already exists with the same name, regardless of setup status. The retries don't create a second storefront or modify the existing one. The first call returns 202, and retries return 409 (StorefrontAlreadyExistsErrorResponse). After the storefront is fully deleted, its record is removed and the storefrontName becomes available for reuse. A subsequent POST with that name succeeds (202) instead of returning 409.PATCH /storefronts/{storefrontId}: This operation is idempotent. The request body is the full desiredsiteslist (complete replacement). Repeating an identical request produces the same resulting state.DELETE /storefronts/{storefrontId}: This operation is idempotent in effect, but not in response code. The first call queues deletion (202). Once deletion completes, retrying returns 404.
Use Cases
- Provision a Storefront Next storefront.
- Assign or reassign existing sites to a storefront.
- Poll storefront status during asynchronous provisioning or teardown.
- Decommission a storefront.
Let us know so we can improve!