@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,7 +2,8 @@
2
2
  "openapi": "3.0.3",
3
3
  "info": {
4
4
  "title": "Shopper Custom Objects",
5
- "version": "1.1.0",
5
+ "description": "[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-custom-objects/shopper-custom-objects-oas-v1-public.yaml)\n\n# API Overview\n\nCustom Objects hold configuration information that is unique to your business, such as third-party configuration information or special field values for Product Information Management (PIM) systems.\n\nFor example, if your out-of-the-box B2C Commerce product attributes do not include employee ID information, you can create a custom attribute for employee ID and use this API to retrieve the information. You provide access to this Custom Object information when requesting a SLAS token.\n\nUse Business Manager to set up Custom Object types, including a definition of the object and the values it contains.\n\nUse the Shopper Custom Objects API to retrieve Custom Object information. You can specify an object type ID as well as a key attribute for the object.\n\n## Authentication & Authorization\n\nThe Shopper Custom Objects API requires a shopper access token from the Shopper Login and API Access Service (SLAS).\n\nYou must include `sfcc.shopper-custom-objects.{object_type}` in the client ID used to generate the token. For a full list of required permissions, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html)\n\nFor details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html) in the SLAS guides. \n\nImportant:\n\nUsing an additional scope namespace, you can define exactly which Custom Object types a specific token can access. The requested custom `object_type` must exactly match the `object-type` specified in the scope. Note that SLAS is capable of handling a maximum of 20 Custom Object scopes.\n\nFor example, to limit access to a specific Custom Object type, such as `employee_details`, include it as the `object_type`. In this case, only the `employee_details` custom object type can be accessed:\n\n```\nsfcc.shopper-custom-objects.employee_details\n```\n\nTo grant global access to all Custom Object types, specify:\n\n```\nsfcc.shopper-custom-objects\n```\n\nFor access to multiple Custom Object types, define the applicable scope(s) in the SLAS API client scopes to be included in the SLAS token, for example:\n\n```\nsfcc.shopper-custom-objects.employee_details\nsfcc.shopper-custom-objects.employee_performance\n```\n\n## Customization\n\n### Custom Properties\n\nThis API supports custom properties (prefixed with `c_`). For details, see [Custom Properties.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/custom-properties.html)\n\n## Request Details\n\n### URL Encoding\n\nIf resource identifiers in request parameters contain commas (`,`) or percent signs (`%`), they must be URL encoded. For details, see [Encode URL Special Characters.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/url-encode.html)\n\n## Response Details\n\n### Personalization\n\nResponses from this API are not personalized via the Shopper Context API.\n\n### Caching\n\nResponses from this API are not cached. Custom object data is dynamic and may change frequently.\n\n### Timeouts\n\nShopper API requests must respond within 10 seconds, including any hook execution. If a response exceeds this threshold, an HTTP 504 status code is returned. For details, see [Timeouts and Limits.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/timeouts-limits.html)\n\n### Error Handling\n\nError responses follow the [RFC 7807](https://datatracker.ietf.org/doc/html/rfc7807) problem detail format. To trace errors, include a `correlation-id` header in your request — the response returns it as `x-correlation-id`. For details, see [HTTP Status Codes and Errors.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/error-response-codes.html)\n\n## Use Cases\n\n### Get a Custom Object\n\nRetrieve a custom object by its type and key.\n\n```sh\ncurl \"https://{shortCode}.api.commercecloud.salesforce.com/custom-object/shopper-custom-objects/v1/organizations/{organizationId}/custom-objects/employee_details/emp_123?siteId=RefArch\" \\\n -H \"Authorization: Bearer {access_token}\"\n```\n\n\n### Create and View Custom Object Types\n\nCustom object types are created in Business Manager:\n\n1. Navigate to **Administration** -> **Site Development** -> **Custom Object Types**.\n2. In the **Custom Object Type List** section, the available Custom Objects are listed.\n3. To create a new Custom Object type, select **New** and enter the applicable information. This creates the `custom_object_type` information that is in the call to the Shopper Custom Objects API endpoint.\n\nAdditionally, keys that provide additional information can be defined for Custom Object types, for example, a `employee_id` key for an `employee_details` Custom Object type.\n\n### Request Custom Object Information\n\nTo request Custom Object type information, the Custom Object type is specified following `custom-objects/` in the API URL:\n\n```\nhttps://{shortCode}/custom-object/shopper-custom-objects/v1/organizations/{organizationId}/custom-objects/{objectType}/{key}\n```\n\n`key` is an optional parameter that retrieves additional Custom Object type information, if available.\n\nFor example, to retrieve the Custom Object type key `employee_id` for the Custom Object type `employee_details`:\n\n```\nhttps://{shortCode}/custom-object/shopper-custom-objects/v1/organizations/{organizationId}/custom-objects/employee_details/employee_id?siteId=RefArch.\n```\n\n## Constraints\n\nCustom Object scopes: SLAS is capable of handling a maximum of 20 custom object scopes.\n\nCustom Objects: Maximum 27 custom objects.\n\nFor additional details, see [Governance and Quotas.](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-governance-and-quotas.html)\n\n## Troubleshooting\n\nThe Custom Object type requested must exactly match, including case, the information in the SLAS token, for example:\n\nIf the scope is `sfcc.custom-object-type.employee_details`, `employee_details` must match the information in the Shopper Custom Objects request:\n\n```\nhttps://…/custom-object/shopper-custom-objects/v1/organizations/f_ecom_bgmj_stg/custom-objects/employee_details/{key}?siteId`\n```\n\nIf you do not include the `shopper-custom-objects` as part of the SLAS token request, and you subsequently call the Shopper Custom Objects API, a 401 error is returned.\n\nIf you specify `key` information when no `key` information has been defined for the Custom Object, a 404 response code is returned.",
6
+ "version": "1.1.2",
6
7
  "x-api-type": "Shopper",
7
8
  "x-api-family": "Custom Object"
8
9
  },
@@ -11,6 +12,7 @@
11
12
  "url": "https://{shortCode}.api.commercecloud.salesforce.com/custom-object/shopper-custom-objects/v1",
12
13
  "variables": {
13
14
  "shortCode": {
15
+ "description": "An eight-character string assigned to a realm for routing purposes. See [Base URL and Request Formation.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html)",
14
16
  "default": "shortCode"
15
17
  }
16
18
  }
@@ -19,88 +21,99 @@
19
21
  "paths": {
20
22
  "/organizations/{organizationId}/custom-objects/{objectType}/{key}": {
21
23
  "get": {
24
+ "summary": "Read a custom object using its object type ID and its unique key attribute value.",
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": "siteId",
36
41
  "in": "query",
42
+ "description": "The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.",
37
43
  "required": true,
38
44
  "style": "form",
39
45
  "explode": true,
40
46
  "schema": {
41
47
  "$ref": "#/components/schemas/SiteId"
48
+ },
49
+ "examples": {
50
+ "SiteId": {
51
+ "value": "RefArch"
52
+ }
42
53
  }
43
54
  },
44
55
  {
45
56
  "name": "locale",
46
57
  "in": "query",
58
+ "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.",
47
59
  "required": false,
48
60
  "style": "form",
49
61
  "explode": true,
50
62
  "schema": {
51
63
  "$ref": "#/components/schemas/LocaleCode"
64
+ },
65
+ "examples": {
66
+ "LanguageCountry": {
67
+ "value": "en-US"
68
+ },
69
+ "CountryCode": {
70
+ "value": "US"
71
+ }
52
72
  }
53
73
  },
54
74
  {
55
75
  "name": "objectType",
56
76
  "in": "path",
77
+ "description": "The object type of custom object.",
57
78
  "required": true,
58
79
  "style": "simple",
59
80
  "explode": false,
60
81
  "schema": {
61
82
  "type": "string",
83
+ "example": "Test_Integer",
62
84
  "minLength": 1
63
85
  }
64
86
  },
65
87
  {
66
88
  "name": "key",
67
89
  "in": "path",
90
+ "description": "The key to identify the custom object.",
68
91
  "required": true,
69
92
  "style": "simple",
70
93
  "explode": false,
71
94
  "schema": {
72
95
  "type": "string",
96
+ "example": "1",
73
97
  "minLength": 1
74
98
  }
75
99
  },
76
100
  {
77
101
  "name": "sfdc_usid",
78
102
  "in": "header",
103
+ "description": "A unique shopper identifier (USID) for tracking client context.\nUsed with endpoints secured with ShopperClientContextToken.\nThis header is required for all endpoints secured with ShopperClientContextToken.",
79
104
  "required": false,
80
105
  "style": "simple",
81
106
  "explode": false,
82
107
  "schema": {
83
108
  "type": "string",
84
- "format": "uuid"
85
- }
86
- },
87
- {
88
- "name": "sfdc_dw_dnt",
89
- "in": "header",
90
- "required": false,
91
- "style": "simple",
92
- "explode": false,
93
- "schema": {
94
- "type": "string",
95
- "enum": [
96
- "0",
97
- "1"
98
- ]
109
+ "format": "uuid",
110
+ "example": "550e8400-e29b-41d4-a716-446655440000"
99
111
  }
100
112
  },
101
113
  {
102
114
  "name": "personalized",
103
115
  "in": "query",
116
+ "description": "Controls whether personalization is applied to the response. When set to `none`, the server skips applying personalization to the response.",
104
117
  "required": false,
105
118
  "style": "form",
106
119
  "explode": true,
@@ -108,12 +121,14 @@
108
121
  "type": "string",
109
122
  "enum": [
110
123
  "none"
111
- ]
124
+ ],
125
+ "example": "none"
112
126
  }
113
127
  },
114
128
  {
115
129
  "name": "sfdc_shopper_context",
116
130
  "in": "header",
131
+ "description": "Shopper context information (for example clientIP, sourceCode, and customQualifiers)\npassed in from a trusted backend application.",
117
132
  "required": false,
118
133
  "style": "simple",
119
134
  "explode": false,
@@ -129,6 +144,11 @@
129
144
  "application/json": {
130
145
  "schema": {
131
146
  "$ref": "#/components/schemas/CustomObject"
147
+ },
148
+ "examples": {
149
+ "CustomObjectResultExample": {
150
+ "$ref": "#/components/examples/CustomObjectResultExample"
151
+ }
132
152
  }
133
153
  }
134
154
  }
@@ -139,6 +159,11 @@
139
159
  "application/problem+json": {
140
160
  "schema": {
141
161
  "$ref": "#/components/schemas/ErrorResponse"
162
+ },
163
+ "examples": {
164
+ "MalformedKeyParameter": {
165
+ "$ref": "#/components/examples/MalformedKeyParameter"
166
+ }
142
167
  }
143
168
  }
144
169
  }
@@ -149,6 +174,11 @@
149
174
  "application/problem+json": {
150
175
  "schema": {
151
176
  "$ref": "#/components/schemas/ErrorResponse"
177
+ },
178
+ "examples": {
179
+ "Unauthorized": {
180
+ "$ref": "#/components/examples/Unauthorized"
181
+ }
152
182
  }
153
183
  }
154
184
  }
@@ -159,6 +189,14 @@
159
189
  "application/problem+json": {
160
190
  "schema": {
161
191
  "$ref": "#/components/schemas/ErrorResponse"
192
+ },
193
+ "examples": {
194
+ "CustomObjectNotFound": {
195
+ "$ref": "#/components/examples/CustomObjectNotFound"
196
+ },
197
+ "ObjectTypeNotFound": {
198
+ "$ref": "#/components/examples/ObjectTypeNotFound"
199
+ }
162
200
  }
163
201
  }
164
202
  }
@@ -185,27 +223,38 @@
185
223
  "schemas": {
186
224
  "OrganizationId": {
187
225
  "type": "string",
226
+ "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).",
227
+ "example": "f_ecom_zzxy_prd",
188
228
  "pattern": "^f_ecom_[a-z]{4}_(prd|stg|dev|s[0-9]{2}|[0-9]{3})$"
189
229
  },
190
230
  "SiteId": {
191
231
  "type": "string",
232
+ "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",
233
+ "example": "RefArch",
192
234
  "maxLength": 32,
193
235
  "minLength": 1
194
236
  },
195
237
  "LanguageCountry": {
196
238
  "type": "string",
239
+ "description": "A concatenated version of the standard Language and Country codes, combined with a hyphen '`-`'.",
240
+ "example": "en-US",
197
241
  "pattern": "^[a-z][a-z]-[A-Z][A-Z]$"
198
242
  },
199
243
  "LanguageCode": {
200
244
  "type": "string",
245
+ "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).",
246
+ "example": "en",
201
247
  "pattern": "^[a-z][a-z]$"
202
248
  },
203
249
  "DefaultFallback": {
204
250
  "type": "string",
205
251
  "default": "default",
252
+ "description": "A specialized value indicating the system default values for locales.",
253
+ "example": "default",
206
254
  "pattern": "^default$"
207
255
  },
208
256
  "LocaleCode": {
257
+ "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.",
209
258
  "oneOf": [
210
259
  {
211
260
  "$ref": "#/components/schemas/LanguageCountry"
@@ -220,20 +269,33 @@
220
269
  },
221
270
  "CustomObject": {
222
271
  "type": "object",
223
- "additionalProperties": {},
272
+ "additionalProperties": {
273
+ "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.",
274
+ "example": "c_trackingId",
275
+ "title": "Additional Property Support"
276
+ },
277
+ "description": "Document representing a custom object that contains all defined custom attributes for its object type.",
224
278
  "properties": {
225
279
  "keyProperty": {
226
- "type": "string"
280
+ "type": "string",
281
+ "description": "The name of the key property for the custom object. This is ignored in input documents.",
282
+ "example": "global_key"
227
283
  },
228
284
  "keyValueInteger": {
229
285
  "type": "integer",
230
- "format": "int32"
286
+ "format": "int32",
287
+ "description": "The id of the custom object when the type of the key is Integer. This is ignored in input documents.",
288
+ "example": 1
231
289
  },
232
290
  "keyValueString": {
233
- "type": "string"
291
+ "type": "string",
292
+ "description": "The id of the custom object when the type of the key is String. This is ignored in input documents.",
293
+ "example": "1"
234
294
  },
235
295
  "objectType": {
236
296
  "type": "string",
297
+ "description": "The id of the object type. This is ignored in input documents.",
298
+ "example": "Global_String",
237
299
  "maxLength": 256
238
300
  }
239
301
  }
@@ -244,17 +306,25 @@
244
306
  "properties": {
245
307
  "title": {
246
308
  "type": "string",
309
+ "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",
310
+ "example": "You do not have enough credit",
247
311
  "maxLength": 256
248
312
  },
249
313
  "type": {
250
314
  "type": "string",
315
+ "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",
316
+ "example": "NotEnoughMoney",
251
317
  "maxLength": 2048
252
318
  },
253
319
  "detail": {
254
- "type": "string"
320
+ "type": "string",
321
+ "description": "A human-readable explanation specific to this occurrence of the problem.",
322
+ "example": "Your current balance is 30, but that costs 50"
255
323
  },
256
324
  "instance": {
257
325
  "type": "string",
326
+ "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",
327
+ "example": "/account/12345/msgs/abc",
258
328
  "maxLength": 2048
259
329
  }
260
330
  },
@@ -269,83 +339,93 @@
269
339
  "organizationId": {
270
340
  "name": "organizationId",
271
341
  "in": "path",
342
+ "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).",
272
343
  "required": true,
273
344
  "style": "simple",
274
345
  "explode": false,
275
346
  "schema": {
276
347
  "$ref": "#/components/schemas/OrganizationId"
277
- }
348
+ },
349
+ "example": "f_ecom_zzxy_prd"
278
350
  },
279
351
  "siteId": {
280
352
  "name": "siteId",
281
353
  "in": "query",
354
+ "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.",
282
355
  "required": true,
283
356
  "style": "form",
284
357
  "explode": true,
285
358
  "schema": {
286
359
  "$ref": "#/components/schemas/SiteId"
360
+ },
361
+ "examples": {
362
+ "SiteId": {
363
+ "value": "RefArch"
364
+ }
287
365
  }
288
366
  },
289
367
  "locale": {
290
368
  "name": "locale",
291
369
  "in": "query",
370
+ "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.",
292
371
  "required": false,
293
372
  "style": "form",
294
373
  "explode": true,
295
374
  "schema": {
296
375
  "$ref": "#/components/schemas/LocaleCode"
376
+ },
377
+ "examples": {
378
+ "LanguageCountry": {
379
+ "value": "en-US"
380
+ },
381
+ "CountryCode": {
382
+ "value": "US"
383
+ }
297
384
  }
298
385
  },
299
386
  "objectType": {
300
387
  "name": "objectType",
301
388
  "in": "path",
389
+ "description": "The object type of custom object.",
302
390
  "required": true,
303
391
  "style": "simple",
304
392
  "explode": false,
305
393
  "schema": {
306
394
  "type": "string",
395
+ "example": "Test_Integer",
307
396
  "minLength": 1
308
397
  }
309
398
  },
310
399
  "key": {
311
400
  "name": "key",
312
401
  "in": "path",
402
+ "description": "The key to identify the custom object.",
313
403
  "required": true,
314
404
  "style": "simple",
315
405
  "explode": false,
316
406
  "schema": {
317
407
  "type": "string",
408
+ "example": "1",
318
409
  "minLength": 1
319
410
  }
320
411
  },
321
412
  "sfdcUsid": {
322
413
  "name": "sfdc_usid",
323
414
  "in": "header",
415
+ "description": "A unique shopper identifier (USID) for tracking client context.\nUsed with endpoints secured with ShopperClientContextToken.\nThis header is required for all endpoints secured with ShopperClientContextToken.",
324
416
  "required": false,
325
417
  "style": "simple",
326
418
  "explode": false,
327
419
  "schema": {
328
420
  "type": "string",
329
- "format": "uuid"
330
- }
331
- },
332
- "sfdcDwDnt": {
333
- "name": "sfdc_dw_dnt",
334
- "in": "header",
335
- "required": false,
336
- "style": "simple",
337
- "explode": false,
338
- "schema": {
339
- "type": "string",
340
- "enum": [
341
- "0",
342
- "1"
343
- ]
421
+ "format": "uuid",
422
+ "example": "550e8400-e29b-41d4-a716-446655440000"
344
423
  }
345
424
  },
346
425
  "personalized": {
347
426
  "name": "personalized",
348
427
  "in": "query",
428
+ "description": "Controls whether personalization is applied to the response. When set to `none`, the server skips applying personalization to the response.",
349
429
  "required": false,
350
430
  "style": "form",
351
431
  "explode": true,
@@ -353,12 +433,14 @@
353
433
  "type": "string",
354
434
  "enum": [
355
435
  "none"
356
- ]
436
+ ],
437
+ "example": "none"
357
438
  }
358
439
  },
359
440
  "sfdcShopperContext": {
360
441
  "name": "sfdc_shopper_context",
361
442
  "in": "header",
443
+ "description": "Shopper context information (for example clientIP, sourceCode, and customQualifiers)\npassed in from a trusted backend application.",
362
444
  "required": false,
363
445
  "style": "simple",
364
446
  "explode": false,
@@ -367,9 +449,77 @@
367
449
  }
368
450
  }
369
451
  },
452
+ "examples": {
453
+ "CustomObjectResultExample": {
454
+ "value": {
455
+ "keyProperty": "global_key",
456
+ "objectType": "Global_String",
457
+ "c_BooleanAttribute": true,
458
+ "c_DateAttribute": "2015-02-03",
459
+ "c_DateTimeAttribute": "2015-02-20T01:00:00.000Z",
460
+ "c_EmailAttribute": "tralala@gmail.com",
461
+ "c_HtmlAttribute": "<html>\r\n<head><title>some title</title></head>\r\n<body>the body</body>\r\n</html>",
462
+ "c_ImageAttribute": "https://whatever/on/demandware.static/-/Sites/default/v0/home/user/images/image.gif",
463
+ "c_IntegerAttribute": 42,
464
+ "c_IntegerEnumAttribute": 3,
465
+ "c_IntegerSetAttribute": [
466
+ 1,
467
+ 2
468
+ ],
469
+ "c_NumberAttribute": 42,
470
+ "c_NumberSetAttribute": [
471
+ 1,
472
+ 1.1
473
+ ],
474
+ "c_PasswordAttribute": "UUIG6ydSpJtdBbYDb1JMd7jgiA1rwYmQTzB5AEvz/YjorR6cIl19cu1IN6H/i/Ol",
475
+ "c_StringAttribute": "Tralala",
476
+ "c_StringEnumAttribute": "Value3",
477
+ "c_StringSetAttribute": [
478
+ "string1",
479
+ "string2"
480
+ ],
481
+ "c_TextAttribute": "This is a text, which is not very meaningful."
482
+ }
483
+ },
484
+ "MalformedKeyParameter": {
485
+ "value": {
486
+ "title": "Malformed Key Parameter",
487
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/malformed-key-parameter",
488
+ "detail": "The format of path parameter 'gdd' for data type 'integer' is invalid.",
489
+ "value": "gdd",
490
+ "parameter": "integer"
491
+ }
492
+ },
493
+ "Unauthorized": {
494
+ "value": {
495
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
496
+ "title": "Unauthorized",
497
+ "detail": "Your access token is invalid or expired and can’t be used to identify a user.",
498
+ "accessToken": "hbGciOiJIUzI1NiIsenR5cCI6Ikp"
499
+ }
500
+ },
501
+ "CustomObjectNotFound": {
502
+ "value": {
503
+ "title": "Custom Object Not Found",
504
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/custom-object-not-found",
505
+ "detail": "No custom object with key '2213' for object type 'Test_Integer' could be found.",
506
+ "key": "2213",
507
+ "objectType": "Test_Integer"
508
+ }
509
+ },
510
+ "ObjectTypeNotFound": {
511
+ "value": {
512
+ "title": "Object Type Not Found",
513
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/object-type-not-found",
514
+ "detail": "No object type with ID 'Test_Integer1' could be found.",
515
+ "objectType": "Test_Integer1"
516
+ }
517
+ }
518
+ },
370
519
  "securitySchemes": {
371
520
  "ShopperToken": {
372
521
  "type": "oauth2",
522
+ "description": "ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. \nFor a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nA shopper token allows you to access the Shopper API endpoints of both the Open Commerce API (OCAPI) and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.\nThe `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.\n",
373
523
  "flows": {
374
524
  "clientCredentials": {
375
525
  "tokenUrl": "https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token",
@@ -390,6 +540,7 @@
390
540
  },
391
541
  "ShopperClientContextToken": {
392
542
  "type": "oauth2",
543
+ "description": "ShopperClientContextToken is a separate security scheme used to track and validate client context information.\nIt is valid for Guest shoppers flows only using SLAS private clients. For registered shoppers, use existing ShopperToken flows.\nFor authentication details, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nThis token allows access to Shopper API endpoints for guest shoppers only.\n",
393
544
  "flows": {
394
545
  "clientCredentials": {
395
546
  "tokenUrl": "https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token?hint=client_context",