@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.
- package/data/guides/enrichment.json +291 -0
- package/data/guides/index.json +426 -37
- package/data/schemas/dw.schema.json +590 -0
- package/data/tooling/index.json +18 -9
- package/dist/esm/cli/base-command.d.ts +20 -1
- package/dist/esm/cli/base-command.js +61 -11
- package/dist/esm/cli/base-command.js.map +1 -1
- package/dist/esm/cli/cartridge-command.js +2 -1
- package/dist/esm/cli/cartridge-command.js.map +1 -1
- package/dist/esm/cli/command-search.d.ts +85 -0
- package/dist/esm/cli/command-search.js +147 -0
- package/dist/esm/cli/command-search.js.map +1 -0
- package/dist/esm/cli/config.d.ts +10 -1
- package/dist/esm/cli/config.js +18 -9
- package/dist/esm/cli/config.js.map +1 -1
- package/dist/esm/cli/hooks.d.ts +13 -0
- package/dist/esm/cli/hooks.js +11 -0
- package/dist/esm/cli/hooks.js.map +1 -1
- package/dist/esm/cli/index.d.ts +2 -0
- package/dist/esm/cli/index.js +2 -0
- package/dist/esm/cli/index.js.map +1 -1
- package/dist/esm/cli/instance-command.d.ts +1 -0
- package/dist/esm/cli/instance-command.js +2 -1
- package/dist/esm/cli/instance-command.js.map +1 -1
- package/dist/esm/cli/mrt-command.d.ts +3 -2
- package/dist/esm/cli/mrt-command.js +4 -4
- package/dist/esm/cli/mrt-command.js.map +1 -1
- package/dist/esm/cli/oauth-command.d.ts +1 -0
- package/dist/esm/cli/ods-command.d.ts +1 -0
- package/dist/esm/cli/webdav-command.d.ts +1 -0
- package/dist/esm/clients/custom-apis.d.ts +36 -2
- package/dist/esm/clients/custom-apis.js +57 -4
- package/dist/esm/clients/custom-apis.js.map +1 -1
- package/dist/esm/clients/index.d.ts +1 -1
- package/dist/esm/clients/index.js +1 -1
- package/dist/esm/clients/index.js.map +1 -1
- package/dist/esm/clients/scapi-backend-utils.d.ts +15 -0
- package/dist/esm/clients/scapi-backend-utils.js +28 -1
- package/dist/esm/clients/scapi-backend-utils.js.map +1 -1
- package/dist/esm/clients/scapi-fallback-backend.js +2 -2
- package/dist/esm/clients/scapi-fallback-backend.js.map +1 -1
- package/dist/esm/clients/scapi-schemas.generated.d.ts +2 -2
- package/dist/esm/compat/dispatcher.js +2 -2
- package/dist/esm/compat/dispatcher.js.map +1 -1
- package/dist/esm/config/config-origins.d.ts +19 -0
- package/dist/esm/config/config-origins.js +11 -0
- package/dist/esm/config/config-origins.js.map +1 -0
- package/dist/esm/config/config-write.d.ts +86 -0
- package/dist/esm/config/config-write.js +296 -0
- package/dist/esm/config/config-write.js.map +1 -0
- package/dist/esm/config/dw-json-schema.d.ts +14 -0
- package/dist/esm/config/dw-json-schema.js +269 -0
- package/dist/esm/config/dw-json-schema.js.map +1 -0
- package/dist/esm/config/dw-json.d.ts +2 -0
- package/dist/esm/config/dw-json.js +10 -6
- package/dist/esm/config/dw-json.js.map +1 -1
- package/dist/esm/config/index.d.ts +13 -4
- package/dist/esm/config/index.js +8 -3
- package/dist/esm/config/index.js.map +1 -1
- package/dist/esm/config/instance-manager.d.ts +64 -28
- package/dist/esm/config/instance-manager.js +145 -63
- package/dist/esm/config/instance-manager.js.map +1 -1
- package/dist/esm/config/mapping.d.ts +5 -0
- package/dist/esm/config/mapping.js +20 -1
- package/dist/esm/config/mapping.js.map +1 -1
- package/dist/esm/config/project-environment.d.ts +62 -0
- package/dist/esm/config/project-environment.js +113 -0
- package/dist/esm/config/project-environment.js.map +1 -1
- package/dist/esm/config/resolver.d.ts +22 -0
- package/dist/esm/config/resolver.js +106 -37
- package/dist/esm/config/resolver.js.map +1 -1
- package/dist/esm/config/sources/dw-json-source.d.ts +9 -1
- package/dist/esm/config/sources/dw-json-source.js +59 -23
- package/dist/esm/config/sources/dw-json-source.js.map +1 -1
- package/dist/esm/config/sources/env-source.d.ts +70 -9
- package/dist/esm/config/sources/env-source.js +205 -47
- package/dist/esm/config/sources/env-source.js.map +1 -1
- package/dist/esm/config/sources/index.d.ts +1 -1
- package/dist/esm/config/sources/index.js +1 -1
- package/dist/esm/config/sources/index.js.map +1 -1
- package/dist/esm/config/types.d.ts +53 -3
- package/dist/esm/docs/search.js +3 -1
- package/dist/esm/docs/search.js.map +1 -1
- package/dist/esm/docs/types.d.ts +3 -1
- package/dist/esm/guidance/bundle.d.ts +33 -0
- package/dist/esm/guidance/bundle.js +268 -0
- package/dist/esm/guidance/bundle.js.map +1 -0
- package/dist/esm/guidance/catalog.d.ts +8 -1
- package/dist/esm/guidance/catalog.js +48 -6
- package/dist/esm/guidance/catalog.js.map +1 -1
- package/dist/esm/guidance/index.d.ts +1 -0
- package/dist/esm/guidance/index.js +1 -0
- package/dist/esm/guidance/index.js.map +1 -1
- package/dist/esm/guidance/types.d.ts +17 -1
- package/dist/esm/guidance/types.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/operations/jobs/run-system-job.js +2 -2
- package/dist/esm/operations/jobs/run-system-job.js.map +1 -1
- package/dist/esm/plugins/discovery.js +2 -1
- package/dist/esm/plugins/discovery.js.map +1 -1
- package/dist/esm/scapi/catalog.d.ts +5 -2
- package/dist/esm/scapi/catalog.js.map +1 -1
- package/dist/esm/scapi/index.d.ts +6 -2
- package/dist/esm/scapi/index.js +4 -2
- package/dist/esm/scapi/index.js.map +1 -1
- package/dist/esm/scapi/live.d.ts +14 -3
- package/dist/esm/scapi/live.js +33 -5
- package/dist/esm/scapi/live.js.map +1 -1
- package/dist/esm/scapi/local.d.ts +26 -0
- package/dist/esm/scapi/local.js +143 -0
- package/dist/esm/scapi/local.js.map +1 -0
- package/dist/esm/scapi/request.d.ts +2 -2
- package/dist/esm/scapi/request.js +4 -2
- package/dist/esm/scapi/request.js.map +1 -1
- package/dist/esm/scapi/runtime.d.ts +5 -0
- package/dist/esm/scapi/runtime.js.map +1 -1
- package/dist/esm/scapi/schema-source.d.ts +90 -0
- package/dist/esm/scapi/schema-source.js +146 -0
- package/dist/esm/scapi/schema-source.js.map +1 -0
- package/dist/esm/scapi/worker-source.js +31 -7
- package/dist/esm/scapi/worker-source.js.map +1 -1
- package/dist/esm/telemetry/telemetry.d.ts +1 -0
- package/dist/esm/telemetry/telemetry.js +18 -1
- package/dist/esm/telemetry/telemetry.js.map +1 -1
- package/dist/esm/telemetry/types.d.ts +9 -0
- package/dist/esm/test-utils/config-isolation.js +21 -15
- package/dist/esm/test-utils/config-isolation.js.map +1 -1
- package/dist/esm/ux/agent-context.d.ts +69 -0
- package/dist/esm/ux/agent-context.js +133 -0
- package/dist/esm/ux/agent-context.js.map +1 -0
- package/dist/esm/ux/confirm.d.ts +27 -0
- package/dist/esm/ux/confirm.js +32 -0
- package/dist/esm/ux/confirm.js.map +1 -1
- package/dist/esm/ux/index.d.ts +2 -1
- package/dist/esm/ux/index.js +2 -1
- package/dist/esm/ux/index.js.map +1 -1
- package/node_modules/@salesforce/b2c-api-schemas/manifest.json +83 -42
- package/node_modules/@salesforce/b2c-api-schemas/package.json +1 -1
- package/node_modules/@salesforce/b2c-api-schemas/scapi/cdn/zones/v1.json +6798 -238
- package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/orders/v1.json +2296 -205
- package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-baskets/v1.json +5571 -666
- package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-baskets/v2.json +6062 -371
- package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-orders/v1.json +3426 -360
- package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-payments/v1.json +351 -99
- package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/cors/v1.json +172 -12
- package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/preferences/v1.json +1497 -111
- package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/shopper-configurations/v1.json +202 -36
- package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/timeouts/v1.json +79 -10
- package/node_modules/@salesforce/b2c-api-schemas/scapi/custom-object/custom-objects/v1.json +785 -49
- package/node_modules/@salesforce/b2c-api-schemas/scapi/custom-object/shopper-custom-objects/v1.json +191 -40
- package/node_modules/@salesforce/b2c-api-schemas/scapi/customer/customers/v1.json +1483 -107
- package/node_modules/@salesforce/b2c-api-schemas/scapi/customer/shopper-customers/v1.json +4854 -787
- package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/custom-apis/v1.json +119 -15
- package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/object-definitions/v1.json +1699 -80
- package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/scapi-schemas/v1.json +252 -18
- package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/scripts/v1.json +329 -23
- package/node_modules/@salesforce/b2c-api-schemas/scapi/experience/experiences/v1.json +4208 -234
- package/node_modules/@salesforce/b2c-api-schemas/scapi/experience/shopper-experience/v1.json +1591 -247
- package/node_modules/@salesforce/b2c-api-schemas/scapi/intelligence/analytics/v1.json +396 -8
- package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/availability/v1.json +1242 -69
- package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/impex/v1.json +2354 -248
- package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/reservation/v1.json +1550 -45
- package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/segmentation/v1.json +6615 -0
- package/node_modules/@salesforce/b2c-api-schemas/scapi/merchant/roles/v1.json +1520 -59
- package/node_modules/@salesforce/b2c-api-schemas/scapi/merchant/users/v1.json +397 -17
- package/node_modules/@salesforce/b2c-api-schemas/scapi/observability/metrics/v1.json +1241 -27
- package/node_modules/@salesforce/b2c-api-schemas/scapi/operation/jobs/v1.json +1069 -68
- package/node_modules/@salesforce/b2c-api-schemas/scapi/operation/replications/v1.json +410 -23
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/assignments/v1.json +502 -102
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/campaigns/v1.json +1112 -94
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/coupons/v1.json +820 -93
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/gift-certificates/v1.json +845 -92
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/promotions/v1.json +2716 -674
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/shopper-gift-certificates/v1.json +130 -47
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/shopper-promotions/v1.json +233 -63
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/source-code-groups/v1.json +630 -70
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/catalogs/v1.json +2886 -348
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/inventory-lists/v1.json +520 -19
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/price-books/v1.json +3115 -293
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/products/v1.json +3313 -138
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-availability/v1.json +266 -52
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-delivery-estimates/v1.json +256 -48
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-products/v1.json +1744 -306
- package/node_modules/@salesforce/b2c-api-schemas/scapi/search/shopper-search/v1.json +1661 -120
- package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/auth/v1.json +2174 -118
- package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/auth-admin/v1.json +1373 -24
- package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/consents/v1.json +531 -20
- package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-agents/v1.json +154 -6
- package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-consents/v1.json +596 -79
- package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-context/v1.json +456 -42
- package/node_modules/@salesforce/b2c-api-schemas/scapi/site/seo/v1.json +101 -23
- package/node_modules/@salesforce/b2c-api-schemas/scapi/site/shopper-seo/v1.json +184 -41
- package/node_modules/@salesforce/b2c-api-schemas/scapi/site/sites/v1.json +995 -47
- package/node_modules/@salesforce/b2c-api-schemas/scapi/store/shopper-stores/v1.json +370 -67
- package/node_modules/@salesforce/b2c-api-schemas/scapi/store/store-redirect-mappings/v1.json +319 -11
- package/node_modules/@salesforce/b2c-api-schemas/scapi/store/stores/v1.json +1109 -64
- package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/deployments/v1.json +1442 -0
- package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/environments/v1.json +4293 -0
- package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/storefronts/v1.json +1371 -0
- package/package.json +5 -2
- 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 Consents",
|
|
5
|
-
"
|
|
5
|
+
"description": "[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-consents/shopper-consents-oas-v1-public.yaml)\n\n# API Overview\n\nThe Shopper Consent API offers a centralized method for managing shopper consent. With this API, shoppers can view and update subscription preferences for marketing communications across various channels. This API controls how and where shoppers receive marketing messages while ensuring compliance with privacy regulations.\n\nThe Shopper Consent API provides sensible defaults for optional fields to simplify integration:\n- Consent Type: Defaults to \"marketing\" for marketing communications.\n- Consent Required: Defaults to false, making subscriptions optional by default.\n- Default Status: Defaults to \"opt_out\" to respect privacy-first principles.\n- Tags: Defaults to an empty array when not specified.\n\n## Authentication & Authorization\n\nThe Shopper Consent API requires a shopper access token from the Shopper Login and API Access Service (SLAS).\n\nYou must include the relevant scope(s) in the client ID used to generate the SLAS token.\n\n- `sfcc.shopper-consents`: Required for reading communication subscription data (GET operations).\n- `sfcc.shopper-consents.rw`: Required for creating and modifying communication subscription consent data (POST operations).\n\nFor 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\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. Consent data is unique to each shopper.\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 Consent Subscriptions\n\nRetrieve the communication subscriptions for a shopper.\n\n```sh\ncurl \"https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-consents/v1/organizations/{organizationId}/subscriptions?siteId=RefArch\" \\\n -H \"Authorization: Bearer {access_token}\"\n```\n\n\n### Retrieve communication subscriptions\n\nRetrieve relevant communication subscription options with rich display information.\n - Communication subscription options can be filtered by one or more qualifying tags.\n - Use the `expand` parameter to conditionally include subscription status.\n\n### Update individual subscription consent\n\nUpdate consent status for a single subscription with simple request/response pattern.\n\n### Bulk subscription updates\n\nEfficiently manage multiple subscription preferences with a single request.\n - Update 1-50 subscriptions per bulk request.\n - Partial success handling with detailed error reporting for failed updates.\n\n## Data Model\n\n### Subscriptions\nSubscriptions represent a shopper's consent to receive specific types of marketing communications. Each subscription includes:\n\n- Subscription Id: Descriptive identifier\n- Channels: Array of communication methods - Email, SMS, or WhatsApp\n- Consent Type: Marketing or legal subscription classification\n- Consent Required: Whether the subscription is mandatory for the shopper\n- Default Status: Default opt-in or opt-out behavior\n- Consent Status: Array of status entries for each channel showing current opt-in or opt-out status (conditionally returned based on expand parameter)\n- Rich Display Information: \n - Title: Simple localized string for subscription name\n - Subtitle: Simple localized string with HTML markup support for descriptions\n - Localized content determined by the locale parameter\n- Tags: Categorical tags indicating where the subscription option can appear (defaults to empty array, max 10 tags)\n\n### Channels\nChannels define the communication methods available for a subscription:\n- `email`: Email communications\n- `sms`: SMS/text messages\n- `whatsapp`: WhatsApp messaging\n\n### Tags\nTags indicate where subscription options are displayed in your shopper experience. Tags are also accepted as optional filtering parameters in the retrieval of shopper consent subscriptions. For example:\n- `homepage_banner`: Main website homepage\n- `registration`: Shopper registration form\n- `checkout`: Checkout flow\n- `user_profile`: User profile management section\n\n## Advanced Features\n\n### Expand Parameter\n\nThe `expand` parameter provides conditional field inclusion:\n- `expand=[]` (default): Returns basic subscription information\n- `expand=[\"consentStatus\"]`: Include consent status information in the response\n- Future expansion may include additional fields\n\n## Best Practices\n\n- Use single subscription updates for real-time, interactive preference changes.\n- Use bulk operations when updating multiple subscriptions to reduce API calls and improve performance.\n- Only request status information when needed using the expand parameter to reduce latency.",
|
|
6
|
+
"version": "1.2.2",
|
|
6
7
|
"x-api-type": "Shopper",
|
|
7
8
|
"x-api-family": "Shopper"
|
|
8
9
|
},
|
|
@@ -11,6 +12,7 @@
|
|
|
11
12
|
"url": "https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-consents/v1",
|
|
12
13
|
"variables": {
|
|
13
14
|
"shortCode": {
|
|
15
|
+
"description": "An eight-character string assigned to a realm for routing purposes. See [Base URL and Request Formation.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html)",
|
|
14
16
|
"default": "shortCode"
|
|
15
17
|
}
|
|
16
18
|
}
|
|
@@ -19,41 +21,61 @@
|
|
|
19
21
|
"paths": {
|
|
20
22
|
"/organizations/{organizationId}/subscriptions": {
|
|
21
23
|
"get": {
|
|
24
|
+
"summary": "Get shopper consent preferences",
|
|
25
|
+
"description": "Retrieve all subscription preferences for the shopper (authenticated or guest).\n\nUse the 'expand' parameter to include additional fields in the response:\n- expand=[\"consentStatus\"]: Include subscription status information\n- expand=[]: Default behavior, excludes status for privacy and performance\n\nThe expand parameter provides privacy benefits by not exposing sensitive status \ninformation unless explicitly requested.\n",
|
|
22
26
|
"operationId": "getSubscriptions",
|
|
23
27
|
"parameters": [
|
|
24
28
|
{
|
|
25
29
|
"name": "organizationId",
|
|
26
30
|
"in": "path",
|
|
31
|
+
"description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
|
|
27
32
|
"required": true,
|
|
28
33
|
"style": "simple",
|
|
29
34
|
"explode": false,
|
|
30
35
|
"schema": {
|
|
31
36
|
"$ref": "#/components/schemas/OrganizationId"
|
|
32
|
-
}
|
|
37
|
+
},
|
|
38
|
+
"example": "f_ecom_zzxy_prd"
|
|
33
39
|
},
|
|
34
40
|
{
|
|
35
41
|
"name": "siteId",
|
|
36
42
|
"in": "query",
|
|
43
|
+
"description": "The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.",
|
|
37
44
|
"required": true,
|
|
38
45
|
"style": "form",
|
|
39
46
|
"explode": true,
|
|
40
47
|
"schema": {
|
|
41
48
|
"$ref": "#/components/schemas/SiteId"
|
|
49
|
+
},
|
|
50
|
+
"examples": {
|
|
51
|
+
"SiteId": {
|
|
52
|
+
"value": "RefArch"
|
|
53
|
+
}
|
|
42
54
|
}
|
|
43
55
|
},
|
|
44
56
|
{
|
|
45
57
|
"name": "locale",
|
|
46
58
|
"in": "query",
|
|
59
|
+
"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
60
|
"required": false,
|
|
48
61
|
"style": "form",
|
|
49
62
|
"explode": true,
|
|
50
63
|
"schema": {
|
|
51
64
|
"$ref": "#/components/schemas/LocaleCode"
|
|
65
|
+
},
|
|
66
|
+
"examples": {
|
|
67
|
+
"LanguageCountry": {
|
|
68
|
+
"value": "en-US"
|
|
69
|
+
},
|
|
70
|
+
"CountryCode": {
|
|
71
|
+
"value": "US"
|
|
72
|
+
}
|
|
52
73
|
}
|
|
53
74
|
},
|
|
54
75
|
{
|
|
55
76
|
"name": "tags",
|
|
56
77
|
"in": "query",
|
|
78
|
+
"description": "Optional parameter of 0 or more query string values which act as a filtering criteria. Multiple values are treated with `OR` logic, and absence of a value indicates no filtering by tag is desired.",
|
|
57
79
|
"required": false,
|
|
58
80
|
"style": "form",
|
|
59
81
|
"explode": false,
|
|
@@ -64,11 +86,29 @@
|
|
|
64
86
|
},
|
|
65
87
|
"maxItems": 10,
|
|
66
88
|
"minItems": 0
|
|
89
|
+
},
|
|
90
|
+
"examples": {
|
|
91
|
+
"one": {
|
|
92
|
+
"summary": "One tag filter",
|
|
93
|
+
"value": [
|
|
94
|
+
"homepage_banner"
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
"multiple": {
|
|
98
|
+
"summary": "Multiple tag filters (ORs)",
|
|
99
|
+
"value": [
|
|
100
|
+
"homepage_banner",
|
|
101
|
+
"user_profile",
|
|
102
|
+
"checkout",
|
|
103
|
+
"registration"
|
|
104
|
+
]
|
|
105
|
+
}
|
|
67
106
|
}
|
|
68
107
|
},
|
|
69
108
|
{
|
|
70
109
|
"name": "expand",
|
|
71
110
|
"in": "query",
|
|
111
|
+
"description": "Optional parameter to expand response with additional fields. \nAccepts an array of field names to include in the response.\nCurrently supports:\n- \"consentStatus\": Include consent status information in the response\n\nFuture expansions may include additional fields.\n",
|
|
72
112
|
"required": false,
|
|
73
113
|
"style": "form",
|
|
74
114
|
"explode": false,
|
|
@@ -79,41 +119,43 @@
|
|
|
79
119
|
"type": "string",
|
|
80
120
|
"enum": [
|
|
81
121
|
"consentStatus"
|
|
82
|
-
]
|
|
122
|
+
],
|
|
123
|
+
"example": "consentStatus"
|
|
83
124
|
},
|
|
84
125
|
"maxItems": 10,
|
|
85
126
|
"minItems": 0,
|
|
86
127
|
"uniqueItems": true
|
|
128
|
+
},
|
|
129
|
+
"examples": {
|
|
130
|
+
"empty": {
|
|
131
|
+
"summary": "No expansion (default behavior)",
|
|
132
|
+
"value": []
|
|
133
|
+
},
|
|
134
|
+
"consentStatus": {
|
|
135
|
+
"summary": "Include status information",
|
|
136
|
+
"value": [
|
|
137
|
+
"consentStatus"
|
|
138
|
+
]
|
|
139
|
+
}
|
|
87
140
|
}
|
|
88
141
|
},
|
|
89
142
|
{
|
|
90
143
|
"name": "sfdc_usid",
|
|
91
144
|
"in": "header",
|
|
145
|
+
"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.",
|
|
92
146
|
"required": false,
|
|
93
147
|
"style": "simple",
|
|
94
148
|
"explode": false,
|
|
95
149
|
"schema": {
|
|
96
150
|
"type": "string",
|
|
97
|
-
"format": "uuid"
|
|
98
|
-
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"name": "sfdc_dw_dnt",
|
|
102
|
-
"in": "header",
|
|
103
|
-
"required": false,
|
|
104
|
-
"style": "simple",
|
|
105
|
-
"explode": false,
|
|
106
|
-
"schema": {
|
|
107
|
-
"type": "string",
|
|
108
|
-
"enum": [
|
|
109
|
-
"0",
|
|
110
|
-
"1"
|
|
111
|
-
]
|
|
151
|
+
"format": "uuid",
|
|
152
|
+
"example": "550e8400-e29b-41d4-a716-446655440000"
|
|
112
153
|
}
|
|
113
154
|
},
|
|
114
155
|
{
|
|
115
156
|
"name": "personalized",
|
|
116
157
|
"in": "query",
|
|
158
|
+
"description": "Controls whether personalization is applied to the response. When set to `none`, the server skips applying personalization to the response.",
|
|
117
159
|
"required": false,
|
|
118
160
|
"style": "form",
|
|
119
161
|
"explode": true,
|
|
@@ -121,12 +163,14 @@
|
|
|
121
163
|
"type": "string",
|
|
122
164
|
"enum": [
|
|
123
165
|
"none"
|
|
124
|
-
]
|
|
166
|
+
],
|
|
167
|
+
"example": "none"
|
|
125
168
|
}
|
|
126
169
|
},
|
|
127
170
|
{
|
|
128
171
|
"name": "sfdc_shopper_context",
|
|
129
172
|
"in": "header",
|
|
173
|
+
"description": "Shopper context information (for example clientIP, sourceCode, and customQualifiers)\npassed in from a trusted backend application.",
|
|
130
174
|
"required": false,
|
|
131
175
|
"style": "simple",
|
|
132
176
|
"explode": false,
|
|
@@ -142,6 +186,17 @@
|
|
|
142
186
|
"application/json": {
|
|
143
187
|
"schema": {
|
|
144
188
|
"$ref": "#/components/schemas/ConsentSubscriptionResponse"
|
|
189
|
+
},
|
|
190
|
+
"examples": {
|
|
191
|
+
"ConsentSubscriptionResponseAuthenticated": {
|
|
192
|
+
"$ref": "#/components/examples/ConsentSubscriptionResponseAuthenticated"
|
|
193
|
+
},
|
|
194
|
+
"ConsentSubscriptionResponseAuthenticatedExpanded": {
|
|
195
|
+
"$ref": "#/components/examples/ConsentSubscriptionResponseAuthenticatedExpanded"
|
|
196
|
+
},
|
|
197
|
+
"ConsentSubscriptionResponseGuest": {
|
|
198
|
+
"$ref": "#/components/examples/ConsentSubscriptionResponseGuest"
|
|
199
|
+
}
|
|
145
200
|
}
|
|
146
201
|
}
|
|
147
202
|
}
|
|
@@ -152,6 +207,11 @@
|
|
|
152
207
|
"application/problem+json": {
|
|
153
208
|
"schema": {
|
|
154
209
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
210
|
+
},
|
|
211
|
+
"examples": {
|
|
212
|
+
"ConsentSubscriptionError": {
|
|
213
|
+
"$ref": "#/components/examples/ConsentSubscriptionError"
|
|
214
|
+
}
|
|
155
215
|
}
|
|
156
216
|
}
|
|
157
217
|
}
|
|
@@ -173,66 +233,74 @@
|
|
|
173
233
|
]
|
|
174
234
|
},
|
|
175
235
|
"post": {
|
|
236
|
+
"summary": "Update shopper subscription preference",
|
|
237
|
+
"description": "Update the consent status for a single subscription.",
|
|
176
238
|
"operationId": "updateSubscription",
|
|
177
239
|
"parameters": [
|
|
178
240
|
{
|
|
179
241
|
"name": "organizationId",
|
|
180
242
|
"in": "path",
|
|
243
|
+
"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).",
|
|
181
244
|
"required": true,
|
|
182
245
|
"style": "simple",
|
|
183
246
|
"explode": false,
|
|
184
247
|
"schema": {
|
|
185
248
|
"$ref": "#/components/schemas/OrganizationId"
|
|
186
|
-
}
|
|
249
|
+
},
|
|
250
|
+
"example": "f_ecom_zzxy_prd"
|
|
187
251
|
},
|
|
188
252
|
{
|
|
189
253
|
"name": "siteId",
|
|
190
254
|
"in": "query",
|
|
255
|
+
"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.",
|
|
191
256
|
"required": true,
|
|
192
257
|
"style": "form",
|
|
193
258
|
"explode": true,
|
|
194
259
|
"schema": {
|
|
195
260
|
"$ref": "#/components/schemas/SiteId"
|
|
261
|
+
},
|
|
262
|
+
"examples": {
|
|
263
|
+
"SiteId": {
|
|
264
|
+
"value": "RefArch"
|
|
265
|
+
}
|
|
196
266
|
}
|
|
197
267
|
},
|
|
198
268
|
{
|
|
199
269
|
"name": "locale",
|
|
200
270
|
"in": "query",
|
|
271
|
+
"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.",
|
|
201
272
|
"required": false,
|
|
202
273
|
"style": "form",
|
|
203
274
|
"explode": true,
|
|
204
275
|
"schema": {
|
|
205
276
|
"$ref": "#/components/schemas/LocaleCode"
|
|
277
|
+
},
|
|
278
|
+
"examples": {
|
|
279
|
+
"LanguageCountry": {
|
|
280
|
+
"value": "en-US"
|
|
281
|
+
},
|
|
282
|
+
"CountryCode": {
|
|
283
|
+
"value": "US"
|
|
284
|
+
}
|
|
206
285
|
}
|
|
207
286
|
},
|
|
208
287
|
{
|
|
209
288
|
"name": "sfdc_usid",
|
|
210
289
|
"in": "header",
|
|
290
|
+
"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.",
|
|
211
291
|
"required": false,
|
|
212
292
|
"style": "simple",
|
|
213
293
|
"explode": false,
|
|
214
294
|
"schema": {
|
|
215
295
|
"type": "string",
|
|
216
|
-
"format": "uuid"
|
|
217
|
-
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
"name": "sfdc_dw_dnt",
|
|
221
|
-
"in": "header",
|
|
222
|
-
"required": false,
|
|
223
|
-
"style": "simple",
|
|
224
|
-
"explode": false,
|
|
225
|
-
"schema": {
|
|
226
|
-
"type": "string",
|
|
227
|
-
"enum": [
|
|
228
|
-
"0",
|
|
229
|
-
"1"
|
|
230
|
-
]
|
|
296
|
+
"format": "uuid",
|
|
297
|
+
"example": "550e8400-e29b-41d4-a716-446655440000"
|
|
231
298
|
}
|
|
232
299
|
},
|
|
233
300
|
{
|
|
234
301
|
"name": "sfdc_shopper_context",
|
|
235
302
|
"in": "header",
|
|
303
|
+
"description": "Shopper context information (for example clientIP, sourceCode, and customQualifiers)\npassed in from a trusted backend application.",
|
|
236
304
|
"required": false,
|
|
237
305
|
"style": "simple",
|
|
238
306
|
"explode": false,
|
|
@@ -246,6 +314,11 @@
|
|
|
246
314
|
"application/json": {
|
|
247
315
|
"schema": {
|
|
248
316
|
"$ref": "#/components/schemas/ConsentSubscriptionRequest"
|
|
317
|
+
},
|
|
318
|
+
"examples": {
|
|
319
|
+
"ConsentSubscriptionUpdateRequest": {
|
|
320
|
+
"$ref": "#/components/examples/ConsentSubscriptionUpdateRequest"
|
|
321
|
+
}
|
|
249
322
|
}
|
|
250
323
|
}
|
|
251
324
|
},
|
|
@@ -258,6 +331,11 @@
|
|
|
258
331
|
"application/json": {
|
|
259
332
|
"schema": {
|
|
260
333
|
"$ref": "#/components/schemas/ConsentSubscriptionUpdateResponse"
|
|
334
|
+
},
|
|
335
|
+
"examples": {
|
|
336
|
+
"ConsentSubscriptionUpdateResponseSuccess": {
|
|
337
|
+
"$ref": "#/components/examples/ConsentSubscriptionUpdateResponseSuccess"
|
|
338
|
+
}
|
|
261
339
|
}
|
|
262
340
|
}
|
|
263
341
|
}
|
|
@@ -268,6 +346,11 @@
|
|
|
268
346
|
"application/problem+json": {
|
|
269
347
|
"schema": {
|
|
270
348
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
349
|
+
},
|
|
350
|
+
"examples": {
|
|
351
|
+
"ConsentSubscriptionUpdateError": {
|
|
352
|
+
"$ref": "#/components/examples/ConsentSubscriptionUpdateError"
|
|
353
|
+
}
|
|
271
354
|
}
|
|
272
355
|
}
|
|
273
356
|
}
|
|
@@ -289,66 +372,74 @@
|
|
|
289
372
|
},
|
|
290
373
|
"/organizations/{organizationId}/subscriptions/actions/bulk": {
|
|
291
374
|
"post": {
|
|
375
|
+
"summary": "Update shopper subscription preferences",
|
|
376
|
+
"description": "Update the consent status for multiple subscriptions in a single bulk request. Supports 1-50 subscription updates per request with partial success handling.",
|
|
292
377
|
"operationId": "updateSubscriptions",
|
|
293
378
|
"parameters": [
|
|
294
379
|
{
|
|
295
380
|
"name": "organizationId",
|
|
296
381
|
"in": "path",
|
|
382
|
+
"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).",
|
|
297
383
|
"required": true,
|
|
298
384
|
"style": "simple",
|
|
299
385
|
"explode": false,
|
|
300
386
|
"schema": {
|
|
301
387
|
"$ref": "#/components/schemas/OrganizationId"
|
|
302
|
-
}
|
|
388
|
+
},
|
|
389
|
+
"example": "f_ecom_zzxy_prd"
|
|
303
390
|
},
|
|
304
391
|
{
|
|
305
392
|
"name": "siteId",
|
|
306
393
|
"in": "query",
|
|
394
|
+
"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.",
|
|
307
395
|
"required": true,
|
|
308
396
|
"style": "form",
|
|
309
397
|
"explode": true,
|
|
310
398
|
"schema": {
|
|
311
399
|
"$ref": "#/components/schemas/SiteId"
|
|
400
|
+
},
|
|
401
|
+
"examples": {
|
|
402
|
+
"SiteId": {
|
|
403
|
+
"value": "RefArch"
|
|
404
|
+
}
|
|
312
405
|
}
|
|
313
406
|
},
|
|
314
407
|
{
|
|
315
408
|
"name": "locale",
|
|
316
409
|
"in": "query",
|
|
410
|
+
"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.",
|
|
317
411
|
"required": false,
|
|
318
412
|
"style": "form",
|
|
319
413
|
"explode": true,
|
|
320
414
|
"schema": {
|
|
321
415
|
"$ref": "#/components/schemas/LocaleCode"
|
|
416
|
+
},
|
|
417
|
+
"examples": {
|
|
418
|
+
"LanguageCountry": {
|
|
419
|
+
"value": "en-US"
|
|
420
|
+
},
|
|
421
|
+
"CountryCode": {
|
|
422
|
+
"value": "US"
|
|
423
|
+
}
|
|
322
424
|
}
|
|
323
425
|
},
|
|
324
426
|
{
|
|
325
427
|
"name": "sfdc_usid",
|
|
326
428
|
"in": "header",
|
|
429
|
+
"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.",
|
|
327
430
|
"required": false,
|
|
328
431
|
"style": "simple",
|
|
329
432
|
"explode": false,
|
|
330
433
|
"schema": {
|
|
331
434
|
"type": "string",
|
|
332
|
-
"format": "uuid"
|
|
333
|
-
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
"name": "sfdc_dw_dnt",
|
|
337
|
-
"in": "header",
|
|
338
|
-
"required": false,
|
|
339
|
-
"style": "simple",
|
|
340
|
-
"explode": false,
|
|
341
|
-
"schema": {
|
|
342
|
-
"type": "string",
|
|
343
|
-
"enum": [
|
|
344
|
-
"0",
|
|
345
|
-
"1"
|
|
346
|
-
]
|
|
435
|
+
"format": "uuid",
|
|
436
|
+
"example": "550e8400-e29b-41d4-a716-446655440000"
|
|
347
437
|
}
|
|
348
438
|
},
|
|
349
439
|
{
|
|
350
440
|
"name": "sfdc_shopper_context",
|
|
351
441
|
"in": "header",
|
|
442
|
+
"description": "Shopper context information (for example clientIP, sourceCode, and customQualifiers)\npassed in from a trusted backend application.",
|
|
352
443
|
"required": false,
|
|
353
444
|
"style": "simple",
|
|
354
445
|
"explode": false,
|
|
@@ -362,6 +453,11 @@
|
|
|
362
453
|
"application/json": {
|
|
363
454
|
"schema": {
|
|
364
455
|
"$ref": "#/components/schemas/ConsentSubscriptionBulkRequest"
|
|
456
|
+
},
|
|
457
|
+
"examples": {
|
|
458
|
+
"ConsentSubscriptionBulkUpdateRequest": {
|
|
459
|
+
"$ref": "#/components/examples/ConsentSubscriptionBulkUpdateRequest"
|
|
460
|
+
}
|
|
365
461
|
}
|
|
366
462
|
}
|
|
367
463
|
},
|
|
@@ -374,6 +470,11 @@
|
|
|
374
470
|
"application/json": {
|
|
375
471
|
"schema": {
|
|
376
472
|
"$ref": "#/components/schemas/ConsentSubscriptionBulkResponse"
|
|
473
|
+
},
|
|
474
|
+
"examples": {
|
|
475
|
+
"ConsentSubscriptionBulkUpdateResponseSuccess": {
|
|
476
|
+
"$ref": "#/components/examples/ConsentSubscriptionBulkUpdateResponseSuccess"
|
|
477
|
+
}
|
|
377
478
|
}
|
|
378
479
|
}
|
|
379
480
|
}
|
|
@@ -384,6 +485,11 @@
|
|
|
384
485
|
"application/json": {
|
|
385
486
|
"schema": {
|
|
386
487
|
"$ref": "#/components/schemas/ConsentSubscriptionBulkResponse"
|
|
488
|
+
},
|
|
489
|
+
"examples": {
|
|
490
|
+
"ConsentSubscriptionBulkUpdateResponsePartial": {
|
|
491
|
+
"$ref": "#/components/examples/ConsentSubscriptionBulkUpdateResponsePartial"
|
|
492
|
+
}
|
|
387
493
|
}
|
|
388
494
|
}
|
|
389
495
|
}
|
|
@@ -394,6 +500,11 @@
|
|
|
394
500
|
"application/problem+json": {
|
|
395
501
|
"schema": {
|
|
396
502
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
503
|
+
},
|
|
504
|
+
"examples": {
|
|
505
|
+
"BulkValidationError": {
|
|
506
|
+
"$ref": "#/components/examples/BulkValidationError"
|
|
507
|
+
}
|
|
397
508
|
}
|
|
398
509
|
}
|
|
399
510
|
}
|
|
@@ -418,27 +529,38 @@
|
|
|
418
529
|
"schemas": {
|
|
419
530
|
"OrganizationId": {
|
|
420
531
|
"type": "string",
|
|
532
|
+
"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).",
|
|
533
|
+
"example": "f_ecom_zzxy_prd",
|
|
421
534
|
"pattern": "^f_ecom_[a-z]{4}_(prd|stg|dev|s[0-9]{2}|[0-9]{3})$"
|
|
422
535
|
},
|
|
423
536
|
"SiteId": {
|
|
424
537
|
"type": "string",
|
|
538
|
+
"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",
|
|
539
|
+
"example": "RefArch",
|
|
425
540
|
"maxLength": 32,
|
|
426
541
|
"minLength": 1
|
|
427
542
|
},
|
|
428
543
|
"LanguageCountry": {
|
|
429
544
|
"type": "string",
|
|
545
|
+
"description": "A concatenated version of the standard Language and Country codes, combined with a hyphen '`-`'.",
|
|
546
|
+
"example": "en-US",
|
|
430
547
|
"pattern": "^[a-z][a-z]-[A-Z][A-Z]$"
|
|
431
548
|
},
|
|
432
549
|
"LanguageCode": {
|
|
433
550
|
"type": "string",
|
|
551
|
+
"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).",
|
|
552
|
+
"example": "en",
|
|
434
553
|
"pattern": "^[a-z][a-z]$"
|
|
435
554
|
},
|
|
436
555
|
"DefaultFallback": {
|
|
437
556
|
"type": "string",
|
|
438
557
|
"default": "default",
|
|
558
|
+
"description": "A specialized value indicating the system default values for locales.",
|
|
559
|
+
"example": "default",
|
|
439
560
|
"pattern": "^default$"
|
|
440
561
|
},
|
|
441
562
|
"LocaleCode": {
|
|
563
|
+
"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.",
|
|
442
564
|
"oneOf": [
|
|
443
565
|
{
|
|
444
566
|
"$ref": "#/components/schemas/LanguageCountry"
|
|
@@ -453,11 +575,15 @@
|
|
|
453
575
|
},
|
|
454
576
|
"Tag": {
|
|
455
577
|
"type": "string",
|
|
578
|
+
"description": "Filter criteria for consent subscriptions",
|
|
579
|
+
"example": "homepage_banner",
|
|
456
580
|
"maxLength": 256,
|
|
457
581
|
"minLength": 1
|
|
458
582
|
},
|
|
459
583
|
"SubscriptionId": {
|
|
460
584
|
"type": "string",
|
|
585
|
+
"description": "Identifier for the communication subscription",
|
|
586
|
+
"example": "weekly-newsletter",
|
|
461
587
|
"maxLength": 255,
|
|
462
588
|
"minLength": 1,
|
|
463
589
|
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
@@ -468,10 +594,15 @@
|
|
|
468
594
|
"email",
|
|
469
595
|
"sms",
|
|
470
596
|
"whatsapp"
|
|
471
|
-
]
|
|
597
|
+
],
|
|
598
|
+
"example": "email"
|
|
472
599
|
},
|
|
473
600
|
"SubscriptionChannel": {
|
|
474
601
|
"type": "array",
|
|
602
|
+
"example": [
|
|
603
|
+
"email",
|
|
604
|
+
"sms"
|
|
605
|
+
],
|
|
475
606
|
"items": {
|
|
476
607
|
"$ref": "#/components/schemas/ChannelType"
|
|
477
608
|
},
|
|
@@ -481,19 +612,29 @@
|
|
|
481
612
|
},
|
|
482
613
|
"ContactPointValue": {
|
|
483
614
|
"type": "string",
|
|
615
|
+
"description": "The customer's contact point value, polymorphic based on the channel type as below:\n- `sms` - Subject's phone number in E.164 format, ex: `+1 424 535 3546`\n- `email` - Subject's email address in RFC 5321 & RFC 5322 format, ex: `jack.sparrow@salesforce.com`\n",
|
|
616
|
+
"example": "jack.sparrow@salesforce.com",
|
|
484
617
|
"maxLength": 320,
|
|
485
618
|
"minLength": 3
|
|
486
619
|
},
|
|
487
620
|
"ConsentStatus": {
|
|
488
621
|
"type": "string",
|
|
622
|
+
"description": "The consent status of the subscription as supplied or recorded by this system",
|
|
489
623
|
"enum": [
|
|
490
624
|
"opt_in",
|
|
491
625
|
"opt_out"
|
|
492
|
-
]
|
|
626
|
+
],
|
|
627
|
+
"example": "opt_in"
|
|
493
628
|
},
|
|
494
629
|
"SubscriptionStatusEntry": {
|
|
495
630
|
"type": "object",
|
|
496
631
|
"additionalProperties": false,
|
|
632
|
+
"description": "Individual subscription status entry for a specific channel",
|
|
633
|
+
"example": {
|
|
634
|
+
"channel": "email",
|
|
635
|
+
"contactPointValue": "john.doe@example.com",
|
|
636
|
+
"status": "opt_in"
|
|
637
|
+
},
|
|
497
638
|
"properties": {
|
|
498
639
|
"channel": {
|
|
499
640
|
"$ref": "#/components/schemas/ChannelType"
|
|
@@ -513,6 +654,19 @@
|
|
|
513
654
|
},
|
|
514
655
|
"SubscriptionStatusArray": {
|
|
515
656
|
"type": "array",
|
|
657
|
+
"description": "Array of subscription status entries for different channels",
|
|
658
|
+
"example": [
|
|
659
|
+
{
|
|
660
|
+
"channel": "email",
|
|
661
|
+
"contactPointValue": "john.doe@example.com",
|
|
662
|
+
"status": "opt_in"
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
"channel": "sms",
|
|
666
|
+
"contactPointValue": "+1 555 123 4567",
|
|
667
|
+
"status": "opt_out"
|
|
668
|
+
}
|
|
669
|
+
],
|
|
516
670
|
"items": {
|
|
517
671
|
"$ref": "#/components/schemas/SubscriptionStatusEntry"
|
|
518
672
|
},
|
|
@@ -521,11 +675,15 @@
|
|
|
521
675
|
},
|
|
522
676
|
"SubscriptionTitle": {
|
|
523
677
|
"type": "string",
|
|
678
|
+
"description": "The localized title of the subscription for shopper displays",
|
|
679
|
+
"example": "Weekly Newsletter",
|
|
524
680
|
"maxLength": 255,
|
|
525
681
|
"minLength": 1
|
|
526
682
|
},
|
|
527
683
|
"SubscriptionSubtitle": {
|
|
528
684
|
"type": "string",
|
|
685
|
+
"description": "The localized subtitle of the subscription for shopper displays, may contain HTML markup",
|
|
686
|
+
"example": "Stay informed about new features. <a href=\"https://example.com/features\">Learn more</a>",
|
|
529
687
|
"maxLength": 2000,
|
|
530
688
|
"minLength": 1
|
|
531
689
|
},
|
|
@@ -543,7 +701,8 @@
|
|
|
543
701
|
{
|
|
544
702
|
"$ref": "#/components/schemas/SubscriptionStatusArray"
|
|
545
703
|
}
|
|
546
|
-
]
|
|
704
|
+
],
|
|
705
|
+
"description": "Subscription status information across different channels. This field is only included in the response\nwhen the 'expand' parameter contains \"consentStatus\". For privacy and performance\nreasons, status is not returned by default.\n"
|
|
547
706
|
},
|
|
548
707
|
"title": {
|
|
549
708
|
"$ref": "#/components/schemas/SubscriptionTitle"
|
|
@@ -554,6 +713,10 @@
|
|
|
554
713
|
"tags": {
|
|
555
714
|
"type": "array",
|
|
556
715
|
"default": [],
|
|
716
|
+
"example": [
|
|
717
|
+
"homepage_banner",
|
|
718
|
+
"user_profile"
|
|
719
|
+
],
|
|
557
720
|
"items": {
|
|
558
721
|
"$ref": "#/components/schemas/Tag"
|
|
559
722
|
},
|
|
@@ -563,22 +726,28 @@
|
|
|
563
726
|
"consentType": {
|
|
564
727
|
"type": "string",
|
|
565
728
|
"default": "marketing",
|
|
729
|
+
"description": "Type of consent subscription",
|
|
566
730
|
"enum": [
|
|
567
731
|
"marketing",
|
|
568
732
|
"legal"
|
|
569
|
-
]
|
|
733
|
+
],
|
|
734
|
+
"example": "marketing"
|
|
570
735
|
},
|
|
571
736
|
"consentRequired": {
|
|
572
737
|
"type": "boolean",
|
|
573
|
-
"default": false
|
|
738
|
+
"default": false,
|
|
739
|
+
"description": "Whether this subscription is mandatory for the user",
|
|
740
|
+
"example": false
|
|
574
741
|
},
|
|
575
742
|
"defaultStatus": {
|
|
576
743
|
"type": "string",
|
|
577
744
|
"default": "opt_out",
|
|
745
|
+
"description": "Default consent status for this subscription",
|
|
578
746
|
"enum": [
|
|
579
747
|
"opt_in",
|
|
580
748
|
"opt_out"
|
|
581
|
-
]
|
|
749
|
+
],
|
|
750
|
+
"example": "opt_out"
|
|
582
751
|
}
|
|
583
752
|
},
|
|
584
753
|
"required": [
|
|
@@ -588,6 +757,7 @@
|
|
|
588
757
|
},
|
|
589
758
|
"ConsentSubscriptionResponse": {
|
|
590
759
|
"type": "object",
|
|
760
|
+
"description": "Collection wrapper of consent subscriptions",
|
|
591
761
|
"properties": {
|
|
592
762
|
"data": {
|
|
593
763
|
"type": "array",
|
|
@@ -608,17 +778,25 @@
|
|
|
608
778
|
"properties": {
|
|
609
779
|
"title": {
|
|
610
780
|
"type": "string",
|
|
781
|
+
"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",
|
|
782
|
+
"example": "You do not have enough credit",
|
|
611
783
|
"maxLength": 256
|
|
612
784
|
},
|
|
613
785
|
"type": {
|
|
614
786
|
"type": "string",
|
|
787
|
+
"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",
|
|
788
|
+
"example": "NotEnoughMoney",
|
|
615
789
|
"maxLength": 2048
|
|
616
790
|
},
|
|
617
791
|
"detail": {
|
|
618
|
-
"type": "string"
|
|
792
|
+
"type": "string",
|
|
793
|
+
"description": "A human-readable explanation specific to this occurrence of the problem.",
|
|
794
|
+
"example": "Your current balance is 30, but that costs 50"
|
|
619
795
|
},
|
|
620
796
|
"instance": {
|
|
621
797
|
"type": "string",
|
|
798
|
+
"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",
|
|
799
|
+
"example": "/account/12345/msgs/abc",
|
|
622
800
|
"maxLength": 2048
|
|
623
801
|
}
|
|
624
802
|
},
|
|
@@ -630,6 +808,7 @@
|
|
|
630
808
|
},
|
|
631
809
|
"ConsentSubscriptionRequest": {
|
|
632
810
|
"type": "object",
|
|
811
|
+
"description": "Consent subscription update request",
|
|
633
812
|
"properties": {
|
|
634
813
|
"subscriptionId": {
|
|
635
814
|
"$ref": "#/components/schemas/SubscriptionId"
|
|
@@ -653,6 +832,7 @@
|
|
|
653
832
|
},
|
|
654
833
|
"ConsentSubscriptionUpdateResponse": {
|
|
655
834
|
"type": "object",
|
|
835
|
+
"description": "Single subscription update response",
|
|
656
836
|
"properties": {
|
|
657
837
|
"subscriptionId": {
|
|
658
838
|
"$ref": "#/components/schemas/SubscriptionId"
|
|
@@ -676,9 +856,25 @@
|
|
|
676
856
|
},
|
|
677
857
|
"ConsentSubscriptionBulkRequest": {
|
|
678
858
|
"type": "object",
|
|
859
|
+
"description": "Bulk request for updating multiple consent subscriptions",
|
|
679
860
|
"properties": {
|
|
680
861
|
"subscriptions": {
|
|
681
862
|
"type": "array",
|
|
863
|
+
"description": "Array of subscription consent updates to process",
|
|
864
|
+
"example": [
|
|
865
|
+
{
|
|
866
|
+
"subscriptionId": "weekly-newsletter",
|
|
867
|
+
"channel": "email",
|
|
868
|
+
"contactPointValue": "john.doe@example.com",
|
|
869
|
+
"status": "opt_in"
|
|
870
|
+
},
|
|
871
|
+
{
|
|
872
|
+
"subscriptionId": "sms-alerts",
|
|
873
|
+
"channel": "sms",
|
|
874
|
+
"contactPointValue": "+1 555 123 4567",
|
|
875
|
+
"status": "opt_out"
|
|
876
|
+
}
|
|
877
|
+
],
|
|
682
878
|
"items": {
|
|
683
879
|
"$ref": "#/components/schemas/ConsentSubscriptionRequest"
|
|
684
880
|
},
|
|
@@ -692,18 +888,28 @@
|
|
|
692
888
|
},
|
|
693
889
|
"ConsentSubscriptionError": {
|
|
694
890
|
"type": "object",
|
|
891
|
+
"description": "Error details for failed subscription updates",
|
|
695
892
|
"properties": {
|
|
696
893
|
"code": {
|
|
697
894
|
"type": "string",
|
|
895
|
+
"description": "Error code indicating the type of failure",
|
|
896
|
+
"example": "INVALID_CONTACT_POINT",
|
|
698
897
|
"maxLength": 100
|
|
699
898
|
},
|
|
700
899
|
"message": {
|
|
701
900
|
"type": "string",
|
|
901
|
+
"description": "Human-readable error message",
|
|
902
|
+
"example": "Invalid email address format",
|
|
702
903
|
"maxLength": 500
|
|
703
904
|
},
|
|
704
905
|
"details": {
|
|
705
906
|
"type": "object",
|
|
706
|
-
"additionalProperties": false
|
|
907
|
+
"additionalProperties": false,
|
|
908
|
+
"description": "Additional error details",
|
|
909
|
+
"example": {
|
|
910
|
+
"field": "contactPointValue",
|
|
911
|
+
"provided": "invalid-email"
|
|
912
|
+
}
|
|
707
913
|
}
|
|
708
914
|
},
|
|
709
915
|
"required": [
|
|
@@ -713,6 +919,7 @@
|
|
|
713
919
|
},
|
|
714
920
|
"ConsentSubscriptionResult": {
|
|
715
921
|
"type": "object",
|
|
922
|
+
"description": "Individual subscription update result with input parameters",
|
|
716
923
|
"properties": {
|
|
717
924
|
"subscriptionId": {
|
|
718
925
|
"$ref": "#/components/schemas/SubscriptionId"
|
|
@@ -727,14 +934,17 @@
|
|
|
727
934
|
"$ref": "#/components/schemas/ConsentStatus"
|
|
728
935
|
},
|
|
729
936
|
"success": {
|
|
730
|
-
"type": "boolean"
|
|
937
|
+
"type": "boolean",
|
|
938
|
+
"description": "Whether the subscription update was successful",
|
|
939
|
+
"example": true
|
|
731
940
|
},
|
|
732
941
|
"error": {
|
|
733
942
|
"allOf": [
|
|
734
943
|
{
|
|
735
944
|
"$ref": "#/components/schemas/ConsentSubscriptionError"
|
|
736
945
|
}
|
|
737
|
-
]
|
|
946
|
+
],
|
|
947
|
+
"description": "Error details (present when success is false)"
|
|
738
948
|
}
|
|
739
949
|
},
|
|
740
950
|
"required": [
|
|
@@ -747,9 +957,11 @@
|
|
|
747
957
|
},
|
|
748
958
|
"ConsentSubscriptionBulkResponse": {
|
|
749
959
|
"type": "object",
|
|
960
|
+
"description": "Bulk response with results for each subscription update request",
|
|
750
961
|
"properties": {
|
|
751
962
|
"results": {
|
|
752
963
|
"type": "array",
|
|
964
|
+
"description": "Results for each subscription update request",
|
|
753
965
|
"items": {
|
|
754
966
|
"$ref": "#/components/schemas/ConsentSubscriptionResult"
|
|
755
967
|
}
|
|
@@ -764,36 +976,54 @@
|
|
|
764
976
|
"organizationId": {
|
|
765
977
|
"name": "organizationId",
|
|
766
978
|
"in": "path",
|
|
979
|
+
"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).",
|
|
767
980
|
"required": true,
|
|
768
981
|
"style": "simple",
|
|
769
982
|
"explode": false,
|
|
770
983
|
"schema": {
|
|
771
984
|
"$ref": "#/components/schemas/OrganizationId"
|
|
772
|
-
}
|
|
985
|
+
},
|
|
986
|
+
"example": "f_ecom_zzxy_prd"
|
|
773
987
|
},
|
|
774
988
|
"siteId": {
|
|
775
989
|
"name": "siteId",
|
|
776
990
|
"in": "query",
|
|
991
|
+
"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.",
|
|
777
992
|
"required": true,
|
|
778
993
|
"style": "form",
|
|
779
994
|
"explode": true,
|
|
780
995
|
"schema": {
|
|
781
996
|
"$ref": "#/components/schemas/SiteId"
|
|
997
|
+
},
|
|
998
|
+
"examples": {
|
|
999
|
+
"SiteId": {
|
|
1000
|
+
"value": "RefArch"
|
|
1001
|
+
}
|
|
782
1002
|
}
|
|
783
1003
|
},
|
|
784
1004
|
"locale": {
|
|
785
1005
|
"name": "locale",
|
|
786
1006
|
"in": "query",
|
|
1007
|
+
"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.",
|
|
787
1008
|
"required": false,
|
|
788
1009
|
"style": "form",
|
|
789
1010
|
"explode": true,
|
|
790
1011
|
"schema": {
|
|
791
1012
|
"$ref": "#/components/schemas/LocaleCode"
|
|
1013
|
+
},
|
|
1014
|
+
"examples": {
|
|
1015
|
+
"LanguageCountry": {
|
|
1016
|
+
"value": "en-US"
|
|
1017
|
+
},
|
|
1018
|
+
"CountryCode": {
|
|
1019
|
+
"value": "US"
|
|
1020
|
+
}
|
|
792
1021
|
}
|
|
793
1022
|
},
|
|
794
1023
|
"tags": {
|
|
795
1024
|
"name": "tags",
|
|
796
1025
|
"in": "query",
|
|
1026
|
+
"description": "Optional parameter of 0 or more query string values which act as a filtering criteria. Multiple values are treated with `OR` logic, and absence of a value indicates no filtering by tag is desired.",
|
|
797
1027
|
"required": false,
|
|
798
1028
|
"style": "form",
|
|
799
1029
|
"explode": false,
|
|
@@ -804,11 +1034,29 @@
|
|
|
804
1034
|
},
|
|
805
1035
|
"maxItems": 10,
|
|
806
1036
|
"minItems": 0
|
|
1037
|
+
},
|
|
1038
|
+
"examples": {
|
|
1039
|
+
"one": {
|
|
1040
|
+
"summary": "One tag filter",
|
|
1041
|
+
"value": [
|
|
1042
|
+
"homepage_banner"
|
|
1043
|
+
]
|
|
1044
|
+
},
|
|
1045
|
+
"multiple": {
|
|
1046
|
+
"summary": "Multiple tag filters (ORs)",
|
|
1047
|
+
"value": [
|
|
1048
|
+
"homepage_banner",
|
|
1049
|
+
"user_profile",
|
|
1050
|
+
"checkout",
|
|
1051
|
+
"registration"
|
|
1052
|
+
]
|
|
1053
|
+
}
|
|
807
1054
|
}
|
|
808
1055
|
},
|
|
809
1056
|
"expand": {
|
|
810
1057
|
"name": "expand",
|
|
811
1058
|
"in": "query",
|
|
1059
|
+
"description": "Optional parameter to expand response with additional fields. \nAccepts an array of field names to include in the response.\nCurrently supports:\n- \"consentStatus\": Include consent status information in the response\n\nFuture expansions may include additional fields.\n",
|
|
812
1060
|
"required": false,
|
|
813
1061
|
"style": "form",
|
|
814
1062
|
"explode": false,
|
|
@@ -819,41 +1067,43 @@
|
|
|
819
1067
|
"type": "string",
|
|
820
1068
|
"enum": [
|
|
821
1069
|
"consentStatus"
|
|
822
|
-
]
|
|
1070
|
+
],
|
|
1071
|
+
"example": "consentStatus"
|
|
823
1072
|
},
|
|
824
1073
|
"maxItems": 10,
|
|
825
1074
|
"minItems": 0,
|
|
826
1075
|
"uniqueItems": true
|
|
1076
|
+
},
|
|
1077
|
+
"examples": {
|
|
1078
|
+
"empty": {
|
|
1079
|
+
"summary": "No expansion (default behavior)",
|
|
1080
|
+
"value": []
|
|
1081
|
+
},
|
|
1082
|
+
"consentStatus": {
|
|
1083
|
+
"summary": "Include status information",
|
|
1084
|
+
"value": [
|
|
1085
|
+
"consentStatus"
|
|
1086
|
+
]
|
|
1087
|
+
}
|
|
827
1088
|
}
|
|
828
1089
|
},
|
|
829
1090
|
"sfdcUsid": {
|
|
830
1091
|
"name": "sfdc_usid",
|
|
831
1092
|
"in": "header",
|
|
1093
|
+
"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.",
|
|
832
1094
|
"required": false,
|
|
833
1095
|
"style": "simple",
|
|
834
1096
|
"explode": false,
|
|
835
1097
|
"schema": {
|
|
836
1098
|
"type": "string",
|
|
837
|
-
"format": "uuid"
|
|
838
|
-
|
|
839
|
-
},
|
|
840
|
-
"sfdcDwDnt": {
|
|
841
|
-
"name": "sfdc_dw_dnt",
|
|
842
|
-
"in": "header",
|
|
843
|
-
"required": false,
|
|
844
|
-
"style": "simple",
|
|
845
|
-
"explode": false,
|
|
846
|
-
"schema": {
|
|
847
|
-
"type": "string",
|
|
848
|
-
"enum": [
|
|
849
|
-
"0",
|
|
850
|
-
"1"
|
|
851
|
-
]
|
|
1099
|
+
"format": "uuid",
|
|
1100
|
+
"example": "550e8400-e29b-41d4-a716-446655440000"
|
|
852
1101
|
}
|
|
853
1102
|
},
|
|
854
1103
|
"personalized": {
|
|
855
1104
|
"name": "personalized",
|
|
856
1105
|
"in": "query",
|
|
1106
|
+
"description": "Controls whether personalization is applied to the response. When set to `none`, the server skips applying personalization to the response.",
|
|
857
1107
|
"required": false,
|
|
858
1108
|
"style": "form",
|
|
859
1109
|
"explode": true,
|
|
@@ -861,12 +1111,14 @@
|
|
|
861
1111
|
"type": "string",
|
|
862
1112
|
"enum": [
|
|
863
1113
|
"none"
|
|
864
|
-
]
|
|
1114
|
+
],
|
|
1115
|
+
"example": "none"
|
|
865
1116
|
}
|
|
866
1117
|
},
|
|
867
1118
|
"sfdcShopperContext": {
|
|
868
1119
|
"name": "sfdc_shopper_context",
|
|
869
1120
|
"in": "header",
|
|
1121
|
+
"description": "Shopper context information (for example clientIP, sourceCode, and customQualifiers)\npassed in from a trusted backend application.",
|
|
870
1122
|
"required": false,
|
|
871
1123
|
"style": "simple",
|
|
872
1124
|
"explode": false,
|
|
@@ -875,9 +1127,273 @@
|
|
|
875
1127
|
}
|
|
876
1128
|
}
|
|
877
1129
|
},
|
|
1130
|
+
"examples": {
|
|
1131
|
+
"ConsentSubscriptionResponseAuthenticated": {
|
|
1132
|
+
"summary": "AUTHENTICATED shopper's available consent subscriptions",
|
|
1133
|
+
"value": {
|
|
1134
|
+
"data": [
|
|
1135
|
+
{
|
|
1136
|
+
"subscriptionId": "weekly-newsletter",
|
|
1137
|
+
"channels": [
|
|
1138
|
+
"email",
|
|
1139
|
+
"whatsapp"
|
|
1140
|
+
],
|
|
1141
|
+
"title": "Weekly Newsletter",
|
|
1142
|
+
"subtitle": "Get our weekly newsletter with the latest updates. <a href=\"https://example.com/newsletter\">Learn more</a>",
|
|
1143
|
+
"consentType": "marketing",
|
|
1144
|
+
"consentRequired": false,
|
|
1145
|
+
"defaultStatus": "opt_out",
|
|
1146
|
+
"tags": [
|
|
1147
|
+
"homepage_banner",
|
|
1148
|
+
"user_profile"
|
|
1149
|
+
]
|
|
1150
|
+
},
|
|
1151
|
+
{
|
|
1152
|
+
"subscriptionId": "promotional-offers",
|
|
1153
|
+
"channels": [
|
|
1154
|
+
"sms"
|
|
1155
|
+
],
|
|
1156
|
+
"title": "Promotional Offers",
|
|
1157
|
+
"subtitle": "Receive special promotional offers. <a href=\"https://example.com/offers\">View terms</a>",
|
|
1158
|
+
"consentType": "marketing",
|
|
1159
|
+
"consentRequired": false,
|
|
1160
|
+
"defaultStatus": "opt_out",
|
|
1161
|
+
"tags": [
|
|
1162
|
+
"checkout"
|
|
1163
|
+
]
|
|
1164
|
+
}
|
|
1165
|
+
]
|
|
1166
|
+
}
|
|
1167
|
+
},
|
|
1168
|
+
"ConsentSubscriptionResponseAuthenticatedExpanded": {
|
|
1169
|
+
"summary": "AUTHENTICATED shopper's consent subscriptions with expand=[\"consentStatus\"]",
|
|
1170
|
+
"value": {
|
|
1171
|
+
"data": [
|
|
1172
|
+
{
|
|
1173
|
+
"subscriptionId": "weekly-newsletter",
|
|
1174
|
+
"channels": [
|
|
1175
|
+
"email",
|
|
1176
|
+
"whatsapp"
|
|
1177
|
+
],
|
|
1178
|
+
"consentStatus": [
|
|
1179
|
+
{
|
|
1180
|
+
"channel": "email",
|
|
1181
|
+
"contactPointValue": "customer@example.com",
|
|
1182
|
+
"status": "opt_in"
|
|
1183
|
+
},
|
|
1184
|
+
{
|
|
1185
|
+
"channel": "whatsapp",
|
|
1186
|
+
"contactPointValue": "+1 555 123 4567",
|
|
1187
|
+
"status": "opt_out"
|
|
1188
|
+
}
|
|
1189
|
+
],
|
|
1190
|
+
"title": "Weekly Newsletter",
|
|
1191
|
+
"subtitle": "Get our weekly newsletter with the latest updates. <a href=\"https://example.com/newsletter\">Learn more</a>",
|
|
1192
|
+
"consentType": "marketing",
|
|
1193
|
+
"consentRequired": false,
|
|
1194
|
+
"defaultStatus": "opt_out",
|
|
1195
|
+
"tags": [
|
|
1196
|
+
"homepage_banner",
|
|
1197
|
+
"user_profile"
|
|
1198
|
+
]
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
"subscriptionId": "promotional-offers",
|
|
1202
|
+
"channels": [
|
|
1203
|
+
"sms"
|
|
1204
|
+
],
|
|
1205
|
+
"consentStatus": [
|
|
1206
|
+
{
|
|
1207
|
+
"channel": "sms",
|
|
1208
|
+
"contactPointValue": "+1 555 987 6543",
|
|
1209
|
+
"status": "opt_out"
|
|
1210
|
+
}
|
|
1211
|
+
],
|
|
1212
|
+
"title": "Promotional Offers",
|
|
1213
|
+
"subtitle": "Receive special promotional offers. <a href=\"https://example.com/offers\">View terms</a>",
|
|
1214
|
+
"consentType": "marketing",
|
|
1215
|
+
"consentRequired": false,
|
|
1216
|
+
"defaultStatus": "opt_out",
|
|
1217
|
+
"tags": [
|
|
1218
|
+
"checkout",
|
|
1219
|
+
"user_profile"
|
|
1220
|
+
]
|
|
1221
|
+
},
|
|
1222
|
+
{
|
|
1223
|
+
"subscriptionId": "privacy-policy-updates",
|
|
1224
|
+
"channels": [
|
|
1225
|
+
"email"
|
|
1226
|
+
],
|
|
1227
|
+
"consentStatus": [
|
|
1228
|
+
{
|
|
1229
|
+
"channel": "email",
|
|
1230
|
+
"contactPointValue": "customer@example.com",
|
|
1231
|
+
"status": "opt_in"
|
|
1232
|
+
}
|
|
1233
|
+
],
|
|
1234
|
+
"title": "Privacy Policy Updates",
|
|
1235
|
+
"subtitle": "Important updates to our privacy policy. <a href=\"https://example.com/privacy\">Read policy</a>",
|
|
1236
|
+
"consentType": "legal",
|
|
1237
|
+
"consentRequired": true,
|
|
1238
|
+
"defaultStatus": "opt_in",
|
|
1239
|
+
"tags": [
|
|
1240
|
+
"registration"
|
|
1241
|
+
]
|
|
1242
|
+
}
|
|
1243
|
+
]
|
|
1244
|
+
}
|
|
1245
|
+
},
|
|
1246
|
+
"ConsentSubscriptionResponseGuest": {
|
|
1247
|
+
"summary": "GUEST shopper's available consent subscriptions",
|
|
1248
|
+
"value": {
|
|
1249
|
+
"data": [
|
|
1250
|
+
{
|
|
1251
|
+
"subscriptionId": "weekly-newsletter",
|
|
1252
|
+
"channels": [
|
|
1253
|
+
"email",
|
|
1254
|
+
"whatsapp"
|
|
1255
|
+
],
|
|
1256
|
+
"title": "Weekly Newsletter",
|
|
1257
|
+
"subtitle": "Get our weekly newsletter with the latest updates. <a href=\"https://example.com/newsletter\">Learn more</a>",
|
|
1258
|
+
"consentType": "marketing",
|
|
1259
|
+
"consentRequired": false,
|
|
1260
|
+
"defaultStatus": "opt_out",
|
|
1261
|
+
"tags": [
|
|
1262
|
+
"homepage_banner",
|
|
1263
|
+
"user_profile"
|
|
1264
|
+
]
|
|
1265
|
+
},
|
|
1266
|
+
{
|
|
1267
|
+
"subscriptionId": "promotional-offers",
|
|
1268
|
+
"channels": [
|
|
1269
|
+
"sms"
|
|
1270
|
+
],
|
|
1271
|
+
"title": "Promotional Offers",
|
|
1272
|
+
"subtitle": "Receive special promotional offers. <a href=\"https://example.com/offers\">View terms</a>",
|
|
1273
|
+
"consentType": "marketing",
|
|
1274
|
+
"consentRequired": false,
|
|
1275
|
+
"defaultStatus": "opt_out",
|
|
1276
|
+
"tags": [
|
|
1277
|
+
"checkout"
|
|
1278
|
+
]
|
|
1279
|
+
}
|
|
1280
|
+
]
|
|
1281
|
+
}
|
|
1282
|
+
},
|
|
1283
|
+
"ConsentSubscriptionError": {
|
|
1284
|
+
"value": {
|
|
1285
|
+
"title": "Error Retrieving Consent Subscription",
|
|
1286
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/bad-request",
|
|
1287
|
+
"detail": "Error retrieving consent subscription."
|
|
1288
|
+
}
|
|
1289
|
+
},
|
|
1290
|
+
"ConsentSubscriptionUpdateRequest": {
|
|
1291
|
+
"summary": "Single subscription update request",
|
|
1292
|
+
"value": {
|
|
1293
|
+
"subscriptionId": "weekly-newsletter",
|
|
1294
|
+
"contactPointValue": "john.doe@example.com",
|
|
1295
|
+
"channel": "email",
|
|
1296
|
+
"status": "opt_in"
|
|
1297
|
+
}
|
|
1298
|
+
},
|
|
1299
|
+
"ConsentSubscriptionUpdateResponseSuccess": {
|
|
1300
|
+
"summary": "Single subscription update successful (200 response)",
|
|
1301
|
+
"value": {
|
|
1302
|
+
"subscriptionId": "weekly-newsletter",
|
|
1303
|
+
"contactPointValue": "john.doe@example.com",
|
|
1304
|
+
"channel": "email",
|
|
1305
|
+
"status": "opt_in"
|
|
1306
|
+
}
|
|
1307
|
+
},
|
|
1308
|
+
"ConsentSubscriptionUpdateError": {
|
|
1309
|
+
"value": {
|
|
1310
|
+
"title": "Error Updating Consent Subscription",
|
|
1311
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/validation",
|
|
1312
|
+
"detail": "Consent subscription could not be updated."
|
|
1313
|
+
}
|
|
1314
|
+
},
|
|
1315
|
+
"ConsentSubscriptionBulkUpdateRequest": {
|
|
1316
|
+
"summary": "Bulk subscription update request",
|
|
1317
|
+
"value": {
|
|
1318
|
+
"subscriptions": [
|
|
1319
|
+
{
|
|
1320
|
+
"subscriptionId": "weekly-newsletter",
|
|
1321
|
+
"contactPointValue": "john.doe@example.com",
|
|
1322
|
+
"channel": "email",
|
|
1323
|
+
"status": "opt_in"
|
|
1324
|
+
},
|
|
1325
|
+
{
|
|
1326
|
+
"subscriptionId": "sms-alerts",
|
|
1327
|
+
"contactPointValue": "+1 555 123 4567",
|
|
1328
|
+
"channel": "sms",
|
|
1329
|
+
"status": "opt_out"
|
|
1330
|
+
}
|
|
1331
|
+
]
|
|
1332
|
+
}
|
|
1333
|
+
},
|
|
1334
|
+
"ConsentSubscriptionBulkUpdateResponseSuccess": {
|
|
1335
|
+
"summary": "All subscription updates successful (200 response)",
|
|
1336
|
+
"value": {
|
|
1337
|
+
"results": [
|
|
1338
|
+
{
|
|
1339
|
+
"subscriptionId": "weekly-newsletter",
|
|
1340
|
+
"contactPointValue": "john.doe@example.com",
|
|
1341
|
+
"channel": "email",
|
|
1342
|
+
"status": "opt_in",
|
|
1343
|
+
"success": true
|
|
1344
|
+
},
|
|
1345
|
+
{
|
|
1346
|
+
"subscriptionId": "sms-alerts",
|
|
1347
|
+
"contactPointValue": "+1 555 123 4567",
|
|
1348
|
+
"channel": "sms",
|
|
1349
|
+
"status": "opt_out",
|
|
1350
|
+
"success": true
|
|
1351
|
+
}
|
|
1352
|
+
]
|
|
1353
|
+
}
|
|
1354
|
+
},
|
|
1355
|
+
"ConsentSubscriptionBulkUpdateResponsePartial": {
|
|
1356
|
+
"summary": "Partial success - some updates failed (207 response)",
|
|
1357
|
+
"value": {
|
|
1358
|
+
"results": [
|
|
1359
|
+
{
|
|
1360
|
+
"subscriptionId": "weekly-newsletter",
|
|
1361
|
+
"contactPointValue": "john.doe@example.com",
|
|
1362
|
+
"channel": "email",
|
|
1363
|
+
"status": "opt_in",
|
|
1364
|
+
"success": true
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
"subscriptionId": "sms-alerts",
|
|
1368
|
+
"contactPointValue": "invalid-phone",
|
|
1369
|
+
"channel": "sms",
|
|
1370
|
+
"status": "opt_out",
|
|
1371
|
+
"success": false,
|
|
1372
|
+
"error": {
|
|
1373
|
+
"code": "INVALID_CONTACT_POINT",
|
|
1374
|
+
"message": "Invalid phone number format",
|
|
1375
|
+
"details": {
|
|
1376
|
+
"field": "contactPointValue",
|
|
1377
|
+
"provided": "invalid-phone"
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
]
|
|
1382
|
+
}
|
|
1383
|
+
},
|
|
1384
|
+
"BulkValidationError": {
|
|
1385
|
+
"value": {
|
|
1386
|
+
"title": "Bulk Request Validation Error",
|
|
1387
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/validation",
|
|
1388
|
+
"detail": "One or more validation errors occurred in the bulk request.",
|
|
1389
|
+
"instance": "/organizations/f_ecom_zzrf_001/subscriptions"
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
},
|
|
878
1393
|
"securitySchemes": {
|
|
879
1394
|
"ShopperToken": {
|
|
880
1395
|
"type": "oauth2",
|
|
1396
|
+
"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 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",
|
|
881
1397
|
"flows": {
|
|
882
1398
|
"clientCredentials": {
|
|
883
1399
|
"tokenUrl": "https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token",
|
|
@@ -898,6 +1414,7 @@
|
|
|
898
1414
|
},
|
|
899
1415
|
"ShopperClientContextToken": {
|
|
900
1416
|
"type": "oauth2",
|
|
1417
|
+
"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",
|
|
901
1418
|
"flows": {
|
|
902
1419
|
"clientCredentials": {
|
|
903
1420
|
"tokenUrl": "https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token?hint=client_context",
|