@salesforce/b2c-tooling-sdk 2.4.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/data/schemas/dw.schema.json +14 -0
  2. package/data/tooling/index.json +5 -5
  3. package/dist/esm/cli/base-command.js +4 -3
  4. package/dist/esm/cli/base-command.js.map +1 -1
  5. package/dist/esm/cli/cartridge-command.js +2 -1
  6. package/dist/esm/cli/cartridge-command.js.map +1 -1
  7. package/dist/esm/cli/config.js +3 -1
  8. package/dist/esm/cli/config.js.map +1 -1
  9. package/dist/esm/cli/hooks.d.ts +13 -0
  10. package/dist/esm/cli/hooks.js +11 -0
  11. package/dist/esm/cli/hooks.js.map +1 -1
  12. package/dist/esm/cli/instance-command.js +2 -1
  13. package/dist/esm/cli/instance-command.js.map +1 -1
  14. package/dist/esm/clients/scapi-backend-utils.d.ts +15 -0
  15. package/dist/esm/clients/scapi-backend-utils.js +28 -1
  16. package/dist/esm/clients/scapi-backend-utils.js.map +1 -1
  17. package/dist/esm/clients/scapi-fallback-backend.js +2 -2
  18. package/dist/esm/clients/scapi-fallback-backend.js.map +1 -1
  19. package/dist/esm/clients/scapi-schemas.generated.d.ts +2 -2
  20. package/dist/esm/compat/dispatcher.js +2 -2
  21. package/dist/esm/compat/dispatcher.js.map +1 -1
  22. package/dist/esm/config/config-origins.d.ts +19 -0
  23. package/dist/esm/config/config-origins.js +11 -0
  24. package/dist/esm/config/config-origins.js.map +1 -0
  25. package/dist/esm/config/config-write.d.ts +86 -0
  26. package/dist/esm/config/config-write.js +296 -0
  27. package/dist/esm/config/config-write.js.map +1 -0
  28. package/dist/esm/config/dw-json-schema.js +4 -0
  29. package/dist/esm/config/dw-json-schema.js.map +1 -1
  30. package/dist/esm/config/dw-json.d.ts +2 -0
  31. package/dist/esm/config/dw-json.js +10 -6
  32. package/dist/esm/config/dw-json.js.map +1 -1
  33. package/dist/esm/config/index.d.ts +8 -3
  34. package/dist/esm/config/index.js +5 -2
  35. package/dist/esm/config/index.js.map +1 -1
  36. package/dist/esm/config/instance-manager.d.ts +64 -28
  37. package/dist/esm/config/instance-manager.js +145 -63
  38. package/dist/esm/config/instance-manager.js.map +1 -1
  39. package/dist/esm/config/mapping.js +6 -0
  40. package/dist/esm/config/mapping.js.map +1 -1
  41. package/dist/esm/config/resolver.d.ts +22 -0
  42. package/dist/esm/config/resolver.js +54 -29
  43. package/dist/esm/config/resolver.js.map +1 -1
  44. package/dist/esm/config/sources/dw-json-source.d.ts +9 -1
  45. package/dist/esm/config/sources/dw-json-source.js +34 -20
  46. package/dist/esm/config/sources/dw-json-source.js.map +1 -1
  47. package/dist/esm/config/sources/env-source.d.ts +30 -3
  48. package/dist/esm/config/sources/env-source.js +126 -1
  49. package/dist/esm/config/sources/env-source.js.map +1 -1
  50. package/dist/esm/config/types.d.ts +46 -0
  51. package/dist/esm/operations/jobs/run-system-job.js +2 -2
  52. package/dist/esm/operations/jobs/run-system-job.js.map +1 -1
  53. package/dist/esm/plugins/discovery.js +2 -1
  54. package/dist/esm/plugins/discovery.js.map +1 -1
  55. package/dist/esm/scapi/index.d.ts +5 -2
  56. package/dist/esm/scapi/index.js +3 -2
  57. package/dist/esm/scapi/index.js.map +1 -1
  58. package/dist/esm/scapi/live.d.ts +12 -1
  59. package/dist/esm/scapi/live.js +30 -2
  60. package/dist/esm/scapi/live.js.map +1 -1
  61. package/dist/esm/scapi/local.d.ts +17 -0
  62. package/dist/esm/scapi/local.js +68 -16
  63. package/dist/esm/scapi/local.js.map +1 -1
  64. package/dist/esm/scapi/request.d.ts +2 -2
  65. package/dist/esm/scapi/request.js +2 -1
  66. package/dist/esm/scapi/request.js.map +1 -1
  67. package/dist/esm/scapi/runtime.d.ts +5 -0
  68. package/dist/esm/scapi/runtime.js.map +1 -1
  69. package/dist/esm/scapi/schema-source.d.ts +90 -0
  70. package/dist/esm/scapi/schema-source.js +146 -0
  71. package/dist/esm/scapi/schema-source.js.map +1 -0
  72. package/dist/esm/scapi/worker-source.js +30 -6
  73. package/dist/esm/scapi/worker-source.js.map +1 -1
  74. package/dist/esm/test-utils/config-isolation.js +9 -2
  75. package/dist/esm/test-utils/config-isolation.js.map +1 -1
  76. package/node_modules/@salesforce/b2c-api-schemas/manifest.json +83 -42
  77. package/node_modules/@salesforce/b2c-api-schemas/package.json +1 -1
  78. package/node_modules/@salesforce/b2c-api-schemas/scapi/cdn/zones/v1.json +6798 -238
  79. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/orders/v1.json +2296 -205
  80. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-baskets/v1.json +5571 -666
  81. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-baskets/v2.json +6062 -371
  82. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-orders/v1.json +3426 -360
  83. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-payments/v1.json +351 -99
  84. package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/cors/v1.json +172 -12
  85. package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/preferences/v1.json +1497 -111
  86. package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/shopper-configurations/v1.json +202 -36
  87. package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/timeouts/v1.json +79 -10
  88. package/node_modules/@salesforce/b2c-api-schemas/scapi/custom-object/custom-objects/v1.json +785 -49
  89. package/node_modules/@salesforce/b2c-api-schemas/scapi/custom-object/shopper-custom-objects/v1.json +191 -40
  90. package/node_modules/@salesforce/b2c-api-schemas/scapi/customer/customers/v1.json +1483 -107
  91. package/node_modules/@salesforce/b2c-api-schemas/scapi/customer/shopper-customers/v1.json +4854 -787
  92. package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/custom-apis/v1.json +119 -15
  93. package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/object-definitions/v1.json +1699 -80
  94. package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/scapi-schemas/v1.json +252 -18
  95. package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/scripts/v1.json +329 -23
  96. package/node_modules/@salesforce/b2c-api-schemas/scapi/experience/experiences/v1.json +4208 -234
  97. package/node_modules/@salesforce/b2c-api-schemas/scapi/experience/shopper-experience/v1.json +1591 -247
  98. package/node_modules/@salesforce/b2c-api-schemas/scapi/intelligence/analytics/v1.json +396 -8
  99. package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/availability/v1.json +1242 -69
  100. package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/impex/v1.json +2354 -248
  101. package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/reservation/v1.json +1550 -45
  102. package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/segmentation/v1.json +6615 -0
  103. package/node_modules/@salesforce/b2c-api-schemas/scapi/merchant/roles/v1.json +1520 -59
  104. package/node_modules/@salesforce/b2c-api-schemas/scapi/merchant/users/v1.json +397 -17
  105. package/node_modules/@salesforce/b2c-api-schemas/scapi/observability/metrics/v1.json +1241 -27
  106. package/node_modules/@salesforce/b2c-api-schemas/scapi/operation/jobs/v1.json +1069 -68
  107. package/node_modules/@salesforce/b2c-api-schemas/scapi/operation/replications/v1.json +410 -23
  108. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/assignments/v1.json +502 -102
  109. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/campaigns/v1.json +1112 -94
  110. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/coupons/v1.json +820 -93
  111. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/gift-certificates/v1.json +845 -92
  112. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/promotions/v1.json +2716 -674
  113. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/shopper-gift-certificates/v1.json +130 -47
  114. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/shopper-promotions/v1.json +233 -63
  115. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/source-code-groups/v1.json +630 -70
  116. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/catalogs/v1.json +2886 -348
  117. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/inventory-lists/v1.json +520 -19
  118. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/price-books/v1.json +3115 -293
  119. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/products/v1.json +3313 -138
  120. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-availability/v1.json +266 -52
  121. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-delivery-estimates/v1.json +256 -48
  122. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-products/v1.json +1744 -306
  123. package/node_modules/@salesforce/b2c-api-schemas/scapi/search/shopper-search/v1.json +1661 -120
  124. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/auth/v1.json +2174 -118
  125. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/auth-admin/v1.json +1373 -24
  126. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/consents/v1.json +531 -20
  127. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-agents/v1.json +154 -6
  128. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-consents/v1.json +596 -79
  129. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-context/v1.json +456 -42
  130. package/node_modules/@salesforce/b2c-api-schemas/scapi/site/seo/v1.json +101 -23
  131. package/node_modules/@salesforce/b2c-api-schemas/scapi/site/shopper-seo/v1.json +184 -41
  132. package/node_modules/@salesforce/b2c-api-schemas/scapi/site/sites/v1.json +995 -47
  133. package/node_modules/@salesforce/b2c-api-schemas/scapi/store/shopper-stores/v1.json +370 -67
  134. package/node_modules/@salesforce/b2c-api-schemas/scapi/store/store-redirect-mappings/v1.json +319 -11
  135. package/node_modules/@salesforce/b2c-api-schemas/scapi/store/stores/v1.json +1109 -64
  136. package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/deployments/v1.json +1442 -0
  137. package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/environments/v1.json +4293 -0
  138. package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/storefronts/v1.json +1371 -0
  139. package/package.json +2 -2
  140. package/specs/scapi-schemas-v1.yaml +4 -1
@@ -0,0 +1,1371 @@
1
+ {
2
+ "openapi": "3.0.3",
3
+ "info": {
4
+ "title": "Storefronts",
5
+ "description": "[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/storefront/storefronts-oas-v1-public.yaml)\n\n# API Overview\n\nThe 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.\n\n- **Storefronts** — create, retrieve, list, update (site assignment), and delete storefronts at the organization level.\n\nStorefront 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](https://developer.salesforce.com/static/commercecloud/commerce-api/storefront/environments-oas-v1-public.yaml) for managing a storefront's environments.\n\n## Authentication & Authorization\n\nRequests 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`.\n\n## Idempotency\n\n- `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.\n- `PATCH /storefronts/{storefrontId}`: This operation is idempotent. The request body is the full desired `sites` list (complete replacement). Repeating an identical request produces the same resulting state.\n- `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. Deleting a storefront while a deletion of that same storefront is already in progress returns 409 (`StorefrontBusyErrorResponse`) rather than queuing a duplicate deletion.\n\n## Use Cases\n\n- Provision a Storefront Next storefront.\n- Assign or reassign existing sites to a storefront.\n- Poll storefront status during asynchronous provisioning or teardown.\n- Decommission a storefront.",
6
+ "version": "1.0.4",
7
+ "x-api-type": "Admin",
8
+ "x-api-family": "Storefront"
9
+ },
10
+ "servers": [
11
+ {
12
+ "url": "https://{shortCode}.api.commercecloud.salesforce.com/storefront/storefronts/v1",
13
+ "variables": {
14
+ "shortCode": {
15
+ "default": "123456gf"
16
+ }
17
+ }
18
+ }
19
+ ],
20
+ "paths": {
21
+ "/organizations/{organizationId}/storefronts": {
22
+ "get": {
23
+ "summary": "Get storefronts for an organization.",
24
+ "description": "Retrieves the list of storefronts provisioned for the organization, ordered by creationDate ascending.",
25
+ "operationId": "getStorefronts",
26
+ "parameters": [
27
+ {
28
+ "name": "organizationId",
29
+ "in": "path",
30
+ "description": "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).",
31
+ "required": true,
32
+ "style": "simple",
33
+ "explode": false,
34
+ "schema": {
35
+ "$ref": "#/components/schemas/OrganizationId"
36
+ },
37
+ "example": "f_ecom_zzxy_prd"
38
+ },
39
+ {
40
+ "name": "limit",
41
+ "in": "query",
42
+ "description": "Number of records to retrieve per request. Must be between 1 (minimum) and 200 (maximum). Defaults to 25.",
43
+ "required": false,
44
+ "style": "form",
45
+ "explode": true,
46
+ "schema": {
47
+ "type": "integer",
48
+ "format": "int32",
49
+ "default": 25,
50
+ "maximum": 200,
51
+ "minimum": 1
52
+ }
53
+ },
54
+ {
55
+ "name": "offset",
56
+ "in": "query",
57
+ "description": "Used to retrieve the results based on a particular resource offset.",
58
+ "required": false,
59
+ "style": "form",
60
+ "explode": true,
61
+ "schema": {
62
+ "type": "integer",
63
+ "format": "int32",
64
+ "default": 0,
65
+ "minimum": 0
66
+ }
67
+ }
68
+ ],
69
+ "responses": {
70
+ "200": {
71
+ "description": "List of storefronts successfully retrieved.",
72
+ "content": {
73
+ "application/json": {
74
+ "schema": {
75
+ "$ref": "#/components/schemas/StorefrontResult"
76
+ },
77
+ "examples": {
78
+ "StorefrontListSuccess": {
79
+ "$ref": "#/components/examples/StorefrontListSuccess"
80
+ }
81
+ }
82
+ }
83
+ }
84
+ },
85
+ "401": {
86
+ "$ref": "#/components/responses/401unauthorized"
87
+ },
88
+ "403": {
89
+ "$ref": "#/components/responses/403forbidden"
90
+ }
91
+ },
92
+ "security": [
93
+ {
94
+ "AmOAuth2": [
95
+ "sfcc.storefront.storefronts",
96
+ "sfcc.storefront.storefronts.rw"
97
+ ]
98
+ }
99
+ ]
100
+ },
101
+ "post": {
102
+ "summary": "Create a storefront.",
103
+ "description": "Queues creation of a new storefront. Returns immediately with the storefront resource in the in_progress setup status. Poll the storefront by ID to track provisioning progress.",
104
+ "operationId": "createStorefront",
105
+ "parameters": [
106
+ {
107
+ "name": "organizationId",
108
+ "in": "path",
109
+ "description": "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).",
110
+ "required": true,
111
+ "style": "simple",
112
+ "explode": false,
113
+ "schema": {
114
+ "$ref": "#/components/schemas/OrganizationId"
115
+ },
116
+ "example": "f_ecom_zzxy_prd"
117
+ }
118
+ ],
119
+ "requestBody": {
120
+ "content": {
121
+ "application/json": {
122
+ "schema": {
123
+ "$ref": "#/components/schemas/StorefrontCreateRequest"
124
+ },
125
+ "examples": {
126
+ "CreateStorefront": {
127
+ "$ref": "#/components/examples/CreateStorefront"
128
+ }
129
+ }
130
+ }
131
+ },
132
+ "required": true
133
+ },
134
+ "responses": {
135
+ "202": {
136
+ "description": "Storefront creation successfully queued.",
137
+ "content": {
138
+ "application/json": {
139
+ "schema": {
140
+ "$ref": "#/components/schemas/Storefront"
141
+ },
142
+ "examples": {
143
+ "StorefrontCreatedSuccess": {
144
+ "$ref": "#/components/examples/StorefrontCreatedSuccess"
145
+ }
146
+ }
147
+ }
148
+ }
149
+ },
150
+ "400": {
151
+ "$ref": "#/components/responses/400BadRequest_CreateStorefront"
152
+ },
153
+ "401": {
154
+ "$ref": "#/components/responses/401unauthorized"
155
+ },
156
+ "403": {
157
+ "$ref": "#/components/responses/403forbidden"
158
+ },
159
+ "409": {
160
+ "$ref": "#/components/responses/409Conflict_CreateStorefront"
161
+ }
162
+ },
163
+ "security": [
164
+ {
165
+ "AmOAuth2": [
166
+ "sfcc.storefront.storefronts.rw"
167
+ ]
168
+ }
169
+ ]
170
+ }
171
+ },
172
+ "/organizations/{organizationId}/storefronts/{storefrontId}": {
173
+ "get": {
174
+ "summary": "Get a storefront by ID.",
175
+ "description": "Retrieves the details of a specific storefront, including its current setup status and assigned sites.",
176
+ "operationId": "getStorefrontById",
177
+ "parameters": [
178
+ {
179
+ "name": "organizationId",
180
+ "in": "path",
181
+ "description": "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).",
182
+ "required": true,
183
+ "style": "simple",
184
+ "explode": false,
185
+ "schema": {
186
+ "$ref": "#/components/schemas/OrganizationId"
187
+ },
188
+ "example": "f_ecom_zzxy_prd"
189
+ },
190
+ {
191
+ "name": "storefrontId",
192
+ "in": "path",
193
+ "description": "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.",
194
+ "required": true,
195
+ "style": "simple",
196
+ "explode": false,
197
+ "schema": {
198
+ "type": "string",
199
+ "example": "my-storefront-a1b2c3",
200
+ "maxLength": 20,
201
+ "minLength": 1,
202
+ "pattern": "^[a-z0-9]+(?:-+[a-z0-9]+)*$"
203
+ }
204
+ }
205
+ ],
206
+ "responses": {
207
+ "200": {
208
+ "description": "Storefront successfully retrieved.",
209
+ "content": {
210
+ "application/json": {
211
+ "schema": {
212
+ "$ref": "#/components/schemas/Storefront"
213
+ },
214
+ "examples": {
215
+ "StorefrontSuccess": {
216
+ "$ref": "#/components/examples/StorefrontSuccess"
217
+ }
218
+ }
219
+ }
220
+ }
221
+ },
222
+ "401": {
223
+ "$ref": "#/components/responses/401unauthorized"
224
+ },
225
+ "403": {
226
+ "$ref": "#/components/responses/403forbidden"
227
+ },
228
+ "404": {
229
+ "$ref": "#/components/responses/404NotFound_Storefront"
230
+ }
231
+ },
232
+ "security": [
233
+ {
234
+ "AmOAuth2": [
235
+ "sfcc.storefront.storefronts",
236
+ "sfcc.storefront.storefronts.rw"
237
+ ]
238
+ }
239
+ ]
240
+ },
241
+ "delete": {
242
+ "summary": "Delete a storefront.",
243
+ "description": "Queues deletion of the storefront. Returns immediately with the storefront resource in the delete_in_progress setup status. Poll the storefront by ID to track deletion progress.",
244
+ "operationId": "deleteStorefront",
245
+ "parameters": [
246
+ {
247
+ "name": "organizationId",
248
+ "in": "path",
249
+ "description": "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).",
250
+ "required": true,
251
+ "style": "simple",
252
+ "explode": false,
253
+ "schema": {
254
+ "$ref": "#/components/schemas/OrganizationId"
255
+ },
256
+ "example": "f_ecom_zzxy_prd"
257
+ },
258
+ {
259
+ "name": "storefrontId",
260
+ "in": "path",
261
+ "description": "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.",
262
+ "required": true,
263
+ "style": "simple",
264
+ "explode": false,
265
+ "schema": {
266
+ "type": "string",
267
+ "example": "my-storefront-a1b2c3",
268
+ "maxLength": 20,
269
+ "minLength": 1,
270
+ "pattern": "^[a-z0-9]+(?:-+[a-z0-9]+)*$"
271
+ }
272
+ }
273
+ ],
274
+ "responses": {
275
+ "202": {
276
+ "description": "Storefront deletion successfully queued.",
277
+ "content": {
278
+ "application/json": {
279
+ "schema": {
280
+ "$ref": "#/components/schemas/Storefront"
281
+ },
282
+ "examples": {
283
+ "StorefrontDeleteAcceptedSuccess": {
284
+ "$ref": "#/components/examples/StorefrontDeleteAcceptedSuccess"
285
+ }
286
+ }
287
+ }
288
+ }
289
+ },
290
+ "401": {
291
+ "$ref": "#/components/responses/401unauthorized"
292
+ },
293
+ "403": {
294
+ "$ref": "#/components/responses/403forbidden"
295
+ },
296
+ "404": {
297
+ "$ref": "#/components/responses/404NotFound_Storefront"
298
+ },
299
+ "409": {
300
+ "$ref": "#/components/responses/409Conflict_DeleteStorefront"
301
+ }
302
+ },
303
+ "security": [
304
+ {
305
+ "AmOAuth2": [
306
+ "sfcc.storefront.storefronts.rw"
307
+ ]
308
+ }
309
+ ]
310
+ },
311
+ "patch": {
312
+ "summary": "Update a storefront.",
313
+ "description": "Updates a storefront. Every field is optional and only the supplied fields are changed. When `sites` is provided it replaces the storefront's full set of assigned sites—a complete replacement, not an incremental update—so the request body must contain the complete desired set of site IDs. The `ssrRegion`, `ssrArchitecture`, `allowCookies`, and `preserveProxyUserAgent` fields update the storefront's default configuration.",
314
+ "operationId": "updateStorefront",
315
+ "parameters": [
316
+ {
317
+ "name": "organizationId",
318
+ "in": "path",
319
+ "description": "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).",
320
+ "required": true,
321
+ "style": "simple",
322
+ "explode": false,
323
+ "schema": {
324
+ "$ref": "#/components/schemas/OrganizationId"
325
+ },
326
+ "example": "f_ecom_zzxy_prd"
327
+ },
328
+ {
329
+ "name": "storefrontId",
330
+ "in": "path",
331
+ "description": "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.",
332
+ "required": true,
333
+ "style": "simple",
334
+ "explode": false,
335
+ "schema": {
336
+ "type": "string",
337
+ "example": "my-storefront-a1b2c3",
338
+ "maxLength": 20,
339
+ "minLength": 1,
340
+ "pattern": "^[a-z0-9]+(?:-+[a-z0-9]+)*$"
341
+ }
342
+ }
343
+ ],
344
+ "requestBody": {
345
+ "content": {
346
+ "application/json": {
347
+ "schema": {
348
+ "$ref": "#/components/schemas/StorefrontUpdateRequest"
349
+ },
350
+ "examples": {
351
+ "UpdateStorefront": {
352
+ "$ref": "#/components/examples/UpdateStorefront"
353
+ },
354
+ "UpdateStorefrontConfiguration": {
355
+ "$ref": "#/components/examples/UpdateStorefrontConfiguration"
356
+ }
357
+ }
358
+ }
359
+ },
360
+ "required": true
361
+ },
362
+ "responses": {
363
+ "200": {
364
+ "description": "Storefront successfully updated.",
365
+ "content": {
366
+ "application/json": {
367
+ "schema": {
368
+ "$ref": "#/components/schemas/Storefront"
369
+ },
370
+ "examples": {
371
+ "StorefrontUpdatedSuccess": {
372
+ "$ref": "#/components/examples/StorefrontUpdatedSuccess"
373
+ }
374
+ }
375
+ }
376
+ }
377
+ },
378
+ "400": {
379
+ "$ref": "#/components/responses/400BadRequest_UpdateStorefront"
380
+ },
381
+ "401": {
382
+ "$ref": "#/components/responses/401unauthorized"
383
+ },
384
+ "403": {
385
+ "$ref": "#/components/responses/403Forbidden_UpdateStorefront"
386
+ },
387
+ "404": {
388
+ "$ref": "#/components/responses/404NotFound_Storefront"
389
+ },
390
+ "409": {
391
+ "$ref": "#/components/responses/409Conflict_UpdateStorefront"
392
+ }
393
+ },
394
+ "security": [
395
+ {
396
+ "AmOAuth2": [
397
+ "sfcc.storefront.storefronts.rw"
398
+ ]
399
+ }
400
+ ]
401
+ }
402
+ }
403
+ },
404
+ "components": {
405
+ "schemas": {
406
+ "OrganizationId": {
407
+ "type": "string",
408
+ "description": "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).",
409
+ "example": "f_ecom_zzxy_prd",
410
+ "pattern": "^f_ecom_[a-z]{4}_(prd|stg|dev|s[0-9]{2}|[0-9]{3})$"
411
+ },
412
+ "Total": {
413
+ "type": "integer",
414
+ "format": "int32",
415
+ "default": 0,
416
+ "description": "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.",
417
+ "example": 10,
418
+ "minimum": 0
419
+ },
420
+ "ResultBase": {
421
+ "type": "object",
422
+ "description": "Schema defining generic list result. Each response schema of a resource requiring a list response should extend this schema. \nAdditionally it needs to be defined what data is returned.",
423
+ "properties": {
424
+ "limit": {
425
+ "type": "integer",
426
+ "format": "int32",
427
+ "description": "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.",
428
+ "example": 10
429
+ },
430
+ "total": {
431
+ "$ref": "#/components/schemas/Total"
432
+ }
433
+ },
434
+ "required": [
435
+ "limit",
436
+ "total"
437
+ ]
438
+ },
439
+ "Offset": {
440
+ "type": "integer",
441
+ "format": "int32",
442
+ "default": 0,
443
+ "description": "The zero-based index of the first hit/data to include in the result.",
444
+ "example": 0,
445
+ "minimum": 0
446
+ },
447
+ "PaginatedResultBase": {
448
+ "allOf": [
449
+ {
450
+ "$ref": "#/components/schemas/ResultBase"
451
+ }
452
+ ],
453
+ "description": "Schema defining generic pageable result. Each response schema of a resource requiring pagination should extend this schema. \nIf you use this extend this schema directly, it needs to be defined what data is returned. Allowed names for the data field is `data`.",
454
+ "properties": {
455
+ "offset": {
456
+ "$ref": "#/components/schemas/Offset"
457
+ }
458
+ },
459
+ "required": [
460
+ "limit",
461
+ "offset",
462
+ "total"
463
+ ]
464
+ },
465
+ "StorefrontType": {
466
+ "type": "string",
467
+ "description": "The type of the storefront. `unknown` is a legacy fallback for existing records with no recorded type; it is never a valid value on create.",
468
+ "enum": [
469
+ "storefront_next",
470
+ "pwa_kit",
471
+ "headless",
472
+ "unknown"
473
+ ],
474
+ "example": "storefront_next"
475
+ },
476
+ "StorefrontSetupStatus": {
477
+ "type": "string",
478
+ "description": "The current provisioning/lifecycle status of the storefront.",
479
+ "enum": [
480
+ "in_progress",
481
+ "success",
482
+ "backfilled",
483
+ "failed",
484
+ "delete_in_progress",
485
+ "delete_failed",
486
+ "deleted",
487
+ "unknown"
488
+ ],
489
+ "example": "success"
490
+ },
491
+ "SiteId": {
492
+ "type": "string",
493
+ "description": "The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites",
494
+ "example": "RefArch",
495
+ "maxLength": 32,
496
+ "minLength": 1
497
+ },
498
+ "SsrRegion": {
499
+ "type": "string",
500
+ "description": "The default AWS region for server-side rendering functions of environments newly created under this storefront. 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`).",
501
+ "enum": [
502
+ "us_east_1",
503
+ "us_east_2",
504
+ "us_west_1",
505
+ "us_west_2",
506
+ "ap_south_1",
507
+ "ap_south_2",
508
+ "ap_northeast_2",
509
+ "ap_southeast_1",
510
+ "ap_southeast_2",
511
+ "ap_southeast_3",
512
+ "ap_northeast_1",
513
+ "ap_northeast_3",
514
+ "ca_central_1",
515
+ "eu_central_1",
516
+ "eu_central_2",
517
+ "eu_west_1",
518
+ "eu_west_2",
519
+ "eu_west_3",
520
+ "eu_north_1",
521
+ "eu_south_1",
522
+ "sa_east_1"
523
+ ],
524
+ "example": "us_east_2"
525
+ },
526
+ "Storefront": {
527
+ "type": "object",
528
+ "description": "A storefront represents a provisioned Storefront Next or PWA Kit Composable storefront, its type, and the sites assigned to it.",
529
+ "properties": {
530
+ "storefrontId": {
531
+ "type": "string",
532
+ "description": "A storefront identifier that B2C Commerce generates based on the provided storefront name. The storefront ID is unique within the organization. It consists only of lowercase letters, numbers, and hyphens, with no leading or trailing hyphens.",
533
+ "example": "my-storefront-a1b2c3",
534
+ "maxLength": 20,
535
+ "minLength": 1,
536
+ "pattern": "^[a-z0-9]+(?:-+[a-z0-9]+)*$"
537
+ },
538
+ "storefrontName": {
539
+ "type": "string",
540
+ "description": "The storefront name that you specify when creating a storefront. Must be 64 characters or fewer.",
541
+ "example": "my-storefront",
542
+ "maxLength": 64,
543
+ "minLength": 1
544
+ },
545
+ "type": {
546
+ "$ref": "#/components/schemas/StorefrontType"
547
+ },
548
+ "setupStatus": {
549
+ "$ref": "#/components/schemas/StorefrontSetupStatus"
550
+ },
551
+ "sites": {
552
+ "type": "array",
553
+ "description": "The IDs of the existing sites assigned to this storefront. By default a site can be assigned to only one storefront. Storefronts of type `pwa_kit` are exempt from this restriction and may share a site with another storefront.",
554
+ "example": [
555
+ "RefArch"
556
+ ],
557
+ "items": {
558
+ "$ref": "#/components/schemas/SiteId"
559
+ }
560
+ },
561
+ "creationDate": {
562
+ "type": "string",
563
+ "format": "date-time",
564
+ "description": "The timestamp when the storefront was created.",
565
+ "example": "2026-04-08T21:47:28.188965Z"
566
+ },
567
+ "lastModified": {
568
+ "type": "string",
569
+ "format": "date-time",
570
+ "description": "The timestamp when the storefront was last modified.",
571
+ "example": "2026-04-08T21:47:31.307595Z"
572
+ },
573
+ "ssrRegion": {
574
+ "$ref": "#/components/schemas/SsrRegion"
575
+ },
576
+ "ssrArchitecture": {
577
+ "type": "string",
578
+ "description": "The default architecture for the server-side rendering function of environments newly created under this storefront. Null when no architecture default is configured.",
579
+ "enum": [
580
+ "x86",
581
+ "arm64"
582
+ ],
583
+ "example": "arm64"
584
+ },
585
+ "allowCookies": {
586
+ "type": "boolean",
587
+ "description": "Whether cookies are allowed for the storefront. Always enabled for Storefront Next storefronts.",
588
+ "example": true
589
+ },
590
+ "preserveProxyUserAgent": {
591
+ "type": "boolean",
592
+ "description": "Whether the end-user's User-Agent header is preserved on requests forwarded through the storefront's configured proxies.",
593
+ "example": false
594
+ }
595
+ },
596
+ "required": [
597
+ "setupStatus",
598
+ "storefrontId",
599
+ "storefrontName",
600
+ "type"
601
+ ]
602
+ },
603
+ "StorefrontResult": {
604
+ "allOf": [
605
+ {
606
+ "$ref": "#/components/schemas/PaginatedResultBase"
607
+ }
608
+ ],
609
+ "description": "Result containing a paginated list of storefronts.",
610
+ "properties": {
611
+ "data": {
612
+ "type": "array",
613
+ "description": "The list of storefronts. This field can be empty.",
614
+ "items": {
615
+ "$ref": "#/components/schemas/Storefront"
616
+ }
617
+ }
618
+ },
619
+ "required": [
620
+ "data"
621
+ ]
622
+ },
623
+ "ErrorResponse": {
624
+ "type": "object",
625
+ "additionalProperties": true,
626
+ "properties": {
627
+ "title": {
628
+ "type": "string",
629
+ "description": "A short, human-readable summary of the problem\ntype. It will not change from occurrence to occurrence of the \nproblem, except for purposes of localization\n",
630
+ "example": "You do not have enough credit",
631
+ "maxLength": 256
632
+ },
633
+ "type": {
634
+ "type": "string",
635
+ "description": "A URI reference [RFC3986] that identifies the\nproblem type. This specification encourages that, when\ndereferenced, it provide human-readable documentation for the\nproblem type (e.g., using HTML [W3C.REC-html5-20141028]). When\nthis member is not present, its value is assumed to be\n\"about:blank\". It accepts relative URIs; this means\nthat they must be resolved relative to the document's base URI, as\nper [RFC3986], Section 5.\n",
636
+ "example": "NotEnoughMoney",
637
+ "maxLength": 2048
638
+ },
639
+ "detail": {
640
+ "type": "string",
641
+ "description": "A human-readable explanation specific to this occurrence of the problem.",
642
+ "example": "Your current balance is 30, but that costs 50"
643
+ },
644
+ "instance": {
645
+ "type": "string",
646
+ "description": "A URI reference that identifies the specific\noccurrence of the problem. It may or may not yield further\ninformation if dereferenced. It accepts relative URIs; this means\nthat they must be resolved relative to the document's base URI, as\nper [RFC3986], Section 5.\n",
647
+ "example": "/account/12345/msgs/abc",
648
+ "maxLength": 2048
649
+ }
650
+ },
651
+ "required": [
652
+ "detail",
653
+ "title",
654
+ "type"
655
+ ]
656
+ },
657
+ "StorefrontCreateType": {
658
+ "type": "string",
659
+ "description": "The type of storefront to create. Only `storefront_next` is currently supported by the create-new-storefront flow.",
660
+ "enum": [
661
+ "storefront_next"
662
+ ],
663
+ "example": "storefront_next"
664
+ },
665
+ "StorefrontCreateRequest": {
666
+ "type": "object",
667
+ "description": "Request body for creating a storefront.",
668
+ "properties": {
669
+ "storefrontName": {
670
+ "type": "string",
671
+ "description": "The name to assign to the new storefront. Must be unique within the organization.",
672
+ "example": "my-storefront",
673
+ "maxLength": 64,
674
+ "minLength": 1
675
+ },
676
+ "type": {
677
+ "$ref": "#/components/schemas/StorefrontCreateType"
678
+ },
679
+ "sites": {
680
+ "type": "array",
681
+ "description": "The IDs of existing sites to assign to the storefront. At least one site is required.",
682
+ "example": [
683
+ "RefArch"
684
+ ],
685
+ "items": {
686
+ "$ref": "#/components/schemas/SiteId"
687
+ },
688
+ "minItems": 1
689
+ }
690
+ },
691
+ "required": [
692
+ "sites",
693
+ "storefrontName",
694
+ "type"
695
+ ]
696
+ },
697
+ "InvalidStorefrontCreateRequestErrorResponse": {
698
+ "allOf": [
699
+ {
700
+ "$ref": "#/components/schemas/ErrorResponse"
701
+ }
702
+ ],
703
+ "description": "Returned when the storefront creation request body is malformed or missing required fields."
704
+ },
705
+ "StorefrontSiteNotFoundErrorResponse": {
706
+ "allOf": [
707
+ {
708
+ "$ref": "#/components/schemas/ErrorResponse"
709
+ }
710
+ ],
711
+ "description": "Returned when a site in the storefront creation request does not exist.",
712
+ "properties": {
713
+ "siteId": {
714
+ "type": "string",
715
+ "description": "The identifier of the site that couldn't be found.",
716
+ "example": "RefArch",
717
+ "maxLength": 32,
718
+ "minLength": 1
719
+ }
720
+ }
721
+ },
722
+ "StorefrontAlreadyExistsErrorResponse": {
723
+ "allOf": [
724
+ {
725
+ "$ref": "#/components/schemas/ErrorResponse"
726
+ }
727
+ ],
728
+ "description": "Returned when a storefront with the requested storefrontName already exists in the organization.",
729
+ "properties": {
730
+ "storefrontName": {
731
+ "type": "string",
732
+ "description": "The identifier that was already in use.",
733
+ "example": "my-storefront",
734
+ "maxLength": 64,
735
+ "minLength": 1
736
+ }
737
+ }
738
+ },
739
+ "StorefrontSiteCollisionErrorResponse": {
740
+ "allOf": [
741
+ {
742
+ "$ref": "#/components/schemas/ErrorResponse"
743
+ }
744
+ ],
745
+ "description": "Returned when a site in the request is already assigned to a different storefront. Only storefronts of type pwa_kit are exempt from this restriction.",
746
+ "properties": {
747
+ "siteId": {
748
+ "type": "string",
749
+ "description": "The identifier of the site that is already assigned elsewhere.",
750
+ "example": "RefArch",
751
+ "maxLength": 32,
752
+ "minLength": 1
753
+ }
754
+ }
755
+ },
756
+ "StorefrontNotFoundErrorResponse": {
757
+ "allOf": [
758
+ {
759
+ "$ref": "#/components/schemas/ErrorResponse"
760
+ }
761
+ ],
762
+ "description": "Returned when the requested storefront does not exist for this organization.",
763
+ "properties": {
764
+ "storefrontId": {
765
+ "type": "string",
766
+ "description": "The identifier of the storefront that couldn't be found.",
767
+ "example": "my-storefront-a1b2c3",
768
+ "maxLength": 20,
769
+ "minLength": 1,
770
+ "pattern": "^[a-z0-9]+(?:-+[a-z0-9]+)*$"
771
+ }
772
+ }
773
+ },
774
+ "StorefrontBusyErrorResponse": {
775
+ "allOf": [
776
+ {
777
+ "$ref": "#/components/schemas/ErrorResponse"
778
+ }
779
+ ],
780
+ "description": "Returned when a storefront deletion cannot proceed because a deletion of this storefront is already in progress. Retry once the in-progress deletion completes.",
781
+ "properties": {
782
+ "storefrontId": {
783
+ "type": "string",
784
+ "description": "The identifier of the storefront whose deletion was requested.",
785
+ "example": "my-storefront-a1b2c3",
786
+ "maxLength": 20,
787
+ "minLength": 1,
788
+ "pattern": "^[a-z0-9]+(?:-+[a-z0-9]+)*$"
789
+ }
790
+ }
791
+ },
792
+ "StorefrontUpdateRequest": {
793
+ "type": "object",
794
+ "description": "Request body for updating a storefront. Every field is optional and only the supplied fields are changed. When `sites` is provided it is a complete replacement of the storefront's site assignment, not an incremental update—supply the full set of site IDs.",
795
+ "properties": {
796
+ "sites": {
797
+ "type": "array",
798
+ "description": "The complete set of site IDs assigned to the storefront, replacing any previous assignment. When provided, at least one site is required.",
799
+ "example": [
800
+ "RefArch"
801
+ ],
802
+ "items": {
803
+ "$ref": "#/components/schemas/SiteId"
804
+ },
805
+ "minItems": 1
806
+ },
807
+ "ssrRegion": {
808
+ "$ref": "#/components/schemas/SsrRegion"
809
+ },
810
+ "ssrArchitecture": {
811
+ "type": "string",
812
+ "description": "The default architecture for the server-side rendering function of environments newly created under this storefront. Set to null to clear the architecture default.",
813
+ "enum": [
814
+ "x86",
815
+ "arm64"
816
+ ],
817
+ "example": "arm64"
818
+ },
819
+ "allowCookies": {
820
+ "type": "boolean",
821
+ "description": "Whether cookies are allowed for the storefront. Cannot be modified for Storefront Next storefronts, where cookies are always enabled.",
822
+ "example": true
823
+ },
824
+ "preserveProxyUserAgent": {
825
+ "type": "boolean",
826
+ "description": "Whether the end-user's User-Agent header is preserved on requests forwarded through the storefront's configured proxies.",
827
+ "example": false
828
+ }
829
+ }
830
+ },
831
+ "InvalidStorefrontUpdateRequestErrorResponse": {
832
+ "allOf": [
833
+ {
834
+ "$ref": "#/components/schemas/ErrorResponse"
835
+ }
836
+ ],
837
+ "description": "Returned when the storefront update request body is malformed, contains an unsupported value (for example an invalid ssrRegion or ssrArchitecture), or supplies an empty sites list."
838
+ },
839
+ "StorefrontSsrRegionDisabledErrorResponse": {
840
+ "allOf": [
841
+ {
842
+ "$ref": "#/components/schemas/ErrorResponse"
843
+ }
844
+ ],
845
+ "description": "Returned when the requested ssrRegion is in the temporarily disabled set.",
846
+ "properties": {
847
+ "ssrRegion": {
848
+ "type": "string",
849
+ "description": "The identifier of the SSR region that is temporarily disabled.",
850
+ "example": "eu_south_1",
851
+ "maxLength": 32
852
+ }
853
+ }
854
+ },
855
+ "StorefrontSsrArchitectureNotEnabledErrorResponse": {
856
+ "allOf": [
857
+ {
858
+ "$ref": "#/components/schemas/ErrorResponse"
859
+ }
860
+ ],
861
+ "description": "Returned when the x86 ssrArchitecture is requested but the organization is not permitted to configure the SSR architecture."
862
+ },
863
+ "StorefrontSsrArchitectureX86EndOfLifeErrorResponse": {
864
+ "allOf": [
865
+ {
866
+ "$ref": "#/components/schemas/ErrorResponse"
867
+ }
868
+ ],
869
+ "description": "Returned when the x86 ssrArchitecture is requested after its end-of-life date and the organization has no active grace period."
870
+ },
871
+ "StorefrontAllowCookiesBlockedErrorResponse": {
872
+ "allOf": [
873
+ {
874
+ "$ref": "#/components/schemas/ErrorResponse"
875
+ }
876
+ ],
877
+ "description": "Returned when allowCookies is changed on a Storefront Next storefront, where cookies are always enabled."
878
+ },
879
+ "StorefrontInvalidStateForUpdateErrorResponse": {
880
+ "allOf": [
881
+ {
882
+ "$ref": "#/components/schemas/ErrorResponse"
883
+ }
884
+ ],
885
+ "description": "Returned when a site-assignment update is requested for a storefront whose setupStatus is not success.",
886
+ "properties": {
887
+ "storefrontId": {
888
+ "type": "string",
889
+ "description": "The identifier of the storefront that cannot be updated.",
890
+ "example": "my-storefront-a1b2c3",
891
+ "maxLength": 20,
892
+ "minLength": 1,
893
+ "pattern": "^[a-z0-9]+(?:-+[a-z0-9]+)*$"
894
+ },
895
+ "setupStatus": {
896
+ "type": "string",
897
+ "description": "The storefront's current setup status, which is not success.",
898
+ "enum": [
899
+ "in_progress",
900
+ "backfilled",
901
+ "failed",
902
+ "delete_in_progress",
903
+ "delete_failed",
904
+ "deleted",
905
+ "unknown"
906
+ ],
907
+ "example": "in_progress"
908
+ }
909
+ }
910
+ }
911
+ },
912
+ "responses": {
913
+ "401unauthorized": {
914
+ "description": "Your access token is invalid or expired and can’t be used to identify a user.",
915
+ "content": {
916
+ "application/problem+json": {
917
+ "schema": {
918
+ "$ref": "#/components/schemas/ErrorResponse"
919
+ },
920
+ "examples": {
921
+ "UnauthorizedExample": {
922
+ "$ref": "#/components/examples/UnauthorizedExample"
923
+ }
924
+ }
925
+ }
926
+ }
927
+ },
928
+ "403forbidden": {
929
+ "description": "Forbidden. Your access token is valid, but you don’t have the required permissions to access the resource.",
930
+ "content": {
931
+ "application/problem+json": {
932
+ "schema": {
933
+ "$ref": "#/components/schemas/ErrorResponse"
934
+ },
935
+ "examples": {
936
+ "ForbiddenExample": {
937
+ "$ref": "#/components/examples/ForbiddenExample"
938
+ }
939
+ }
940
+ }
941
+ }
942
+ },
943
+ "400BadRequest_CreateStorefront": {
944
+ "description": "Bad Request. The storefront creation request body is invalid.",
945
+ "content": {
946
+ "application/problem+json": {
947
+ "schema": {
948
+ "oneOf": [
949
+ {
950
+ "$ref": "#/components/schemas/InvalidStorefrontCreateRequestErrorResponse"
951
+ },
952
+ {
953
+ "$ref": "#/components/schemas/StorefrontSiteNotFoundErrorResponse"
954
+ }
955
+ ]
956
+ },
957
+ "examples": {
958
+ "InvalidStorefrontCreateRequestErrorResponseExample": {
959
+ "$ref": "#/components/examples/InvalidStorefrontCreateRequestErrorResponseExample"
960
+ },
961
+ "StorefrontSiteNotFoundErrorResponseExample": {
962
+ "$ref": "#/components/examples/StorefrontSiteNotFoundErrorResponseExample"
963
+ }
964
+ }
965
+ }
966
+ }
967
+ },
968
+ "409Conflict_CreateStorefront": {
969
+ "description": "We couldn't create the storefront due to a conflict.",
970
+ "content": {
971
+ "application/problem+json": {
972
+ "schema": {
973
+ "oneOf": [
974
+ {
975
+ "$ref": "#/components/schemas/StorefrontAlreadyExistsErrorResponse"
976
+ },
977
+ {
978
+ "$ref": "#/components/schemas/StorefrontSiteCollisionErrorResponse"
979
+ }
980
+ ]
981
+ },
982
+ "examples": {
983
+ "StorefrontAlreadyExistsErrorResponseExample": {
984
+ "$ref": "#/components/examples/StorefrontAlreadyExistsErrorResponseExample"
985
+ },
986
+ "StorefrontSiteCollisionErrorResponseExample": {
987
+ "$ref": "#/components/examples/StorefrontSiteCollisionErrorResponseExample"
988
+ }
989
+ }
990
+ }
991
+ }
992
+ },
993
+ "404NotFound_Storefront": {
994
+ "description": "We couldn't find the requested storefront.",
995
+ "content": {
996
+ "application/problem+json": {
997
+ "schema": {
998
+ "$ref": "#/components/schemas/StorefrontNotFoundErrorResponse"
999
+ },
1000
+ "examples": {
1001
+ "StorefrontNotFoundErrorResponseExample": {
1002
+ "$ref": "#/components/examples/StorefrontNotFoundErrorResponseExample"
1003
+ }
1004
+ }
1005
+ }
1006
+ }
1007
+ },
1008
+ "409Conflict_DeleteStorefront": {
1009
+ "description": "We couldn't delete the storefront because a deletion of this storefront is already in progress.",
1010
+ "content": {
1011
+ "application/problem+json": {
1012
+ "schema": {
1013
+ "$ref": "#/components/schemas/StorefrontBusyErrorResponse"
1014
+ },
1015
+ "examples": {
1016
+ "StorefrontBusyErrorResponseExample": {
1017
+ "$ref": "#/components/examples/StorefrontBusyErrorResponseExample"
1018
+ }
1019
+ }
1020
+ }
1021
+ }
1022
+ },
1023
+ "400BadRequest_UpdateStorefront": {
1024
+ "description": "Bad Request. The storefront update request body is invalid.",
1025
+ "content": {
1026
+ "application/problem+json": {
1027
+ "schema": {
1028
+ "oneOf": [
1029
+ {
1030
+ "$ref": "#/components/schemas/InvalidStorefrontUpdateRequestErrorResponse"
1031
+ },
1032
+ {
1033
+ "$ref": "#/components/schemas/StorefrontSsrRegionDisabledErrorResponse"
1034
+ },
1035
+ {
1036
+ "$ref": "#/components/schemas/StorefrontSsrArchitectureNotEnabledErrorResponse"
1037
+ },
1038
+ {
1039
+ "$ref": "#/components/schemas/StorefrontSsrArchitectureX86EndOfLifeErrorResponse"
1040
+ }
1041
+ ]
1042
+ },
1043
+ "examples": {
1044
+ "InvalidStorefrontUpdateRequestErrorResponseExample": {
1045
+ "$ref": "#/components/examples/InvalidStorefrontUpdateRequestErrorResponseExample"
1046
+ },
1047
+ "StorefrontSsrRegionDisabledErrorResponseExample": {
1048
+ "$ref": "#/components/examples/StorefrontSsrRegionDisabledErrorResponseExample"
1049
+ },
1050
+ "StorefrontSsrArchitectureNotEnabledErrorResponseExample": {
1051
+ "$ref": "#/components/examples/StorefrontSsrArchitectureNotEnabledErrorResponseExample"
1052
+ },
1053
+ "StorefrontSsrArchitectureX86EndOfLifeErrorResponseExample": {
1054
+ "$ref": "#/components/examples/StorefrontSsrArchitectureX86EndOfLifeErrorResponseExample"
1055
+ }
1056
+ }
1057
+ }
1058
+ }
1059
+ },
1060
+ "403Forbidden_UpdateStorefront": {
1061
+ "description": "Forbidden. The requested storefront update is not permitted.",
1062
+ "content": {
1063
+ "application/problem+json": {
1064
+ "schema": {
1065
+ "$ref": "#/components/schemas/StorefrontAllowCookiesBlockedErrorResponse"
1066
+ },
1067
+ "examples": {
1068
+ "StorefrontAllowCookiesBlockedErrorResponseExample": {
1069
+ "$ref": "#/components/examples/StorefrontAllowCookiesBlockedErrorResponseExample"
1070
+ }
1071
+ }
1072
+ }
1073
+ }
1074
+ },
1075
+ "409Conflict_UpdateStorefront": {
1076
+ "description": "We couldn't update the storefront's site assignment due to a conflict.",
1077
+ "content": {
1078
+ "application/problem+json": {
1079
+ "schema": {
1080
+ "oneOf": [
1081
+ {
1082
+ "$ref": "#/components/schemas/StorefrontSiteCollisionErrorResponse"
1083
+ },
1084
+ {
1085
+ "$ref": "#/components/schemas/StorefrontInvalidStateForUpdateErrorResponse"
1086
+ }
1087
+ ]
1088
+ },
1089
+ "examples": {
1090
+ "StorefrontSiteCollisionErrorResponseExample": {
1091
+ "$ref": "#/components/examples/StorefrontSiteCollisionErrorResponseExample"
1092
+ },
1093
+ "StorefrontInvalidStateForUpdateErrorResponseExample": {
1094
+ "$ref": "#/components/examples/StorefrontInvalidStateForUpdateErrorResponseExample"
1095
+ }
1096
+ }
1097
+ }
1098
+ }
1099
+ }
1100
+ },
1101
+ "parameters": {
1102
+ "organizationId": {
1103
+ "name": "organizationId",
1104
+ "in": "path",
1105
+ "description": "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).",
1106
+ "required": true,
1107
+ "style": "simple",
1108
+ "explode": false,
1109
+ "schema": {
1110
+ "$ref": "#/components/schemas/OrganizationId"
1111
+ },
1112
+ "example": "f_ecom_zzxy_prd"
1113
+ },
1114
+ "storefrontId": {
1115
+ "name": "storefrontId",
1116
+ "in": "path",
1117
+ "description": "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.",
1118
+ "required": true,
1119
+ "style": "simple",
1120
+ "explode": false,
1121
+ "schema": {
1122
+ "type": "string",
1123
+ "example": "my-storefront-a1b2c3",
1124
+ "maxLength": 20,
1125
+ "minLength": 1,
1126
+ "pattern": "^[a-z0-9]+(?:-+[a-z0-9]+)*$"
1127
+ }
1128
+ }
1129
+ },
1130
+ "examples": {
1131
+ "StorefrontListSuccess": {
1132
+ "summary": "Successful storefront list result",
1133
+ "description": "Example of a successful response returning the list of storefronts for an organization.",
1134
+ "value": {
1135
+ "limit": 25,
1136
+ "offset": 0,
1137
+ "total": 2,
1138
+ "data": [
1139
+ {
1140
+ "storefrontId": "market-street-a1b2c3",
1141
+ "storefrontName": "MarketStreet",
1142
+ "type": "storefront_next",
1143
+ "setupStatus": "success",
1144
+ "sites": [
1145
+ "MarketStreet"
1146
+ ],
1147
+ "creationDate": "2026-04-08T21:47:28.188965Z",
1148
+ "lastModified": "2026-04-08T21:47:31.307595Z"
1149
+ },
1150
+ {
1151
+ "storefrontId": "beauty-street-d4e5f6",
1152
+ "storefrontName": "BeautyStreet",
1153
+ "type": "pwa_kit",
1154
+ "setupStatus": "in_progress",
1155
+ "sites": [
1156
+ "BeautyStreet"
1157
+ ],
1158
+ "creationDate": "2026-04-09T10:12:00.000000Z",
1159
+ "lastModified": "2026-04-09T10:12:00.000000Z"
1160
+ }
1161
+ ]
1162
+ }
1163
+ },
1164
+ "UnauthorizedExample": {
1165
+ "value": {
1166
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
1167
+ "title": "Unauthorized",
1168
+ "detail": "Unauthorized request"
1169
+ }
1170
+ },
1171
+ "ForbiddenExample": {
1172
+ "value": {
1173
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
1174
+ "title": "Forbidden",
1175
+ "detail": "Access to requested resource forbidden"
1176
+ }
1177
+ },
1178
+ "CreateStorefront": {
1179
+ "summary": "Create a storefront",
1180
+ "description": "Create a storefront with an initial site assignment.",
1181
+ "value": {
1182
+ "storefrontName": "MarketStreet",
1183
+ "type": "storefront_next",
1184
+ "sites": [
1185
+ "MarketStreet"
1186
+ ]
1187
+ }
1188
+ },
1189
+ "StorefrontCreatedSuccess": {
1190
+ "summary": "Successful storefront creation",
1191
+ "description": "Example of a successful response when a new storefront is queued for creation (202 Accepted).",
1192
+ "value": {
1193
+ "storefrontId": "market-street-a1b2c3",
1194
+ "storefrontName": "MarketStreet",
1195
+ "type": "storefront_next",
1196
+ "setupStatus": "in_progress",
1197
+ "sites": [
1198
+ "MarketStreet"
1199
+ ],
1200
+ "creationDate": "2026-04-08T21:47:28.188965Z",
1201
+ "lastModified": "2026-04-08T21:47:28.188965Z"
1202
+ }
1203
+ },
1204
+ "StorefrontSuccess": {
1205
+ "summary": "Successful storefront retrieval",
1206
+ "description": "Example of a successful response returning a single storefront.",
1207
+ "value": {
1208
+ "storefrontId": "market-street-a1b2c3",
1209
+ "storefrontName": "MarketStreet",
1210
+ "type": "storefront_next",
1211
+ "setupStatus": "success",
1212
+ "sites": [
1213
+ "MarketStreet"
1214
+ ],
1215
+ "creationDate": "2026-04-08T21:47:28.188965Z",
1216
+ "lastModified": "2026-04-08T21:47:31.307595Z"
1217
+ }
1218
+ },
1219
+ "StorefrontDeleteAcceptedSuccess": {
1220
+ "summary": "Successful storefront deletion request",
1221
+ "description": "Example of a successful response when a storefront is queued for deletion (202 Accepted).",
1222
+ "value": {
1223
+ "storefrontId": "market-street-a1b2c3",
1224
+ "storefrontName": "MarketStreet",
1225
+ "type": "storefront_next",
1226
+ "setupStatus": "delete_in_progress",
1227
+ "sites": [
1228
+ "MarketStreet"
1229
+ ],
1230
+ "creationDate": "2026-04-08T21:47:28.188965Z",
1231
+ "lastModified": "2026-04-09T09:30:00.000000Z"
1232
+ }
1233
+ },
1234
+ "UpdateStorefront": {
1235
+ "summary": "Replace a storefront's site assignment",
1236
+ "description": "Replace the full set of sites assigned to a storefront.",
1237
+ "value": {
1238
+ "sites": [
1239
+ "MarketStreet",
1240
+ "BeautyStreet"
1241
+ ]
1242
+ }
1243
+ },
1244
+ "UpdateStorefrontConfiguration": {
1245
+ "summary": "Update a storefront's default configuration",
1246
+ "description": "Update the storefront's default SSR and proxy configuration without changing its site assignment. Every field is optional.",
1247
+ "value": {
1248
+ "ssrRegion": "us_east_2",
1249
+ "ssrArchitecture": "arm64",
1250
+ "allowCookies": true,
1251
+ "preserveProxyUserAgent": false
1252
+ }
1253
+ },
1254
+ "StorefrontUpdatedSuccess": {
1255
+ "summary": "Successful storefront site-assignment update",
1256
+ "description": "Example of a successful response after replacing a storefront's site assignment.",
1257
+ "value": {
1258
+ "storefrontId": "market-street-a1b2c3",
1259
+ "storefrontName": "MarketStreet",
1260
+ "type": "storefront_next",
1261
+ "setupStatus": "success",
1262
+ "sites": [
1263
+ "MarketStreet",
1264
+ "BeautyStreet"
1265
+ ],
1266
+ "creationDate": "2026-04-08T21:47:28.188965Z",
1267
+ "lastModified": "2026-04-09T09:00:00.000000Z"
1268
+ }
1269
+ },
1270
+ "InvalidStorefrontCreateRequestErrorResponseExample": {
1271
+ "value": {
1272
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-storefront-create-request",
1273
+ "detail": "The storefront creation request body is invalid. A valid storefrontName, type, and sites are required.",
1274
+ "title": "Invalid Storefront Create Request"
1275
+ }
1276
+ },
1277
+ "StorefrontSiteNotFoundErrorResponseExample": {
1278
+ "value": {
1279
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/storefront-site-not-found",
1280
+ "detail": "We couldn't find site RefArch.",
1281
+ "title": "Storefront Site Not Found"
1282
+ }
1283
+ },
1284
+ "StorefrontAlreadyExistsErrorResponseExample": {
1285
+ "value": {
1286
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/storefront-already-exists",
1287
+ "detail": "A storefront with ID 'my-storefront' already exists.",
1288
+ "title": "Storefront Already Exists"
1289
+ }
1290
+ },
1291
+ "StorefrontSiteCollisionErrorResponseExample": {
1292
+ "value": {
1293
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/storefront-site-collision",
1294
+ "detail": "Site 'RefArch' is already assigned to another storefront.",
1295
+ "title": "Storefront Site Collision"
1296
+ }
1297
+ },
1298
+ "StorefrontNotFoundErrorResponseExample": {
1299
+ "value": {
1300
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/storefront-not-found",
1301
+ "detail": "We couldn't find storefront my-storefront-a1b2c3.",
1302
+ "title": "Storefront Not Found"
1303
+ }
1304
+ },
1305
+ "StorefrontBusyErrorResponseExample": {
1306
+ "value": {
1307
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/storefront-busy",
1308
+ "detail": "There is an ongoing deletion for storefront 'my-storefront-a1b2c3'.",
1309
+ "title": "Storefront Busy"
1310
+ }
1311
+ },
1312
+ "InvalidStorefrontUpdateRequestErrorResponseExample": {
1313
+ "value": {
1314
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-storefront-update-request",
1315
+ "detail": "The storefront update request body is invalid.",
1316
+ "title": "Invalid Storefront Update Request"
1317
+ }
1318
+ },
1319
+ "StorefrontSsrRegionDisabledErrorResponseExample": {
1320
+ "value": {
1321
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/storefront-ssr-region-disabled",
1322
+ "detail": "SSR region 'eu_south_1' is temporarily disabled. Choose a different region.",
1323
+ "title": "Storefront Ssr Region Disabled"
1324
+ }
1325
+ },
1326
+ "StorefrontSsrArchitectureNotEnabledErrorResponseExample": {
1327
+ "value": {
1328
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/storefront-ssr-architecture-not-enabled",
1329
+ "detail": "The Server-Side Rendering architecture configuration isn't enabled for this organization.",
1330
+ "title": "Storefront Ssr Architecture Not Enabled"
1331
+ }
1332
+ },
1333
+ "StorefrontSsrArchitectureX86EndOfLifeErrorResponseExample": {
1334
+ "value": {
1335
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/storefront-ssr-architecture-x86-end-of-life",
1336
+ "detail": "x86 is past end-of-life and can no longer be selected. Use arm64.",
1337
+ "title": "Storefront Ssr Architecture X86 End Of Life"
1338
+ }
1339
+ },
1340
+ "StorefrontAllowCookiesBlockedErrorResponseExample": {
1341
+ "value": {
1342
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/storefront-allow-cookies-blocked",
1343
+ "detail": "You can't modify Allow Cookies for Storefront Next. Cookies are always enabled.",
1344
+ "title": "Storefront Allow Cookies Blocked"
1345
+ }
1346
+ },
1347
+ "StorefrontInvalidStateForUpdateErrorResponseExample": {
1348
+ "value": {
1349
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/storefront-invalid-state-for-update",
1350
+ "detail": "Storefront 'my-storefront-a1b2c3' can't be updated while its setup status is 'in_progress'.",
1351
+ "title": "Storefront Invalid State For Update"
1352
+ }
1353
+ }
1354
+ },
1355
+ "securitySchemes": {
1356
+ "AmOAuth2": {
1357
+ "type": "oauth2",
1358
+ "description": "AccountManager OAuth 2.0 bearer token Authentication.",
1359
+ "flows": {
1360
+ "clientCredentials": {
1361
+ "tokenUrl": "https://account.demandware.com/dwsso/oauth2/access_token",
1362
+ "scopes": {
1363
+ "sfcc.storefront.storefronts": "Read-only access to the Storefronts API.",
1364
+ "sfcc.storefront.storefronts.rw": "Read and write access to the Storefronts API."
1365
+ }
1366
+ }
1367
+ }
1368
+ }
1369
+ }
1370
+ }
1371
+ }