@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
@@ -2,7 +2,8 @@
2
2
  "openapi": "3.0.3",
3
3
  "info": {
4
4
  "title": "Consents",
5
- "version": "1.1.4",
5
+ "description": "[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/consents/consents-oas-v1-public.yaml)\n\n# API Overview\n\nUse the Consents Admin API to manage customer consent subscription preferences for marketing communications across multiple channels. This API provides complete CRUD (Create, Read, Update, Delete) operations for subscription management, with support for rich text markup in subscription titles and subtitles.\n\n## Authentication & Authorization\n\nFor resource access, you must use a client ID and client secret from Account Manager to request an access token. The access token is used as a bearer token and added to the Authorization header of your API request.\n\nYou must include one of the following OAuth scopes in the client ID used to generate the token:\n\n- `sfcc.consents`: Required for reading subscription data (GET operations)\n- `sfcc.consents.rw`: Required for creating, updating, and deleting subscription data (POST, PUT, PATCH, DELETE operations)\n\nFor a full list of permissions, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html)\n\nFor detailed setup instructions, see the [Authorization for Admin APIs guide. ](https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-admin-apis.html)\n\n## Data Model\n\n### Subscriptions\nSubscriptions represent a customer's consent to receive specific types of marketing communications. Each subscription includes:\n\n- Identifier: \n - `subscriptionId`: Descriptive identifier following kebab-case format (1-255 characters, pattern: `^[a-z0-9]+(?:-[a-z0-9]+)*$`)\n - `siteId`: Commerce Cloud site identifier for multi-site organizations\n- Display Information: Rich text content with localization and HTML markup support\n - `title`: Localized subscription titles with markup support (required for creation)\n - `subtitle`: Optional localized subscription subtitles with markup support\n- Consent Configuration:\n - `channels`: Array of supported communication methods (required, 1-10 items)\n - `tags`: Configurable filter tags for subscription categorization (0-10 items, defaults to empty array)\n - `consentType`: Type classification (`marketing` or `legal`, defaults to `marketing`)\n - `consentRequired`: Whether the subscription is mandatory (defaults to `false`)\n - `defaultStatus`: Default consent state (`opt_in` or `opt_out`, defaults to `opt_out`)\n - `enabled`: Whether the subscription is currently active (defaults to `true`) - defined as reusable `Enabled` schema component\n- System Integration: \n - `umaSubscriptionId`: Salesforce UMA CommSubscription object ID (15-18 characters)\n\n### Channels\nChannels define the communication methods available for a subscription:\n- `email`: Email communications\n- `sms`: SMS/text messages\n- `whatsapp`: WhatsApp\n\n### Tags\nTags can be used to filter the subscriptions for various uses. Provided tags include:\n- `homepage_banner`: Main website homepage\n- `registration`: Customer registration process\n- `checkout`: During the checkout process\n- `user_profile`: User profile management area\n\n## Response Details\n\n### Timeouts\n\nAdmin API requests must respond within 60 seconds. If a response exceeds this threshold, an HTTP 504 status code is returned. For details, see [Timeouts and Limits.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/timeouts-limits.html)\n\n### Error Handling\n\nError responses follow the [RFC 7807](https://datatracker.ietf.org/doc/html/rfc7807) problem detail format. To trace errors, include a `correlation-id` header in your request — the response returns it as `x-correlation-id`. For details, see [HTTP Status Codes and Errors.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/error-response-codes.html)",
6
+ "version": "1.1.5",
6
7
  "x-api-type": "Admin",
7
8
  "x-api-family": "Shopper"
8
9
  },
@@ -11,6 +12,7 @@
11
12
  "url": "https://{shortCode}.api.commercecloud.salesforce.com/shopper/consents/v1",
12
13
  "variables": {
13
14
  "shortCode": {
15
+ "description": "An eight-character string assigned to a realm for routing purposes. See [Base URL and Request Formation.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html)",
14
16
  "default": "shortCode"
15
17
  }
16
18
  }
@@ -19,26 +21,36 @@
19
21
  "paths": {
20
22
  "/organizations/{organizationId}/subscriptions": {
21
23
  "get": {
24
+ "summary": "Get all subscriptions",
25
+ "description": "Retrieve all current subscriptions for the specified organization and site.",
22
26
  "operationId": "getSubscriptions",
23
27
  "parameters": [
24
28
  {
25
29
  "name": "organizationId",
26
30
  "in": "path",
31
+ "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).",
27
32
  "required": true,
28
33
  "style": "simple",
29
34
  "explode": false,
30
35
  "schema": {
31
36
  "$ref": "#/components/schemas/OrganizationId"
32
- }
37
+ },
38
+ "example": "f_ecom_zzxy_prd"
33
39
  },
34
40
  {
35
41
  "name": "siteId",
36
42
  "in": "query",
43
+ "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.",
37
44
  "required": true,
38
45
  "style": "form",
39
46
  "explode": true,
40
47
  "schema": {
41
48
  "$ref": "#/components/schemas/SiteId"
49
+ },
50
+ "examples": {
51
+ "SiteId": {
52
+ "value": "RefArch"
53
+ }
42
54
  }
43
55
  }
44
56
  ],
@@ -49,6 +61,11 @@
49
61
  "application/json": {
50
62
  "schema": {
51
63
  "$ref": "#/components/schemas/SubscriptionsResponse"
64
+ },
65
+ "examples": {
66
+ "GetSubscriptionsResponse": {
67
+ "$ref": "#/components/examples/GetSubscriptionsResponse"
68
+ }
52
69
  }
53
70
  }
54
71
  }
@@ -59,6 +76,11 @@
59
76
  "application/problem+json": {
60
77
  "schema": {
61
78
  "$ref": "#/components/schemas/ErrorResponse"
79
+ },
80
+ "examples": {
81
+ "ConsentsFeatureNotEnabled": {
82
+ "$ref": "#/components/examples/ConsentsFeatureNotEnabled"
83
+ }
62
84
  }
63
85
  }
64
86
  }
@@ -75,31 +97,42 @@
75
97
  },
76
98
  "/organizations/{organizationId}/subscriptions/{subscriptionId}": {
77
99
  "put": {
100
+ "summary": "Create subscription",
101
+ "description": "Create a new subscription for the specified organization.",
78
102
  "operationId": "createSubscription",
79
103
  "parameters": [
80
104
  {
81
105
  "name": "organizationId",
82
106
  "in": "path",
107
+ "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).",
83
108
  "required": true,
84
109
  "style": "simple",
85
110
  "explode": false,
86
111
  "schema": {
87
112
  "$ref": "#/components/schemas/OrganizationId"
88
- }
113
+ },
114
+ "example": "f_ecom_zzxy_prd"
89
115
  },
90
116
  {
91
117
  "name": "siteId",
92
118
  "in": "query",
119
+ "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.",
93
120
  "required": true,
94
121
  "style": "form",
95
122
  "explode": true,
96
123
  "schema": {
97
124
  "$ref": "#/components/schemas/SiteId"
125
+ },
126
+ "examples": {
127
+ "SiteId": {
128
+ "value": "RefArch"
129
+ }
98
130
  }
99
131
  },
100
132
  {
101
133
  "name": "subscriptionId",
102
134
  "in": "path",
135
+ "description": "The unique identifier of the subscription",
103
136
  "required": true,
104
137
  "style": "simple",
105
138
  "explode": false,
@@ -113,6 +146,11 @@
113
146
  "application/json": {
114
147
  "schema": {
115
148
  "$ref": "#/components/schemas/SubscriptionPutRequest"
149
+ },
150
+ "examples": {
151
+ "PutSubscriptionRequest": {
152
+ "$ref": "#/components/examples/PutSubscriptionRequest"
153
+ }
116
154
  }
117
155
  }
118
156
  },
@@ -125,6 +163,11 @@
125
163
  "application/json": {
126
164
  "schema": {
127
165
  "$ref": "#/components/schemas/Subscription"
166
+ },
167
+ "examples": {
168
+ "PutSubscriptionResponse": {
169
+ "$ref": "#/components/examples/PutSubscriptionResponse"
170
+ }
128
171
  }
129
172
  }
130
173
  }
@@ -135,6 +178,20 @@
135
178
  "application/problem+json": {
136
179
  "schema": {
137
180
  "$ref": "#/components/schemas/ErrorResponse"
181
+ },
182
+ "examples": {
183
+ "ConsentsFeatureNotEnabled": {
184
+ "$ref": "#/components/examples/ConsentsFeatureNotEnabled"
185
+ },
186
+ "SubscriptionCreationValidationError": {
187
+ "$ref": "#/components/examples/SubscriptionCreationValidationError"
188
+ },
189
+ "SubscriptionIdMismatchError": {
190
+ "$ref": "#/components/examples/SubscriptionIdMismatchError"
191
+ },
192
+ "SiteIdMismatchError": {
193
+ "$ref": "#/components/examples/SiteIdMismatchError"
194
+ }
138
195
  }
139
196
  }
140
197
  }
@@ -145,6 +202,11 @@
145
202
  "application/problem+json": {
146
203
  "schema": {
147
204
  "$ref": "#/components/schemas/ErrorResponse"
205
+ },
206
+ "examples": {
207
+ "SubscriptionAlreadyExists": {
208
+ "$ref": "#/components/examples/SubscriptionAlreadyExists"
209
+ }
148
210
  }
149
211
  }
150
212
  }
@@ -159,31 +221,42 @@
159
221
  ]
160
222
  },
161
223
  "delete": {
224
+ "summary": "Delete subscription",
225
+ "description": "Delete an existing subscription for the specified organization.",
162
226
  "operationId": "deleteSubscription",
163
227
  "parameters": [
164
228
  {
165
229
  "name": "organizationId",
166
230
  "in": "path",
231
+ "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).",
167
232
  "required": true,
168
233
  "style": "simple",
169
234
  "explode": false,
170
235
  "schema": {
171
236
  "$ref": "#/components/schemas/OrganizationId"
172
- }
237
+ },
238
+ "example": "f_ecom_zzxy_prd"
173
239
  },
174
240
  {
175
241
  "name": "siteId",
176
242
  "in": "query",
243
+ "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.",
177
244
  "required": true,
178
245
  "style": "form",
179
246
  "explode": true,
180
247
  "schema": {
181
248
  "$ref": "#/components/schemas/SiteId"
249
+ },
250
+ "examples": {
251
+ "SiteId": {
252
+ "value": "RefArch"
253
+ }
182
254
  }
183
255
  },
184
256
  {
185
257
  "name": "subscriptionId",
186
258
  "in": "path",
259
+ "description": "The unique identifier of the subscription",
187
260
  "required": true,
188
261
  "style": "simple",
189
262
  "explode": false,
@@ -202,6 +275,11 @@
202
275
  "application/problem+json": {
203
276
  "schema": {
204
277
  "$ref": "#/components/schemas/ErrorResponse"
278
+ },
279
+ "examples": {
280
+ "ConsentsFeatureNotEnabled": {
281
+ "$ref": "#/components/examples/ConsentsFeatureNotEnabled"
282
+ }
205
283
  }
206
284
  }
207
285
  }
@@ -216,31 +294,42 @@
216
294
  ]
217
295
  },
218
296
  "patch": {
297
+ "summary": "Update subscription",
298
+ "description": "Update an existing subscription for the specified organization.",
219
299
  "operationId": "updateSubscription",
220
300
  "parameters": [
221
301
  {
222
302
  "name": "organizationId",
223
303
  "in": "path",
304
+ "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).",
224
305
  "required": true,
225
306
  "style": "simple",
226
307
  "explode": false,
227
308
  "schema": {
228
309
  "$ref": "#/components/schemas/OrganizationId"
229
- }
310
+ },
311
+ "example": "f_ecom_zzxy_prd"
230
312
  },
231
313
  {
232
314
  "name": "siteId",
233
315
  "in": "query",
316
+ "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.",
234
317
  "required": true,
235
318
  "style": "form",
236
319
  "explode": true,
237
320
  "schema": {
238
321
  "$ref": "#/components/schemas/SiteId"
322
+ },
323
+ "examples": {
324
+ "SiteId": {
325
+ "value": "RefArch"
326
+ }
239
327
  }
240
328
  },
241
329
  {
242
330
  "name": "subscriptionId",
243
331
  "in": "path",
332
+ "description": "The unique identifier of the subscription",
244
333
  "required": true,
245
334
  "style": "simple",
246
335
  "explode": false,
@@ -254,6 +343,11 @@
254
343
  "application/json": {
255
344
  "schema": {
256
345
  "$ref": "#/components/schemas/SubscriptionPatchRequest"
346
+ },
347
+ "examples": {
348
+ "PatchSubscriptionRequest": {
349
+ "$ref": "#/components/examples/PatchSubscriptionRequest"
350
+ }
257
351
  }
258
352
  }
259
353
  },
@@ -266,6 +360,11 @@
266
360
  "application/json": {
267
361
  "schema": {
268
362
  "$ref": "#/components/schemas/Subscription"
363
+ },
364
+ "examples": {
365
+ "PatchSubscriptionResponse": {
366
+ "$ref": "#/components/examples/PatchSubscriptionResponse"
367
+ }
269
368
  }
270
369
  }
271
370
  }
@@ -276,6 +375,20 @@
276
375
  "application/problem+json": {
277
376
  "schema": {
278
377
  "$ref": "#/components/schemas/ErrorResponse"
378
+ },
379
+ "examples": {
380
+ "ConsentsFeatureNotEnabled": {
381
+ "$ref": "#/components/examples/ConsentsFeatureNotEnabled"
382
+ },
383
+ "SubscriptionUpdateValidationError": {
384
+ "$ref": "#/components/examples/SubscriptionUpdateValidationError"
385
+ },
386
+ "SubscriptionIdMismatchError": {
387
+ "$ref": "#/components/examples/SubscriptionIdMismatchError"
388
+ },
389
+ "SiteIdMismatchError": {
390
+ "$ref": "#/components/examples/SiteIdMismatchError"
391
+ }
279
392
  }
280
393
  }
281
394
  }
@@ -295,16 +408,21 @@
295
408
  "schemas": {
296
409
  "OrganizationId": {
297
410
  "type": "string",
298
- "maxLength": 32,
299
- "minLength": 1
411
+ "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).",
412
+ "example": "f_ecom_zzxy_prd",
413
+ "pattern": "^f_ecom_[a-z]{4}_(prd|stg|dev|s[0-9]{2}|[0-9]{3})$"
300
414
  },
301
415
  "SiteId": {
302
416
  "type": "string",
417
+ "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",
418
+ "example": "RefArch",
303
419
  "maxLength": 32,
304
420
  "minLength": 1
305
421
  },
306
422
  "SubscriptionId": {
307
423
  "type": "string",
424
+ "description": "Identifier for the subscription",
425
+ "example": "weekly-newsletter",
308
426
  "maxLength": 255,
309
427
  "minLength": 1,
310
428
  "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
@@ -312,13 +430,22 @@
312
430
  "MarkupText": {
313
431
  "type": "object",
314
432
  "additionalProperties": false,
433
+ "description": "The markup text for rich text content",
434
+ "example": {
435
+ "markup": "Monthly <strong>Product Updates</strong> - <a href=\"https://example.com\">Learn More</a>",
436
+ "source": "Monthly <strong>Product Updates</strong> - <a href=\"https://example.com\">Learn More</a>"
437
+ },
315
438
  "properties": {
316
439
  "markup": {
317
440
  "type": "string",
441
+ "description": "The rendered HTML",
442
+ "example": "Monthly <strong>Product Updates</strong> - <a href=\"https://example.com\">Learn More</a>",
318
443
  "maxLength": 2000
319
444
  },
320
445
  "source": {
321
446
  "type": "string",
447
+ "description": "The raw markup text",
448
+ "example": "Monthly <strong>Product Updates</strong> - <a href=\"https://example.com\">Learn More</a>",
322
449
  "maxLength": 2000
323
450
  }
324
451
  },
@@ -331,16 +458,40 @@
331
458
  "type": "object",
332
459
  "additionalProperties": {
333
460
  "$ref": "#/components/schemas/MarkupText"
461
+ },
462
+ "description": "The localized title of the subscription with markup support",
463
+ "example": {
464
+ "default": {
465
+ "markup": "Monthly <strong>Product Updates</strong>",
466
+ "source": "Monthly <strong>Product Updates</strong>"
467
+ },
468
+ "fr-FR": {
469
+ "markup": "Mises à jour <strong>Produit Mensuelles</strong>",
470
+ "source": "Mises à jour <strong>Produit Mensuelles</strong>"
471
+ }
334
472
  }
335
473
  },
336
474
  "SubscriptionSubtitle": {
337
475
  "type": "object",
338
476
  "additionalProperties": {
339
477
  "$ref": "#/components/schemas/MarkupText"
478
+ },
479
+ "description": "The localized subtitle of the subscription with markup support",
480
+ "example": {
481
+ "default": {
482
+ "markup": "Stay informed about new features - <a href=\"https://example.com\">Learn More</a>",
483
+ "source": "Stay informed about new features - <a href=\"https://example.com\">Learn More</a>"
484
+ },
485
+ "fr-FR": {
486
+ "markup": "Restez informé des nouvelles fonctionnalités - <a href=\"https://example.com\">En savoir plus</a>",
487
+ "source": "Restez informé des nouvelles fonctionnalités - <a href=\"https://example.com\">En savoir plus</a>"
488
+ }
340
489
  }
341
490
  },
342
491
  "Tag": {
343
492
  "type": "string",
493
+ "description": "Filter criteria for consent subscriptions",
494
+ "example": "homepage_banner",
344
495
  "maxLength": 256,
345
496
  "minLength": 1
346
497
  },
@@ -350,23 +501,30 @@
350
501
  "email",
351
502
  "sms",
352
503
  "whatsapp"
353
- ]
504
+ ],
505
+ "example": "email"
354
506
  },
355
507
  "ConsentType": {
356
508
  "type": "string",
357
509
  "default": "marketing",
510
+ "description": "Type of consent subscription",
358
511
  "enum": [
359
512
  "marketing",
360
513
  "legal"
361
- ]
514
+ ],
515
+ "example": "marketing"
362
516
  },
363
517
  "ConsentRequired": {
364
518
  "type": "boolean",
365
- "default": false
519
+ "default": false,
520
+ "description": "Whether this subscription is mandatory",
521
+ "example": false
366
522
  },
367
523
  "Enabled": {
368
524
  "type": "boolean",
369
- "default": true
525
+ "default": true,
526
+ "description": "Whether this subscription is currently enabled",
527
+ "example": true
370
528
  },
371
529
  "Subscription": {
372
530
  "type": "object",
@@ -386,6 +544,12 @@
386
544
  "tags": {
387
545
  "type": "array",
388
546
  "default": [],
547
+ "example": [
548
+ "homepage_banner",
549
+ "user_profile",
550
+ "checkout",
551
+ "registration"
552
+ ],
389
553
  "items": {
390
554
  "$ref": "#/components/schemas/Tag"
391
555
  },
@@ -394,6 +558,10 @@
394
558
  },
395
559
  "channels": {
396
560
  "type": "array",
561
+ "example": [
562
+ "email",
563
+ "sms"
564
+ ],
397
565
  "items": {
398
566
  "$ref": "#/components/schemas/Channel"
399
567
  },
@@ -402,6 +570,8 @@
402
570
  },
403
571
  "umaSubscriptionId": {
404
572
  "type": "string",
573
+ "description": "Salesforce Id for the corresponding CommSubscription object in UMA",
574
+ "example": "0Xl000000000000000",
405
575
  "maxLength": 18,
406
576
  "minLength": 15
407
577
  },
@@ -414,10 +584,12 @@
414
584
  "defaultStatus": {
415
585
  "type": "string",
416
586
  "default": "opt_out",
587
+ "description": "Default state of the consent value",
417
588
  "enum": [
418
589
  "opt_in",
419
590
  "opt_out"
420
- ]
591
+ ],
592
+ "example": "opt_out"
421
593
  },
422
594
  "enabled": {
423
595
  "$ref": "#/components/schemas/Enabled"
@@ -434,6 +606,44 @@
434
606
  "properties": {
435
607
  "data": {
436
608
  "type": "array",
609
+ "example": [
610
+ {
611
+ "id": "weekly-newsletter",
612
+ "siteId": "RefArch",
613
+ "title": {
614
+ "default": {
615
+ "markup": "Weekly <strong>Newsletter</strong>",
616
+ "source": "Weekly <strong>Newsletter</strong>"
617
+ },
618
+ "fr-FR": {
619
+ "markup": "Bulletin <strong>Hebdomadaire</strong>",
620
+ "source": "Bulletin <strong>Hebdomadaire</strong>"
621
+ }
622
+ },
623
+ "subtitle": {
624
+ "default": {
625
+ "markup": "Get our weekly newsletter with the latest updates - <a href=\"https://example.com\">Subscribe</a>",
626
+ "source": "Get our weekly newsletter with the latest updates - <a href=\"https://example.com\">Subscribe</a>"
627
+ },
628
+ "fr-FR": {
629
+ "markup": "Recevez notre bulletin hebdomadaire avec les dernières mises à jour - <a href=\"https://example.com\">S&rsquo;abonner</a>",
630
+ "source": "Recevez notre bulletin hebdomadaire avec les dernières mises à jour - <a href=\"https://example.com\">S&rsquo;abonner</a>"
631
+ }
632
+ },
633
+ "tags": [
634
+ "homepage_banner",
635
+ "user_profile"
636
+ ],
637
+ "channels": [
638
+ "email"
639
+ ],
640
+ "umaSubscriptionId": "0Xl000000000000000",
641
+ "consentType": "marketing",
642
+ "consentRequired": false,
643
+ "defaultStatus": "OPT_OUT",
644
+ "enabled": true
645
+ }
646
+ ],
437
647
  "items": {
438
648
  "$ref": "#/components/schemas/Subscription"
439
649
  },
@@ -451,17 +661,25 @@
451
661
  "properties": {
452
662
  "title": {
453
663
  "type": "string",
664
+ "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",
665
+ "example": "You do not have enough credit",
454
666
  "maxLength": 256
455
667
  },
456
668
  "type": {
457
669
  "type": "string",
670
+ "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",
671
+ "example": "NotEnoughMoney",
458
672
  "maxLength": 2048
459
673
  },
460
674
  "detail": {
461
- "type": "string"
675
+ "type": "string",
676
+ "description": "A human-readable explanation specific to this occurrence of the problem.",
677
+ "example": "Your current balance is 30, but that costs 50"
462
678
  },
463
679
  "instance": {
464
680
  "type": "string",
681
+ "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",
682
+ "example": "/account/12345/msgs/abc",
465
683
  "maxLength": 2048
466
684
  }
467
685
  },
@@ -510,10 +728,12 @@
510
728
  "defaultStatus": {
511
729
  "type": "string",
512
730
  "default": "opt_out",
731
+ "description": "Default state of the consent value",
513
732
  "enum": [
514
733
  "opt_in",
515
734
  "opt_out"
516
- ]
735
+ ],
736
+ "example": "opt_out"
517
737
  },
518
738
  "enabled": {
519
739
  "$ref": "#/components/schemas/Enabled"
@@ -563,10 +783,12 @@
563
783
  "defaultStatus": {
564
784
  "type": "string",
565
785
  "default": "opt_out",
786
+ "description": "Default state of the consent value",
566
787
  "enum": [
567
788
  "opt_in",
568
789
  "opt_out"
569
- ]
790
+ ],
791
+ "example": "opt_out"
570
792
  },
571
793
  "enabled": {
572
794
  "$ref": "#/components/schemas/Enabled"
@@ -578,27 +800,318 @@
578
800
  "organizationId": {
579
801
  "name": "organizationId",
580
802
  "in": "path",
803
+ "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).",
581
804
  "required": true,
582
805
  "style": "simple",
583
806
  "explode": false,
584
807
  "schema": {
585
808
  "$ref": "#/components/schemas/OrganizationId"
586
- }
809
+ },
810
+ "example": "f_ecom_zzxy_prd"
587
811
  },
588
812
  "siteId": {
589
813
  "name": "siteId",
590
814
  "in": "query",
815
+ "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.",
591
816
  "required": true,
592
817
  "style": "form",
593
818
  "explode": true,
594
819
  "schema": {
595
820
  "$ref": "#/components/schemas/SiteId"
821
+ },
822
+ "examples": {
823
+ "SiteId": {
824
+ "value": "RefArch"
825
+ }
826
+ }
827
+ }
828
+ },
829
+ "examples": {
830
+ "GetSubscriptionsResponse": {
831
+ "summary": "Example response for getting all subscriptions for a specific site (RefArch)",
832
+ "value": {
833
+ "data": [
834
+ {
835
+ "subscriptionId": "weekly-newsletter",
836
+ "siteId": "RefArch",
837
+ "title": {
838
+ "default": {
839
+ "markup": "Weekly <strong>Newsletter</strong>",
840
+ "source": "Weekly <strong>Newsletter</strong>"
841
+ },
842
+ "fr-FR": {
843
+ "markup": "Bulletin <strong>Hebdomadaire</strong>",
844
+ "source": "Bulletin <strong>Hebdomadaire</strong>"
845
+ }
846
+ },
847
+ "subtitle": {
848
+ "default": {
849
+ "markup": "Get our weekly newsletter with the latest updates - <a href=\"https://example.com\">Subscribe</a>",
850
+ "source": "Get our weekly newsletter with the latest updates - <a href=\"https://example.com\">Subscribe</a>"
851
+ },
852
+ "fr-FR": {
853
+ "markup": "Recevez notre bulletin hebdomadaire avec les dernières mises à jour - <a href=\"https://example.com\">S&rsquo;abonner</a>",
854
+ "source": "Recevez notre bulletin hebdomadaire avec les dernières mises à jour - <a href=\"https://example.com\">S&rsquo;abonner</a>"
855
+ }
856
+ },
857
+ "tags": [
858
+ "homepage_banner",
859
+ "user_profile"
860
+ ],
861
+ "channels": [
862
+ "email",
863
+ "whatsapp"
864
+ ],
865
+ "umaSubscriptionId": "0Xl000000000000000",
866
+ "consentType": "marketing",
867
+ "consentRequired": false,
868
+ "defaultStatus": "opt_out",
869
+ "enabled": true
870
+ },
871
+ {
872
+ "subscriptionId": "promotional-offers",
873
+ "siteId": "RefArch",
874
+ "title": {
875
+ "default": {
876
+ "markup": "Promotional <em>Offers</em>",
877
+ "source": "Promotional <em>Offers</em>"
878
+ },
879
+ "fr-FR": {
880
+ "markup": "Offres <em>Promotionnelles</em>",
881
+ "source": "Offres <em>Promotionnelles</em>"
882
+ }
883
+ },
884
+ "subtitle": {
885
+ "default": {
886
+ "markup": "Receive special promotional offers - <a href=\"https://example.com/offers\">View Offers</a>",
887
+ "source": "Receive special promotional offers - <a href=\"https://example.com/offers\">View Offers</a>"
888
+ },
889
+ "fr-FR": {
890
+ "markup": "Recevez des offres promotionnelles spéciales - <a href=\"https://example.com/offers\">Voir les offres</a>",
891
+ "source": "Recevez des offres promotionnelles spéciales - <a href=\"https://example.com/offers\">Voir les offres</a>"
892
+ }
893
+ },
894
+ "tags": [
895
+ "checkout"
896
+ ],
897
+ "channels": [
898
+ "sms",
899
+ "email"
900
+ ],
901
+ "umaSubscriptionId": "0Xl000000000000001",
902
+ "consentType": "legal",
903
+ "consentRequired": true,
904
+ "defaultStatus": "opt_in",
905
+ "enabled": true
906
+ }
907
+ ]
908
+ }
909
+ },
910
+ "ConsentsFeatureNotEnabled": {
911
+ "value": {
912
+ "title": "Consents Feature Not Enabled",
913
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/consents-feature-not-enabled",
914
+ "detail": "The Marketing Consents feature is not enabled for this organization."
915
+ }
916
+ },
917
+ "PutSubscriptionRequest": {
918
+ "summary": "Example request for creating or replacing a subscription",
919
+ "value": {
920
+ "subscriptionId": "weekly-newsletter",
921
+ "siteId": "RefArch",
922
+ "title": {
923
+ "default": {
924
+ "markup": "Weekly <strong>Newsletter</strong>",
925
+ "source": "Weekly <strong>Newsletter</strong>"
926
+ },
927
+ "fr-FR": {
928
+ "markup": "Bulletin <strong>Hebdomadaire</strong>",
929
+ "source": "Bulletin <strong>Hebdomadaire</strong>"
930
+ }
931
+ },
932
+ "subtitle": {
933
+ "default": {
934
+ "markup": "Get our weekly newsletter with the latest updates - <a href=\"https://example.com\">Subscribe</a>",
935
+ "source": "Get our weekly newsletter with the latest updates - <a href=\"https://example.com\">Subscribe</a>"
936
+ },
937
+ "fr-FR": {
938
+ "markup": "Recevez notre bulletin hebdomadaire avec les dernières mises à jour - <a href=\"https://example.com\">S&rsquo;abonner</a>",
939
+ "source": "Recevez notre bulletin hebdomadaire avec les dernières mises à jour - <a href=\"https://example.com\">S&rsquo;abonner</a>"
940
+ }
941
+ },
942
+ "tags": [
943
+ "homepage_banner",
944
+ "user_profile"
945
+ ],
946
+ "channels": [
947
+ "email",
948
+ "whatsapp"
949
+ ]
950
+ }
951
+ },
952
+ "PutSubscriptionResponse": {
953
+ "summary": "Example response for creating or replacing a subscription",
954
+ "value": {
955
+ "subscriptionId": "weekly-newsletter",
956
+ "siteId": "RefArch",
957
+ "title": {
958
+ "default": {
959
+ "markup": "Weekly <strong>Newsletter</strong>",
960
+ "source": "Weekly <strong>Newsletter</strong>"
961
+ },
962
+ "fr-FR": {
963
+ "markup": "Bulletin <strong>Hebdomadaire</strong>",
964
+ "source": "Bulletin <strong>Hebdomadaire</strong>"
965
+ }
966
+ },
967
+ "subtitle": {
968
+ "default": {
969
+ "markup": "Get our weekly newsletter with the latest updates - <a href=\"https://example.com\">Subscribe</a>",
970
+ "source": "Get our weekly newsletter with the latest updates - <a href=\"https://example.com\">Subscribe</a>"
971
+ },
972
+ "fr-FR": {
973
+ "markup": "Recevez notre bulletin hebdomadaire avec les dernières mises à jour - <a href=\"https://example.com\">S&rsquo;abonner</a>",
974
+ "source": "Recevez notre bulletin hebdomadaire avec les dernières mises à jour - <a href=\"https://example.com\">S&rsquo;abonner</a>"
975
+ }
976
+ },
977
+ "tags": [
978
+ "homepage_banner",
979
+ "user_profile"
980
+ ],
981
+ "channels": [
982
+ "email",
983
+ "whatsapp"
984
+ ],
985
+ "umaSubscriptionId": "0Xl000000000000000",
986
+ "consentType": "marketing",
987
+ "consentRequired": false,
988
+ "defaultStatus": "opt_out",
989
+ "enabled": true
990
+ }
991
+ },
992
+ "SubscriptionCreationValidationError": {
993
+ "value": {
994
+ "title": "Subscription Creation Validation Error",
995
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/subscription-creation-validation-error",
996
+ "detail": "Unable to create consent subscription."
997
+ }
998
+ },
999
+ "SubscriptionIdMismatchError": {
1000
+ "value": {
1001
+ "title": "Subscription ID Mismatch",
1002
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/subscription-id-mismatch",
1003
+ "detail": "The subscriptionId in the request body does not match the subscriptionId parameter."
1004
+ }
1005
+ },
1006
+ "SiteIdMismatchError": {
1007
+ "value": {
1008
+ "title": "Site ID Mismatch",
1009
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/site-id-mismatch",
1010
+ "detail": "The siteId in the request body does not match the siteId parameter. Both must specify the same site."
1011
+ }
1012
+ },
1013
+ "SubscriptionAlreadyExists": {
1014
+ "value": {
1015
+ "title": "Subscription Already Exists",
1016
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/subscription-already-exists",
1017
+ "detail": "A subscription with this ID already exists. Use PATCH to update existing subscriptions."
1018
+ }
1019
+ },
1020
+ "PatchSubscriptionRequest": {
1021
+ "summary": "Example request for updating a subscription",
1022
+ "value": {
1023
+ "subscriptionId": "weekly-newsletter",
1024
+ "siteId": "RefArch",
1025
+ "title": {
1026
+ "default": {
1027
+ "markup": "Weekly <strong>Newsletter</strong> - <em>Updated</em>",
1028
+ "source": "Weekly <strong>Newsletter</strong> - <em>Updated</em>"
1029
+ },
1030
+ "fr-FR": {
1031
+ "markup": "Bulletin <strong>Hebdomadaire</strong> - <em>Mis à jour</em>",
1032
+ "source": "Bulletin <strong>Hebdomadaire</strong> - <em>Mis à jour</em>"
1033
+ }
1034
+ },
1035
+ "subtitle": {
1036
+ "default": {
1037
+ "markup": "Get our updated weekly newsletter with the latest features - <a href=\"https://example.com\">Learn More</a>",
1038
+ "source": "Get our updated weekly newsletter with the latest features - <a href=\"https://example.com\">Learn More</a>"
1039
+ },
1040
+ "fr-FR": {
1041
+ "markup": "Recevez notre bulletin hebdomadaire mis à jour avec les dernières fonctionnalités - <a href=\"https://example.com\">En savoir plus</a>",
1042
+ "source": "Recevez notre bulletin hebdomadaire mis à jour avec les dernières fonctionnalités - <a href=\"https://example.com\">En savoir plus</a>"
1043
+ }
1044
+ },
1045
+ "tags": [
1046
+ "homepage_banner",
1047
+ "user_profile",
1048
+ "checkout_page"
1049
+ ],
1050
+ "channels": [
1051
+ "email",
1052
+ "sms",
1053
+ "whatsapp"
1054
+ ],
1055
+ "consentType": "marketing",
1056
+ "consentRequired": false,
1057
+ "defaultStatus": "opt_out",
1058
+ "enabled": true
1059
+ }
1060
+ },
1061
+ "PatchSubscriptionResponse": {
1062
+ "summary": "Example response for updating a subscription",
1063
+ "value": {
1064
+ "subscriptionId": "weekly-newsletter",
1065
+ "siteId": "RefArch",
1066
+ "title": {
1067
+ "default": {
1068
+ "markup": "Weekly <strong>Newsletter</strong> - <em>Updated</em>",
1069
+ "source": "Weekly <strong>Newsletter</strong> - <em>Updated</em>"
1070
+ },
1071
+ "fr-FR": {
1072
+ "markup": "Bulletin <strong>Hebdomadaire</strong> - <em>Mis à jour</em>",
1073
+ "source": "Bulletin <strong>Hebdomadaire</strong> - <em>Mis à jour</em>"
1074
+ }
1075
+ },
1076
+ "subtitle": {
1077
+ "default": {
1078
+ "markup": "Get our updated weekly newsletter with the latest features - <a href=\"https://example.com\">Learn More</a>",
1079
+ "source": "Get our updated weekly newsletter with the latest features - <a href=\"https://example.com\">Learn More</a>"
1080
+ },
1081
+ "fr-FR": {
1082
+ "markup": "Recevez notre bulletin hebdomadaire mis à jour avec les dernières fonctionnalités - <a href=\"https://example.com\">En savoir plus</a>",
1083
+ "source": "Recevez notre bulletin hebdomadaire mis à jour avec les dernières fonctionnalités - <a href=\"https://example.com\">En savoir plus</a>"
1084
+ }
1085
+ },
1086
+ "tags": [
1087
+ "homepage_banner",
1088
+ "user_profile",
1089
+ "checkout_page"
1090
+ ],
1091
+ "channels": [
1092
+ "email",
1093
+ "sms",
1094
+ "whatsapp"
1095
+ ],
1096
+ "umaSubscriptionId": "0Xl000000000000000",
1097
+ "consentType": "marketing",
1098
+ "consentRequired": false,
1099
+ "defaultStatus": "opt_out",
1100
+ "enabled": true
1101
+ }
1102
+ },
1103
+ "SubscriptionUpdateValidationError": {
1104
+ "value": {
1105
+ "title": "Subscription Update Validation Error",
1106
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/subscription-update-validation-error",
1107
+ "detail": "Unable to update consent subscription due to validation errors."
596
1108
  }
597
1109
  }
598
1110
  },
599
1111
  "securitySchemes": {
600
1112
  "AmOAuth2": {
601
1113
  "type": "oauth2",
1114
+ "description": "AccountManager OAuth 2.0 bearer token Authentication.",
602
1115
  "flows": {
603
1116
  "clientCredentials": {
604
1117
  "tokenUrl": "https://account.demandware.com/dwsso/oauth2/access_token",
@@ -610,10 +1123,8 @@
610
1123
  "authorizationCode": {
611
1124
  "authorizationUrl": "https://account.demandware.com/dwsso/oauth2/authorize",
612
1125
  "tokenUrl": "https://account.demandware.com/dwsso/oauth2/access_token",
613
- "scopes": {
614
- "sfcc.consents": "Consents READONLY",
615
- "sfcc.consents.rw": "Consents"
616
- }
1126
+ "refreshUrl": "https://account.demandware.com/dwsso/oauth2/access_token",
1127
+ "scopes": {}
617
1128
  }
618
1129
  }
619
1130
  }