@salesforce/b2c-tooling-sdk 2.3.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 (203) hide show
  1. package/data/guides/enrichment.json +291 -0
  2. package/data/guides/index.json +426 -37
  3. package/data/schemas/dw.schema.json +590 -0
  4. package/data/tooling/index.json +18 -9
  5. package/dist/esm/cli/base-command.d.ts +20 -1
  6. package/dist/esm/cli/base-command.js +61 -11
  7. package/dist/esm/cli/base-command.js.map +1 -1
  8. package/dist/esm/cli/cartridge-command.js +2 -1
  9. package/dist/esm/cli/cartridge-command.js.map +1 -1
  10. package/dist/esm/cli/command-search.d.ts +85 -0
  11. package/dist/esm/cli/command-search.js +147 -0
  12. package/dist/esm/cli/command-search.js.map +1 -0
  13. package/dist/esm/cli/config.d.ts +10 -1
  14. package/dist/esm/cli/config.js +18 -9
  15. package/dist/esm/cli/config.js.map +1 -1
  16. package/dist/esm/cli/hooks.d.ts +13 -0
  17. package/dist/esm/cli/hooks.js +11 -0
  18. package/dist/esm/cli/hooks.js.map +1 -1
  19. package/dist/esm/cli/index.d.ts +2 -0
  20. package/dist/esm/cli/index.js +2 -0
  21. package/dist/esm/cli/index.js.map +1 -1
  22. package/dist/esm/cli/instance-command.d.ts +1 -0
  23. package/dist/esm/cli/instance-command.js +2 -1
  24. package/dist/esm/cli/instance-command.js.map +1 -1
  25. package/dist/esm/cli/mrt-command.d.ts +3 -2
  26. package/dist/esm/cli/mrt-command.js +4 -4
  27. package/dist/esm/cli/mrt-command.js.map +1 -1
  28. package/dist/esm/cli/oauth-command.d.ts +1 -0
  29. package/dist/esm/cli/ods-command.d.ts +1 -0
  30. package/dist/esm/cli/webdav-command.d.ts +1 -0
  31. package/dist/esm/clients/custom-apis.d.ts +36 -2
  32. package/dist/esm/clients/custom-apis.js +57 -4
  33. package/dist/esm/clients/custom-apis.js.map +1 -1
  34. package/dist/esm/clients/index.d.ts +1 -1
  35. package/dist/esm/clients/index.js +1 -1
  36. package/dist/esm/clients/index.js.map +1 -1
  37. package/dist/esm/clients/scapi-backend-utils.d.ts +15 -0
  38. package/dist/esm/clients/scapi-backend-utils.js +28 -1
  39. package/dist/esm/clients/scapi-backend-utils.js.map +1 -1
  40. package/dist/esm/clients/scapi-fallback-backend.js +2 -2
  41. package/dist/esm/clients/scapi-fallback-backend.js.map +1 -1
  42. package/dist/esm/clients/scapi-schemas.generated.d.ts +2 -2
  43. package/dist/esm/compat/dispatcher.js +2 -2
  44. package/dist/esm/compat/dispatcher.js.map +1 -1
  45. package/dist/esm/config/config-origins.d.ts +19 -0
  46. package/dist/esm/config/config-origins.js +11 -0
  47. package/dist/esm/config/config-origins.js.map +1 -0
  48. package/dist/esm/config/config-write.d.ts +86 -0
  49. package/dist/esm/config/config-write.js +296 -0
  50. package/dist/esm/config/config-write.js.map +1 -0
  51. package/dist/esm/config/dw-json-schema.d.ts +14 -0
  52. package/dist/esm/config/dw-json-schema.js +269 -0
  53. package/dist/esm/config/dw-json-schema.js.map +1 -0
  54. package/dist/esm/config/dw-json.d.ts +2 -0
  55. package/dist/esm/config/dw-json.js +10 -6
  56. package/dist/esm/config/dw-json.js.map +1 -1
  57. package/dist/esm/config/index.d.ts +13 -4
  58. package/dist/esm/config/index.js +8 -3
  59. package/dist/esm/config/index.js.map +1 -1
  60. package/dist/esm/config/instance-manager.d.ts +64 -28
  61. package/dist/esm/config/instance-manager.js +145 -63
  62. package/dist/esm/config/instance-manager.js.map +1 -1
  63. package/dist/esm/config/mapping.d.ts +5 -0
  64. package/dist/esm/config/mapping.js +20 -1
  65. package/dist/esm/config/mapping.js.map +1 -1
  66. package/dist/esm/config/project-environment.d.ts +62 -0
  67. package/dist/esm/config/project-environment.js +113 -0
  68. package/dist/esm/config/project-environment.js.map +1 -1
  69. package/dist/esm/config/resolver.d.ts +22 -0
  70. package/dist/esm/config/resolver.js +106 -37
  71. package/dist/esm/config/resolver.js.map +1 -1
  72. package/dist/esm/config/sources/dw-json-source.d.ts +9 -1
  73. package/dist/esm/config/sources/dw-json-source.js +59 -23
  74. package/dist/esm/config/sources/dw-json-source.js.map +1 -1
  75. package/dist/esm/config/sources/env-source.d.ts +70 -9
  76. package/dist/esm/config/sources/env-source.js +205 -47
  77. package/dist/esm/config/sources/env-source.js.map +1 -1
  78. package/dist/esm/config/sources/index.d.ts +1 -1
  79. package/dist/esm/config/sources/index.js +1 -1
  80. package/dist/esm/config/sources/index.js.map +1 -1
  81. package/dist/esm/config/types.d.ts +53 -3
  82. package/dist/esm/docs/search.js +3 -1
  83. package/dist/esm/docs/search.js.map +1 -1
  84. package/dist/esm/docs/types.d.ts +3 -1
  85. package/dist/esm/guidance/bundle.d.ts +33 -0
  86. package/dist/esm/guidance/bundle.js +268 -0
  87. package/dist/esm/guidance/bundle.js.map +1 -0
  88. package/dist/esm/guidance/catalog.d.ts +8 -1
  89. package/dist/esm/guidance/catalog.js +48 -6
  90. package/dist/esm/guidance/catalog.js.map +1 -1
  91. package/dist/esm/guidance/index.d.ts +1 -0
  92. package/dist/esm/guidance/index.js +1 -0
  93. package/dist/esm/guidance/index.js.map +1 -1
  94. package/dist/esm/guidance/types.d.ts +17 -1
  95. package/dist/esm/guidance/types.js.map +1 -1
  96. package/dist/esm/index.d.ts +1 -1
  97. package/dist/esm/index.js +1 -1
  98. package/dist/esm/index.js.map +1 -1
  99. package/dist/esm/operations/jobs/run-system-job.js +2 -2
  100. package/dist/esm/operations/jobs/run-system-job.js.map +1 -1
  101. package/dist/esm/plugins/discovery.js +2 -1
  102. package/dist/esm/plugins/discovery.js.map +1 -1
  103. package/dist/esm/scapi/catalog.d.ts +5 -2
  104. package/dist/esm/scapi/catalog.js.map +1 -1
  105. package/dist/esm/scapi/index.d.ts +6 -2
  106. package/dist/esm/scapi/index.js +4 -2
  107. package/dist/esm/scapi/index.js.map +1 -1
  108. package/dist/esm/scapi/live.d.ts +14 -3
  109. package/dist/esm/scapi/live.js +33 -5
  110. package/dist/esm/scapi/live.js.map +1 -1
  111. package/dist/esm/scapi/local.d.ts +26 -0
  112. package/dist/esm/scapi/local.js +143 -0
  113. package/dist/esm/scapi/local.js.map +1 -0
  114. package/dist/esm/scapi/request.d.ts +2 -2
  115. package/dist/esm/scapi/request.js +4 -2
  116. package/dist/esm/scapi/request.js.map +1 -1
  117. package/dist/esm/scapi/runtime.d.ts +5 -0
  118. package/dist/esm/scapi/runtime.js.map +1 -1
  119. package/dist/esm/scapi/schema-source.d.ts +90 -0
  120. package/dist/esm/scapi/schema-source.js +146 -0
  121. package/dist/esm/scapi/schema-source.js.map +1 -0
  122. package/dist/esm/scapi/worker-source.js +31 -7
  123. package/dist/esm/scapi/worker-source.js.map +1 -1
  124. package/dist/esm/telemetry/telemetry.d.ts +1 -0
  125. package/dist/esm/telemetry/telemetry.js +18 -1
  126. package/dist/esm/telemetry/telemetry.js.map +1 -1
  127. package/dist/esm/telemetry/types.d.ts +9 -0
  128. package/dist/esm/test-utils/config-isolation.js +21 -15
  129. package/dist/esm/test-utils/config-isolation.js.map +1 -1
  130. package/dist/esm/ux/agent-context.d.ts +69 -0
  131. package/dist/esm/ux/agent-context.js +133 -0
  132. package/dist/esm/ux/agent-context.js.map +1 -0
  133. package/dist/esm/ux/confirm.d.ts +27 -0
  134. package/dist/esm/ux/confirm.js +32 -0
  135. package/dist/esm/ux/confirm.js.map +1 -1
  136. package/dist/esm/ux/index.d.ts +2 -1
  137. package/dist/esm/ux/index.js +2 -1
  138. package/dist/esm/ux/index.js.map +1 -1
  139. package/node_modules/@salesforce/b2c-api-schemas/manifest.json +83 -42
  140. package/node_modules/@salesforce/b2c-api-schemas/package.json +1 -1
  141. package/node_modules/@salesforce/b2c-api-schemas/scapi/cdn/zones/v1.json +6798 -238
  142. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/orders/v1.json +2296 -205
  143. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-baskets/v1.json +5571 -666
  144. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-baskets/v2.json +6062 -371
  145. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-orders/v1.json +3426 -360
  146. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-payments/v1.json +351 -99
  147. package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/cors/v1.json +172 -12
  148. package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/preferences/v1.json +1497 -111
  149. package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/shopper-configurations/v1.json +202 -36
  150. package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/timeouts/v1.json +79 -10
  151. package/node_modules/@salesforce/b2c-api-schemas/scapi/custom-object/custom-objects/v1.json +785 -49
  152. package/node_modules/@salesforce/b2c-api-schemas/scapi/custom-object/shopper-custom-objects/v1.json +191 -40
  153. package/node_modules/@salesforce/b2c-api-schemas/scapi/customer/customers/v1.json +1483 -107
  154. package/node_modules/@salesforce/b2c-api-schemas/scapi/customer/shopper-customers/v1.json +4854 -787
  155. package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/custom-apis/v1.json +119 -15
  156. package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/object-definitions/v1.json +1699 -80
  157. package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/scapi-schemas/v1.json +252 -18
  158. package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/scripts/v1.json +329 -23
  159. package/node_modules/@salesforce/b2c-api-schemas/scapi/experience/experiences/v1.json +4208 -234
  160. package/node_modules/@salesforce/b2c-api-schemas/scapi/experience/shopper-experience/v1.json +1591 -247
  161. package/node_modules/@salesforce/b2c-api-schemas/scapi/intelligence/analytics/v1.json +396 -8
  162. package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/availability/v1.json +1242 -69
  163. package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/impex/v1.json +2354 -248
  164. package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/reservation/v1.json +1550 -45
  165. package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/segmentation/v1.json +6615 -0
  166. package/node_modules/@salesforce/b2c-api-schemas/scapi/merchant/roles/v1.json +1520 -59
  167. package/node_modules/@salesforce/b2c-api-schemas/scapi/merchant/users/v1.json +397 -17
  168. package/node_modules/@salesforce/b2c-api-schemas/scapi/observability/metrics/v1.json +1241 -27
  169. package/node_modules/@salesforce/b2c-api-schemas/scapi/operation/jobs/v1.json +1069 -68
  170. package/node_modules/@salesforce/b2c-api-schemas/scapi/operation/replications/v1.json +410 -23
  171. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/assignments/v1.json +502 -102
  172. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/campaigns/v1.json +1112 -94
  173. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/coupons/v1.json +820 -93
  174. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/gift-certificates/v1.json +845 -92
  175. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/promotions/v1.json +2716 -674
  176. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/shopper-gift-certificates/v1.json +130 -47
  177. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/shopper-promotions/v1.json +233 -63
  178. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/source-code-groups/v1.json +630 -70
  179. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/catalogs/v1.json +2886 -348
  180. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/inventory-lists/v1.json +520 -19
  181. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/price-books/v1.json +3115 -293
  182. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/products/v1.json +3313 -138
  183. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-availability/v1.json +266 -52
  184. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-delivery-estimates/v1.json +256 -48
  185. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-products/v1.json +1744 -306
  186. package/node_modules/@salesforce/b2c-api-schemas/scapi/search/shopper-search/v1.json +1661 -120
  187. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/auth/v1.json +2174 -118
  188. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/auth-admin/v1.json +1373 -24
  189. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/consents/v1.json +531 -20
  190. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-agents/v1.json +154 -6
  191. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-consents/v1.json +596 -79
  192. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-context/v1.json +456 -42
  193. package/node_modules/@salesforce/b2c-api-schemas/scapi/site/seo/v1.json +101 -23
  194. package/node_modules/@salesforce/b2c-api-schemas/scapi/site/shopper-seo/v1.json +184 -41
  195. package/node_modules/@salesforce/b2c-api-schemas/scapi/site/sites/v1.json +995 -47
  196. package/node_modules/@salesforce/b2c-api-schemas/scapi/store/shopper-stores/v1.json +370 -67
  197. package/node_modules/@salesforce/b2c-api-schemas/scapi/store/store-redirect-mappings/v1.json +319 -11
  198. package/node_modules/@salesforce/b2c-api-schemas/scapi/store/stores/v1.json +1109 -64
  199. package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/deployments/v1.json +1442 -0
  200. package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/environments/v1.json +4293 -0
  201. package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/storefronts/v1.json +1371 -0
  202. package/package.json +5 -2
  203. package/specs/scapi-schemas-v1.yaml +4 -1
@@ -2,6 +2,7 @@
2
2
  "openapi": "3.0.3",
3
3
  "info": {
4
4
  "title": "Custom Objects",
5
+ "description": "[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/custom-objects/custom-objects-oas-v1-public.yaml)\n\n# API Overview\n\nThe Custom Objects API lets you manage custom objects in Commerce Cloud.\n\n## Overview\n\nCustom objects are instances of custom object types that can hold any business-specific data. Each custom object belongs to an object type and is identified by a unique key attribute.\n\nCustom objects can be scoped globally (organization-level) or to a specific site.\n\n## Key Features\n\n- **CRUD Operations**: Create, read, update, and delete custom objects by object type and key\n- **Search**: Search custom objects using flexible query expressions with pagination and sorting\n- **Site-Specific Scope**: Operate on global or site-specific custom objects via separate endpoints\n\n## Searchable Attributes\n\nThe following attributes can be used in search queries:\n\n- `keyValueString` - The string key value of the custom object (String)\n- `keyValueInteger` - The integer key value of the custom object (Integer)\n- `creationDate` - The creation date of the custom object (Date)\n- `lastModified` - The last modification date of the custom object (Date)\n- `siteId` - The site identifier (String)\n- Any custom attribute\n\n## Sortable Attributes\n\nOnly searchable attributes can be used in sorting.\n\n## Authentication\n\nThis API requires OAuth 2.0 authentication with the appropriate scopes:\n- `sfcc.custom-objects` - Read access to custom object resources\n- `sfcc.custom-objects.rw` - Read and write access to custom object resources",
5
6
  "version": "1.1.0",
6
7
  "x-api-type": "Admin",
7
8
  "x-api-family": "Custom-Object"
@@ -19,26 +20,32 @@
19
20
  "paths": {
20
21
  "/organizations/{organizationId}/custom-objects/{objectType}/{key}": {
21
22
  "get": {
23
+ "summary": "Read a global custom object by its object type ID and key.",
24
+ "description": "Reads a global custom object with a given object type ID and a value for the\nkey attribute of the object which represents its unique identifier.\n",
22
25
  "operationId": "getCustomObject",
23
26
  "parameters": [
24
27
  {
25
28
  "name": "organizationId",
26
29
  "in": "path",
30
+ "description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
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": "objectType",
36
41
  "in": "path",
42
+ "description": "The ID of the custom object type.",
37
43
  "required": true,
38
44
  "style": "simple",
39
45
  "explode": false,
40
46
  "schema": {
41
47
  "type": "string",
48
+ "example": "MyCustomType",
42
49
  "maxLength": 256,
43
50
  "minLength": 1
44
51
  }
@@ -46,11 +53,13 @@
46
53
  {
47
54
  "name": "key",
48
55
  "in": "path",
56
+ "description": "The key attribute value that identifies the custom object.",
49
57
  "required": true,
50
58
  "style": "simple",
51
59
  "explode": false,
52
60
  "schema": {
53
61
  "type": "string",
62
+ "example": "my-key-value",
54
63
  "maxLength": 256,
55
64
  "minLength": 1
56
65
  }
@@ -63,6 +72,11 @@
63
72
  "application/json": {
64
73
  "schema": {
65
74
  "$ref": "#/components/schemas/CustomObject"
75
+ },
76
+ "examples": {
77
+ "CustomObjectResultExample": {
78
+ "$ref": "#/components/examples/CustomObjectResultExample"
79
+ }
66
80
  }
67
81
  }
68
82
  }
@@ -73,6 +87,11 @@
73
87
  "application/json": {
74
88
  "schema": {
75
89
  "$ref": "#/components/schemas/ErrorResponse"
90
+ },
91
+ "examples": {
92
+ "MalformedKeyParameter": {
93
+ "$ref": "#/components/examples/MalformedKeyParameter"
94
+ }
76
95
  }
77
96
  }
78
97
  }
@@ -89,6 +108,14 @@
89
108
  "application/json": {
90
109
  "schema": {
91
110
  "$ref": "#/components/schemas/ErrorResponse"
111
+ },
112
+ "examples": {
113
+ "CustomObjectNotFound": {
114
+ "$ref": "#/components/examples/CustomObjectNotFound"
115
+ },
116
+ "ObjectTypeNotFound": {
117
+ "$ref": "#/components/examples/ObjectTypeNotFound"
118
+ }
92
119
  }
93
120
  }
94
121
  }
@@ -104,26 +131,32 @@
104
131
  ]
105
132
  },
106
133
  "put": {
134
+ "summary": "Create or replace a global custom object.",
135
+ "description": "Creates a global custom object from request body. Note that an existing\nglobal custom object with the same key will be overwritten by this action.\n",
107
136
  "operationId": "createCustomObject",
108
137
  "parameters": [
109
138
  {
110
139
  "name": "organizationId",
111
140
  "in": "path",
141
+ "description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
112
142
  "required": true,
113
143
  "style": "simple",
114
144
  "explode": false,
115
145
  "schema": {
116
146
  "$ref": "#/components/schemas/OrganizationId"
117
- }
147
+ },
148
+ "example": "f_ecom_zzxy_prd"
118
149
  },
119
150
  {
120
151
  "name": "objectType",
121
152
  "in": "path",
153
+ "description": "The ID of the custom object type.",
122
154
  "required": true,
123
155
  "style": "simple",
124
156
  "explode": false,
125
157
  "schema": {
126
158
  "type": "string",
159
+ "example": "MyCustomType",
127
160
  "maxLength": 256,
128
161
  "minLength": 1
129
162
  }
@@ -131,11 +164,13 @@
131
164
  {
132
165
  "name": "key",
133
166
  "in": "path",
167
+ "description": "The key attribute value that identifies the custom object.",
134
168
  "required": true,
135
169
  "style": "simple",
136
170
  "explode": false,
137
171
  "schema": {
138
172
  "type": "string",
173
+ "example": "my-key-value",
139
174
  "maxLength": 256,
140
175
  "minLength": 1
141
176
  }
@@ -146,6 +181,11 @@
146
181
  "application/json": {
147
182
  "schema": {
148
183
  "$ref": "#/components/schemas/CustomObject"
184
+ },
185
+ "examples": {
186
+ "CreateCustomObjectExample": {
187
+ "$ref": "#/components/examples/CreateCustomObjectExample"
188
+ }
149
189
  }
150
190
  }
151
191
  },
@@ -158,6 +198,11 @@
158
198
  "application/json": {
159
199
  "schema": {
160
200
  "$ref": "#/components/schemas/CustomObject"
201
+ },
202
+ "examples": {
203
+ "CustomObjectResultExample": {
204
+ "$ref": "#/components/examples/CustomObjectResultExample"
205
+ }
161
206
  }
162
207
  }
163
208
  }
@@ -168,6 +213,11 @@
168
213
  "application/json": {
169
214
  "schema": {
170
215
  "$ref": "#/components/schemas/CustomObject"
216
+ },
217
+ "examples": {
218
+ "CustomObjectResultExample": {
219
+ "$ref": "#/components/examples/CustomObjectResultExample"
220
+ }
171
221
  }
172
222
  }
173
223
  }
@@ -178,6 +228,11 @@
178
228
  "application/json": {
179
229
  "schema": {
180
230
  "$ref": "#/components/schemas/ErrorResponse"
231
+ },
232
+ "examples": {
233
+ "MalformedKeyParameter": {
234
+ "$ref": "#/components/examples/MalformedKeyParameter"
235
+ }
181
236
  }
182
237
  }
183
238
  }
@@ -194,6 +249,11 @@
194
249
  "application/json": {
195
250
  "schema": {
196
251
  "$ref": "#/components/schemas/ErrorResponse"
252
+ },
253
+ "examples": {
254
+ "ObjectTypeNotFound": {
255
+ "$ref": "#/components/examples/ObjectTypeNotFound"
256
+ }
197
257
  }
198
258
  }
199
259
  }
@@ -208,26 +268,32 @@
208
268
  ]
209
269
  },
210
270
  "delete": {
271
+ "summary": "Delete a global custom object.",
272
+ "description": "Deletes a global custom object. If the custom object does not exist,\nthis will do nothing.\n",
211
273
  "operationId": "deleteCustomObject",
212
274
  "parameters": [
213
275
  {
214
276
  "name": "organizationId",
215
277
  "in": "path",
278
+ "description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
216
279
  "required": true,
217
280
  "style": "simple",
218
281
  "explode": false,
219
282
  "schema": {
220
283
  "$ref": "#/components/schemas/OrganizationId"
221
- }
284
+ },
285
+ "example": "f_ecom_zzxy_prd"
222
286
  },
223
287
  {
224
288
  "name": "objectType",
225
289
  "in": "path",
290
+ "description": "The ID of the custom object type.",
226
291
  "required": true,
227
292
  "style": "simple",
228
293
  "explode": false,
229
294
  "schema": {
230
295
  "type": "string",
296
+ "example": "MyCustomType",
231
297
  "maxLength": 256,
232
298
  "minLength": 1
233
299
  }
@@ -235,11 +301,13 @@
235
301
  {
236
302
  "name": "key",
237
303
  "in": "path",
304
+ "description": "The key attribute value that identifies the custom object.",
238
305
  "required": true,
239
306
  "style": "simple",
240
307
  "explode": false,
241
308
  "schema": {
242
309
  "type": "string",
310
+ "example": "my-key-value",
243
311
  "maxLength": 256,
244
312
  "minLength": 1
245
313
  }
@@ -255,6 +323,11 @@
255
323
  "application/json": {
256
324
  "schema": {
257
325
  "$ref": "#/components/schemas/ErrorResponse"
326
+ },
327
+ "examples": {
328
+ "MalformedKeyParameter": {
329
+ "$ref": "#/components/examples/MalformedKeyParameter"
330
+ }
258
331
  }
259
332
  }
260
333
  }
@@ -271,6 +344,11 @@
271
344
  "application/json": {
272
345
  "schema": {
273
346
  "$ref": "#/components/schemas/ErrorResponse"
347
+ },
348
+ "examples": {
349
+ "ObjectTypeNotFound": {
350
+ "$ref": "#/components/examples/ObjectTypeNotFound"
351
+ }
274
352
  }
275
353
  }
276
354
  }
@@ -285,26 +363,32 @@
285
363
  ]
286
364
  },
287
365
  "patch": {
366
+ "summary": "Update a global custom object.",
367
+ "description": "Updates a global custom object with information from request body. Note\nthat only mentioned attributes will be updated and the key attribute is\nignored. All other attributes will be left unattended.\n",
288
368
  "operationId": "updateCustomObject",
289
369
  "parameters": [
290
370
  {
291
371
  "name": "organizationId",
292
372
  "in": "path",
373
+ "description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
293
374
  "required": true,
294
375
  "style": "simple",
295
376
  "explode": false,
296
377
  "schema": {
297
378
  "$ref": "#/components/schemas/OrganizationId"
298
- }
379
+ },
380
+ "example": "f_ecom_zzxy_prd"
299
381
  },
300
382
  {
301
383
  "name": "objectType",
302
384
  "in": "path",
385
+ "description": "The ID of the custom object type.",
303
386
  "required": true,
304
387
  "style": "simple",
305
388
  "explode": false,
306
389
  "schema": {
307
390
  "type": "string",
391
+ "example": "MyCustomType",
308
392
  "maxLength": 256,
309
393
  "minLength": 1
310
394
  }
@@ -312,11 +396,13 @@
312
396
  {
313
397
  "name": "key",
314
398
  "in": "path",
399
+ "description": "The key attribute value that identifies the custom object.",
315
400
  "required": true,
316
401
  "style": "simple",
317
402
  "explode": false,
318
403
  "schema": {
319
404
  "type": "string",
405
+ "example": "my-key-value",
320
406
  "maxLength": 256,
321
407
  "minLength": 1
322
408
  }
@@ -327,6 +413,11 @@
327
413
  "application/json": {
328
414
  "schema": {
329
415
  "$ref": "#/components/schemas/CustomObject"
416
+ },
417
+ "examples": {
418
+ "UpdateCustomObjectExample": {
419
+ "$ref": "#/components/examples/UpdateCustomObjectExample"
420
+ }
330
421
  }
331
422
  }
332
423
  },
@@ -339,6 +430,11 @@
339
430
  "application/json": {
340
431
  "schema": {
341
432
  "$ref": "#/components/schemas/CustomObject"
433
+ },
434
+ "examples": {
435
+ "CustomObjectResultExample": {
436
+ "$ref": "#/components/examples/CustomObjectResultExample"
437
+ }
342
438
  }
343
439
  }
344
440
  }
@@ -349,6 +445,11 @@
349
445
  "application/json": {
350
446
  "schema": {
351
447
  "$ref": "#/components/schemas/ErrorResponse"
448
+ },
449
+ "examples": {
450
+ "MalformedKeyParameter": {
451
+ "$ref": "#/components/examples/MalformedKeyParameter"
452
+ }
352
453
  }
353
454
  }
354
455
  }
@@ -365,6 +466,14 @@
365
466
  "application/json": {
366
467
  "schema": {
367
468
  "$ref": "#/components/schemas/ErrorResponse"
469
+ },
470
+ "examples": {
471
+ "CustomObjectNotFound": {
472
+ "$ref": "#/components/examples/CustomObjectNotFound"
473
+ },
474
+ "ObjectTypeNotFound": {
475
+ "$ref": "#/components/examples/ObjectTypeNotFound"
476
+ }
368
477
  }
369
478
  }
370
479
  }
@@ -381,26 +490,32 @@
381
490
  },
382
491
  "/organizations/{organizationId}/custom-objects-search/{objectType}": {
383
492
  "post": {
493
+ "summary": "Search custom objects by object type.",
494
+ "description": "Searches for custom objects of a specific object type.\n\nThe query attribute specifies a complex query that can be used to narrow down the search.\nThe following attributes are searchable:\n- `keyValueString` (String)\n- `keyValueInteger` (Integer)\n- `creationDate` (Date)\n- `lastModified` (Date)\n- `siteId` (String)\n- Any custom attribute\n\nOnly searchable attributes can be used in sorting.\n",
384
495
  "operationId": "searchCustomObjects",
385
496
  "parameters": [
386
497
  {
387
498
  "name": "organizationId",
388
499
  "in": "path",
500
+ "description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
389
501
  "required": true,
390
502
  "style": "simple",
391
503
  "explode": false,
392
504
  "schema": {
393
505
  "$ref": "#/components/schemas/OrganizationId"
394
- }
506
+ },
507
+ "example": "f_ecom_zzxy_prd"
395
508
  },
396
509
  {
397
510
  "name": "objectType",
398
511
  "in": "path",
512
+ "description": "The ID of the custom object type.",
399
513
  "required": true,
400
514
  "style": "simple",
401
515
  "explode": false,
402
516
  "schema": {
403
517
  "type": "string",
518
+ "example": "MyCustomType",
404
519
  "maxLength": 256,
405
520
  "minLength": 1
406
521
  }
@@ -408,6 +523,7 @@
408
523
  {
409
524
  "name": "limit",
410
525
  "in": "query",
526
+ "description": "Number of records to retrieve per request. Must be between 1 (minimum) and 200 (maximum). Defaults to 50.",
411
527
  "required": false,
412
528
  "style": "form",
413
529
  "explode": true,
@@ -422,6 +538,7 @@
422
538
  {
423
539
  "name": "offset",
424
540
  "in": "query",
541
+ "description": "Used to retrieve the results based on a particular resource offset.",
425
542
  "required": false,
426
543
  "style": "form",
427
544
  "explode": true,
@@ -438,6 +555,14 @@
438
555
  "application/json": {
439
556
  "schema": {
440
557
  "$ref": "#/components/schemas/SearchRequest"
558
+ },
559
+ "examples": {
560
+ "SearchCustomObjectsExample": {
561
+ "$ref": "#/components/examples/SearchCustomObjectsExample"
562
+ },
563
+ "SearchCustomObjectsBySiteIdExample": {
564
+ "$ref": "#/components/examples/SearchCustomObjectsBySiteIdExample"
565
+ }
441
566
  }
442
567
  }
443
568
  },
@@ -450,6 +575,11 @@
450
575
  "application/json": {
451
576
  "schema": {
452
577
  "$ref": "#/components/schemas/CustomObjectSearchResult"
578
+ },
579
+ "examples": {
580
+ "CustomObjectSearchResultExample": {
581
+ "$ref": "#/components/examples/CustomObjectSearchResultExample"
582
+ }
453
583
  }
454
584
  }
455
585
  }
@@ -460,6 +590,11 @@
460
590
  "application/json": {
461
591
  "schema": {
462
592
  "$ref": "#/components/schemas/ErrorResponse"
593
+ },
594
+ "examples": {
595
+ "TypeMismatch": {
596
+ "$ref": "#/components/examples/TypeMismatch"
597
+ }
463
598
  }
464
599
  }
465
600
  }
@@ -476,6 +611,11 @@
476
611
  "application/json": {
477
612
  "schema": {
478
613
  "$ref": "#/components/schemas/ErrorResponse"
614
+ },
615
+ "examples": {
616
+ "ObjectTypeNotFound": {
617
+ "$ref": "#/components/examples/ObjectTypeNotFound"
618
+ }
479
619
  }
480
620
  }
481
621
  }
@@ -493,36 +633,44 @@
493
633
  },
494
634
  "/organizations/{organizationId}/sites/{siteId}/custom-objects/{objectType}/{key}": {
495
635
  "get": {
636
+ "summary": "Read a site-specific custom object by its object type ID and key.",
637
+ "description": "Reads a site-specific custom object with a given object type ID and a value for the\nkey attribute of the object which represents its unique identifier.\n",
496
638
  "operationId": "getSiteCustomObject",
497
639
  "parameters": [
498
640
  {
499
641
  "name": "organizationId",
500
642
  "in": "path",
643
+ "description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
501
644
  "required": true,
502
645
  "style": "simple",
503
646
  "explode": false,
504
647
  "schema": {
505
648
  "$ref": "#/components/schemas/OrganizationId"
506
- }
649
+ },
650
+ "example": "f_ecom_zzxy_prd"
507
651
  },
508
652
  {
509
653
  "name": "siteId",
510
654
  "in": "path",
655
+ "description": "The ID of the site that the custom object belongs to.",
511
656
  "required": true,
512
657
  "style": "simple",
513
658
  "explode": false,
514
659
  "schema": {
515
660
  "$ref": "#/components/schemas/SiteId"
516
- }
661
+ },
662
+ "example": "SiteGenesis"
517
663
  },
518
664
  {
519
665
  "name": "objectType",
520
666
  "in": "path",
667
+ "description": "The ID of the custom object type.",
521
668
  "required": true,
522
669
  "style": "simple",
523
670
  "explode": false,
524
671
  "schema": {
525
672
  "type": "string",
673
+ "example": "MyCustomType",
526
674
  "maxLength": 256,
527
675
  "minLength": 1
528
676
  }
@@ -530,11 +678,13 @@
530
678
  {
531
679
  "name": "key",
532
680
  "in": "path",
681
+ "description": "The key attribute value that identifies the custom object.",
533
682
  "required": true,
534
683
  "style": "simple",
535
684
  "explode": false,
536
685
  "schema": {
537
686
  "type": "string",
687
+ "example": "my-key-value",
538
688
  "maxLength": 256,
539
689
  "minLength": 1
540
690
  }
@@ -547,6 +697,11 @@
547
697
  "application/json": {
548
698
  "schema": {
549
699
  "$ref": "#/components/schemas/CustomObject"
700
+ },
701
+ "examples": {
702
+ "CustomObjectResultExample": {
703
+ "$ref": "#/components/examples/CustomObjectResultExample"
704
+ }
550
705
  }
551
706
  }
552
707
  }
@@ -557,6 +712,11 @@
557
712
  "application/json": {
558
713
  "schema": {
559
714
  "$ref": "#/components/schemas/ErrorResponse"
715
+ },
716
+ "examples": {
717
+ "MalformedKeyParameter": {
718
+ "$ref": "#/components/examples/MalformedKeyParameter"
719
+ }
560
720
  }
561
721
  }
562
722
  }
@@ -573,6 +733,14 @@
573
733
  "application/json": {
574
734
  "schema": {
575
735
  "$ref": "#/components/schemas/ErrorResponse"
736
+ },
737
+ "examples": {
738
+ "CustomObjectNotFound": {
739
+ "$ref": "#/components/examples/CustomObjectNotFound"
740
+ },
741
+ "ObjectTypeNotFound": {
742
+ "$ref": "#/components/examples/ObjectTypeNotFound"
743
+ }
576
744
  }
577
745
  }
578
746
  }
@@ -588,36 +756,44 @@
588
756
  ]
589
757
  },
590
758
  "put": {
759
+ "summary": "Create or replace a site-specific custom object.",
760
+ "description": "Creates a site-specific custom object from request body. Note that an existing\nsite-specific custom object with the same key will be overwritten by this action.\n",
591
761
  "operationId": "createSiteCustomObject",
592
762
  "parameters": [
593
763
  {
594
764
  "name": "organizationId",
595
765
  "in": "path",
766
+ "description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
596
767
  "required": true,
597
768
  "style": "simple",
598
769
  "explode": false,
599
770
  "schema": {
600
771
  "$ref": "#/components/schemas/OrganizationId"
601
- }
772
+ },
773
+ "example": "f_ecom_zzxy_prd"
602
774
  },
603
775
  {
604
776
  "name": "siteId",
605
777
  "in": "path",
778
+ "description": "The ID of the site that the custom object belongs to.",
606
779
  "required": true,
607
780
  "style": "simple",
608
781
  "explode": false,
609
782
  "schema": {
610
783
  "$ref": "#/components/schemas/SiteId"
611
- }
784
+ },
785
+ "example": "SiteGenesis"
612
786
  },
613
787
  {
614
788
  "name": "objectType",
615
789
  "in": "path",
790
+ "description": "The ID of the custom object type.",
616
791
  "required": true,
617
792
  "style": "simple",
618
793
  "explode": false,
619
794
  "schema": {
620
795
  "type": "string",
796
+ "example": "MyCustomType",
621
797
  "maxLength": 256,
622
798
  "minLength": 1
623
799
  }
@@ -625,11 +801,13 @@
625
801
  {
626
802
  "name": "key",
627
803
  "in": "path",
804
+ "description": "The key attribute value that identifies the custom object.",
628
805
  "required": true,
629
806
  "style": "simple",
630
807
  "explode": false,
631
808
  "schema": {
632
809
  "type": "string",
810
+ "example": "my-key-value",
633
811
  "maxLength": 256,
634
812
  "minLength": 1
635
813
  }
@@ -640,6 +818,11 @@
640
818
  "application/json": {
641
819
  "schema": {
642
820
  "$ref": "#/components/schemas/CustomObject"
821
+ },
822
+ "examples": {
823
+ "CreateCustomObjectExample": {
824
+ "$ref": "#/components/examples/CreateCustomObjectExample"
825
+ }
643
826
  }
644
827
  }
645
828
  },
@@ -652,6 +835,11 @@
652
835
  "application/json": {
653
836
  "schema": {
654
837
  "$ref": "#/components/schemas/CustomObject"
838
+ },
839
+ "examples": {
840
+ "CustomObjectResultExample": {
841
+ "$ref": "#/components/examples/CustomObjectResultExample"
842
+ }
655
843
  }
656
844
  }
657
845
  }
@@ -662,6 +850,11 @@
662
850
  "application/json": {
663
851
  "schema": {
664
852
  "$ref": "#/components/schemas/CustomObject"
853
+ },
854
+ "examples": {
855
+ "CustomObjectResultExample": {
856
+ "$ref": "#/components/examples/CustomObjectResultExample"
857
+ }
665
858
  }
666
859
  }
667
860
  }
@@ -672,6 +865,11 @@
672
865
  "application/json": {
673
866
  "schema": {
674
867
  "$ref": "#/components/schemas/ErrorResponse"
868
+ },
869
+ "examples": {
870
+ "MalformedKeyParameter": {
871
+ "$ref": "#/components/examples/MalformedKeyParameter"
872
+ }
675
873
  }
676
874
  }
677
875
  }
@@ -688,6 +886,11 @@
688
886
  "application/json": {
689
887
  "schema": {
690
888
  "$ref": "#/components/schemas/ErrorResponse"
889
+ },
890
+ "examples": {
891
+ "ObjectTypeNotFound": {
892
+ "$ref": "#/components/examples/ObjectTypeNotFound"
893
+ }
691
894
  }
692
895
  }
693
896
  }
@@ -702,36 +905,44 @@
702
905
  ]
703
906
  },
704
907
  "delete": {
908
+ "summary": "Delete a site-specific custom object.",
909
+ "description": "Deletes a site-specific custom object. If the custom object does not exist,\nthis will do nothing.\n",
705
910
  "operationId": "deleteSiteCustomObject",
706
911
  "parameters": [
707
912
  {
708
913
  "name": "organizationId",
709
914
  "in": "path",
915
+ "description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
710
916
  "required": true,
711
917
  "style": "simple",
712
918
  "explode": false,
713
919
  "schema": {
714
920
  "$ref": "#/components/schemas/OrganizationId"
715
- }
921
+ },
922
+ "example": "f_ecom_zzxy_prd"
716
923
  },
717
924
  {
718
925
  "name": "siteId",
719
926
  "in": "path",
927
+ "description": "The ID of the site that the custom object belongs to.",
720
928
  "required": true,
721
929
  "style": "simple",
722
930
  "explode": false,
723
931
  "schema": {
724
932
  "$ref": "#/components/schemas/SiteId"
725
- }
933
+ },
934
+ "example": "SiteGenesis"
726
935
  },
727
936
  {
728
937
  "name": "objectType",
729
938
  "in": "path",
939
+ "description": "The ID of the custom object type.",
730
940
  "required": true,
731
941
  "style": "simple",
732
942
  "explode": false,
733
943
  "schema": {
734
944
  "type": "string",
945
+ "example": "MyCustomType",
735
946
  "maxLength": 256,
736
947
  "minLength": 1
737
948
  }
@@ -739,11 +950,13 @@
739
950
  {
740
951
  "name": "key",
741
952
  "in": "path",
953
+ "description": "The key attribute value that identifies the custom object.",
742
954
  "required": true,
743
955
  "style": "simple",
744
956
  "explode": false,
745
957
  "schema": {
746
958
  "type": "string",
959
+ "example": "my-key-value",
747
960
  "maxLength": 256,
748
961
  "minLength": 1
749
962
  }
@@ -759,6 +972,11 @@
759
972
  "application/json": {
760
973
  "schema": {
761
974
  "$ref": "#/components/schemas/ErrorResponse"
975
+ },
976
+ "examples": {
977
+ "MalformedKeyParameter": {
978
+ "$ref": "#/components/examples/MalformedKeyParameter"
979
+ }
762
980
  }
763
981
  }
764
982
  }
@@ -775,6 +993,11 @@
775
993
  "application/json": {
776
994
  "schema": {
777
995
  "$ref": "#/components/schemas/ErrorResponse"
996
+ },
997
+ "examples": {
998
+ "ObjectTypeNotFound": {
999
+ "$ref": "#/components/examples/ObjectTypeNotFound"
1000
+ }
778
1001
  }
779
1002
  }
780
1003
  }
@@ -789,36 +1012,44 @@
789
1012
  ]
790
1013
  },
791
1014
  "patch": {
1015
+ "summary": "Update a site-specific custom object.",
1016
+ "description": "Updates a site-specific custom object with information from request body. Note\nthat only mentioned attributes will be updated and the key attribute is\nignored. All other attributes will be left unattended.\n",
792
1017
  "operationId": "updateSiteCustomObject",
793
1018
  "parameters": [
794
1019
  {
795
1020
  "name": "organizationId",
796
1021
  "in": "path",
1022
+ "description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
797
1023
  "required": true,
798
1024
  "style": "simple",
799
1025
  "explode": false,
800
1026
  "schema": {
801
1027
  "$ref": "#/components/schemas/OrganizationId"
802
- }
1028
+ },
1029
+ "example": "f_ecom_zzxy_prd"
803
1030
  },
804
1031
  {
805
1032
  "name": "siteId",
806
1033
  "in": "path",
1034
+ "description": "The ID of the site that the custom object belongs to.",
807
1035
  "required": true,
808
1036
  "style": "simple",
809
1037
  "explode": false,
810
1038
  "schema": {
811
1039
  "$ref": "#/components/schemas/SiteId"
812
- }
1040
+ },
1041
+ "example": "SiteGenesis"
813
1042
  },
814
1043
  {
815
1044
  "name": "objectType",
816
1045
  "in": "path",
1046
+ "description": "The ID of the custom object type.",
817
1047
  "required": true,
818
1048
  "style": "simple",
819
1049
  "explode": false,
820
1050
  "schema": {
821
1051
  "type": "string",
1052
+ "example": "MyCustomType",
822
1053
  "maxLength": 256,
823
1054
  "minLength": 1
824
1055
  }
@@ -826,11 +1057,13 @@
826
1057
  {
827
1058
  "name": "key",
828
1059
  "in": "path",
1060
+ "description": "The key attribute value that identifies the custom object.",
829
1061
  "required": true,
830
1062
  "style": "simple",
831
1063
  "explode": false,
832
1064
  "schema": {
833
1065
  "type": "string",
1066
+ "example": "my-key-value",
834
1067
  "maxLength": 256,
835
1068
  "minLength": 1
836
1069
  }
@@ -841,6 +1074,11 @@
841
1074
  "application/json": {
842
1075
  "schema": {
843
1076
  "$ref": "#/components/schemas/CustomObject"
1077
+ },
1078
+ "examples": {
1079
+ "UpdateCustomObjectExample": {
1080
+ "$ref": "#/components/examples/UpdateCustomObjectExample"
1081
+ }
844
1082
  }
845
1083
  }
846
1084
  },
@@ -853,6 +1091,11 @@
853
1091
  "application/json": {
854
1092
  "schema": {
855
1093
  "$ref": "#/components/schemas/CustomObject"
1094
+ },
1095
+ "examples": {
1096
+ "CustomObjectResultExample": {
1097
+ "$ref": "#/components/examples/CustomObjectResultExample"
1098
+ }
856
1099
  }
857
1100
  }
858
1101
  }
@@ -863,6 +1106,11 @@
863
1106
  "application/json": {
864
1107
  "schema": {
865
1108
  "$ref": "#/components/schemas/ErrorResponse"
1109
+ },
1110
+ "examples": {
1111
+ "MalformedKeyParameter": {
1112
+ "$ref": "#/components/examples/MalformedKeyParameter"
1113
+ }
866
1114
  }
867
1115
  }
868
1116
  }
@@ -879,6 +1127,14 @@
879
1127
  "application/json": {
880
1128
  "schema": {
881
1129
  "$ref": "#/components/schemas/ErrorResponse"
1130
+ },
1131
+ "examples": {
1132
+ "CustomObjectNotFound": {
1133
+ "$ref": "#/components/examples/CustomObjectNotFound"
1134
+ },
1135
+ "ObjectTypeNotFound": {
1136
+ "$ref": "#/components/examples/ObjectTypeNotFound"
1137
+ }
882
1138
  }
883
1139
  }
884
1140
  }
@@ -898,37 +1154,56 @@
898
1154
  "schemas": {
899
1155
  "OrganizationId": {
900
1156
  "type": "string",
1157
+ "description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
1158
+ "example": "f_ecom_zzxy_prd",
901
1159
  "pattern": "^f_ecom_[a-z]{4}_(prd|stg|dev|s[0-9]{2}|[0-9]{3})$"
902
1160
  },
903
1161
  "CustomObject": {
904
1162
  "type": "object",
905
- "additionalProperties": {},
1163
+ "additionalProperties": {
1164
+ "description": "This type supports additional properties passed along with the defined properties of this API.\nTo indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`.\nThe type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix.",
1165
+ "example": "c_trackingId",
1166
+ "title": "Additional Property Support"
1167
+ },
1168
+ "description": "Document representing a custom object that contains all defined custom attributes for its object type.",
906
1169
  "properties": {
907
1170
  "keyProperty": {
908
1171
  "type": "string",
1172
+ "description": "The name of the key property for the custom object. This is ignored in input documents.",
1173
+ "example": "myKey",
909
1174
  "maxLength": 256,
910
1175
  "minLength": 1
911
1176
  },
912
1177
  "keyValueInteger": {
913
1178
  "type": "integer",
914
- "format": "int32"
1179
+ "format": "int32",
1180
+ "description": "The id of the custom object when the type of the key is Integer. This is ignored in input documents.",
1181
+ "example": 42
915
1182
  },
916
1183
  "keyValueString": {
917
1184
  "type": "string",
1185
+ "description": "The id of the custom object when the type of the key is String. This is ignored in input documents.",
1186
+ "example": "my-key-value",
918
1187
  "maxLength": 256,
919
1188
  "minLength": 1
920
1189
  },
921
1190
  "objectType": {
922
1191
  "type": "string",
1192
+ "description": "The id of the object type. This is ignored in input documents.",
1193
+ "example": "MyCustomType",
923
1194
  "maxLength": 256
924
1195
  },
925
1196
  "creationDate": {
926
1197
  "type": "string",
927
- "format": "date-time"
1198
+ "format": "date-time",
1199
+ "description": "Returns the value of attribute 'creationDate'.",
1200
+ "example": "2019-10-20T12:00:00Z"
928
1201
  },
929
1202
  "lastModified": {
930
1203
  "type": "string",
931
- "format": "date-time"
1204
+ "format": "date-time",
1205
+ "description": "Returns the value of attribute 'lastModified'.",
1206
+ "example": "2019-10-20T13:00:00Z"
932
1207
  }
933
1208
  }
934
1209
  },
@@ -938,17 +1213,25 @@
938
1213
  "properties": {
939
1214
  "title": {
940
1215
  "type": "string",
1216
+ "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",
1217
+ "example": "You do not have enough credit",
941
1218
  "maxLength": 256
942
1219
  },
943
1220
  "type": {
944
1221
  "type": "string",
1222
+ "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",
1223
+ "example": "NotEnoughMoney",
945
1224
  "maxLength": 2048
946
1225
  },
947
1226
  "detail": {
948
- "type": "string"
1227
+ "type": "string",
1228
+ "description": "A human-readable explanation specific to this occurrence of the problem.",
1229
+ "example": "Your current balance is 30, but that costs 50"
949
1230
  },
950
1231
  "instance": {
951
1232
  "type": "string",
1233
+ "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",
1234
+ "example": "/account/12345/msgs/abc",
952
1235
  "maxLength": 2048
953
1236
  }
954
1237
  },
@@ -961,6 +1244,28 @@
961
1244
  "Query": {
962
1245
  "type": "object",
963
1246
  "additionalProperties": false,
1247
+ "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._",
1248
+ "example": {
1249
+ "filteredQuery": {
1250
+ "query": {
1251
+ "textQuery": {
1252
+ "fields": [
1253
+ "couponId"
1254
+ ],
1255
+ "searchPhrase": "disabled"
1256
+ }
1257
+ },
1258
+ "filter": {
1259
+ "termFilter": {
1260
+ "field": "enabled",
1261
+ "operator": "is",
1262
+ "values": [
1263
+ false
1264
+ ]
1265
+ }
1266
+ }
1267
+ }
1268
+ },
964
1269
  "maxProperties": 1,
965
1270
  "minProperties": 1,
966
1271
  "properties": {
@@ -987,21 +1292,60 @@
987
1292
  "BoolQuery": {
988
1293
  "type": "object",
989
1294
  "additionalProperties": false,
1295
+ "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",
1296
+ "example": {
1297
+ "value": {
1298
+ "must": [
1299
+ {
1300
+ "textQuery": {
1301
+ "fields": [
1302
+ "couponId"
1303
+ ],
1304
+ "searchPhrase": "DEAL"
1305
+ }
1306
+ },
1307
+ {
1308
+ "textQuery": {
1309
+ "fields": [
1310
+ "description"
1311
+ ],
1312
+ "searchPhrase": "Big bargain deal"
1313
+ }
1314
+ }
1315
+ ],
1316
+ "mustNot": [
1317
+ {
1318
+ "termQuery": {
1319
+ "fields": [
1320
+ "enabled"
1321
+ ],
1322
+ "operator": "is",
1323
+ "values": [
1324
+ false
1325
+ ]
1326
+ }
1327
+ }
1328
+ ]
1329
+ }
1330
+ },
990
1331
  "properties": {
991
1332
  "must": {
992
1333
  "type": "array",
1334
+ "description": "List of queries to be evaluated as an `AND` operator.",
993
1335
  "items": {
994
1336
  "$ref": "#/components/schemas/Query"
995
1337
  }
996
1338
  },
997
1339
  "mustNot": {
998
1340
  "type": "array",
1341
+ "description": "List of queries to be evaluated as a `NOT` operator.",
999
1342
  "items": {
1000
1343
  "$ref": "#/components/schemas/Query"
1001
1344
  }
1002
1345
  },
1003
1346
  "should": {
1004
1347
  "type": "array",
1348
+ "description": "List of queries to be evaluated as an `OR` operator.",
1005
1349
  "items": {
1006
1350
  "$ref": "#/components/schemas/Query"
1007
1351
  }
@@ -1011,6 +1355,7 @@
1011
1355
  "Filter": {
1012
1356
  "type": "object",
1013
1357
  "additionalProperties": false,
1358
+ "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.",
1014
1359
  "maxProperties": 1,
1015
1360
  "minProperties": 1,
1016
1361
  "properties": {
@@ -1034,20 +1379,49 @@
1034
1379
  "BoolFilter": {
1035
1380
  "type": "object",
1036
1381
  "additionalProperties": false,
1382
+ "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.",
1383
+ "example": {
1384
+ "value": {
1385
+ "operator": "and",
1386
+ "filters": [
1387
+ {
1388
+ "termFilter": {
1389
+ "field": "id",
1390
+ "operator": "is",
1391
+ "values": [
1392
+ "myId"
1393
+ ]
1394
+ }
1395
+ },
1396
+ {
1397
+ "termFilter": {
1398
+ "field": "couponId",
1399
+ "operator": "is",
1400
+ "values": [
1401
+ "couponOne"
1402
+ ]
1403
+ }
1404
+ }
1405
+ ]
1406
+ }
1407
+ },
1037
1408
  "properties": {
1038
1409
  "filters": {
1039
1410
  "type": "array",
1411
+ "description": "A list of filters that are logically combined by an operator.",
1040
1412
  "items": {
1041
1413
  "$ref": "#/components/schemas/Filter"
1042
1414
  }
1043
1415
  },
1044
1416
  "operator": {
1045
1417
  "type": "string",
1418
+ "description": "The logical operator that is used to combine the filters.",
1046
1419
  "enum": [
1047
1420
  "and",
1048
1421
  "or",
1049
1422
  "not"
1050
- ]
1423
+ ],
1424
+ "example": "and"
1051
1425
  }
1052
1426
  },
1053
1427
  "required": [
@@ -1056,6 +1430,7 @@
1056
1430
  },
1057
1431
  "QueryFilter": {
1058
1432
  "type": "object",
1433
+ "description": "Wraps any query and allows it to be used as a filter.",
1059
1434
  "properties": {
1060
1435
  "query": {
1061
1436
  "$ref": "#/components/schemas/Query"
@@ -1067,45 +1442,71 @@
1067
1442
  },
1068
1443
  "Field": {
1069
1444
  "type": "string",
1445
+ "description": "Name of the field. Might be a custom field name prefixed with c_.",
1446
+ "example": "couponId",
1070
1447
  "maxLength": 260
1071
1448
  },
1072
1449
  "Range2Filter": {
1073
1450
  "type": "object",
1074
1451
  "additionalProperties": false,
1452
+ "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.",
1453
+ "example": {
1454
+ "fromField": "validFrom",
1455
+ "toField": "validTo",
1456
+ "filterMode": "overlap",
1457
+ "fromValue": "2007-01-01T00:00:00.000Z",
1458
+ "toValue": "2017-01-01T00:00:00.000Z"
1459
+ },
1075
1460
  "properties": {
1076
1461
  "filterMode": {
1077
1462
  "type": "string",
1078
1463
  "default": "overlap",
1464
+ "description": "Compare mode: overlap, containing, or contained.",
1079
1465
  "enum": [
1080
1466
  "overlap",
1081
1467
  "containing",
1082
1468
  "contained"
1083
- ]
1469
+ ],
1470
+ "example": "overlap"
1084
1471
  },
1085
1472
  "fromField": {
1086
1473
  "allOf": [
1087
1474
  {
1088
1475
  "$ref": "#/components/schemas/Field"
1089
1476
  }
1090
- ]
1477
+ ],
1478
+ "description": "The field name of the field that starts the first range.",
1479
+ "example": "validFrom"
1091
1480
  },
1092
1481
  "fromInclusive": {
1093
1482
  "type": "boolean",
1094
- "default": true
1483
+ "default": true,
1484
+ "description": "A flag indicating if the lower bound of the second range is inclusive. To make the lower bound exclusive, set to `false`.",
1485
+ "example": true
1486
+ },
1487
+ "fromValue": {
1488
+ "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.",
1489
+ "example": "2007-01-01T00:00:00.000Z"
1095
1490
  },
1096
- "fromValue": {},
1097
1491
  "toField": {
1098
1492
  "allOf": [
1099
1493
  {
1100
1494
  "$ref": "#/components/schemas/Field"
1101
1495
  }
1102
- ]
1496
+ ],
1497
+ "description": "The field name of the field that ends the first range.",
1498
+ "example": "validTo"
1103
1499
  },
1104
1500
  "toInclusive": {
1105
1501
  "type": "boolean",
1106
- "default": true
1502
+ "default": true,
1503
+ "description": "A flag indicating if the upper bound of the second range is inclusive. To make the lower bound exclusive, set to `false`.",
1504
+ "example": true
1107
1505
  },
1108
- "toValue": {}
1506
+ "toValue": {
1507
+ "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.",
1508
+ "example": "2017-01-01T00:00:00.000Z"
1509
+ }
1109
1510
  },
1110
1511
  "required": [
1111
1512
  "fromField",
@@ -1114,49 +1515,64 @@
1114
1515
  },
1115
1516
  "RangeFilter": {
1116
1517
  "type": "object",
1518
+ "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.",
1117
1519
  "properties": {
1118
1520
  "field": {
1119
1521
  "allOf": [
1120
1522
  {
1121
1523
  "$ref": "#/components/schemas/Field"
1122
1524
  }
1123
- ]
1525
+ ],
1526
+ "description": "The search field.",
1527
+ "example": "validFrom"
1124
1528
  },
1125
1529
  "from": {
1530
+ "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.",
1126
1531
  "oneOf": [
1127
1532
  {
1128
1533
  "type": "string",
1129
- "format": "date-time"
1534
+ "format": "date-time",
1535
+ "example": "2007-01-01T00:00:00Z"
1130
1536
  },
1131
1537
  {
1132
- "type": "integer"
1538
+ "type": "integer",
1539
+ "example": 1
1133
1540
  },
1134
1541
  {
1135
- "type": "number"
1542
+ "type": "number",
1543
+ "example": 1
1136
1544
  }
1137
1545
  ]
1138
1546
  },
1139
1547
  "fromInclusive": {
1140
1548
  "type": "boolean",
1141
- "default": true
1549
+ "default": true,
1550
+ "description": "A flag indicating if the lower bound of the range is inclusive. To make the lower bound exclusive, set to `false`.",
1551
+ "example": true
1142
1552
  },
1143
1553
  "to": {
1554
+ "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.",
1144
1555
  "oneOf": [
1145
1556
  {
1146
1557
  "type": "string",
1147
- "format": "date-time"
1558
+ "format": "date-time",
1559
+ "example": "2007-01-02T00:00:00Z"
1148
1560
  },
1149
1561
  {
1150
- "type": "integer"
1562
+ "type": "integer",
1563
+ "example": 2
1151
1564
  },
1152
1565
  {
1153
- "type": "number"
1566
+ "type": "number",
1567
+ "example": 2
1154
1568
  }
1155
1569
  ]
1156
1570
  },
1157
1571
  "toInclusive": {
1158
1572
  "type": "boolean",
1159
- "default": true
1573
+ "default": true,
1574
+ "description": "A flag indicating if the upper bound of the range is inclusive. To make the upper bound exclusive, set to `false`.",
1575
+ "example": true
1160
1576
  }
1161
1577
  },
1162
1578
  "required": [
@@ -1166,16 +1582,26 @@
1166
1582
  "TermFilter": {
1167
1583
  "type": "object",
1168
1584
  "additionalProperties": false,
1585
+ "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.",
1586
+ "example": {
1587
+ "field": "id",
1588
+ "operator": "is",
1589
+ "values": [
1590
+ "myId"
1591
+ ]
1592
+ },
1169
1593
  "properties": {
1170
1594
  "field": {
1171
1595
  "allOf": [
1172
1596
  {
1173
1597
  "$ref": "#/components/schemas/Field"
1174
1598
  }
1175
- ]
1599
+ ],
1600
+ "description": "The filter field."
1176
1601
  },
1177
1602
  "operator": {
1178
1603
  "type": "string",
1604
+ "description": "The operator used to compare the field's values with the given values.",
1179
1605
  "enum": [
1180
1606
  "is",
1181
1607
  "one_of",
@@ -1185,12 +1611,15 @@
1185
1611
  "greater",
1186
1612
  "not_in",
1187
1613
  "neq"
1188
- ]
1614
+ ],
1615
+ "example": "is"
1189
1616
  },
1190
1617
  "values": {
1191
1618
  "type": "array",
1619
+ "description": "The filter values.",
1192
1620
  "items": {
1193
- "type": "string"
1621
+ "type": "string",
1622
+ "example": "myId"
1194
1623
  }
1195
1624
  }
1196
1625
  },
@@ -1202,6 +1631,26 @@
1202
1631
  "FilteredQuery": {
1203
1632
  "type": "object",
1204
1633
  "additionalProperties": false,
1634
+ "description": "Allows to filter the result of a possibly complex query using a possibly complex filter.",
1635
+ "example": {
1636
+ "query": {
1637
+ "textQuery": {
1638
+ "fields": [
1639
+ "couponId"
1640
+ ],
1641
+ "searchPhrase": "disabled"
1642
+ }
1643
+ },
1644
+ "filter": {
1645
+ "termFilter": {
1646
+ "field": "enabled",
1647
+ "operator": "is",
1648
+ "values": [
1649
+ false
1650
+ ]
1651
+ }
1652
+ }
1653
+ },
1205
1654
  "properties": {
1206
1655
  "filter": {
1207
1656
  "$ref": "#/components/schemas/Filter"
@@ -1216,14 +1665,62 @@
1216
1665
  ]
1217
1666
  },
1218
1667
  "MatchAllQuery": {
1219
- "type": "object"
1668
+ "type": "object",
1669
+ "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."
1220
1670
  },
1221
1671
  "NestedQuery": {
1222
1672
  "type": "object",
1223
1673
  "additionalProperties": false,
1674
+ "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",
1675
+ "example": {
1676
+ "path": "order.shippingAddresses",
1677
+ "query": {
1678
+ "boolQuery": {
1679
+ "must": [
1680
+ {
1681
+ "boolQuery": {
1682
+ "must": [
1683
+ {
1684
+ "termQuery": {
1685
+ "fields": [
1686
+ "order.shippingAddresses.firstName"
1687
+ ],
1688
+ "operator": "is",
1689
+ "values": [
1690
+ "John"
1691
+ ]
1692
+ }
1693
+ }
1694
+ ]
1695
+ }
1696
+ },
1697
+ {
1698
+ "boolQuery": {
1699
+ "must": [
1700
+ {
1701
+ "termQuery": {
1702
+ "fields": [
1703
+ "order.shippingAddresses.lastName"
1704
+ ],
1705
+ "operator": "is",
1706
+ "values": [
1707
+ "Doe"
1708
+ ]
1709
+ }
1710
+ }
1711
+ ]
1712
+ }
1713
+ }
1714
+ ]
1715
+ }
1716
+ },
1717
+ "scoreMode": "avg"
1718
+ },
1224
1719
  "properties": {
1225
1720
  "path": {
1226
1721
  "type": "string",
1722
+ "description": "The path to the nested document.",
1723
+ "example": "order.shippingAddresses",
1227
1724
  "maxLength": 2048
1228
1725
  },
1229
1726
  "query": {
@@ -1231,12 +1728,14 @@
1231
1728
  },
1232
1729
  "scoreMode": {
1233
1730
  "type": "string",
1731
+ "description": "Indicates how scores for matching child objects affect the root parent document’s relevance score.",
1234
1732
  "enum": [
1235
1733
  "avg",
1236
1734
  "total",
1237
1735
  "max",
1238
1736
  "none"
1239
- ]
1737
+ ],
1738
+ "example": "avg"
1240
1739
  }
1241
1740
  },
1242
1741
  "required": [
@@ -1246,9 +1745,11 @@
1246
1745
  },
1247
1746
  "TermQuery": {
1248
1747
  "type": "object",
1748
+ "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.",
1249
1749
  "properties": {
1250
1750
  "fields": {
1251
1751
  "type": "array",
1752
+ "description": "The document fields that the values are matched against, combined with the operator.",
1252
1753
  "items": {
1253
1754
  "$ref": "#/components/schemas/Field"
1254
1755
  },
@@ -1256,6 +1757,7 @@
1256
1757
  },
1257
1758
  "operator": {
1258
1759
  "type": "string",
1760
+ "description": "Returns the operator to use for the term query.",
1259
1761
  "enum": [
1260
1762
  "is",
1261
1763
  "one_of",
@@ -1265,23 +1767,30 @@
1265
1767
  "greater",
1266
1768
  "not_in",
1267
1769
  "neq"
1268
- ]
1770
+ ],
1771
+ "example": "is"
1269
1772
  },
1270
1773
  "values": {
1271
1774
  "type": "array",
1775
+ "description": "The values that the fields are compared against, combined with the operator.",
1272
1776
  "items": {
1777
+ "example": "myCouponId",
1273
1778
  "oneOf": [
1274
1779
  {
1275
- "type": "string"
1780
+ "type": "string",
1781
+ "example": "myCouponId"
1276
1782
  },
1277
1783
  {
1278
- "type": "number"
1784
+ "type": "number",
1785
+ "example": 1
1279
1786
  },
1280
1787
  {
1281
- "type": "boolean"
1788
+ "type": "boolean",
1789
+ "example": true
1282
1790
  },
1283
1791
  {
1284
- "type": "integer"
1792
+ "type": "integer",
1793
+ "example": 1
1285
1794
  }
1286
1795
  ]
1287
1796
  }
@@ -1295,16 +1804,26 @@
1295
1804
  "TextQuery": {
1296
1805
  "type": "object",
1297
1806
  "additionalProperties": false,
1807
+ "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.",
1808
+ "example": {
1809
+ "fields": [
1810
+ "couponId"
1811
+ ],
1812
+ "searchPhrase": "limit"
1813
+ },
1298
1814
  "properties": {
1299
1815
  "fields": {
1300
1816
  "type": "array",
1817
+ "description": "The document fields that the search phrase matches against.",
1301
1818
  "items": {
1302
1819
  "$ref": "#/components/schemas/Field"
1303
1820
  },
1304
1821
  "minItems": 1
1305
1822
  },
1306
1823
  "searchPhrase": {
1307
- "type": "string"
1824
+ "type": "string",
1825
+ "description": "A search phrase, which can include multiple terms separated by spaces.",
1826
+ "example": "campaign summer"
1308
1827
  }
1309
1828
  },
1310
1829
  "required": [
@@ -1315,18 +1834,27 @@
1315
1834
  "Sort": {
1316
1835
  "type": "object",
1317
1836
  "additionalProperties": false,
1837
+ "description": "Document representing a sort request. Each API has a different default sort configuration that can be modified in the request.",
1838
+ "example": {
1839
+ "field": "couponId",
1840
+ "sortOrder": "desc"
1841
+ },
1318
1842
  "properties": {
1319
1843
  "field": {
1320
1844
  "type": "string",
1845
+ "description": "The name of the field to sort on.",
1846
+ "example": "couponId",
1321
1847
  "maxLength": 256
1322
1848
  },
1323
1849
  "sortOrder": {
1324
1850
  "type": "string",
1325
1851
  "default": "asc",
1852
+ "description": "The sort order to be applied when sorting. When omitted, the default sort order (asc) is used.",
1326
1853
  "enum": [
1327
1854
  "asc",
1328
1855
  "desc"
1329
- ]
1856
+ ],
1857
+ "example": "asc"
1330
1858
  }
1331
1859
  },
1332
1860
  "required": [
@@ -1337,14 +1865,19 @@
1337
1865
  "type": "integer",
1338
1866
  "format": "int32",
1339
1867
  "default": 0,
1868
+ "description": "The zero-based index of the first hit/data to include in the result.",
1869
+ "example": 0,
1340
1870
  "minimum": 0
1341
1871
  },
1342
1872
  "SearchRequest": {
1343
1873
  "type": "object",
1874
+ "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.",
1344
1875
  "properties": {
1345
1876
  "limit": {
1346
1877
  "type": "integer",
1347
1878
  "format": "int32",
1879
+ "description": "Maximum records to retrieve per request, not to exceed 200.",
1880
+ "example": 10,
1348
1881
  "maximum": 200,
1349
1882
  "minimum": 1
1350
1883
  },
@@ -1353,6 +1886,7 @@
1353
1886
  },
1354
1887
  "sorts": {
1355
1888
  "type": "array",
1889
+ "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.",
1356
1890
  "items": {
1357
1891
  "$ref": "#/components/schemas/Sort"
1358
1892
  }
@@ -1369,14 +1903,19 @@
1369
1903
  "type": "integer",
1370
1904
  "format": "int32",
1371
1905
  "default": 0,
1906
+ "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.",
1907
+ "example": 10,
1372
1908
  "minimum": 0
1373
1909
  },
1374
1910
  "ResultBase": {
1375
1911
  "type": "object",
1912
+ "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.",
1376
1913
  "properties": {
1377
1914
  "limit": {
1378
1915
  "type": "integer",
1379
- "format": "int32"
1916
+ "format": "int32",
1917
+ "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.",
1918
+ "example": 10
1380
1919
  },
1381
1920
  "total": {
1382
1921
  "$ref": "#/components/schemas/Total"
@@ -1393,6 +1932,7 @@
1393
1932
  "$ref": "#/components/schemas/ResultBase"
1394
1933
  }
1395
1934
  ],
1935
+ "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`.",
1396
1936
  "properties": {
1397
1937
  "offset": {
1398
1938
  "$ref": "#/components/schemas/Offset"
@@ -1411,18 +1951,67 @@
1411
1951
  "$ref": "#/components/schemas/PaginatedResultBase"
1412
1952
  }
1413
1953
  ],
1954
+ "description": "Document representing a generic search result. Each search resource should extend this to define what is returned in the `hits`.",
1955
+ "example": {
1956
+ "limit": 1,
1957
+ "hits": [
1958
+ {
1959
+ "couponId": "coupon1",
1960
+ "creationDate": "2019-10-20T12:00:00Z",
1961
+ "description": "This coupon is used to give 10% off stuff.",
1962
+ "enabled": false,
1963
+ "exportedCodeCount": 0,
1964
+ "lastModified": "2019-10-30T04:23:59Z",
1965
+ "redemptionCount": 3,
1966
+ "redemptionLimits": {
1967
+ "limitPerCode": 1,
1968
+ "limitPerCustomer": 1,
1969
+ "limitPerTimeFrame": {
1970
+ "limit": 2,
1971
+ "redemptionTimeFrame": 24
1972
+ }
1973
+ },
1974
+ "singleCode": "MyCode",
1975
+ "systemCodesConfig": {
1976
+ "codePrefix": "SG",
1977
+ "numberOfCodes": 500000
1978
+ },
1979
+ "totalCodesCount": 50,
1980
+ "type": "single_code"
1981
+ }
1982
+ ],
1983
+ "query": {
1984
+ "textQuery": {
1985
+ "fields": [
1986
+ "id",
1987
+ "description"
1988
+ ],
1989
+ "searchPhrase": "stuff"
1990
+ }
1991
+ },
1992
+ "sorts": [
1993
+ {
1994
+ "field": "couponId",
1995
+ "sortOrder": "desc"
1996
+ }
1997
+ ],
1998
+ "offset": 2,
1999
+ "total": 8
2000
+ },
1414
2001
  "properties": {
1415
2002
  "query": {
1416
2003
  "$ref": "#/components/schemas/Query"
1417
2004
  },
1418
2005
  "sorts": {
1419
2006
  "type": "array",
2007
+ "description": "The sorting that was applied to the result.",
1420
2008
  "items": {
1421
2009
  "$ref": "#/components/schemas/Sort"
1422
2010
  }
1423
2011
  },
1424
2012
  "hits": {
1425
2013
  "type": "array",
2014
+ "description": "The sorted array of search hits. Can be empty.",
1426
2015
  "items": {
1427
2016
  "type": "object"
1428
2017
  }
@@ -1438,9 +2027,11 @@
1438
2027
  "$ref": "#/components/schemas/PaginatedSearchResult"
1439
2028
  }
1440
2029
  ],
2030
+ "description": "Search result containing a paginated list of custom objects.",
1441
2031
  "properties": {
1442
2032
  "hits": {
1443
2033
  "type": "array",
2034
+ "description": "The sorted array of search hits. Can be empty.",
1444
2035
  "items": {
1445
2036
  "$ref": "#/components/schemas/CustomObject"
1446
2037
  }
@@ -1452,6 +2043,8 @@
1452
2043
  },
1453
2044
  "SiteId": {
1454
2045
  "type": "string",
2046
+ "description": "The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites",
2047
+ "example": "RefArch",
1455
2048
  "maxLength": 32,
1456
2049
  "minLength": 1
1457
2050
  }
@@ -1463,6 +2056,11 @@
1463
2056
  "application/problem+json": {
1464
2057
  "schema": {
1465
2058
  "$ref": "#/components/schemas/ErrorResponse"
2059
+ },
2060
+ "examples": {
2061
+ "UnauthorizedExample": {
2062
+ "$ref": "#/components/examples/UnauthorizedExample"
2063
+ }
1466
2064
  }
1467
2065
  }
1468
2066
  }
@@ -1473,6 +2071,11 @@
1473
2071
  "application/problem+json": {
1474
2072
  "schema": {
1475
2073
  "$ref": "#/components/schemas/ErrorResponse"
2074
+ },
2075
+ "examples": {
2076
+ "ForbiddenExample": {
2077
+ "$ref": "#/components/examples/ForbiddenExample"
2078
+ }
1476
2079
  }
1477
2080
  }
1478
2081
  }
@@ -1482,21 +2085,25 @@
1482
2085
  "organizationId": {
1483
2086
  "name": "organizationId",
1484
2087
  "in": "path",
2088
+ "description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
1485
2089
  "required": true,
1486
2090
  "style": "simple",
1487
2091
  "explode": false,
1488
2092
  "schema": {
1489
2093
  "$ref": "#/components/schemas/OrganizationId"
1490
- }
2094
+ },
2095
+ "example": "f_ecom_zzxy_prd"
1491
2096
  },
1492
2097
  "objectType": {
1493
2098
  "name": "objectType",
1494
2099
  "in": "path",
2100
+ "description": "The ID of the custom object type.",
1495
2101
  "required": true,
1496
2102
  "style": "simple",
1497
2103
  "explode": false,
1498
2104
  "schema": {
1499
2105
  "type": "string",
2106
+ "example": "MyCustomType",
1500
2107
  "maxLength": 256,
1501
2108
  "minLength": 1
1502
2109
  }
@@ -1504,11 +2111,13 @@
1504
2111
  "key": {
1505
2112
  "name": "key",
1506
2113
  "in": "path",
2114
+ "description": "The key attribute value that identifies the custom object.",
1507
2115
  "required": true,
1508
2116
  "style": "simple",
1509
2117
  "explode": false,
1510
2118
  "schema": {
1511
2119
  "type": "string",
2120
+ "example": "my-key-value",
1512
2121
  "maxLength": 256,
1513
2122
  "minLength": 1
1514
2123
  }
@@ -1516,17 +2125,144 @@
1516
2125
  "siteId": {
1517
2126
  "name": "siteId",
1518
2127
  "in": "path",
2128
+ "description": "The ID of the site that the custom object belongs to.",
1519
2129
  "required": true,
1520
2130
  "style": "simple",
1521
2131
  "explode": false,
1522
2132
  "schema": {
1523
2133
  "$ref": "#/components/schemas/SiteId"
2134
+ },
2135
+ "example": "SiteGenesis"
2136
+ }
2137
+ },
2138
+ "examples": {
2139
+ "CustomObjectResultExample": {
2140
+ "value": {
2141
+ "keyProperty": "global_key",
2142
+ "keyValueString": "my-key-value",
2143
+ "objectType": "MyCustomType",
2144
+ "c_textField": "some text value",
2145
+ "c_numberField": 42,
2146
+ "c_booleanField": true
2147
+ }
2148
+ },
2149
+ "MalformedKeyParameter": {
2150
+ "value": {
2151
+ "title": "Malformed Key Parameter",
2152
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/malformed-key-parameter",
2153
+ "detail": "The format of path parameter 'abc' for data type 'integer' is invalid."
2154
+ }
2155
+ },
2156
+ "UnauthorizedExample": {
2157
+ "value": {
2158
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
2159
+ "title": "Unauthorized",
2160
+ "detail": "Your access token is invalid or expired and can’t be used to identify a user."
2161
+ }
2162
+ },
2163
+ "ForbiddenExample": {
2164
+ "value": {
2165
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
2166
+ "title": "Forbidden",
2167
+ "detail": "Your access token is valid, but you don’t have the required permissions to access the resource."
2168
+ }
2169
+ },
2170
+ "CustomObjectNotFound": {
2171
+ "value": {
2172
+ "title": "Custom Object Not Found",
2173
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/custom-object-not-found",
2174
+ "detail": "No custom object with key 'nonexistent' for object type 'MyCustomType' could be found."
2175
+ }
2176
+ },
2177
+ "ObjectTypeNotFound": {
2178
+ "value": {
2179
+ "title": "Object Type Not Found",
2180
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/object-type-not-found",
2181
+ "detail": "No object type with ID 'NonExistentType' could be found."
2182
+ }
2183
+ },
2184
+ "CreateCustomObjectExample": {
2185
+ "value": {
2186
+ "c_textField": "some text value",
2187
+ "c_numberField": 42,
2188
+ "c_booleanField": true
2189
+ }
2190
+ },
2191
+ "UpdateCustomObjectExample": {
2192
+ "value": {
2193
+ "c_textField": "updated text value"
2194
+ }
2195
+ },
2196
+ "SearchCustomObjectsExample": {
2197
+ "value": {
2198
+ "query": {
2199
+ "matchAllQuery": {}
2200
+ },
2201
+ "limit": 25,
2202
+ "offset": 0,
2203
+ "sorts": [
2204
+ {
2205
+ "field": "key_value_string",
2206
+ "sortOrder": "asc"
2207
+ }
2208
+ ]
2209
+ }
2210
+ },
2211
+ "SearchCustomObjectsBySiteIdExample": {
2212
+ "summary": "Search custom objects belonging to a specific site",
2213
+ "description": "Restricts the search to custom objects of a specific site by filtering on the searchable `siteId` attribute. Custom object search is not scoped by site at the URL level, so filtering by `siteId` is the supported way to limit results to a single site.",
2214
+ "value": {
2215
+ "query": {
2216
+ "termQuery": {
2217
+ "fields": [
2218
+ "siteId"
2219
+ ],
2220
+ "operator": "is",
2221
+ "values": [
2222
+ "SiteGenesis"
2223
+ ]
2224
+ }
2225
+ },
2226
+ "limit": 25,
2227
+ "offset": 0
2228
+ }
2229
+ },
2230
+ "CustomObjectSearchResultExample": {
2231
+ "value": {
2232
+ "limit": 2,
2233
+ "hits": [
2234
+ {
2235
+ "keyProperty": "global_key",
2236
+ "keyValueString": "key1",
2237
+ "objectType": "MyCustomType",
2238
+ "c_textField": "value1"
2239
+ },
2240
+ {
2241
+ "keyProperty": "global_key",
2242
+ "keyValueString": "key2",
2243
+ "objectType": "MyCustomType",
2244
+ "c_textField": "value2"
2245
+ }
2246
+ ],
2247
+ "query": {
2248
+ "matchAllQuery": {}
2249
+ },
2250
+ "offset": 0,
2251
+ "total": 2
2252
+ }
2253
+ },
2254
+ "TypeMismatch": {
2255
+ "value": {
2256
+ "title": "Type Mismatch",
2257
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/type-mismatch",
2258
+ "detail": "There is a type mismatch for field 'key_value_integer'."
1524
2259
  }
1525
2260
  }
1526
2261
  },
1527
2262
  "securitySchemes": {
1528
2263
  "AmOAuth2": {
1529
2264
  "type": "oauth2",
2265
+ "description": "Authentication via Account Manager OAuth 2.0.\n",
1530
2266
  "flows": {
1531
2267
  "clientCredentials": {
1532
2268
  "tokenUrl": "https://account.demandware.com/dwsso/oauth2/access_token",