@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,6 +2,7 @@
2
2
  "openapi": "3.0.3",
3
3
  "info": {
4
4
  "title": "Roles",
5
+ "description": "[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/roles/roles-oas-v1-public.yaml)\n\n# API Overview\n\nThe Roles API provides endpoints for managing access roles and their associated users and permissions within Salesforce Commerce Cloud.\n\n## Overview\n\nThis API allows administrators to create, retrieve, update, and delete access roles. It also supports managing user assignments to roles, retrieving and setting role permissions, and searching for users within a specific role.\n\n## Key Features\n\n- **Role Management**: Create, retrieve, and delete access roles\n- **Permission Management**: Get and set permissions for access roles\n- **User Assignment**: Assign and unassign users to/from roles\n- **User Search**: Search for users assigned to a specific role using complex queries\n\n## Searchable Attributes (User Search)\n\nThe following attributes can be used in user search queries within a role:\n\n- `login`: The user login identifier (String)\n- `email`: The user email address (String)\n- `firstName`: The user first name (String)\n- `lastName`: The user last name (String)\n- `externalId`: The external identifier (String)\n- `lastLoginDate`: The date of last login (Date)\n\n## Sortable Attributes (User Search)\n\nSearch results can be sorted by:\n\n- `login`: Sort by user login\n- `email`: Sort by email address\n- `firstName`: Sort by first name\n- `lastName`: Sort by last name\n- `externalId`: Sort by external identifier\n- `lastLoginDate`: Sort by last login date\n\n## Use Cases\n\n- **Access Control**: Define and manage role-based access control for Business Manager\n- **User Management**: Assign users to appropriate roles for their job functions\n- **Permission Auditing**: Review and update role permissions\n- **Compliance**: Ensure proper access controls are in place\n\n## Authentication\n\nThis API requires OAuth 2.0 authentication with the appropriate scopes:\n- `sfcc.roles` - Read access to role resources\n- `sfcc.roles.rw` - Read and write access to role resources\n\n## Best Practices\n\n1. Use the Administrator role carefully as permission changes are limited for system roles\n2. Review role permissions regularly for security compliance\n3. Use the user search endpoint for efficient user-role lookups\n4. Avoid deleting roles that have active user assignments",
5
6
  "version": "1.0.0",
6
7
  "x-api-type": "Admin",
7
8
  "x-api-family": "Merchant"
@@ -19,21 +20,26 @@
19
20
  "paths": {
20
21
  "/organizations/{organizationId}/roles": {
21
22
  "get": {
23
+ "summary": "Get Roles",
24
+ "description": "Retrieves all access roles with no filtering.\n",
22
25
  "operationId": "getRoles",
23
26
  "parameters": [
24
27
  {
25
28
  "name": "organizationId",
26
29
  "in": "path",
30
+ "description": "An identifier for the organization the request is being made by",
27
31
  "required": true,
28
32
  "style": "simple",
29
33
  "explode": false,
30
34
  "schema": {
31
35
  "$ref": "#/components/schemas/OrganizationId"
32
- }
36
+ },
37
+ "example": "f_ecom_zzxy_prd"
33
38
  },
34
39
  {
35
40
  "name": "expand",
36
41
  "in": "query",
42
+ "description": "The list of resource types to include in the response.",
37
43
  "required": false,
38
44
  "style": "form",
39
45
  "explode": false,
@@ -44,7 +50,8 @@
44
50
  "enum": [
45
51
  "users",
46
52
  "permissions"
47
- ]
53
+ ],
54
+ "example": "users"
48
55
  }
49
56
  }
50
57
  },
@@ -56,11 +63,17 @@
56
63
  "explode": true,
57
64
  "schema": {
58
65
  "$ref": "#/components/schemas/Select"
66
+ },
67
+ "examples": {
68
+ "select": {
69
+ "value": "(**)"
70
+ }
59
71
  }
60
72
  },
61
73
  {
62
74
  "name": "limit",
63
75
  "in": "query",
76
+ "description": "Number of records to retrieve per request. Must be between 1 (minimum) and 200 (maximum). Defaults to 25.",
64
77
  "required": false,
65
78
  "style": "form",
66
79
  "explode": true,
@@ -75,6 +88,7 @@
75
88
  {
76
89
  "name": "offset",
77
90
  "in": "query",
91
+ "description": "Used to retrieve the results based on a particular resource offset.",
78
92
  "required": false,
79
93
  "style": "form",
80
94
  "explode": true,
@@ -93,6 +107,17 @@
93
107
  "application/json": {
94
108
  "schema": {
95
109
  "$ref": "#/components/schemas/RoleSearch"
110
+ },
111
+ "examples": {
112
+ "RoleSearchResult": {
113
+ "$ref": "#/components/examples/RoleSearchResult"
114
+ },
115
+ "RoleSearchExpandUsersResult": {
116
+ "$ref": "#/components/examples/RoleSearchExpandUsersResult"
117
+ },
118
+ "RoleSearchExpandPermissionsResult": {
119
+ "$ref": "#/components/examples/RoleSearchExpandPermissionsResult"
120
+ }
96
121
  }
97
122
  }
98
123
  }
@@ -110,26 +135,32 @@
110
135
  },
111
136
  "/organizations/{organizationId}/roles/{roleId}": {
112
137
  "get": {
138
+ "summary": "Get Role",
139
+ "description": "Retrieves a single access role by its identifier.\n",
113
140
  "operationId": "getRole",
114
141
  "parameters": [
115
142
  {
116
143
  "name": "organizationId",
117
144
  "in": "path",
145
+ "description": "An identifier for the organization the request is being made by",
118
146
  "required": true,
119
147
  "style": "simple",
120
148
  "explode": false,
121
149
  "schema": {
122
150
  "$ref": "#/components/schemas/OrganizationId"
123
- }
151
+ },
152
+ "example": "f_ecom_zzxy_prd"
124
153
  },
125
154
  {
126
155
  "name": "roleId",
127
156
  "in": "path",
157
+ "description": "The identifier of the access role.",
128
158
  "required": true,
129
159
  "style": "simple",
130
160
  "explode": false,
131
161
  "schema": {
132
162
  "type": "string",
163
+ "example": "Administrator",
133
164
  "maxLength": 256,
134
165
  "minLength": 1
135
166
  }
@@ -137,6 +168,7 @@
137
168
  {
138
169
  "name": "expand",
139
170
  "in": "query",
171
+ "description": "The list of resource types to include in the response.",
140
172
  "required": false,
141
173
  "style": "form",
142
174
  "explode": false,
@@ -147,7 +179,8 @@
147
179
  "enum": [
148
180
  "users",
149
181
  "permissions"
150
- ]
182
+ ],
183
+ "example": "users"
151
184
  }
152
185
  }
153
186
  }
@@ -159,6 +192,17 @@
159
192
  "application/json": {
160
193
  "schema": {
161
194
  "$ref": "#/components/schemas/Role"
195
+ },
196
+ "examples": {
197
+ "RoleDetailsResult": {
198
+ "$ref": "#/components/examples/RoleDetailsResult"
199
+ },
200
+ "RoleDetailsExpandUsersResult": {
201
+ "$ref": "#/components/examples/RoleDetailsExpandUsersResult"
202
+ },
203
+ "RoleDetailsExpandPermissionsResult": {
204
+ "$ref": "#/components/examples/RoleDetailsExpandPermissionsResult"
205
+ }
162
206
  }
163
207
  }
164
208
  }
@@ -169,6 +213,11 @@
169
213
  "application/problem+json": {
170
214
  "schema": {
171
215
  "$ref": "#/components/schemas/ErrorResponse"
216
+ },
217
+ "examples": {
218
+ "RoleNotFound": {
219
+ "$ref": "#/components/examples/RoleNotFound"
220
+ }
172
221
  }
173
222
  }
174
223
  }
@@ -184,36 +233,48 @@
184
233
  ]
185
234
  },
186
235
  "put": {
236
+ "summary": "Create Role",
237
+ "description": "Creates a new access role with the specified identifier.\n",
187
238
  "operationId": "createRole",
188
239
  "parameters": [
189
240
  {
190
241
  "name": "organizationId",
191
242
  "in": "path",
243
+ "description": "An identifier for the organization the request is being made by",
192
244
  "required": true,
193
245
  "style": "simple",
194
246
  "explode": false,
195
247
  "schema": {
196
248
  "$ref": "#/components/schemas/OrganizationId"
197
- }
249
+ },
250
+ "example": "f_ecom_zzxy_prd"
198
251
  },
199
252
  {
200
253
  "name": "roleId",
201
254
  "in": "path",
255
+ "description": "The identifier of the access role.",
202
256
  "required": true,
203
257
  "style": "simple",
204
258
  "explode": false,
205
259
  "schema": {
206
260
  "type": "string",
261
+ "example": "Administrator",
207
262
  "maxLength": 256,
208
263
  "minLength": 1
209
264
  }
210
265
  }
211
266
  ],
212
267
  "requestBody": {
268
+ "description": "The access role to create",
213
269
  "content": {
214
270
  "application/json": {
215
271
  "schema": {
216
272
  "$ref": "#/components/schemas/Role"
273
+ },
274
+ "examples": {
275
+ "CreateRole": {
276
+ "$ref": "#/components/examples/CreateRole"
277
+ }
217
278
  }
218
279
  }
219
280
  },
@@ -226,6 +287,11 @@
226
287
  "application/json": {
227
288
  "schema": {
228
289
  "$ref": "#/components/schemas/Role"
290
+ },
291
+ "examples": {
292
+ "RoleCreated": {
293
+ "$ref": "#/components/examples/RoleCreated"
294
+ }
229
295
  }
230
296
  }
231
297
  }
@@ -236,6 +302,11 @@
236
302
  "application/json": {
237
303
  "schema": {
238
304
  "$ref": "#/components/schemas/Role"
305
+ },
306
+ "examples": {
307
+ "RoleCreated": {
308
+ "$ref": "#/components/examples/RoleCreated"
309
+ }
239
310
  }
240
311
  }
241
312
  }
@@ -246,6 +317,17 @@
246
317
  "application/problem+json": {
247
318
  "schema": {
248
319
  "$ref": "#/components/schemas/ErrorResponse"
320
+ },
321
+ "examples": {
322
+ "IdConflict": {
323
+ "$ref": "#/components/examples/IdConflict"
324
+ },
325
+ "RoleAlreadyExists": {
326
+ "$ref": "#/components/examples/RoleAlreadyExists"
327
+ },
328
+ "RoleOperationNotAllowed": {
329
+ "$ref": "#/components/examples/RoleOperationNotAllowed"
330
+ }
249
331
  }
250
332
  }
251
333
  }
@@ -260,26 +342,32 @@
260
342
  ]
261
343
  },
262
344
  "delete": {
345
+ "summary": "Delete Role",
346
+ "description": "Deletes a single access role.\n",
263
347
  "operationId": "deleteRole",
264
348
  "parameters": [
265
349
  {
266
350
  "name": "organizationId",
267
351
  "in": "path",
352
+ "description": "An identifier for the organization the request is being made by",
268
353
  "required": true,
269
354
  "style": "simple",
270
355
  "explode": false,
271
356
  "schema": {
272
357
  "$ref": "#/components/schemas/OrganizationId"
273
- }
358
+ },
359
+ "example": "f_ecom_zzxy_prd"
274
360
  },
275
361
  {
276
362
  "name": "roleId",
277
363
  "in": "path",
364
+ "description": "The identifier of the access role.",
278
365
  "required": true,
279
366
  "style": "simple",
280
367
  "explode": false,
281
368
  "schema": {
282
369
  "type": "string",
370
+ "example": "Administrator",
283
371
  "maxLength": 256,
284
372
  "minLength": 1
285
373
  }
@@ -295,6 +383,11 @@
295
383
  "application/problem+json": {
296
384
  "schema": {
297
385
  "$ref": "#/components/schemas/ErrorResponse"
386
+ },
387
+ "examples": {
388
+ "RoleNotFound": {
389
+ "$ref": "#/components/examples/RoleNotFound"
390
+ }
298
391
  }
299
392
  }
300
393
  }
@@ -311,26 +404,32 @@
311
404
  },
312
405
  "/organizations/{organizationId}/roles/{roleId}/permissions": {
313
406
  "get": {
407
+ "summary": "Get Role Permissions",
408
+ "description": "Retrieves the list of permissions assigned to the given role.\n",
314
409
  "operationId": "getRolePermissions",
315
410
  "parameters": [
316
411
  {
317
412
  "name": "organizationId",
318
413
  "in": "path",
414
+ "description": "An identifier for the organization the request is being made by",
319
415
  "required": true,
320
416
  "style": "simple",
321
417
  "explode": false,
322
418
  "schema": {
323
419
  "$ref": "#/components/schemas/OrganizationId"
324
- }
420
+ },
421
+ "example": "f_ecom_zzxy_prd"
325
422
  },
326
423
  {
327
424
  "name": "roleId",
328
425
  "in": "path",
426
+ "description": "The identifier of the access role.",
329
427
  "required": true,
330
428
  "style": "simple",
331
429
  "explode": false,
332
430
  "schema": {
333
431
  "type": "string",
432
+ "example": "Administrator",
334
433
  "maxLength": 256,
335
434
  "minLength": 1
336
435
  }
@@ -343,6 +442,11 @@
343
442
  "application/json": {
344
443
  "schema": {
345
444
  "$ref": "#/components/schemas/RolePermissions"
445
+ },
446
+ "examples": {
447
+ "RolePermissionsSuccess": {
448
+ "$ref": "#/components/examples/RolePermissionsSuccess"
449
+ }
346
450
  }
347
451
  }
348
452
  }
@@ -353,6 +457,11 @@
353
457
  "application/problem+json": {
354
458
  "schema": {
355
459
  "$ref": "#/components/schemas/ErrorResponse"
460
+ },
461
+ "examples": {
462
+ "RoleNotFound": {
463
+ "$ref": "#/components/examples/RoleNotFound"
464
+ }
356
465
  }
357
466
  }
358
467
  }
@@ -368,36 +477,48 @@
368
477
  ]
369
478
  },
370
479
  "put": {
480
+ "summary": "Set Role Permissions",
481
+ "description": "Assigns permissions to the given role. This will replace the current permission assignments.\nFor the 'Administrator' role only adjustments for custom module permissions will be processed\nbut other given permissions will be ignored.\n",
371
482
  "operationId": "setRolePermissions",
372
483
  "parameters": [
373
484
  {
374
485
  "name": "organizationId",
375
486
  "in": "path",
487
+ "description": "An identifier for the organization the request is being made by",
376
488
  "required": true,
377
489
  "style": "simple",
378
490
  "explode": false,
379
491
  "schema": {
380
492
  "$ref": "#/components/schemas/OrganizationId"
381
- }
493
+ },
494
+ "example": "f_ecom_zzxy_prd"
382
495
  },
383
496
  {
384
497
  "name": "roleId",
385
498
  "in": "path",
499
+ "description": "The identifier of the access role.",
386
500
  "required": true,
387
501
  "style": "simple",
388
502
  "explode": false,
389
503
  "schema": {
390
504
  "type": "string",
505
+ "example": "Administrator",
391
506
  "maxLength": 256,
392
507
  "minLength": 1
393
508
  }
394
509
  }
395
510
  ],
396
511
  "requestBody": {
512
+ "description": "The permissions to assign to the role",
397
513
  "content": {
398
514
  "application/json": {
399
515
  "schema": {
400
516
  "$ref": "#/components/schemas/RolePermissions"
517
+ },
518
+ "examples": {
519
+ "SetPermissions": {
520
+ "$ref": "#/components/examples/SetPermissions"
521
+ }
401
522
  }
402
523
  }
403
524
  },
@@ -410,6 +531,11 @@
410
531
  "application/json": {
411
532
  "schema": {
412
533
  "$ref": "#/components/schemas/RolePermissions"
534
+ },
535
+ "examples": {
536
+ "RolePermissionsSuccess": {
537
+ "$ref": "#/components/examples/RolePermissionsSuccess"
538
+ }
413
539
  }
414
540
  }
415
541
  }
@@ -420,6 +546,11 @@
420
546
  "application/json": {
421
547
  "schema": {
422
548
  "$ref": "#/components/schemas/RolePermissions"
549
+ },
550
+ "examples": {
551
+ "RolePermissionsSuccess": {
552
+ "$ref": "#/components/examples/RolePermissionsSuccess"
553
+ }
423
554
  }
424
555
  }
425
556
  }
@@ -430,6 +561,17 @@
430
561
  "application/problem+json": {
431
562
  "schema": {
432
563
  "$ref": "#/components/schemas/ErrorResponse"
564
+ },
565
+ "examples": {
566
+ "InvalidPermissionType": {
567
+ "$ref": "#/components/examples/InvalidPermissionType"
568
+ },
569
+ "UnknownPermission": {
570
+ "$ref": "#/components/examples/UnknownPermission"
571
+ },
572
+ "InvalidPermissionValue": {
573
+ "$ref": "#/components/examples/InvalidPermissionValue"
574
+ }
433
575
  }
434
576
  }
435
577
  }
@@ -440,6 +582,11 @@
440
582
  "application/problem+json": {
441
583
  "schema": {
442
584
  "$ref": "#/components/schemas/ErrorResponse"
585
+ },
586
+ "examples": {
587
+ "RoleNotFound": {
588
+ "$ref": "#/components/examples/RoleNotFound"
589
+ }
443
590
  }
444
591
  }
445
592
  }
@@ -456,36 +603,51 @@
456
603
  },
457
604
  "/organizations/{organizationId}/roles/{roleId}/user-search": {
458
605
  "post": {
606
+ "summary": "Search Role Users",
607
+ "description": "Searches for users of the specified access role.\n\nThe query attribute specifies a complex query that can be used to narrow down the search. These are the list of\nsearchable attributes:\n\n- login - String\n- email - String\n- firstName - String\n- lastName - String\n- externalId - String\n- lastLoginDate - Date\n- isLocked - Boolean\n- isDisabled - Boolean\n\nThe output of the query can also be sorted. These are the list of sortable attributes:\n\n- login - String\n- email - String\n- firstName - String\n- lastName - String\n- externalId - String\n- lastLoginDate - Date\n",
459
608
  "operationId": "searchRoleUsers",
460
609
  "parameters": [
461
610
  {
462
611
  "name": "organizationId",
463
612
  "in": "path",
613
+ "description": "An identifier for the organization the request is being made by",
464
614
  "required": true,
465
615
  "style": "simple",
466
616
  "explode": false,
467
617
  "schema": {
468
618
  "$ref": "#/components/schemas/OrganizationId"
469
- }
619
+ },
620
+ "example": "f_ecom_zzxy_prd"
470
621
  },
471
622
  {
472
623
  "name": "roleId",
473
624
  "in": "path",
625
+ "description": "The identifier of the access role.",
474
626
  "required": true,
475
627
  "style": "simple",
476
628
  "explode": false,
477
629
  "schema": {
478
630
  "type": "string",
631
+ "example": "Administrator",
479
632
  "maxLength": 256,
480
633
  "minLength": 1
481
634
  }
482
635
  }
483
636
  ],
484
637
  "requestBody": {
638
+ "description": "The search request document for role users",
485
639
  "content": {
486
640
  "application/json": {
487
641
  "schema": {
488
642
  "$ref": "#/components/schemas/RoleUserSearchRequest"
643
+ },
644
+ "examples": {
645
+ "SearchUsersByLogin": {
646
+ "$ref": "#/components/examples/SearchUsersByLogin"
647
+ },
648
+ "SearchUsersByEmail": {
649
+ "$ref": "#/components/examples/SearchUsersByEmail"
650
+ }
489
651
  }
490
652
  }
491
653
  },
@@ -498,6 +660,11 @@
498
660
  "application/json": {
499
661
  "schema": {
500
662
  "$ref": "#/components/schemas/RoleUserSearchResult"
663
+ },
664
+ "examples": {
665
+ "RoleUserSearchResultSuccess": {
666
+ "$ref": "#/components/examples/RoleUserSearchResultSuccess"
667
+ }
501
668
  }
502
669
  }
503
670
  }
@@ -508,6 +675,14 @@
508
675
  "application/problem+json": {
509
676
  "schema": {
510
677
  "$ref": "#/components/schemas/ErrorResponse"
678
+ },
679
+ "examples": {
680
+ "UnqueryableField": {
681
+ "$ref": "#/components/examples/UnqueryableField"
682
+ },
683
+ "FieldNotSortable": {
684
+ "$ref": "#/components/examples/FieldNotSortable"
685
+ }
511
686
  }
512
687
  }
513
688
  }
@@ -518,6 +693,11 @@
518
693
  "application/problem+json": {
519
694
  "schema": {
520
695
  "$ref": "#/components/schemas/ErrorResponse"
696
+ },
697
+ "examples": {
698
+ "RoleNotFound": {
699
+ "$ref": "#/components/examples/RoleNotFound"
700
+ }
521
701
  }
522
702
  }
523
703
  }
@@ -535,26 +715,32 @@
535
715
  },
536
716
  "/organizations/{organizationId}/roles/{roleId}/users": {
537
717
  "get": {
718
+ "summary": "Get Role Users",
719
+ "description": "Retrieves all users assigned to the specified access role.\n",
538
720
  "operationId": "getRoleUsers",
539
721
  "parameters": [
540
722
  {
541
723
  "name": "organizationId",
542
724
  "in": "path",
725
+ "description": "An identifier for the organization the request is being made by",
543
726
  "required": true,
544
727
  "style": "simple",
545
728
  "explode": false,
546
729
  "schema": {
547
730
  "$ref": "#/components/schemas/OrganizationId"
548
- }
731
+ },
732
+ "example": "f_ecom_zzxy_prd"
549
733
  },
550
734
  {
551
735
  "name": "roleId",
552
736
  "in": "path",
737
+ "description": "The identifier of the access role.",
553
738
  "required": true,
554
739
  "style": "simple",
555
740
  "explode": false,
556
741
  "schema": {
557
742
  "type": "string",
743
+ "example": "Administrator",
558
744
  "maxLength": 256,
559
745
  "minLength": 1
560
746
  }
@@ -567,11 +753,17 @@
567
753
  "explode": true,
568
754
  "schema": {
569
755
  "$ref": "#/components/schemas/Select"
756
+ },
757
+ "examples": {
758
+ "select": {
759
+ "value": "(**)"
760
+ }
570
761
  }
571
762
  },
572
763
  {
573
764
  "name": "limit",
574
765
  "in": "query",
766
+ "description": "Number of records to retrieve per request. Must be between 1 (minimum) and 200 (maximum). Defaults to 25.",
575
767
  "required": false,
576
768
  "style": "form",
577
769
  "explode": true,
@@ -586,6 +778,7 @@
586
778
  {
587
779
  "name": "offset",
588
780
  "in": "query",
781
+ "description": "Used to retrieve the results based on a particular resource offset.",
589
782
  "required": false,
590
783
  "style": "form",
591
784
  "explode": true,
@@ -604,6 +797,11 @@
604
797
  "application/json": {
605
798
  "schema": {
606
799
  "$ref": "#/components/schemas/UserSearch"
800
+ },
801
+ "examples": {
802
+ "RoleUserCollectionSuccess": {
803
+ "$ref": "#/components/examples/RoleUserCollectionSuccess"
804
+ }
607
805
  }
608
806
  }
609
807
  }
@@ -614,6 +812,11 @@
614
812
  "application/problem+json": {
615
813
  "schema": {
616
814
  "$ref": "#/components/schemas/ErrorResponse"
815
+ },
816
+ "examples": {
817
+ "RoleNotFound": {
818
+ "$ref": "#/components/examples/RoleNotFound"
819
+ }
617
820
  }
618
821
  }
619
822
  }
@@ -631,26 +834,32 @@
631
834
  },
632
835
  "/organizations/{organizationId}/roles/{roleId}/users/{login}": {
633
836
  "put": {
837
+ "summary": "Assign User to Role",
838
+ "description": "Assigns a user to the specified access role.\n",
634
839
  "operationId": "assignUserToRole",
635
840
  "parameters": [
636
841
  {
637
842
  "name": "organizationId",
638
843
  "in": "path",
844
+ "description": "An identifier for the organization the request is being made by",
639
845
  "required": true,
640
846
  "style": "simple",
641
847
  "explode": false,
642
848
  "schema": {
643
849
  "$ref": "#/components/schemas/OrganizationId"
644
- }
850
+ },
851
+ "example": "f_ecom_zzxy_prd"
645
852
  },
646
853
  {
647
854
  "name": "roleId",
648
855
  "in": "path",
856
+ "description": "The identifier of the access role.",
649
857
  "required": true,
650
858
  "style": "simple",
651
859
  "explode": false,
652
860
  "schema": {
653
861
  "type": "string",
862
+ "example": "Administrator",
654
863
  "maxLength": 256,
655
864
  "minLength": 1
656
865
  }
@@ -658,11 +867,13 @@
658
867
  {
659
868
  "name": "login",
660
869
  "in": "path",
870
+ "description": "The login of the user.",
661
871
  "required": true,
662
872
  "style": "simple",
663
873
  "explode": false,
664
874
  "schema": {
665
875
  "type": "string",
876
+ "example": "admin-user",
666
877
  "maxLength": 256,
667
878
  "minLength": 1
668
879
  }
@@ -675,6 +886,11 @@
675
886
  "application/json": {
676
887
  "schema": {
677
888
  "$ref": "#/components/schemas/User"
889
+ },
890
+ "examples": {
891
+ "UserAssigned": {
892
+ "$ref": "#/components/examples/UserAssigned"
893
+ }
678
894
  }
679
895
  }
680
896
  }
@@ -685,6 +901,11 @@
685
901
  "application/json": {
686
902
  "schema": {
687
903
  "$ref": "#/components/schemas/User"
904
+ },
905
+ "examples": {
906
+ "UserAssigned": {
907
+ "$ref": "#/components/examples/UserAssigned"
908
+ }
688
909
  }
689
910
  }
690
911
  }
@@ -695,6 +916,14 @@
695
916
  "application/problem+json": {
696
917
  "schema": {
697
918
  "$ref": "#/components/schemas/ErrorResponse"
919
+ },
920
+ "examples": {
921
+ "RoleNotFound": {
922
+ "$ref": "#/components/examples/RoleNotFound"
923
+ },
924
+ "UserNotFound": {
925
+ "$ref": "#/components/examples/UserNotFound"
926
+ }
698
927
  }
699
928
  }
700
929
  }
@@ -709,26 +938,32 @@
709
938
  ]
710
939
  },
711
940
  "delete": {
941
+ "summary": "Unassign User from Role",
942
+ "description": "Unassigns a user from the specified access role.\n",
712
943
  "operationId": "unassignUserFromRole",
713
944
  "parameters": [
714
945
  {
715
946
  "name": "organizationId",
716
947
  "in": "path",
948
+ "description": "An identifier for the organization the request is being made by",
717
949
  "required": true,
718
950
  "style": "simple",
719
951
  "explode": false,
720
952
  "schema": {
721
953
  "$ref": "#/components/schemas/OrganizationId"
722
- }
954
+ },
955
+ "example": "f_ecom_zzxy_prd"
723
956
  },
724
957
  {
725
958
  "name": "roleId",
726
959
  "in": "path",
960
+ "description": "The identifier of the access role.",
727
961
  "required": true,
728
962
  "style": "simple",
729
963
  "explode": false,
730
964
  "schema": {
731
965
  "type": "string",
966
+ "example": "Administrator",
732
967
  "maxLength": 256,
733
968
  "minLength": 1
734
969
  }
@@ -736,11 +971,13 @@
736
971
  {
737
972
  "name": "login",
738
973
  "in": "path",
974
+ "description": "The login of the user.",
739
975
  "required": true,
740
976
  "style": "simple",
741
977
  "explode": false,
742
978
  "schema": {
743
979
  "type": "string",
980
+ "example": "admin-user",
744
981
  "maxLength": 256,
745
982
  "minLength": 1
746
983
  }
@@ -756,6 +993,14 @@
756
993
  "application/problem+json": {
757
994
  "schema": {
758
995
  "$ref": "#/components/schemas/ErrorResponse"
996
+ },
997
+ "examples": {
998
+ "RoleNotFound": {
999
+ "$ref": "#/components/examples/RoleNotFound"
1000
+ },
1001
+ "UserNotFound": {
1002
+ "$ref": "#/components/examples/UserNotFound"
1003
+ }
759
1004
  }
760
1005
  }
761
1006
  }
@@ -775,11 +1020,15 @@
775
1020
  "schemas": {
776
1021
  "OrganizationId": {
777
1022
  "type": "string",
1023
+ "description": "An identifier for the organization the request is being made by",
1024
+ "example": "f_ecom_zzxy_prd",
778
1025
  "maxLength": 32,
779
1026
  "minLength": 1
780
1027
  },
781
1028
  "Select": {
782
1029
  "type": "string",
1030
+ "description": "The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names or work with wildcards. You can also specify array operations and filter expressions. The actual selector value must be enclosed within parentheses. For more information, please read the documentation about property selectors [here](https://developer.salesforce.com/docs/commerce/commerce-api/guide/scapi-property-selection.html).",
1031
+ "example": "(name,id,variationAttributes.(**))",
783
1032
  "minLength": 1,
784
1033
  "pattern": "^[(].*[)]$"
785
1034
  },
@@ -787,14 +1036,19 @@
787
1036
  "type": "integer",
788
1037
  "format": "int32",
789
1038
  "default": 0,
1039
+ "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.",
1040
+ "example": 10,
790
1041
  "minimum": 0
791
1042
  },
792
1043
  "ResultBase": {
793
1044
  "type": "object",
1045
+ "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.",
794
1046
  "properties": {
795
1047
  "limit": {
796
1048
  "type": "integer",
797
- "format": "int32"
1049
+ "format": "int32",
1050
+ "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.",
1051
+ "example": 10
798
1052
  },
799
1053
  "total": {
800
1054
  "$ref": "#/components/schemas/Total"
@@ -809,6 +1063,8 @@
809
1063
  "type": "integer",
810
1064
  "format": "int32",
811
1065
  "default": 0,
1066
+ "description": "The zero-based index of the first hit/data to include in the result.",
1067
+ "example": 0,
812
1068
  "minimum": 0
813
1069
  },
814
1070
  "PaginatedResultBase": {
@@ -817,6 +1073,7 @@
817
1073
  "$ref": "#/components/schemas/ResultBase"
818
1074
  }
819
1075
  ],
1076
+ "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`.",
820
1077
  "properties": {
821
1078
  "offset": {
822
1079
  "$ref": "#/components/schemas/Offset"
@@ -830,34 +1087,51 @@
830
1087
  },
831
1088
  "RoleModulePermission": {
832
1089
  "type": "object",
1090
+ "description": "Document representing a single module permission entry.",
833
1091
  "properties": {
834
1092
  "name": {
835
1093
  "type": "string",
1094
+ "description": "The related menu action name of the module permission.",
1095
+ "example": "jobschedules",
836
1096
  "maxLength": 256,
837
1097
  "minLength": 1
838
1098
  },
839
1099
  "type": {
840
1100
  "type": "string",
1101
+ "description": "The permission type. Always \"module\" for module permissions.",
1102
+ "example": "module",
841
1103
  "maxLength": 256,
842
1104
  "minLength": 1
843
1105
  },
844
1106
  "application": {
845
1107
  "type": "string",
1108
+ "description": "The permission application (e.g. \"bm\" for Business Manager, \"csc\" for Commerce Service Cloud).",
1109
+ "example": "bm",
846
1110
  "maxLength": 256,
847
1111
  "minLength": 1
848
1112
  },
849
1113
  "system": {
850
- "type": "boolean"
1114
+ "type": "boolean",
1115
+ "description": "Indicates whether this is a system menu action. False for custom menu actions.",
1116
+ "example": true
851
1117
  },
852
1118
  "value": {
853
1119
  "type": "string",
1120
+ "description": "The non domain-specific permission value used in organization scope (e.g. ACCESS, READONLY).",
1121
+ "example": "ACCESS",
854
1122
  "maxLength": 256
855
1123
  },
856
1124
  "values": {
857
1125
  "type": "object",
858
1126
  "additionalProperties": {
859
1127
  "type": "string",
1128
+ "example": "ACCESS",
860
1129
  "maxLength": 256
1130
+ },
1131
+ "description": "A map of site identifiers to permission values, used in site scope.",
1132
+ "example": {
1133
+ "SiteGenesis": "ACCESS",
1134
+ "RefArch": "ACCESS"
861
1135
  }
862
1136
  }
863
1137
  },
@@ -869,15 +1143,18 @@
869
1143
  },
870
1144
  "RoleModulePermissions": {
871
1145
  "type": "object",
1146
+ "description": "Document listing the module permissions assigned to a role, scoped to organization and site levels.",
872
1147
  "properties": {
873
1148
  "organization": {
874
1149
  "type": "array",
1150
+ "description": "Organization-level module permissions. Each entry uses a single `value`.",
875
1151
  "items": {
876
1152
  "$ref": "#/components/schemas/RoleModulePermission"
877
1153
  }
878
1154
  },
879
1155
  "site": {
880
1156
  "type": "array",
1157
+ "description": "Site-level module permissions. Each entry uses a `values` map keyed by site ID.",
881
1158
  "items": {
882
1159
  "$ref": "#/components/schemas/RoleModulePermission"
883
1160
  }
@@ -886,26 +1163,38 @@
886
1163
  },
887
1164
  "RoleFunctionalPermission": {
888
1165
  "type": "object",
1166
+ "description": "Document representing a single functional permission entry.",
889
1167
  "properties": {
890
1168
  "name": {
891
1169
  "type": "string",
1170
+ "description": "The name of the functional permission.",
1171
+ "example": "Delete_All_Catalogs",
892
1172
  "maxLength": 256,
893
1173
  "minLength": 1
894
1174
  },
895
1175
  "type": {
896
1176
  "type": "string",
1177
+ "description": "The permission type. Always \"functional\" for functional permissions.",
1178
+ "example": "functional",
897
1179
  "maxLength": 256,
898
1180
  "minLength": 1
899
1181
  },
900
1182
  "value": {
901
1183
  "type": "string",
1184
+ "description": "The non domain-specific permission value used in organization scope (e.g. ACCESS).",
1185
+ "example": "ACCESS",
902
1186
  "maxLength": 256
903
1187
  },
904
1188
  "values": {
905
1189
  "type": "object",
906
1190
  "additionalProperties": {
907
1191
  "type": "string",
1192
+ "example": "ACCESS",
908
1193
  "maxLength": 256
1194
+ },
1195
+ "description": "A map of site identifiers to permission values, used in site scope.",
1196
+ "example": {
1197
+ "SiteGenesis": "ACCESS"
909
1198
  }
910
1199
  }
911
1200
  },
@@ -916,15 +1205,18 @@
916
1205
  },
917
1206
  "RoleFunctionalPermissions": {
918
1207
  "type": "object",
1208
+ "description": "Document listing the functional permissions assigned to a role, scoped to organization and site levels.",
919
1209
  "properties": {
920
1210
  "organization": {
921
1211
  "type": "array",
1212
+ "description": "Organization-level functional permissions. Each entry uses a single `value`.",
922
1213
  "items": {
923
1214
  "$ref": "#/components/schemas/RoleFunctionalPermission"
924
1215
  }
925
1216
  },
926
1217
  "site": {
927
1218
  "type": "array",
1219
+ "description": "Site-level functional permissions. Each entry uses a `values` map keyed by site ID.",
928
1220
  "items": {
929
1221
  "$ref": "#/components/schemas/RoleFunctionalPermission"
930
1222
  }
@@ -933,18 +1225,25 @@
933
1225
  },
934
1226
  "LanguageCountry": {
935
1227
  "type": "string",
1228
+ "description": "A concatenated version of the standard Language and Country codes, combined with a hyphen '`-`'.",
1229
+ "example": "en-US",
936
1230
  "pattern": "^[a-z][a-z]-[A-Z][A-Z]$"
937
1231
  },
938
1232
  "LanguageCode": {
939
1233
  "type": "string",
1234
+ "description": "A two letter lowercase language code conforming to the [ISO 639-1](https://www.iso.org/iso-639-language-codes.html) standard. Additionally, this may be used to submit requests with the header parameter `Accept-Language`, following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766).",
1235
+ "example": "en",
940
1236
  "pattern": "^[a-z][a-z]$"
941
1237
  },
942
1238
  "DefaultFallback": {
943
1239
  "type": "string",
944
1240
  "default": "default",
1241
+ "description": "A specialized value indicating the system default values for locales.",
1242
+ "example": "default",
945
1243
  "pattern": "^default$"
946
1244
  },
947
1245
  "LocaleCode": {
1246
+ "description": "A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.",
948
1247
  "oneOf": [
949
1248
  {
950
1249
  "$ref": "#/components/schemas/LanguageCountry"
@@ -959,29 +1258,37 @@
959
1258
  },
960
1259
  "RoleLocalePermission": {
961
1260
  "type": "object",
1261
+ "description": "Document representing a single locale permission entry.",
962
1262
  "properties": {
963
1263
  "localeId": {
964
1264
  "allOf": [
965
1265
  {
966
1266
  "$ref": "#/components/schemas/LocaleCode"
967
1267
  }
968
- ]
1268
+ ],
1269
+ "description": "The related locale id of the locale permission."
969
1270
  },
970
1271
  "type": {
971
1272
  "type": "string",
1273
+ "description": "The permission type. Always \"locale\" for locale permissions.",
1274
+ "example": "locale",
972
1275
  "maxLength": 256,
973
1276
  "minLength": 1
974
1277
  },
975
1278
  "value": {
976
1279
  "type": "string",
1280
+ "description": "The non domain-specific permission value (e.g. ACCESS, READONLY).",
1281
+ "example": "ACCESS",
977
1282
  "maxLength": 256
978
1283
  },
979
1284
  "values": {
980
1285
  "type": "object",
981
1286
  "additionalProperties": {
982
1287
  "type": "string",
1288
+ "example": "ACCESS",
983
1289
  "maxLength": 256
984
- }
1290
+ },
1291
+ "description": "A map of domain identifiers to permission values."
985
1292
  }
986
1293
  },
987
1294
  "required": [
@@ -991,9 +1298,11 @@
991
1298
  },
992
1299
  "RoleLocalePermissions": {
993
1300
  "type": "object",
1301
+ "description": "Document listing the locale permissions assigned to a role (unscoped).",
994
1302
  "properties": {
995
1303
  "unscoped": {
996
1304
  "type": "array",
1305
+ "description": "Unscoped locale permissions. A permission for the \"default\" locale is mandatory.",
997
1306
  "items": {
998
1307
  "$ref": "#/components/schemas/RoleLocalePermission"
999
1308
  }
@@ -1002,27 +1311,36 @@
1002
1311
  },
1003
1312
  "RoleWebdavPermission": {
1004
1313
  "type": "object",
1314
+ "description": "Document representing a single WebDAV permission entry.",
1005
1315
  "properties": {
1006
1316
  "folder": {
1007
1317
  "type": "string",
1318
+ "description": "The WebDAV folder path for this permission.",
1319
+ "example": "/catalogs/apparel-catalog",
1008
1320
  "maxLength": 256,
1009
1321
  "minLength": 1
1010
1322
  },
1011
1323
  "type": {
1012
1324
  "type": "string",
1325
+ "description": "The permission type. Always \"webdav\" for WebDAV permissions.",
1326
+ "example": "webdav",
1013
1327
  "maxLength": 256,
1014
1328
  "minLength": 1
1015
1329
  },
1016
1330
  "value": {
1017
1331
  "type": "string",
1332
+ "description": "The non domain-specific permission value (e.g. ACCESS, READONLY).",
1333
+ "example": "ACCESS",
1018
1334
  "maxLength": 256
1019
1335
  },
1020
1336
  "values": {
1021
1337
  "type": "object",
1022
1338
  "additionalProperties": {
1023
1339
  "type": "string",
1340
+ "example": "ACCESS",
1024
1341
  "maxLength": 256
1025
- }
1342
+ },
1343
+ "description": "A map of domain identifiers to permission values."
1026
1344
  }
1027
1345
  },
1028
1346
  "required": [
@@ -1032,9 +1350,11 @@
1032
1350
  },
1033
1351
  "RoleWebdavPermissions": {
1034
1352
  "type": "object",
1353
+ "description": "Document listing the WebDAV permissions assigned to a role (unscoped).",
1035
1354
  "properties": {
1036
1355
  "unscoped": {
1037
1356
  "type": "array",
1357
+ "description": "Unscoped WebDAV permissions.",
1038
1358
  "items": {
1039
1359
  "$ref": "#/components/schemas/RoleWebdavPermission"
1040
1360
  }
@@ -1043,6 +1363,7 @@
1043
1363
  },
1044
1364
  "RolePermissions": {
1045
1365
  "type": "object",
1366
+ "description": "Document representing the complete set of permissions for an access role.",
1046
1367
  "properties": {
1047
1368
  "module": {
1048
1369
  "$ref": "#/components/schemas/RoleModulePermissions"
@@ -1060,68 +1381,95 @@
1060
1381
  },
1061
1382
  "User": {
1062
1383
  "type": "object",
1384
+ "description": "Document representing a user.",
1063
1385
  "properties": {
1064
1386
  "login": {
1065
1387
  "type": "string",
1388
+ "description": "The login of the user.",
1389
+ "example": "admin-user",
1066
1390
  "maxLength": 256,
1067
1391
  "minLength": 1
1068
1392
  },
1069
1393
  "password": {
1070
1394
  "type": "string",
1395
+ "description": "The password of the user.",
1396
+ "example": "password",
1071
1397
  "maxLength": 256
1072
1398
  },
1073
1399
  "email": {
1074
1400
  "type": "string",
1401
+ "description": "The email address of the user.",
1402
+ "example": "admin@example.com",
1075
1403
  "maxLength": 256
1076
1404
  },
1077
1405
  "firstName": {
1078
1406
  "type": "string",
1407
+ "description": "The first name of the user.",
1408
+ "example": "John",
1079
1409
  "maxLength": 256
1080
1410
  },
1081
1411
  "lastName": {
1082
1412
  "type": "string",
1413
+ "description": "The last name of the user.",
1414
+ "example": "Doe",
1083
1415
  "maxLength": 256
1084
1416
  },
1085
1417
  "externalId": {
1086
1418
  "type": "string",
1419
+ "description": "The external identifier for the user.",
1420
+ "example": "ext-12345",
1087
1421
  "maxLength": 256
1088
1422
  },
1089
1423
  "disabled": {
1090
- "type": "boolean"
1424
+ "type": "boolean",
1425
+ "description": "Indicates whether the user is disabled.",
1426
+ "example": false
1091
1427
  },
1092
1428
  "locked": {
1093
- "type": "boolean"
1429
+ "type": "boolean",
1430
+ "description": "Indicates whether the user is locked.",
1431
+ "example": false
1094
1432
  },
1095
1433
  "lastLoginDate": {
1096
1434
  "type": "string",
1097
- "format": "date"
1435
+ "format": "date",
1436
+ "description": "The date of the user's last login.",
1437
+ "example": "2024-10-14"
1098
1438
  },
1099
1439
  "passwordExpirationDate": {
1100
1440
  "type": "string",
1101
- "format": "date-time"
1441
+ "format": "date-time",
1442
+ "description": "The date and time when the user's password expires.",
1443
+ "example": "2025-01-14T00:00:00Z"
1102
1444
  },
1103
1445
  "passwordModificationDate": {
1104
1446
  "type": "string",
1105
- "format": "date-time"
1447
+ "format": "date-time",
1448
+ "description": "The date and time when the user's password was last modified.",
1449
+ "example": "2024-10-14T10:00:00Z"
1106
1450
  },
1107
1451
  "preferredDataLocale": {
1108
1452
  "allOf": [
1109
1453
  {
1110
1454
  "$ref": "#/components/schemas/LocaleCode"
1111
1455
  }
1112
- ]
1456
+ ],
1457
+ "description": "The preferred data locale for the user."
1113
1458
  },
1114
1459
  "preferredUiLocale": {
1115
1460
  "allOf": [
1116
1461
  {
1117
1462
  "$ref": "#/components/schemas/LocaleCode"
1118
1463
  }
1119
- ]
1464
+ ],
1465
+ "description": "The preferred UI locale for the user."
1120
1466
  },
1121
1467
  "roles": {
1122
1468
  "type": "array",
1469
+ "description": "The list of role identifiers assigned to the user.",
1123
1470
  "items": {
1124
1471
  "type": "string",
1472
+ "example": "Administrator",
1125
1473
  "maxLength": 256
1126
1474
  }
1127
1475
  }
@@ -1133,28 +1481,38 @@
1133
1481
  },
1134
1482
  "Role": {
1135
1483
  "type": "object",
1484
+ "description": "Document representing an access role.",
1136
1485
  "properties": {
1137
1486
  "id": {
1138
1487
  "type": "string",
1488
+ "description": "The identifier of the access role.",
1489
+ "example": "Administrator",
1139
1490
  "maxLength": 256,
1140
1491
  "minLength": 1
1141
1492
  },
1142
1493
  "description": {
1143
1494
  "type": "string",
1495
+ "description": "The description of the access role.",
1496
+ "example": "Full administrative access",
1144
1497
  "maxLength": 4000
1145
1498
  },
1146
1499
  "userCount": {
1147
1500
  "type": "integer",
1148
- "format": "int32"
1501
+ "format": "int32",
1502
+ "description": "The number of users assigned to this role.",
1503
+ "example": 5
1149
1504
  },
1150
1505
  "userManager": {
1151
- "type": "boolean"
1506
+ "type": "boolean",
1507
+ "description": "Indicates whether this role has user management capabilities.",
1508
+ "example": true
1152
1509
  },
1153
1510
  "permissions": {
1154
1511
  "$ref": "#/components/schemas/RolePermissions"
1155
1512
  },
1156
1513
  "users": {
1157
1514
  "type": "array",
1515
+ "description": "The users assigned to the access role. Available through expands.",
1158
1516
  "items": {
1159
1517
  "$ref": "#/components/schemas/User"
1160
1518
  }
@@ -1167,9 +1525,11 @@
1167
1525
  "$ref": "#/components/schemas/PaginatedResultBase"
1168
1526
  }
1169
1527
  ],
1528
+ "description": "Document representing a collection of access roles.",
1170
1529
  "properties": {
1171
1530
  "data": {
1172
1531
  "type": "array",
1532
+ "description": "The collection of roles.",
1173
1533
  "items": {
1174
1534
  "$ref": "#/components/schemas/Role"
1175
1535
  }
@@ -1185,17 +1545,25 @@
1185
1545
  "properties": {
1186
1546
  "title": {
1187
1547
  "type": "string",
1548
+ "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",
1549
+ "example": "You do not have enough credit",
1188
1550
  "maxLength": 256
1189
1551
  },
1190
1552
  "type": {
1191
1553
  "type": "string",
1554
+ "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",
1555
+ "example": "NotEnoughMoney",
1192
1556
  "maxLength": 2048
1193
1557
  },
1194
1558
  "detail": {
1195
- "type": "string"
1559
+ "type": "string",
1560
+ "description": "A human-readable explanation specific to this occurrence of the problem.",
1561
+ "example": "Your current balance is 30, but that costs 50"
1196
1562
  },
1197
1563
  "instance": {
1198
1564
  "type": "string",
1565
+ "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",
1566
+ "example": "/account/12345/msgs/abc",
1199
1567
  "maxLength": 2048
1200
1568
  }
1201
1569
  },
@@ -1208,6 +1576,28 @@
1208
1576
  "Query": {
1209
1577
  "type": "object",
1210
1578
  "additionalProperties": false,
1579
+ "description": "A set of objects that define criteria used to select records. A query can contain one of the following:\n* `MatchAllQuery`\n - Matches all documents.\n* `TermQuery`\n - Matches one or more documents against one or more document fields.\n* `TextQuery`\n - Matches text against one or more fields.\n* `BoolQuery`\n - Allows construction of a logical expression of multiple queries.\n* `FilteredQuery`\n - Allows a filter to be applied to a query.\n* `NestedQuery`\n - Allows you to query on nested documents.\n - _Only supported by some Commerce APIs. For more details, see the endpoint descriptions in the API documentation._",
1580
+ "example": {
1581
+ "filteredQuery": {
1582
+ "query": {
1583
+ "textQuery": {
1584
+ "fields": [
1585
+ "couponId"
1586
+ ],
1587
+ "searchPhrase": "disabled"
1588
+ }
1589
+ },
1590
+ "filter": {
1591
+ "termFilter": {
1592
+ "field": "enabled",
1593
+ "operator": "is",
1594
+ "values": [
1595
+ false
1596
+ ]
1597
+ }
1598
+ }
1599
+ }
1600
+ },
1211
1601
  "maxProperties": 1,
1212
1602
  "minProperties": 1,
1213
1603
  "properties": {
@@ -1234,21 +1624,60 @@
1234
1624
  "BoolQuery": {
1235
1625
  "type": "object",
1236
1626
  "additionalProperties": false,
1627
+ "description": "A boolean query allows construction of full logical expression trees that are composed of other queries (usually term queries and text queries). A boolean query has three sets of clauses:\n \n - `must`, which combines as an `AND` operator.\n - `should`, which combines as an `OR` operator.\n - `must_not`, which combines as a `NOT` operator.\n \nIf `must`, `mustNot`, or `should` appear in the same boolean query, they are combined logically using the `AND` operator. For example:\n\n (must-1 AND must-1 AND ...)\n AND (should-1 OR should-2 OR ...)\n AND NOT (must_not-1 OR must_not-2 OR ...)\n",
1628
+ "example": {
1629
+ "value": {
1630
+ "must": [
1631
+ {
1632
+ "textQuery": {
1633
+ "fields": [
1634
+ "couponId"
1635
+ ],
1636
+ "searchPhrase": "DEAL"
1637
+ }
1638
+ },
1639
+ {
1640
+ "textQuery": {
1641
+ "fields": [
1642
+ "description"
1643
+ ],
1644
+ "searchPhrase": "Big bargain deal"
1645
+ }
1646
+ }
1647
+ ],
1648
+ "mustNot": [
1649
+ {
1650
+ "termQuery": {
1651
+ "fields": [
1652
+ "enabled"
1653
+ ],
1654
+ "operator": "is",
1655
+ "values": [
1656
+ false
1657
+ ]
1658
+ }
1659
+ }
1660
+ ]
1661
+ }
1662
+ },
1237
1663
  "properties": {
1238
1664
  "must": {
1239
1665
  "type": "array",
1666
+ "description": "List of queries to be evaluated as an `AND` operator.",
1240
1667
  "items": {
1241
1668
  "$ref": "#/components/schemas/Query"
1242
1669
  }
1243
1670
  },
1244
1671
  "mustNot": {
1245
1672
  "type": "array",
1673
+ "description": "List of queries to be evaluated as a `NOT` operator.",
1246
1674
  "items": {
1247
1675
  "$ref": "#/components/schemas/Query"
1248
1676
  }
1249
1677
  },
1250
1678
  "should": {
1251
1679
  "type": "array",
1680
+ "description": "List of queries to be evaluated as an `OR` operator.",
1252
1681
  "items": {
1253
1682
  "$ref": "#/components/schemas/Query"
1254
1683
  }
@@ -1258,6 +1687,7 @@
1258
1687
  "Filter": {
1259
1688
  "type": "object",
1260
1689
  "additionalProperties": false,
1690
+ "description": "Contains a set of objects that define criteria used to select records. A filter can contain one of the following:\n * `TermFilter`\n - Matches records where a field (or fields) exactly matches some simple value (including `null`).\n * `RangeFilter`\n - Matches records where a field value lies within a specified range.\n * `Range2Filter`\n - Matches records in a specified range across fields.\n * `QueryFilter`\n - Matches records based on a query.\n * `BoolFilter`\n - Provides filtering of records using a set of filters combined using a logical operator.",
1261
1691
  "maxProperties": 1,
1262
1692
  "minProperties": 1,
1263
1693
  "properties": {
@@ -1281,20 +1711,49 @@
1281
1711
  "BoolFilter": {
1282
1712
  "type": "object",
1283
1713
  "additionalProperties": false,
1714
+ "description": "Allows you to combine other filters into (possibly recursive) logical expression trees. A boolean filter is composed of a logical operator (`AND`, `OR`, `NOT`) and a list of filters that the operator relates to. Multiple filters can be negated with a single `NOT` operator, even when the filters are combined with the `AND` operator.",
1715
+ "example": {
1716
+ "value": {
1717
+ "operator": "and",
1718
+ "filters": [
1719
+ {
1720
+ "termFilter": {
1721
+ "field": "id",
1722
+ "operator": "is",
1723
+ "values": [
1724
+ "myId"
1725
+ ]
1726
+ }
1727
+ },
1728
+ {
1729
+ "termFilter": {
1730
+ "field": "couponId",
1731
+ "operator": "is",
1732
+ "values": [
1733
+ "couponOne"
1734
+ ]
1735
+ }
1736
+ }
1737
+ ]
1738
+ }
1739
+ },
1284
1740
  "properties": {
1285
1741
  "filters": {
1286
1742
  "type": "array",
1743
+ "description": "A list of filters that are logically combined by an operator.",
1287
1744
  "items": {
1288
1745
  "$ref": "#/components/schemas/Filter"
1289
1746
  }
1290
1747
  },
1291
1748
  "operator": {
1292
1749
  "type": "string",
1750
+ "description": "The logical operator that is used to combine the filters.",
1293
1751
  "enum": [
1294
1752
  "and",
1295
1753
  "or",
1296
1754
  "not"
1297
- ]
1755
+ ],
1756
+ "example": "and"
1298
1757
  }
1299
1758
  },
1300
1759
  "required": [
@@ -1303,6 +1762,7 @@
1303
1762
  },
1304
1763
  "QueryFilter": {
1305
1764
  "type": "object",
1765
+ "description": "Wraps any query and allows it to be used as a filter.",
1306
1766
  "properties": {
1307
1767
  "query": {
1308
1768
  "$ref": "#/components/schemas/Query"
@@ -1314,45 +1774,71 @@
1314
1774
  },
1315
1775
  "Field": {
1316
1776
  "type": "string",
1777
+ "description": "Name of the field. Might be a custom field name prefixed with c_.",
1778
+ "example": "couponId",
1317
1779
  "maxLength": 260
1318
1780
  },
1319
1781
  "Range2Filter": {
1320
1782
  "type": "object",
1321
1783
  "additionalProperties": false,
1784
+ "description": "Allows you to restrict a search result to hits where a range defined by specified attributes has a certain relationship to a specified range.\n\nThe first range (R1) is defined by a pair of attributes (`fromField` and `toField`) that specify the extent of a range, such as attributes `validFrom` and `validTo`.\n\nThe second range (R2) is defined by `fromValue` and `toValue`.\n\nThe filter mode specifies the method used to compare the two ranges:\n\n* `overlap`: R1 overlaps fully or partially with R2.\n* `containing`: R1 contains R2.\n* `contained`: R1 is contained in R2.\n\nThe range filter supports several value types, and relies on the natural sorting of the value type for range interpretation. Value ranges can be open-ended, but only at one end of the range. You can configure whether the lower bounds and upper bounds are inclusive or exclusive.\n\nA range 2 filter is useful for general restrictions that can be shared between searches (like a static date range) because the filter result is cached in memory. Range filters are not appropriate if the range is expected to be different for every query (for example, if the user controls the date range down to the hour via a UI control). Range filters are inclusive by default.",
1785
+ "example": {
1786
+ "fromField": "validFrom",
1787
+ "toField": "validTo",
1788
+ "filterMode": "overlap",
1789
+ "fromValue": "2007-01-01T00:00:00.000Z",
1790
+ "toValue": "2017-01-01T00:00:00.000Z"
1791
+ },
1322
1792
  "properties": {
1323
1793
  "filterMode": {
1324
1794
  "type": "string",
1325
1795
  "default": "overlap",
1796
+ "description": "Compare mode: overlap, containing, or contained.",
1326
1797
  "enum": [
1327
1798
  "overlap",
1328
1799
  "containing",
1329
1800
  "contained"
1330
- ]
1801
+ ],
1802
+ "example": "overlap"
1331
1803
  },
1332
1804
  "fromField": {
1333
1805
  "allOf": [
1334
1806
  {
1335
1807
  "$ref": "#/components/schemas/Field"
1336
1808
  }
1337
- ]
1809
+ ],
1810
+ "description": "The field name of the field that starts the first range.",
1811
+ "example": "validFrom"
1338
1812
  },
1339
1813
  "fromInclusive": {
1340
1814
  "type": "boolean",
1341
- "default": true
1815
+ "default": true,
1816
+ "description": "A flag indicating if the lower bound of the second range is inclusive. To make the lower bound exclusive, set to `false`.",
1817
+ "example": true
1818
+ },
1819
+ "fromValue": {
1820
+ "description": "The lower bound of the second range. If not specified, the range is open-ended with respect to the lower bound. You can't leave both the lower and upper bounds open-ended.",
1821
+ "example": "2007-01-01T00:00:00.000Z"
1342
1822
  },
1343
- "fromValue": {},
1344
1823
  "toField": {
1345
1824
  "allOf": [
1346
1825
  {
1347
1826
  "$ref": "#/components/schemas/Field"
1348
1827
  }
1349
- ]
1828
+ ],
1829
+ "description": "The field name of the field that ends the first range.",
1830
+ "example": "validTo"
1350
1831
  },
1351
1832
  "toInclusive": {
1352
1833
  "type": "boolean",
1353
- "default": true
1834
+ "default": true,
1835
+ "description": "A flag indicating if the upper bound of the second range is inclusive. To make the lower bound exclusive, set to `false`.",
1836
+ "example": true
1354
1837
  },
1355
- "toValue": {}
1838
+ "toValue": {
1839
+ "description": "The upper bound of the second range. If not specified, the range is open-ended with respect to the upper bound. You can't leave both the upper and lower bounds open-ended.",
1840
+ "example": "2017-01-01T00:00:00.000Z"
1841
+ }
1356
1842
  },
1357
1843
  "required": [
1358
1844
  "fromField",
@@ -1361,49 +1847,64 @@
1361
1847
  },
1362
1848
  "RangeFilter": {
1363
1849
  "type": "object",
1850
+ "description": "Allows you to restrict a search result to hits that have values for a given attribute that fall within a given value range. The range filter supports several value types and relies on the natural sorting of the value type for range interpretation. Value ranges can be open-ended, but only at one end of the range. You can configure whether the lower bounds and upper bounds are inclusive or exclusive.\n\nA range filter is useful for general restrictions that can be shared between searches (like a static date range) because the filter result is cached in memory. Range filters are not appropriate if the range is expected to be different for every query (for example, if the user controls the date range down to the hour via a UI control). Range filters are inclusive by default.",
1364
1851
  "properties": {
1365
1852
  "field": {
1366
1853
  "allOf": [
1367
1854
  {
1368
1855
  "$ref": "#/components/schemas/Field"
1369
1856
  }
1370
- ]
1857
+ ],
1858
+ "description": "The search field.",
1859
+ "example": "validFrom"
1371
1860
  },
1372
1861
  "from": {
1862
+ "description": "The lower bound of the filter range. If not specified, the range is open-ended with respect to the lower bound. You can't leave both the lower and upper bounds open-ended.",
1373
1863
  "oneOf": [
1374
1864
  {
1375
1865
  "type": "string",
1376
- "format": "date-time"
1866
+ "format": "date-time",
1867
+ "example": "2007-01-01T00:00:00Z"
1377
1868
  },
1378
1869
  {
1379
- "type": "integer"
1870
+ "type": "integer",
1871
+ "example": 1
1380
1872
  },
1381
1873
  {
1382
- "type": "number"
1874
+ "type": "number",
1875
+ "example": 1
1383
1876
  }
1384
1877
  ]
1385
1878
  },
1386
1879
  "fromInclusive": {
1387
1880
  "type": "boolean",
1388
- "default": true
1881
+ "default": true,
1882
+ "description": "A flag indicating if the lower bound of the range is inclusive. To make the lower bound exclusive, set to `false`.",
1883
+ "example": true
1389
1884
  },
1390
1885
  "to": {
1886
+ "description": "The upper bound of the filter range. If not specified, the range is open-ended with respect to the upper bound. You can't leave both the upper and lower bounds open-ended.",
1391
1887
  "oneOf": [
1392
1888
  {
1393
1889
  "type": "string",
1394
- "format": "date-time"
1890
+ "format": "date-time",
1891
+ "example": "2007-01-02T00:00:00Z"
1395
1892
  },
1396
1893
  {
1397
- "type": "integer"
1894
+ "type": "integer",
1895
+ "example": 2
1398
1896
  },
1399
1897
  {
1400
- "type": "number"
1898
+ "type": "number",
1899
+ "example": 2
1401
1900
  }
1402
1901
  ]
1403
1902
  },
1404
1903
  "toInclusive": {
1405
1904
  "type": "boolean",
1406
- "default": true
1905
+ "default": true,
1906
+ "description": "A flag indicating if the upper bound of the range is inclusive. To make the upper bound exclusive, set to `false`.",
1907
+ "example": true
1407
1908
  }
1408
1909
  },
1409
1910
  "required": [
@@ -1413,16 +1914,26 @@
1413
1914
  "TermFilter": {
1414
1915
  "type": "object",
1415
1916
  "additionalProperties": false,
1917
+ "description": "Allows you to restrict a search result to hits that match exactly one of the values configured for the filter. A term filter is useful for general restrictions that can be shared between searches. Use term filters whenever the criteria you filter on is a shared property of multiple searches (for example, like filtering by an order status). Use term filters for fields that have a discrete and small set of values only.",
1918
+ "example": {
1919
+ "field": "id",
1920
+ "operator": "is",
1921
+ "values": [
1922
+ "myId"
1923
+ ]
1924
+ },
1416
1925
  "properties": {
1417
1926
  "field": {
1418
1927
  "allOf": [
1419
1928
  {
1420
1929
  "$ref": "#/components/schemas/Field"
1421
1930
  }
1422
- ]
1931
+ ],
1932
+ "description": "The filter field."
1423
1933
  },
1424
1934
  "operator": {
1425
1935
  "type": "string",
1936
+ "description": "The operator used to compare the field's values with the given values.",
1426
1937
  "enum": [
1427
1938
  "is",
1428
1939
  "one_of",
@@ -1432,12 +1943,15 @@
1432
1943
  "greater",
1433
1944
  "not_in",
1434
1945
  "neq"
1435
- ]
1946
+ ],
1947
+ "example": "is"
1436
1948
  },
1437
1949
  "values": {
1438
1950
  "type": "array",
1951
+ "description": "The filter values.",
1439
1952
  "items": {
1440
- "type": "string"
1953
+ "type": "string",
1954
+ "example": "myId"
1441
1955
  }
1442
1956
  }
1443
1957
  },
@@ -1449,6 +1963,26 @@
1449
1963
  "FilteredQuery": {
1450
1964
  "type": "object",
1451
1965
  "additionalProperties": false,
1966
+ "description": "Allows to filter the result of a possibly complex query using a possibly complex filter.",
1967
+ "example": {
1968
+ "query": {
1969
+ "textQuery": {
1970
+ "fields": [
1971
+ "couponId"
1972
+ ],
1973
+ "searchPhrase": "disabled"
1974
+ }
1975
+ },
1976
+ "filter": {
1977
+ "termFilter": {
1978
+ "field": "enabled",
1979
+ "operator": "is",
1980
+ "values": [
1981
+ false
1982
+ ]
1983
+ }
1984
+ }
1985
+ },
1452
1986
  "properties": {
1453
1987
  "filter": {
1454
1988
  "$ref": "#/components/schemas/Filter"
@@ -1463,14 +1997,62 @@
1463
1997
  ]
1464
1998
  },
1465
1999
  "MatchAllQuery": {
1466
- "type": "object"
2000
+ "type": "object",
2001
+ "description": "Matches all documents (namespace and document type). This query comes in handy if you just want to filter a search result or really do not have any constraints."
1467
2002
  },
1468
2003
  "NestedQuery": {
1469
2004
  "type": "object",
1470
2005
  "additionalProperties": false,
2006
+ "description": "Allows you to query nested documents that are part of a larger document. Say, for example, that you have a main product with variations in one big document, and you want to constrain a search to main products that have variations that match multiple constraints. \n\nA `NestedQuery` is only supported by some Commerce APIs. For more details, see the endpoint descriptions in the API documentation.\n",
2007
+ "example": {
2008
+ "path": "order.shippingAddresses",
2009
+ "query": {
2010
+ "boolQuery": {
2011
+ "must": [
2012
+ {
2013
+ "boolQuery": {
2014
+ "must": [
2015
+ {
2016
+ "termQuery": {
2017
+ "fields": [
2018
+ "order.shippingAddresses.firstName"
2019
+ ],
2020
+ "operator": "is",
2021
+ "values": [
2022
+ "John"
2023
+ ]
2024
+ }
2025
+ }
2026
+ ]
2027
+ }
2028
+ },
2029
+ {
2030
+ "boolQuery": {
2031
+ "must": [
2032
+ {
2033
+ "termQuery": {
2034
+ "fields": [
2035
+ "order.shippingAddresses.lastName"
2036
+ ],
2037
+ "operator": "is",
2038
+ "values": [
2039
+ "Doe"
2040
+ ]
2041
+ }
2042
+ }
2043
+ ]
2044
+ }
2045
+ }
2046
+ ]
2047
+ }
2048
+ },
2049
+ "scoreMode": "avg"
2050
+ },
1471
2051
  "properties": {
1472
2052
  "path": {
1473
2053
  "type": "string",
2054
+ "description": "The path to the nested document.",
2055
+ "example": "order.shippingAddresses",
1474
2056
  "maxLength": 2048
1475
2057
  },
1476
2058
  "query": {
@@ -1478,12 +2060,14 @@
1478
2060
  },
1479
2061
  "scoreMode": {
1480
2062
  "type": "string",
2063
+ "description": "Indicates how scores for matching child objects affect the root parent document’s relevance score.",
1481
2064
  "enum": [
1482
2065
  "avg",
1483
2066
  "total",
1484
2067
  "max",
1485
2068
  "none"
1486
- ]
2069
+ ],
2070
+ "example": "avg"
1487
2071
  }
1488
2072
  },
1489
2073
  "required": [
@@ -1493,9 +2077,11 @@
1493
2077
  },
1494
2078
  "TermQuery": {
1495
2079
  "type": "object",
2080
+ "description": "A term query matches one or more values against one or more document fields. A document is considered a hit if one of the values matches exactly with at least one of the given fields. The operator `is` can only take one value, while `one_of` can take multiple values. If multiple fields are specified, they are combined using a logical `OR` operator.\n\n**Limitations:**\n\n* The `greater` and `less` operators are not supported under certain conditions. Both operators are permitted unless the API documentation states otherwise.\n* A subset of Commerce APIs handle queries with multiple fields differently. If the query has multiple fields, the query is internally handled as a logical `OR` of `DisjointMaxQueries` (with the dismax matching a value against all fields). The dismax makes sure that a document carrying a single term in multiple fields does not get higher scores than a document matching multiple terms in multiple fields.",
1496
2081
  "properties": {
1497
2082
  "fields": {
1498
2083
  "type": "array",
2084
+ "description": "The document fields that the values are matched against, combined with the operator.",
1499
2085
  "items": {
1500
2086
  "$ref": "#/components/schemas/Field"
1501
2087
  },
@@ -1503,6 +2089,7 @@
1503
2089
  },
1504
2090
  "operator": {
1505
2091
  "type": "string",
2092
+ "description": "Returns the operator to use for the term query.",
1506
2093
  "enum": [
1507
2094
  "is",
1508
2095
  "one_of",
@@ -1512,23 +2099,30 @@
1512
2099
  "greater",
1513
2100
  "not_in",
1514
2101
  "neq"
1515
- ]
2102
+ ],
2103
+ "example": "is"
1516
2104
  },
1517
2105
  "values": {
1518
2106
  "type": "array",
2107
+ "description": "The values that the fields are compared against, combined with the operator.",
1519
2108
  "items": {
2109
+ "example": "myCouponId",
1520
2110
  "oneOf": [
1521
2111
  {
1522
- "type": "string"
2112
+ "type": "string",
2113
+ "example": "myCouponId"
1523
2114
  },
1524
2115
  {
1525
- "type": "number"
2116
+ "type": "number",
2117
+ "example": 1
1526
2118
  },
1527
2119
  {
1528
- "type": "boolean"
2120
+ "type": "boolean",
2121
+ "example": true
1529
2122
  },
1530
2123
  {
1531
- "type": "integer"
2124
+ "type": "integer",
2125
+ "example": 1
1532
2126
  }
1533
2127
  ]
1534
2128
  }
@@ -1542,16 +2136,26 @@
1542
2136
  "TextQuery": {
1543
2137
  "type": "object",
1544
2138
  "additionalProperties": false,
2139
+ "description": "A text query is used to match some text (for example, a search phrase possibly consisting of multiple terms) against one or more fields. When multiple fields are provided, the phrase conceptually forms a logical `OR` over the fields. In this case, the terms of the phrase basically have to match within the text, that would result in concatenating all given fields.",
2140
+ "example": {
2141
+ "fields": [
2142
+ "couponId"
2143
+ ],
2144
+ "searchPhrase": "limit"
2145
+ },
1545
2146
  "properties": {
1546
2147
  "fields": {
1547
2148
  "type": "array",
2149
+ "description": "The document fields that the search phrase matches against.",
1548
2150
  "items": {
1549
2151
  "$ref": "#/components/schemas/Field"
1550
2152
  },
1551
2153
  "minItems": 1
1552
2154
  },
1553
2155
  "searchPhrase": {
1554
- "type": "string"
2156
+ "type": "string",
2157
+ "description": "A search phrase, which can include multiple terms separated by spaces.",
2158
+ "example": "campaign summer"
1555
2159
  }
1556
2160
  },
1557
2161
  "required": [
@@ -1562,18 +2166,27 @@
1562
2166
  "Sort": {
1563
2167
  "type": "object",
1564
2168
  "additionalProperties": false,
2169
+ "description": "Document representing a sort request. Each API has a different default sort configuration that can be modified in the request.",
2170
+ "example": {
2171
+ "field": "couponId",
2172
+ "sortOrder": "desc"
2173
+ },
1565
2174
  "properties": {
1566
2175
  "field": {
1567
2176
  "type": "string",
2177
+ "description": "The name of the field to sort on.",
2178
+ "example": "couponId",
1568
2179
  "maxLength": 256
1569
2180
  },
1570
2181
  "sortOrder": {
1571
2182
  "type": "string",
1572
2183
  "default": "asc",
2184
+ "description": "The sort order to be applied when sorting. When omitted, the default sort order (asc) is used.",
1573
2185
  "enum": [
1574
2186
  "asc",
1575
2187
  "desc"
1576
- ]
2188
+ ],
2189
+ "example": "asc"
1577
2190
  }
1578
2191
  },
1579
2192
  "required": [
@@ -1582,10 +2195,13 @@
1582
2195
  },
1583
2196
  "SearchRequest": {
1584
2197
  "type": "object",
2198
+ "description": "Document representing a search request for retrieving items within the Data API. The query is a potentially complex set of expressions. The fields and expands that each query supports are defined within the search resource.",
1585
2199
  "properties": {
1586
2200
  "limit": {
1587
2201
  "type": "integer",
1588
2202
  "format": "int32",
2203
+ "description": "Maximum records to retrieve per request, not to exceed 200.",
2204
+ "example": 10,
1589
2205
  "maximum": 200,
1590
2206
  "minimum": 1
1591
2207
  },
@@ -1594,6 +2210,7 @@
1594
2210
  },
1595
2211
  "sorts": {
1596
2212
  "type": "array",
2213
+ "description": "The list of sort clauses configured for the search request. Sort clauses are optional. See the description of the search endpoint for details on the default sorting behavior that is used when explicit sorts are not passed.",
1597
2214
  "items": {
1598
2215
  "$ref": "#/components/schemas/Sort"
1599
2216
  }
@@ -1611,7 +2228,8 @@
1611
2228
  {
1612
2229
  "$ref": "#/components/schemas/SearchRequest"
1613
2230
  }
1614
- ]
2231
+ ],
2232
+ "description": "Document representing a search request for retrieving users assigned to an access role.\n\nSearchable attributes:\n- login - String\n- email - String\n- firstName - String\n- lastName - String\n- externalId - String\n- lastLoginDate - Date\n- isLocked - Boolean\n- isDisabled - Boolean\n\nSortable attributes:\n- login - String\n- email - String\n- firstName - String\n- lastName - String\n- externalId - String\n- lastLoginDate - Date\n"
1615
2233
  },
1616
2234
  "PaginatedSearchResult": {
1617
2235
  "additionalProperties": false,
@@ -1620,18 +2238,67 @@
1620
2238
  "$ref": "#/components/schemas/PaginatedResultBase"
1621
2239
  }
1622
2240
  ],
2241
+ "description": "Document representing a generic search result. Each search resource should extend this to define what is returned in the `hits`.",
2242
+ "example": {
2243
+ "limit": 1,
2244
+ "hits": [
2245
+ {
2246
+ "couponId": "coupon1",
2247
+ "creationDate": "2019-10-20T12:00:00Z",
2248
+ "description": "This coupon is used to give 10% off stuff.",
2249
+ "enabled": false,
2250
+ "exportedCodeCount": 0,
2251
+ "lastModified": "2019-10-30T04:23:59Z",
2252
+ "redemptionCount": 3,
2253
+ "redemptionLimits": {
2254
+ "limitPerCode": 1,
2255
+ "limitPerCustomer": 1,
2256
+ "limitPerTimeFrame": {
2257
+ "limit": 2,
2258
+ "redemptionTimeFrame": 24
2259
+ }
2260
+ },
2261
+ "singleCode": "MyCode",
2262
+ "systemCodesConfig": {
2263
+ "codePrefix": "SG",
2264
+ "numberOfCodes": 500000
2265
+ },
2266
+ "totalCodesCount": 50,
2267
+ "type": "single_code"
2268
+ }
2269
+ ],
2270
+ "query": {
2271
+ "textQuery": {
2272
+ "fields": [
2273
+ "id",
2274
+ "description"
2275
+ ],
2276
+ "searchPhrase": "stuff"
2277
+ }
2278
+ },
2279
+ "sorts": [
2280
+ {
2281
+ "field": "couponId",
2282
+ "sortOrder": "desc"
2283
+ }
2284
+ ],
2285
+ "offset": 2,
2286
+ "total": 8
2287
+ },
1623
2288
  "properties": {
1624
2289
  "query": {
1625
2290
  "$ref": "#/components/schemas/Query"
1626
2291
  },
1627
2292
  "sorts": {
1628
2293
  "type": "array",
2294
+ "description": "The sorting that was applied to the result.",
1629
2295
  "items": {
1630
2296
  "$ref": "#/components/schemas/Sort"
1631
2297
  }
1632
2298
  },
1633
2299
  "hits": {
1634
2300
  "type": "array",
2301
+ "description": "The sorted array of search hits. Can be empty.",
1635
2302
  "items": {
1636
2303
  "type": "object"
1637
2304
  }
@@ -1647,9 +2314,11 @@
1647
2314
  "$ref": "#/components/schemas/PaginatedSearchResult"
1648
2315
  }
1649
2316
  ],
2317
+ "description": "Document representing a role user search result. This includes the query, sorts, hits (array of user objects), and pagination information.",
1650
2318
  "properties": {
1651
2319
  "hits": {
1652
2320
  "type": "array",
2321
+ "description": "The sorted array of search hits (user objects). Can be empty.",
1653
2322
  "items": {
1654
2323
  "$ref": "#/components/schemas/User"
1655
2324
  }
@@ -1666,9 +2335,11 @@
1666
2335
  "$ref": "#/components/schemas/PaginatedResultBase"
1667
2336
  }
1668
2337
  ],
2338
+ "description": "Document representing a collection of users assigned to an access role.",
1669
2339
  "properties": {
1670
2340
  "data": {
1671
2341
  "type": "array",
2342
+ "description": "The collection of users.",
1672
2343
  "items": {
1673
2344
  "$ref": "#/components/schemas/User"
1674
2345
  }
@@ -1683,16 +2354,19 @@
1683
2354
  "organizationId": {
1684
2355
  "name": "organizationId",
1685
2356
  "in": "path",
2357
+ "description": "An identifier for the organization the request is being made by",
1686
2358
  "required": true,
1687
2359
  "style": "simple",
1688
2360
  "explode": false,
1689
2361
  "schema": {
1690
2362
  "$ref": "#/components/schemas/OrganizationId"
1691
- }
2363
+ },
2364
+ "example": "f_ecom_zzxy_prd"
1692
2365
  },
1693
2366
  "expand": {
1694
2367
  "name": "expand",
1695
2368
  "in": "query",
2369
+ "description": "The list of resource types to include in the response.",
1696
2370
  "required": false,
1697
2371
  "style": "form",
1698
2372
  "explode": false,
@@ -1703,7 +2377,8 @@
1703
2377
  "enum": [
1704
2378
  "users",
1705
2379
  "permissions"
1706
- ]
2380
+ ],
2381
+ "example": "users"
1707
2382
  }
1708
2383
  }
1709
2384
  },
@@ -1715,16 +2390,23 @@
1715
2390
  "explode": true,
1716
2391
  "schema": {
1717
2392
  "$ref": "#/components/schemas/Select"
2393
+ },
2394
+ "examples": {
2395
+ "select": {
2396
+ "value": "(**)"
2397
+ }
1718
2398
  }
1719
2399
  },
1720
2400
  "roleId": {
1721
2401
  "name": "roleId",
1722
2402
  "in": "path",
2403
+ "description": "The identifier of the access role.",
1723
2404
  "required": true,
1724
2405
  "style": "simple",
1725
2406
  "explode": false,
1726
2407
  "schema": {
1727
2408
  "type": "string",
2409
+ "example": "Administrator",
1728
2410
  "maxLength": 256,
1729
2411
  "minLength": 1
1730
2412
  }
@@ -1732,19 +2414,798 @@
1732
2414
  "login": {
1733
2415
  "name": "login",
1734
2416
  "in": "path",
2417
+ "description": "The login of the user.",
1735
2418
  "required": true,
1736
2419
  "style": "simple",
1737
2420
  "explode": false,
1738
2421
  "schema": {
1739
2422
  "type": "string",
2423
+ "example": "admin-user",
1740
2424
  "maxLength": 256,
1741
2425
  "minLength": 1
1742
2426
  }
1743
2427
  }
1744
2428
  },
2429
+ "examples": {
2430
+ "RoleSearchResult": {
2431
+ "summary": "Role search result",
2432
+ "description": "Example of a role search response. By default, only IDs are returned.",
2433
+ "value": {
2434
+ "limit": 3,
2435
+ "offset": 0,
2436
+ "total": 3,
2437
+ "data": [
2438
+ {
2439
+ "id": "Administrator"
2440
+ },
2441
+ {
2442
+ "id": "CustomManager"
2443
+ },
2444
+ {
2445
+ "id": "ContentEditor"
2446
+ }
2447
+ ]
2448
+ }
2449
+ },
2450
+ "RoleSearchExpandUsersResult": {
2451
+ "summary": "Role search with expand users",
2452
+ "description": "Example of a role search response with `expand=users` and `select=(**)`. All role fields are returned and each role includes its full users.",
2453
+ "value": {
2454
+ "limit": 3,
2455
+ "offset": 0,
2456
+ "total": 3,
2457
+ "data": [
2458
+ {
2459
+ "id": "Administrator",
2460
+ "description": "Full administrative access to Business Manager",
2461
+ "userCount": 2,
2462
+ "userManager": true,
2463
+ "users": [
2464
+ {
2465
+ "login": "admin-user",
2466
+ "email": "admin@example.com",
2467
+ "firstName": "John",
2468
+ "lastName": "Doe",
2469
+ "externalId": "ext-12345",
2470
+ "disabled": false,
2471
+ "locked": false,
2472
+ "lastLoginDate": "2024-10-14",
2473
+ "passwordExpirationDate": "2025-01-14T00:00:00.000Z",
2474
+ "passwordModificationDate": "2024-10-14T10:00:00.000Z",
2475
+ "preferredDataLocale": "en-US",
2476
+ "preferredUiLocale": "en-US",
2477
+ "roles": [
2478
+ "Administrator"
2479
+ ]
2480
+ }
2481
+ ]
2482
+ },
2483
+ {
2484
+ "id": "CustomManager",
2485
+ "description": "Custom manager role for site operations",
2486
+ "userCount": 5,
2487
+ "userManager": false,
2488
+ "users": [
2489
+ {
2490
+ "login": "manager-user",
2491
+ "email": "manager@example.com",
2492
+ "firstName": "Alice",
2493
+ "lastName": "Brown",
2494
+ "externalId": "ext-11111",
2495
+ "disabled": false,
2496
+ "locked": false,
2497
+ "lastLoginDate": "2024-12-01",
2498
+ "passwordExpirationDate": "2025-03-01T00:00:00.000Z",
2499
+ "passwordModificationDate": "2024-12-01T09:00:00.000Z",
2500
+ "preferredDataLocale": "en-US",
2501
+ "preferredUiLocale": "en-US",
2502
+ "roles": [
2503
+ "CustomManager"
2504
+ ]
2505
+ }
2506
+ ]
2507
+ },
2508
+ {
2509
+ "id": "ContentEditor",
2510
+ "description": "Content editing access",
2511
+ "userCount": 8,
2512
+ "userManager": false,
2513
+ "users": [
2514
+ {
2515
+ "login": "editor-user",
2516
+ "email": "editor@example.com",
2517
+ "firstName": "Jane",
2518
+ "lastName": "Smith",
2519
+ "externalId": "ext-67890",
2520
+ "disabled": false,
2521
+ "locked": false,
2522
+ "lastLoginDate": "2024-11-20",
2523
+ "passwordExpirationDate": "2025-02-20T00:00:00.000Z",
2524
+ "passwordModificationDate": "2024-11-20T08:30:00.000Z",
2525
+ "preferredDataLocale": "en-US",
2526
+ "preferredUiLocale": "en-US",
2527
+ "roles": [
2528
+ "ContentEditor"
2529
+ ]
2530
+ }
2531
+ ]
2532
+ }
2533
+ ]
2534
+ }
2535
+ },
2536
+ "RoleSearchExpandPermissionsResult": {
2537
+ "summary": "Role search with expand permissions",
2538
+ "description": "Example of a role search response with `expand=permissions` and `select=(**)`. All role fields are returned and each role includes its full permissions.",
2539
+ "value": {
2540
+ "limit": 3,
2541
+ "offset": 0,
2542
+ "total": 3,
2543
+ "data": [
2544
+ {
2545
+ "id": "Administrator",
2546
+ "description": "Full administrative access to Business Manager",
2547
+ "userCount": 2,
2548
+ "userManager": true,
2549
+ "permissions": {
2550
+ "module": {
2551
+ "organization": [
2552
+ {
2553
+ "name": "jobschedules",
2554
+ "application": "bm",
2555
+ "system": true,
2556
+ "type": "module",
2557
+ "value": "ACCESS"
2558
+ },
2559
+ {
2560
+ "name": "customreports",
2561
+ "application": "bm",
2562
+ "system": false,
2563
+ "type": "module",
2564
+ "value": "ACCESS"
2565
+ }
2566
+ ],
2567
+ "site": [
2568
+ {
2569
+ "name": "library_content",
2570
+ "application": "bm",
2571
+ "system": true,
2572
+ "type": "module",
2573
+ "values": {
2574
+ "SiteGenesis": "ACCESS",
2575
+ "RefArch": "READONLY"
2576
+ }
2577
+ }
2578
+ ]
2579
+ },
2580
+ "functional": {
2581
+ "organization": [
2582
+ {
2583
+ "name": "Delete_All_Catalogs",
2584
+ "type": "functional",
2585
+ "value": "ACCESS"
2586
+ }
2587
+ ],
2588
+ "site": [
2589
+ {
2590
+ "name": "ViewOrders",
2591
+ "type": "functional",
2592
+ "values": {
2593
+ "SiteGenesis": "ACCESS"
2594
+ }
2595
+ }
2596
+ ]
2597
+ },
2598
+ "locale": {
2599
+ "unscoped": [
2600
+ {
2601
+ "localeId": "default",
2602
+ "type": "locale",
2603
+ "value": "ACCESS"
2604
+ },
2605
+ {
2606
+ "localeId": "en",
2607
+ "type": "locale",
2608
+ "value": "ACCESS"
2609
+ }
2610
+ ]
2611
+ },
2612
+ "webdav": {
2613
+ "unscoped": [
2614
+ {
2615
+ "folder": "/catalogs/apparel-catalog",
2616
+ "type": "webdav",
2617
+ "value": "ACCESS"
2618
+ }
2619
+ ]
2620
+ }
2621
+ }
2622
+ },
2623
+ {
2624
+ "id": "CustomManager",
2625
+ "description": "Custom manager role for site operations",
2626
+ "userCount": 5,
2627
+ "userManager": false,
2628
+ "permissions": {
2629
+ "module": {
2630
+ "site": [
2631
+ {
2632
+ "name": "library_content",
2633
+ "application": "bm",
2634
+ "system": true,
2635
+ "type": "module",
2636
+ "values": {
2637
+ "SiteGenesis": "ACCESS"
2638
+ }
2639
+ }
2640
+ ]
2641
+ },
2642
+ "locale": {
2643
+ "unscoped": [
2644
+ {
2645
+ "localeId": "default",
2646
+ "type": "locale",
2647
+ "value": "ACCESS"
2648
+ }
2649
+ ]
2650
+ },
2651
+ "webdav": {
2652
+ "unscoped": []
2653
+ }
2654
+ }
2655
+ },
2656
+ {
2657
+ "id": "ContentEditor",
2658
+ "description": "Content editing access",
2659
+ "userCount": 8,
2660
+ "userManager": false,
2661
+ "permissions": {
2662
+ "module": {
2663
+ "site": [
2664
+ {
2665
+ "name": "library_content",
2666
+ "application": "bm",
2667
+ "system": true,
2668
+ "type": "module",
2669
+ "values": {
2670
+ "SiteGenesis": "READONLY"
2671
+ }
2672
+ }
2673
+ ]
2674
+ },
2675
+ "locale": {
2676
+ "unscoped": [
2677
+ {
2678
+ "localeId": "default",
2679
+ "type": "locale",
2680
+ "value": "ACCESS"
2681
+ },
2682
+ {
2683
+ "localeId": "en",
2684
+ "type": "locale",
2685
+ "value": "READONLY"
2686
+ }
2687
+ ]
2688
+ },
2689
+ "webdav": {
2690
+ "unscoped": []
2691
+ }
2692
+ }
2693
+ }
2694
+ ]
2695
+ }
2696
+ },
2697
+ "RoleDetailsResult": {
2698
+ "summary": "Single role",
2699
+ "description": "Example of a single role response. By default, only the ID is returned.",
2700
+ "value": {
2701
+ "id": "Administrator"
2702
+ }
2703
+ },
2704
+ "RoleDetailsExpandUsersResult": {
2705
+ "summary": "Single role with expand users",
2706
+ "description": "Example of a single role response with `expand=users` and `select=(**)`. All role fields are returned including the assigned users.",
2707
+ "value": {
2708
+ "id": "Administrator",
2709
+ "description": "Full administrative access to Business Manager",
2710
+ "userCount": 2,
2711
+ "userManager": true,
2712
+ "users": [
2713
+ {
2714
+ "login": "admin-user",
2715
+ "email": "admin@example.com",
2716
+ "firstName": "John",
2717
+ "lastName": "Doe",
2718
+ "externalId": "ext-12345",
2719
+ "disabled": false,
2720
+ "locked": false,
2721
+ "lastLoginDate": "2024-10-14",
2722
+ "passwordExpirationDate": "2025-01-14T00:00:00.000Z",
2723
+ "passwordModificationDate": "2024-10-14T10:00:00.000Z",
2724
+ "preferredDataLocale": "en-US",
2725
+ "preferredUiLocale": "en-US",
2726
+ "roles": [
2727
+ "Administrator"
2728
+ ]
2729
+ }
2730
+ ]
2731
+ }
2732
+ },
2733
+ "RoleDetailsExpandPermissionsResult": {
2734
+ "summary": "Single role with expand permissions",
2735
+ "description": "Example of a single role response with `expand=permissions` and `select=(**)`. All role fields are returned including the full permissions.",
2736
+ "value": {
2737
+ "id": "Administrator",
2738
+ "description": "Full administrative access to Business Manager",
2739
+ "userCount": 2,
2740
+ "userManager": true,
2741
+ "permissions": {
2742
+ "module": {
2743
+ "organization": [
2744
+ {
2745
+ "name": "jobschedules",
2746
+ "application": "bm",
2747
+ "system": true,
2748
+ "type": "module",
2749
+ "value": "ACCESS"
2750
+ },
2751
+ {
2752
+ "name": "customreports",
2753
+ "application": "bm",
2754
+ "system": false,
2755
+ "type": "module",
2756
+ "value": "ACCESS"
2757
+ }
2758
+ ],
2759
+ "site": [
2760
+ {
2761
+ "name": "library_content",
2762
+ "application": "bm",
2763
+ "system": true,
2764
+ "type": "module",
2765
+ "values": {
2766
+ "SiteGenesis": "ACCESS",
2767
+ "RefArch": "READONLY"
2768
+ }
2769
+ }
2770
+ ]
2771
+ },
2772
+ "functional": {
2773
+ "organization": [
2774
+ {
2775
+ "name": "Delete_All_Catalogs",
2776
+ "type": "functional",
2777
+ "value": "ACCESS"
2778
+ }
2779
+ ],
2780
+ "site": [
2781
+ {
2782
+ "name": "ViewOrders",
2783
+ "type": "functional",
2784
+ "values": {
2785
+ "SiteGenesis": "ACCESS"
2786
+ }
2787
+ }
2788
+ ]
2789
+ },
2790
+ "locale": {
2791
+ "unscoped": [
2792
+ {
2793
+ "localeId": "default",
2794
+ "type": "locale",
2795
+ "value": "ACCESS"
2796
+ },
2797
+ {
2798
+ "localeId": "en",
2799
+ "type": "locale",
2800
+ "value": "ACCESS"
2801
+ },
2802
+ {
2803
+ "localeId": "de",
2804
+ "type": "locale",
2805
+ "value": "READONLY"
2806
+ }
2807
+ ]
2808
+ },
2809
+ "webdav": {
2810
+ "unscoped": [
2811
+ {
2812
+ "folder": "/catalogs/apparel-catalog",
2813
+ "type": "webdav",
2814
+ "value": "ACCESS"
2815
+ },
2816
+ {
2817
+ "folder": "/impex",
2818
+ "type": "webdav",
2819
+ "value": "ACCESS"
2820
+ }
2821
+ ]
2822
+ }
2823
+ }
2824
+ }
2825
+ },
2826
+ "RoleNotFound": {
2827
+ "summary": "Role not found",
2828
+ "description": "Example of an error when the specified role does not exist",
2829
+ "value": {
2830
+ "title": "Role Not Found",
2831
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/role-not-found",
2832
+ "detail": "No access role with ID 'nonexistent-role' could be found."
2833
+ }
2834
+ },
2835
+ "CreateRole": {
2836
+ "summary": "Create an access role",
2837
+ "description": "Example of creating a new access role",
2838
+ "value": {
2839
+ "id": "CustomManager",
2840
+ "description": "Custom manager role for site operations"
2841
+ }
2842
+ },
2843
+ "RoleCreated": {
2844
+ "summary": "Newly created role",
2845
+ "description": "Example of a successfully created access role",
2846
+ "value": {
2847
+ "id": "CustomManager",
2848
+ "description": "Custom manager role for site operations",
2849
+ "userCount": 0,
2850
+ "userManager": false
2851
+ }
2852
+ },
2853
+ "IdConflict": {
2854
+ "summary": "ID conflict",
2855
+ "description": "Example of an error when the ID in the request body does not match the ID in the URL",
2856
+ "value": {
2857
+ "title": "Id Conflict",
2858
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/id-conflict",
2859
+ "detail": "The ID in the request body ('DifferentRoleId') doesn't match the ID in the URL ('ScapiTestRole')."
2860
+ }
2861
+ },
2862
+ "RoleAlreadyExists": {
2863
+ "summary": "Role already exists",
2864
+ "description": "Example of an error when trying to create a role that already exists",
2865
+ "value": {
2866
+ "title": "Role Already Exists",
2867
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/role-already-exists",
2868
+ "detail": "An access role with ID 'ScapiTestRole' already exists. Please delete the existing role before creating a role with the same ID."
2869
+ }
2870
+ },
2871
+ "RoleOperationNotAllowed": {
2872
+ "summary": "Role operation not allowed",
2873
+ "description": "Example of an error when the operation is not allowed for the given role",
2874
+ "value": {
2875
+ "title": "Role Operation Not Allowed",
2876
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/role-operation-not-allowed",
2877
+ "detail": "The operation isn't allowed for the role with ID 'Administrator'."
2878
+ }
2879
+ },
2880
+ "RolePermissionsSuccess": {
2881
+ "summary": "Successful role permissions retrieval",
2882
+ "description": "Example of a successful retrieval of role permissions",
2883
+ "value": {
2884
+ "module": {
2885
+ "organization": [
2886
+ {
2887
+ "name": "jobschedules",
2888
+ "application": "bm",
2889
+ "system": true,
2890
+ "type": "module",
2891
+ "value": "ACCESS"
2892
+ },
2893
+ {
2894
+ "name": "customreports",
2895
+ "application": "bm",
2896
+ "system": false,
2897
+ "type": "module",
2898
+ "value": "ACCESS"
2899
+ }
2900
+ ],
2901
+ "site": [
2902
+ {
2903
+ "name": "library_content",
2904
+ "application": "bm",
2905
+ "system": true,
2906
+ "type": "module",
2907
+ "values": {
2908
+ "SiteGenesis": "ACCESS",
2909
+ "RefArch": "READONLY"
2910
+ }
2911
+ }
2912
+ ]
2913
+ },
2914
+ "functional": {
2915
+ "organization": [
2916
+ {
2917
+ "name": "Delete_All_Catalogs",
2918
+ "type": "functional",
2919
+ "value": "ACCESS"
2920
+ }
2921
+ ],
2922
+ "site": [
2923
+ {
2924
+ "name": "ViewOrders",
2925
+ "type": "functional",
2926
+ "values": {
2927
+ "SiteGenesis": "ACCESS"
2928
+ }
2929
+ }
2930
+ ]
2931
+ },
2932
+ "locale": {
2933
+ "unscoped": [
2934
+ {
2935
+ "localeId": "default",
2936
+ "type": "locale",
2937
+ "value": "ACCESS"
2938
+ },
2939
+ {
2940
+ "localeId": "en",
2941
+ "type": "locale",
2942
+ "value": "ACCESS"
2943
+ },
2944
+ {
2945
+ "localeId": "de",
2946
+ "type": "locale",
2947
+ "value": "READONLY"
2948
+ }
2949
+ ]
2950
+ },
2951
+ "webdav": {
2952
+ "unscoped": [
2953
+ {
2954
+ "folder": "/catalogs/apparel-catalog",
2955
+ "type": "webdav",
2956
+ "value": "ACCESS"
2957
+ },
2958
+ {
2959
+ "folder": "/impex",
2960
+ "type": "webdav",
2961
+ "value": "ACCESS"
2962
+ }
2963
+ ]
2964
+ }
2965
+ }
2966
+ },
2967
+ "SetPermissions": {
2968
+ "summary": "Set role permissions",
2969
+ "description": "Example of setting permissions for an access role",
2970
+ "value": {
2971
+ "module": {
2972
+ "organization": [
2973
+ {
2974
+ "name": "jobschedules",
2975
+ "application": "bm",
2976
+ "system": true,
2977
+ "type": "module",
2978
+ "value": "ACCESS"
2979
+ }
2980
+ ],
2981
+ "site": [
2982
+ {
2983
+ "name": "library_content",
2984
+ "application": "bm",
2985
+ "system": true,
2986
+ "type": "module",
2987
+ "values": {
2988
+ "SiteGenesis": "ACCESS"
2989
+ }
2990
+ }
2991
+ ]
2992
+ },
2993
+ "functional": {
2994
+ "organization": [
2995
+ {
2996
+ "name": "Delete_All_Catalogs",
2997
+ "type": "functional",
2998
+ "value": "ACCESS"
2999
+ }
3000
+ ]
3001
+ }
3002
+ }
3003
+ },
3004
+ "InvalidPermissionType": {
3005
+ "summary": "Invalid permission type",
3006
+ "description": "Example of an error when the type of a permission does not match the expected type",
3007
+ "value": {
3008
+ "title": "Invalid Permission Type",
3009
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-permission-type",
3010
+ "detail": "The expected permission type is 'module' but provided was 'locale' for permission 'jobschedules(system)' in path 'module.organization'."
3011
+ }
3012
+ },
3013
+ "UnknownPermission": {
3014
+ "summary": "Unknown permission",
3015
+ "description": "Example of an error when a permission ID cannot be resolved",
3016
+ "value": {
3017
+ "title": "Unknown Permission",
3018
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unknown-permission",
3019
+ "detail": "Permission 'nonexistent-permission-xyz(system)' for application 'bm' in path 'module.organization' is unknown."
3020
+ }
3021
+ },
3022
+ "InvalidPermissionValue": {
3023
+ "summary": "Invalid permission value",
3024
+ "description": "Example of an error when a permission value is unknown or not supported",
3025
+ "value": {
3026
+ "title": "Invalid Permission Value",
3027
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-permission-value",
3028
+ "detail": "Permission 'jobschedules(system)' in path 'module.organization' doesn't support a value of 'INVALID_VALUE'."
3029
+ }
3030
+ },
3031
+ "SearchUsersByLogin": {
3032
+ "summary": "Search role users by login",
3033
+ "description": "Example of searching for users assigned to a role by their login",
3034
+ "value": {
3035
+ "query": {
3036
+ "textQuery": {
3037
+ "fields": [
3038
+ "login"
3039
+ ],
3040
+ "searchPhrase": "admin"
3041
+ }
3042
+ },
3043
+ "limit": 25,
3044
+ "offset": 0
3045
+ }
3046
+ },
3047
+ "SearchUsersByEmail": {
3048
+ "summary": "Search role users by email",
3049
+ "description": "Example of searching for users assigned to a role by their email",
3050
+ "value": {
3051
+ "query": {
3052
+ "textQuery": {
3053
+ "fields": [
3054
+ "email"
3055
+ ],
3056
+ "searchPhrase": "@salesforce.com"
3057
+ }
3058
+ },
3059
+ "limit": 10,
3060
+ "offset": 0,
3061
+ "sorts": [
3062
+ {
3063
+ "field": "login",
3064
+ "sortOrder": "asc"
3065
+ }
3066
+ ]
3067
+ }
3068
+ },
3069
+ "RoleUserSearchResultSuccess": {
3070
+ "summary": "Successful role user search result",
3071
+ "description": "Example of a successful role user search",
3072
+ "value": {
3073
+ "limit": 1,
3074
+ "offset": 0,
3075
+ "total": 1,
3076
+ "hits": [
3077
+ {
3078
+ "login": "admin-user",
3079
+ "email": "admin@example.com",
3080
+ "firstName": "John",
3081
+ "lastName": "Doe",
3082
+ "externalId": "ext-12345",
3083
+ "disabled": false,
3084
+ "locked": false,
3085
+ "lastLoginDate": "2024-10-14",
3086
+ "passwordExpirationDate": "2025-01-14T00:00:00.000Z",
3087
+ "passwordModificationDate": "2024-10-14T10:00:00.000Z",
3088
+ "preferredDataLocale": "en-US",
3089
+ "preferredUiLocale": "en-US",
3090
+ "roles": [
3091
+ "Administrator"
3092
+ ]
3093
+ }
3094
+ ],
3095
+ "query": {
3096
+ "textQuery": {
3097
+ "fields": [
3098
+ "login"
3099
+ ],
3100
+ "searchPhrase": "admin"
3101
+ }
3102
+ },
3103
+ "sorts": [
3104
+ {
3105
+ "field": "login",
3106
+ "sortOrder": "asc"
3107
+ }
3108
+ ]
3109
+ }
3110
+ },
3111
+ "UnqueryableField": {
3112
+ "summary": "Unqueryable field",
3113
+ "description": "Example of an error when an invalid field name is used in the search query",
3114
+ "value": {
3115
+ "title": "Unqueryable Field",
3116
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unqueryable-field",
3117
+ "detail": "The field 'nonexistent_field' can't be queried."
3118
+ }
3119
+ },
3120
+ "FieldNotSortable": {
3121
+ "summary": "Field not sortable",
3122
+ "description": "Example of an error when a field that cannot be used for sorting is specified",
3123
+ "value": {
3124
+ "title": "Field Not Sortable",
3125
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/field-not-sortable",
3126
+ "detail": "The field 'locked' can't be used to sort the results."
3127
+ }
3128
+ },
3129
+ "RoleUserCollectionSuccess": {
3130
+ "summary": "Successful role user collection",
3131
+ "description": "Example of a successful retrieval of users assigned to a role with `select=(**)`",
3132
+ "value": {
3133
+ "limit": 2,
3134
+ "offset": 0,
3135
+ "total": 2,
3136
+ "data": [
3137
+ {
3138
+ "login": "admin-user",
3139
+ "email": "admin@example.com",
3140
+ "firstName": "John",
3141
+ "lastName": "Doe",
3142
+ "externalId": "ext-12345",
3143
+ "disabled": false,
3144
+ "locked": false,
3145
+ "lastLoginDate": "2024-10-14",
3146
+ "passwordExpirationDate": "2025-01-14T00:00:00.000Z",
3147
+ "passwordModificationDate": "2024-10-14T10:00:00.000Z",
3148
+ "preferredDataLocale": "en-US",
3149
+ "preferredUiLocale": "en-US",
3150
+ "roles": [
3151
+ "Administrator"
3152
+ ]
3153
+ },
3154
+ {
3155
+ "login": "editor-user",
3156
+ "email": "editor@example.com",
3157
+ "firstName": "Jane",
3158
+ "lastName": "Smith",
3159
+ "externalId": "ext-67890",
3160
+ "disabled": false,
3161
+ "locked": false,
3162
+ "lastLoginDate": "2024-11-20",
3163
+ "passwordExpirationDate": "2025-02-20T00:00:00.000Z",
3164
+ "passwordModificationDate": "2024-11-20T08:30:00.000Z",
3165
+ "preferredDataLocale": "en-US",
3166
+ "preferredUiLocale": "en-US",
3167
+ "roles": [
3168
+ "ContentEditor"
3169
+ ]
3170
+ }
3171
+ ]
3172
+ }
3173
+ },
3174
+ "UserAssigned": {
3175
+ "summary": "User assigned to role",
3176
+ "description": "Example of a user successfully assigned to an access role",
3177
+ "value": {
3178
+ "login": "admin-user",
3179
+ "email": "admin@example.com",
3180
+ "firstName": "John",
3181
+ "lastName": "Doe",
3182
+ "externalId": "ext-12345",
3183
+ "disabled": false,
3184
+ "locked": false,
3185
+ "lastLoginDate": "2024-10-14",
3186
+ "passwordExpirationDate": "2025-01-14T00:00:00.000Z",
3187
+ "passwordModificationDate": "2024-10-14T10:00:00.000Z",
3188
+ "preferredDataLocale": "en-US",
3189
+ "preferredUiLocale": "en-US",
3190
+ "roles": [
3191
+ "Administrator"
3192
+ ]
3193
+ }
3194
+ },
3195
+ "UserNotFound": {
3196
+ "summary": "User not found",
3197
+ "description": "Example of an error when the specified user does not exist",
3198
+ "value": {
3199
+ "title": "User Not Found",
3200
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/user-not-found",
3201
+ "detail": "No user with login 'nonexistent-user-xyz' could be found."
3202
+ }
3203
+ }
3204
+ },
1745
3205
  "securitySchemes": {
1746
3206
  "AmOAuth2": {
1747
3207
  "type": "oauth2",
3208
+ "description": "OAuth 2.0 security scheme for Admin API access using Account Manager.\nRequires appropriate scopes for role management operations.\n",
1748
3209
  "flows": {
1749
3210
  "clientCredentials": {
1750
3211
  "tokenUrl": "https://account.demandware.com/dw/oauth2/access_token",