@salesforce/b2c-tooling-sdk 2.4.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/schemas/dw.schema.json +14 -0
- package/data/tooling/index.json +5 -5
- package/dist/esm/cli/base-command.js +4 -3
- 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/config.js +3 -1
- 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/instance-command.js +2 -1
- package/dist/esm/cli/instance-command.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.js +4 -0
- package/dist/esm/config/dw-json-schema.js.map +1 -1
- 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 +8 -3
- package/dist/esm/config/index.js +5 -2
- 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.js +6 -0
- package/dist/esm/config/mapping.js.map +1 -1
- package/dist/esm/config/resolver.d.ts +22 -0
- package/dist/esm/config/resolver.js +54 -29
- 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 +34 -20
- package/dist/esm/config/sources/dw-json-source.js.map +1 -1
- package/dist/esm/config/sources/env-source.d.ts +30 -3
- package/dist/esm/config/sources/env-source.js +126 -1
- package/dist/esm/config/sources/env-source.js.map +1 -1
- package/dist/esm/config/types.d.ts +46 -0
- 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/index.d.ts +5 -2
- package/dist/esm/scapi/index.js +3 -2
- package/dist/esm/scapi/index.js.map +1 -1
- package/dist/esm/scapi/live.d.ts +12 -1
- package/dist/esm/scapi/live.js +30 -2
- package/dist/esm/scapi/live.js.map +1 -1
- package/dist/esm/scapi/local.d.ts +17 -0
- package/dist/esm/scapi/local.js +68 -16
- package/dist/esm/scapi/local.js.map +1 -1
- package/dist/esm/scapi/request.d.ts +2 -2
- package/dist/esm/scapi/request.js +2 -1
- 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 +30 -6
- package/dist/esm/scapi/worker-source.js.map +1 -1
- package/dist/esm/test-utils/config-isolation.js +9 -2
- package/dist/esm/test-utils/config-isolation.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 +2 -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 Promotions",
|
|
5
|
-
"
|
|
5
|
+
"description": "[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-promotions/shopper-promotions-oas-v1-public.yaml)\n\n# API Overview\n\nRetrieve information about active promotions within the context of a shopper and a site. You can use this API to retrieve promotions that you configured in the commerce platform by searching for specific promotion IDs or by searching for promotions associated with a campaign.\n\n## Authentication & Authorization\n\nThe Shopper Promotions API requires a JSON Web Token acquired via the Shopper Customers endpoint:\n\n```\nhttps://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/v1/organizations/{organizationId}/customers/actions/login\n```\n\nYou must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html)\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### Hooks\n\nFor details on working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.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 can be personalized using the [Shopper Context API.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/shopper-context-api.html) By setting context attributes such as customer group, source code, or store ID, you can retrieve personalized promotions, pricing, and shipping methods. For details on how personalization interacts with caching, see [Personalized Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html#personalized-caching)\n\n### Caching\n\nCaching is provided for this API. For details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html)\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 Promotions by ID\n\nRetrieve one or more promotions by their IDs (comma-separated, max 50).\n\n```sh\ncurl \"https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/v1/organizations/{organizationId}/promotions?ids=Buy5for50,free_shipping&siteId=RefArch\" \\\n -H \"Authorization: Bearer {access_token}\"\n```\n\n\n### Get Promotion by Promotion ID\n\nUse the Shopper Promotions API to find promotion information by the promotion ID.\n\nFor example, a customer who is browsing on a commerce shopping app built using Commerce Cloud APIs can see the details about the applied promotions in the cart.\n\n### Get Promotion by Campaign ID\n\nUse the Shopper Promotions API to find promotion information by the campaign ID.\n\nFor example, a customer who is browsing on a commerce shopping app built using Commerce Cloud APIs can see the possible promotions that can be applied in the cart.\n\n## Related APIs\n\n- [Promotions (Admin)](https://developer.salesforce.com/docs/commerce/commerce-api/references/promotions?meta=Summary) — Create and manage promotions, discounts, and qualifiers.",
|
|
6
|
+
"version": "1.4.2",
|
|
6
7
|
"x-api-type": "Shopper",
|
|
7
8
|
"x-api-family": "Pricing"
|
|
8
9
|
},
|
|
@@ -11,6 +12,7 @@
|
|
|
11
12
|
"url": "https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/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,31 +21,42 @@
|
|
|
19
21
|
"paths": {
|
|
20
22
|
"/organizations/{organizationId}/promotions": {
|
|
21
23
|
"get": {
|
|
24
|
+
"summary": "Return an array of enabled promotions for specified IDs.",
|
|
25
|
+
"description": "In the request URL, you can specify up to 50 IDs. If you specify an ID that contains either parentheses or the separator characters, you must URL encode these characters. \nEach request returns only enabled promotions as the server does not consider promotion qualifiers or schedules.",
|
|
22
26
|
"operationId": "getPromotions",
|
|
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": "ids",
|
|
46
58
|
"in": "query",
|
|
59
|
+
"description": "A comma-separated list of promotion identifiers. Maximum: 50.",
|
|
47
60
|
"required": true,
|
|
48
61
|
"style": "form",
|
|
49
62
|
"explode": true,
|
|
@@ -58,16 +71,26 @@
|
|
|
58
71
|
{
|
|
59
72
|
"name": "locale",
|
|
60
73
|
"in": "query",
|
|
74
|
+
"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.",
|
|
61
75
|
"required": false,
|
|
62
76
|
"style": "form",
|
|
63
77
|
"explode": true,
|
|
64
78
|
"schema": {
|
|
65
79
|
"$ref": "#/components/schemas/LocaleCode"
|
|
80
|
+
},
|
|
81
|
+
"examples": {
|
|
82
|
+
"LanguageCountry": {
|
|
83
|
+
"value": "en-US"
|
|
84
|
+
},
|
|
85
|
+
"CountryCode": {
|
|
86
|
+
"value": "US"
|
|
87
|
+
}
|
|
66
88
|
}
|
|
67
89
|
},
|
|
68
90
|
{
|
|
69
91
|
"name": "personalized",
|
|
70
92
|
"in": "query",
|
|
93
|
+
"description": "Controls whether personalization is applied to the response. Set to `none` to opt out of personalized response handling so the response is safe to cache at the CDN layer.\n\nWhen set to `none`, the server skips applying personalization to the response.",
|
|
71
94
|
"required": false,
|
|
72
95
|
"style": "form",
|
|
73
96
|
"explode": true,
|
|
@@ -75,37 +98,27 @@
|
|
|
75
98
|
"type": "string",
|
|
76
99
|
"enum": [
|
|
77
100
|
"none"
|
|
78
|
-
]
|
|
101
|
+
],
|
|
102
|
+
"example": "none"
|
|
79
103
|
}
|
|
80
104
|
},
|
|
81
105
|
{
|
|
82
106
|
"name": "sfdc_usid",
|
|
83
107
|
"in": "header",
|
|
108
|
+
"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.",
|
|
84
109
|
"required": false,
|
|
85
110
|
"style": "simple",
|
|
86
111
|
"explode": false,
|
|
87
112
|
"schema": {
|
|
88
113
|
"type": "string",
|
|
89
|
-
"format": "uuid"
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"name": "sfdc_dw_dnt",
|
|
94
|
-
"in": "header",
|
|
95
|
-
"required": false,
|
|
96
|
-
"style": "simple",
|
|
97
|
-
"explode": false,
|
|
98
|
-
"schema": {
|
|
99
|
-
"type": "string",
|
|
100
|
-
"enum": [
|
|
101
|
-
"0",
|
|
102
|
-
"1"
|
|
103
|
-
]
|
|
114
|
+
"format": "uuid",
|
|
115
|
+
"example": "550e8400-e29b-41d4-a716-446655440000"
|
|
104
116
|
}
|
|
105
117
|
},
|
|
106
118
|
{
|
|
107
119
|
"name": "sfdc_shopper_context",
|
|
108
120
|
"in": "header",
|
|
121
|
+
"description": "Shopper context information (for example clientIP, sourceCode, and customQualifiers)\npassed in from a trusted backend application.",
|
|
109
122
|
"required": false,
|
|
110
123
|
"style": "simple",
|
|
111
124
|
"explode": false,
|
|
@@ -121,6 +134,11 @@
|
|
|
121
134
|
"application/json": {
|
|
122
135
|
"schema": {
|
|
123
136
|
"$ref": "#/components/schemas/PromotionResult"
|
|
137
|
+
},
|
|
138
|
+
"examples": {
|
|
139
|
+
"PromotionsResult": {
|
|
140
|
+
"$ref": "#/components/examples/PromotionsResult"
|
|
141
|
+
}
|
|
124
142
|
}
|
|
125
143
|
}
|
|
126
144
|
}
|
|
@@ -131,6 +149,11 @@
|
|
|
131
149
|
"application/problem+json": {
|
|
132
150
|
"schema": {
|
|
133
151
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
152
|
+
},
|
|
153
|
+
"examples": {
|
|
154
|
+
"getPromotions404": {
|
|
155
|
+
"$ref": "#/components/examples/PromotionsNotFound404"
|
|
156
|
+
}
|
|
134
157
|
}
|
|
135
158
|
}
|
|
136
159
|
}
|
|
@@ -154,11 +177,14 @@
|
|
|
154
177
|
},
|
|
155
178
|
"/organizations/{organizationId}/promotions/campaigns/{campaignId}": {
|
|
156
179
|
"get": {
|
|
180
|
+
"summary": "Return an array of enabled promotions matching the specified filter criteria.",
|
|
181
|
+
"description": "Retrieves promotion information using filter criteria. In the request URL, you must provide a campaign_id parameter, and you can optionally specify a date\nrange by providing start_date and end_date parameters. Both parameters are required to specify a date range, and\nomitting one causes the server to return a MissingParameterException fault. Each request returns only enabled\npromotions, since the server does not consider promotion qualifiers or schedules.",
|
|
157
182
|
"operationId": "getPromotionsForCampaign",
|
|
158
183
|
"parameters": [
|
|
159
184
|
{
|
|
160
185
|
"name": "campaignId",
|
|
161
186
|
"in": "path",
|
|
187
|
+
"description": "Find the promotions assigned to this campaign (mandatory).",
|
|
162
188
|
"required": true,
|
|
163
189
|
"style": "simple",
|
|
164
190
|
"explode": false,
|
|
@@ -171,26 +197,35 @@
|
|
|
171
197
|
{
|
|
172
198
|
"name": "organizationId",
|
|
173
199
|
"in": "path",
|
|
200
|
+
"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).",
|
|
174
201
|
"required": true,
|
|
175
202
|
"style": "simple",
|
|
176
203
|
"explode": false,
|
|
177
204
|
"schema": {
|
|
178
205
|
"$ref": "#/components/schemas/OrganizationId"
|
|
179
|
-
}
|
|
206
|
+
},
|
|
207
|
+
"example": "f_ecom_zzxy_prd"
|
|
180
208
|
},
|
|
181
209
|
{
|
|
182
210
|
"name": "siteId",
|
|
183
211
|
"in": "query",
|
|
212
|
+
"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.",
|
|
184
213
|
"required": true,
|
|
185
214
|
"style": "form",
|
|
186
215
|
"explode": true,
|
|
187
216
|
"schema": {
|
|
188
217
|
"$ref": "#/components/schemas/SiteId"
|
|
218
|
+
},
|
|
219
|
+
"examples": {
|
|
220
|
+
"SiteId": {
|
|
221
|
+
"value": "RefArch"
|
|
222
|
+
}
|
|
189
223
|
}
|
|
190
224
|
},
|
|
191
225
|
{
|
|
192
226
|
"name": "startDate",
|
|
193
227
|
"in": "query",
|
|
228
|
+
"description": "The start date of the promotion in ISO 8601 date time format.",
|
|
194
229
|
"required": false,
|
|
195
230
|
"style": "form",
|
|
196
231
|
"explode": true,
|
|
@@ -201,6 +236,7 @@
|
|
|
201
236
|
{
|
|
202
237
|
"name": "endDate",
|
|
203
238
|
"in": "query",
|
|
239
|
+
"description": "The end date of the promotion in ISO 8601 date time format.",
|
|
204
240
|
"required": false,
|
|
205
241
|
"style": "form",
|
|
206
242
|
"explode": true,
|
|
@@ -211,6 +247,7 @@
|
|
|
211
247
|
{
|
|
212
248
|
"name": "currency",
|
|
213
249
|
"in": "query",
|
|
250
|
+
"description": "The currency mnemonic specified for price. This parameter is effective only for product suggestions.",
|
|
214
251
|
"required": false,
|
|
215
252
|
"style": "form",
|
|
216
253
|
"explode": true,
|
|
@@ -221,6 +258,7 @@
|
|
|
221
258
|
{
|
|
222
259
|
"name": "personalized",
|
|
223
260
|
"in": "query",
|
|
261
|
+
"description": "Controls whether personalization is applied to the response. Set to `none` to opt out of personalized response handling so the response is safe to cache at the CDN layer.\n\nWhen set to `none`, the server skips applying personalization to the response.",
|
|
224
262
|
"required": false,
|
|
225
263
|
"style": "form",
|
|
226
264
|
"explode": true,
|
|
@@ -228,37 +266,27 @@
|
|
|
228
266
|
"type": "string",
|
|
229
267
|
"enum": [
|
|
230
268
|
"none"
|
|
231
|
-
]
|
|
269
|
+
],
|
|
270
|
+
"example": "none"
|
|
232
271
|
}
|
|
233
272
|
},
|
|
234
273
|
{
|
|
235
274
|
"name": "sfdc_usid",
|
|
236
275
|
"in": "header",
|
|
276
|
+
"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.",
|
|
237
277
|
"required": false,
|
|
238
278
|
"style": "simple",
|
|
239
279
|
"explode": false,
|
|
240
280
|
"schema": {
|
|
241
281
|
"type": "string",
|
|
242
|
-
"format": "uuid"
|
|
243
|
-
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
"name": "sfdc_dw_dnt",
|
|
247
|
-
"in": "header",
|
|
248
|
-
"required": false,
|
|
249
|
-
"style": "simple",
|
|
250
|
-
"explode": false,
|
|
251
|
-
"schema": {
|
|
252
|
-
"type": "string",
|
|
253
|
-
"enum": [
|
|
254
|
-
"0",
|
|
255
|
-
"1"
|
|
256
|
-
]
|
|
282
|
+
"format": "uuid",
|
|
283
|
+
"example": "550e8400-e29b-41d4-a716-446655440000"
|
|
257
284
|
}
|
|
258
285
|
},
|
|
259
286
|
{
|
|
260
287
|
"name": "sfdc_shopper_context",
|
|
261
288
|
"in": "header",
|
|
289
|
+
"description": "Shopper context information (for example clientIP, sourceCode, and customQualifiers)\npassed in from a trusted backend application.",
|
|
262
290
|
"required": false,
|
|
263
291
|
"style": "simple",
|
|
264
292
|
"explode": false,
|
|
@@ -274,6 +302,11 @@
|
|
|
274
302
|
"application/json": {
|
|
275
303
|
"schema": {
|
|
276
304
|
"$ref": "#/components/schemas/PromotionResult"
|
|
305
|
+
},
|
|
306
|
+
"examples": {
|
|
307
|
+
"PromotionsResult": {
|
|
308
|
+
"$ref": "#/components/examples/PromotionsResult"
|
|
309
|
+
}
|
|
277
310
|
}
|
|
278
311
|
}
|
|
279
312
|
}
|
|
@@ -284,6 +317,11 @@
|
|
|
284
317
|
"application/problem+json": {
|
|
285
318
|
"schema": {
|
|
286
319
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
320
|
+
},
|
|
321
|
+
"examples": {
|
|
322
|
+
"getPromotionsForCampaign400": {
|
|
323
|
+
"$ref": "#/components/examples/InvalidDate400"
|
|
324
|
+
}
|
|
287
325
|
}
|
|
288
326
|
}
|
|
289
327
|
}
|
|
@@ -294,6 +332,11 @@
|
|
|
294
332
|
"application/problem+json": {
|
|
295
333
|
"schema": {
|
|
296
334
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
335
|
+
},
|
|
336
|
+
"examples": {
|
|
337
|
+
"getPromotions404": {
|
|
338
|
+
"$ref": "#/components/examples/PromotionsNotFound404"
|
|
339
|
+
}
|
|
297
340
|
}
|
|
298
341
|
}
|
|
299
342
|
}
|
|
@@ -320,27 +363,38 @@
|
|
|
320
363
|
"schemas": {
|
|
321
364
|
"OrganizationId": {
|
|
322
365
|
"type": "string",
|
|
366
|
+
"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).",
|
|
367
|
+
"example": "f_ecom_zzxy_prd",
|
|
323
368
|
"pattern": "^f_ecom_[a-z]{4}_(prd|stg|dev|s[0-9]{2}|[0-9]{3})$"
|
|
324
369
|
},
|
|
325
370
|
"SiteId": {
|
|
326
371
|
"type": "string",
|
|
372
|
+
"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",
|
|
373
|
+
"example": "RefArch",
|
|
327
374
|
"maxLength": 32,
|
|
328
375
|
"minLength": 1
|
|
329
376
|
},
|
|
330
377
|
"LanguageCountry": {
|
|
331
378
|
"type": "string",
|
|
379
|
+
"description": "A concatenated version of the standard Language and Country codes, combined with a hyphen '`-`'.",
|
|
380
|
+
"example": "en-US",
|
|
332
381
|
"pattern": "^[a-z][a-z]-[A-Z][A-Z]$"
|
|
333
382
|
},
|
|
334
383
|
"LanguageCode": {
|
|
335
384
|
"type": "string",
|
|
385
|
+
"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).",
|
|
386
|
+
"example": "en",
|
|
336
387
|
"pattern": "^[a-z][a-z]$"
|
|
337
388
|
},
|
|
338
389
|
"DefaultFallback": {
|
|
339
390
|
"type": "string",
|
|
340
391
|
"default": "default",
|
|
392
|
+
"description": "A specialized value indicating the system default values for locales.",
|
|
393
|
+
"example": "default",
|
|
341
394
|
"pattern": "^default$"
|
|
342
395
|
},
|
|
343
396
|
"LocaleCode": {
|
|
397
|
+
"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.",
|
|
344
398
|
"oneOf": [
|
|
345
399
|
{
|
|
346
400
|
"$ref": "#/components/schemas/LanguageCountry"
|
|
@@ -357,14 +411,19 @@
|
|
|
357
411
|
"type": "integer",
|
|
358
412
|
"format": "int32",
|
|
359
413
|
"default": 0,
|
|
414
|
+
"description": "The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated.",
|
|
415
|
+
"example": 10,
|
|
360
416
|
"minimum": 0
|
|
361
417
|
},
|
|
362
418
|
"ResultBase": {
|
|
363
419
|
"type": "object",
|
|
420
|
+
"description": "Schema defining generic list result. Each response schema of a resource requiring a list response should extend this schema. \nAdditionally it needs to be defined what data is returned.",
|
|
364
421
|
"properties": {
|
|
365
422
|
"limit": {
|
|
366
423
|
"type": "integer",
|
|
367
|
-
"format": "int32"
|
|
424
|
+
"format": "int32",
|
|
425
|
+
"description": "Maximum records to retrieve per request. The limit with its constraints (minimum, maximum, default) is defined by the request parameter `limit` of the endpoint returning this schema.",
|
|
426
|
+
"example": 10
|
|
368
427
|
},
|
|
369
428
|
"total": {
|
|
370
429
|
"$ref": "#/components/schemas/Total"
|
|
@@ -377,33 +436,53 @@
|
|
|
377
436
|
},
|
|
378
437
|
"Promotion": {
|
|
379
438
|
"type": "object",
|
|
380
|
-
"additionalProperties": {
|
|
439
|
+
"additionalProperties": {
|
|
440
|
+
"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.",
|
|
441
|
+
"example": "c_trackingId",
|
|
442
|
+
"title": "Additional Property Support"
|
|
443
|
+
},
|
|
444
|
+
"description": "Document representing a promotion.",
|
|
381
445
|
"properties": {
|
|
382
446
|
"calloutMsg": {
|
|
383
|
-
"type": "string"
|
|
447
|
+
"type": "string",
|
|
448
|
+
"description": "The localized call-out message of the promotion.",
|
|
449
|
+
"example": "$30 Fixed Shipping Amount Above 150"
|
|
384
450
|
},
|
|
385
451
|
"currency": {
|
|
386
|
-
"type": "string"
|
|
452
|
+
"type": "string",
|
|
453
|
+
"description": "The currency that a promotion can be applied to. A null value means that the promotion applies to all allowed\n currencies.",
|
|
454
|
+
"example": "USD"
|
|
387
455
|
},
|
|
388
456
|
"details": {
|
|
389
|
-
"type": "string"
|
|
457
|
+
"type": "string",
|
|
458
|
+
"description": "The localized detailed description of the promotion.",
|
|
459
|
+
"example": "$30 Fixed Shipping Amount Above 150"
|
|
390
460
|
},
|
|
391
461
|
"endDate": {
|
|
392
462
|
"type": "string",
|
|
393
|
-
"format": "date-time"
|
|
463
|
+
"format": "date-time",
|
|
464
|
+
"description": "The end date of the promotion. This property follows the ISO8601 date time format: yyyy-MM-dd'T'HH:mmZ . The time\n zone of the date time is always UTC.",
|
|
465
|
+
"example": "2015-07-04T21:00:00Z"
|
|
394
466
|
},
|
|
395
467
|
"id": {
|
|
396
|
-
"type": "string"
|
|
468
|
+
"type": "string",
|
|
469
|
+
"description": "The unique ID of the promotion.",
|
|
470
|
+
"example": "$30FixedShippingAmountAbove150"
|
|
397
471
|
},
|
|
398
472
|
"image": {
|
|
399
|
-
"type": "string"
|
|
473
|
+
"type": "string",
|
|
474
|
+
"description": "The URL to the promotion image."
|
|
400
475
|
},
|
|
401
476
|
"name": {
|
|
402
|
-
"type": "string"
|
|
477
|
+
"type": "string",
|
|
478
|
+
"description": "The localized name of the promotion.",
|
|
479
|
+
"example": "$30 Fixed Shipping Amount Above 150"
|
|
403
480
|
},
|
|
404
481
|
"startDate": {
|
|
405
482
|
"type": "string",
|
|
406
|
-
"format": "date-time"
|
|
483
|
+
"format": "date-time",
|
|
484
|
+
"description": "The start date of the promotion. This property follows the ISO8601 date time format: yyyy-MM-dd'T'HH:mmZ. The\n time zone of the date time is always UTC.",
|
|
485
|
+
"example": "2015-07-04T21:00:00Z"
|
|
407
486
|
}
|
|
408
487
|
},
|
|
409
488
|
"required": [
|
|
@@ -417,9 +496,29 @@
|
|
|
417
496
|
"$ref": "#/components/schemas/ResultBase"
|
|
418
497
|
}
|
|
419
498
|
],
|
|
499
|
+
"description": "Result document containing an array of promotions.",
|
|
500
|
+
"example": {
|
|
501
|
+
"limit": 2,
|
|
502
|
+
"data": [
|
|
503
|
+
{
|
|
504
|
+
"calloutMsg": "Buy5for50",
|
|
505
|
+
"details": "Buy5for50",
|
|
506
|
+
"id": "Buy5for50",
|
|
507
|
+
"name": "Buy5for50"
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"calloutMsg": "$5 off Men's Ties",
|
|
511
|
+
"details": "$5 off Men's Ties (with coupon)",
|
|
512
|
+
"id": "$5_off_ties_promotion",
|
|
513
|
+
"name": "5 Off Ties Promotion"
|
|
514
|
+
}
|
|
515
|
+
],
|
|
516
|
+
"total": 2
|
|
517
|
+
},
|
|
420
518
|
"properties": {
|
|
421
519
|
"data": {
|
|
422
520
|
"type": "array",
|
|
521
|
+
"description": "The array of promotion documents.",
|
|
423
522
|
"items": {
|
|
424
523
|
"$ref": "#/components/schemas/Promotion"
|
|
425
524
|
}
|
|
@@ -435,17 +534,25 @@
|
|
|
435
534
|
"properties": {
|
|
436
535
|
"title": {
|
|
437
536
|
"type": "string",
|
|
537
|
+
"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",
|
|
538
|
+
"example": "You do not have enough credit",
|
|
438
539
|
"maxLength": 256
|
|
439
540
|
},
|
|
440
541
|
"type": {
|
|
441
542
|
"type": "string",
|
|
543
|
+
"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",
|
|
544
|
+
"example": "NotEnoughMoney",
|
|
442
545
|
"maxLength": 2048
|
|
443
546
|
},
|
|
444
547
|
"detail": {
|
|
445
|
-
"type": "string"
|
|
548
|
+
"type": "string",
|
|
549
|
+
"description": "A human-readable explanation specific to this occurrence of the problem.",
|
|
550
|
+
"example": "Your current balance is 30, but that costs 50"
|
|
446
551
|
},
|
|
447
552
|
"instance": {
|
|
448
553
|
"type": "string",
|
|
554
|
+
"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",
|
|
555
|
+
"example": "/account/12345/msgs/abc",
|
|
449
556
|
"maxLength": 2048
|
|
450
557
|
}
|
|
451
558
|
},
|
|
@@ -457,6 +564,8 @@
|
|
|
457
564
|
},
|
|
458
565
|
"CurrencyCode": {
|
|
459
566
|
"type": "string",
|
|
567
|
+
"description": "A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.",
|
|
568
|
+
"example": "USD",
|
|
460
569
|
"pattern": "^([A-Z][A-Z][A-Z]|N/A)$"
|
|
461
570
|
}
|
|
462
571
|
},
|
|
@@ -464,26 +573,35 @@
|
|
|
464
573
|
"organizationId": {
|
|
465
574
|
"name": "organizationId",
|
|
466
575
|
"in": "path",
|
|
576
|
+
"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).",
|
|
467
577
|
"required": true,
|
|
468
578
|
"style": "simple",
|
|
469
579
|
"explode": false,
|
|
470
580
|
"schema": {
|
|
471
581
|
"$ref": "#/components/schemas/OrganizationId"
|
|
472
|
-
}
|
|
582
|
+
},
|
|
583
|
+
"example": "f_ecom_zzxy_prd"
|
|
473
584
|
},
|
|
474
585
|
"siteId": {
|
|
475
586
|
"name": "siteId",
|
|
476
587
|
"in": "query",
|
|
588
|
+
"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.",
|
|
477
589
|
"required": true,
|
|
478
590
|
"style": "form",
|
|
479
591
|
"explode": true,
|
|
480
592
|
"schema": {
|
|
481
593
|
"$ref": "#/components/schemas/SiteId"
|
|
594
|
+
},
|
|
595
|
+
"examples": {
|
|
596
|
+
"SiteId": {
|
|
597
|
+
"value": "RefArch"
|
|
598
|
+
}
|
|
482
599
|
}
|
|
483
600
|
},
|
|
484
601
|
"ids": {
|
|
485
602
|
"name": "ids",
|
|
486
603
|
"in": "query",
|
|
604
|
+
"description": "A comma-separated list of promotion identifiers. Maximum: 50.",
|
|
487
605
|
"required": true,
|
|
488
606
|
"style": "form",
|
|
489
607
|
"explode": true,
|
|
@@ -498,16 +616,26 @@
|
|
|
498
616
|
"locale": {
|
|
499
617
|
"name": "locale",
|
|
500
618
|
"in": "query",
|
|
619
|
+
"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.",
|
|
501
620
|
"required": false,
|
|
502
621
|
"style": "form",
|
|
503
622
|
"explode": true,
|
|
504
623
|
"schema": {
|
|
505
624
|
"$ref": "#/components/schemas/LocaleCode"
|
|
625
|
+
},
|
|
626
|
+
"examples": {
|
|
627
|
+
"LanguageCountry": {
|
|
628
|
+
"value": "en-US"
|
|
629
|
+
},
|
|
630
|
+
"CountryCode": {
|
|
631
|
+
"value": "US"
|
|
632
|
+
}
|
|
506
633
|
}
|
|
507
634
|
},
|
|
508
635
|
"personalized": {
|
|
509
636
|
"name": "personalized",
|
|
510
637
|
"in": "query",
|
|
638
|
+
"description": "Controls whether personalization is applied to the response. Set to `none` to opt out of personalized response handling so the response is safe to cache at the CDN layer.\n\nWhen set to `none`, the server skips applying personalization to the response.",
|
|
511
639
|
"required": false,
|
|
512
640
|
"style": "form",
|
|
513
641
|
"explode": true,
|
|
@@ -515,12 +643,14 @@
|
|
|
515
643
|
"type": "string",
|
|
516
644
|
"enum": [
|
|
517
645
|
"none"
|
|
518
|
-
]
|
|
646
|
+
],
|
|
647
|
+
"example": "none"
|
|
519
648
|
}
|
|
520
649
|
},
|
|
521
650
|
"campaignId": {
|
|
522
651
|
"name": "campaignId",
|
|
523
652
|
"in": "path",
|
|
653
|
+
"description": "Find the promotions assigned to this campaign (mandatory).",
|
|
524
654
|
"required": true,
|
|
525
655
|
"style": "simple",
|
|
526
656
|
"explode": false,
|
|
@@ -533,6 +663,7 @@
|
|
|
533
663
|
"startDate": {
|
|
534
664
|
"name": "startDate",
|
|
535
665
|
"in": "query",
|
|
666
|
+
"description": "The start date of the promotion in ISO 8601 date time format.",
|
|
536
667
|
"required": false,
|
|
537
668
|
"style": "form",
|
|
538
669
|
"explode": true,
|
|
@@ -543,6 +674,7 @@
|
|
|
543
674
|
"endDate": {
|
|
544
675
|
"name": "endDate",
|
|
545
676
|
"in": "query",
|
|
677
|
+
"description": "The end date of the promotion in ISO 8601 date time format.",
|
|
546
678
|
"required": false,
|
|
547
679
|
"style": "form",
|
|
548
680
|
"explode": true,
|
|
@@ -553,6 +685,7 @@
|
|
|
553
685
|
"currency": {
|
|
554
686
|
"name": "currency",
|
|
555
687
|
"in": "query",
|
|
688
|
+
"description": "The currency mnemonic specified for price. This parameter is effective only for product suggestions.",
|
|
556
689
|
"required": false,
|
|
557
690
|
"style": "form",
|
|
558
691
|
"explode": true,
|
|
@@ -563,31 +696,20 @@
|
|
|
563
696
|
"sfdcUsid": {
|
|
564
697
|
"name": "sfdc_usid",
|
|
565
698
|
"in": "header",
|
|
699
|
+
"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.",
|
|
566
700
|
"required": false,
|
|
567
701
|
"style": "simple",
|
|
568
702
|
"explode": false,
|
|
569
703
|
"schema": {
|
|
570
704
|
"type": "string",
|
|
571
|
-
"format": "uuid"
|
|
572
|
-
|
|
573
|
-
},
|
|
574
|
-
"sfdcDwDnt": {
|
|
575
|
-
"name": "sfdc_dw_dnt",
|
|
576
|
-
"in": "header",
|
|
577
|
-
"required": false,
|
|
578
|
-
"style": "simple",
|
|
579
|
-
"explode": false,
|
|
580
|
-
"schema": {
|
|
581
|
-
"type": "string",
|
|
582
|
-
"enum": [
|
|
583
|
-
"0",
|
|
584
|
-
"1"
|
|
585
|
-
]
|
|
705
|
+
"format": "uuid",
|
|
706
|
+
"example": "550e8400-e29b-41d4-a716-446655440000"
|
|
586
707
|
}
|
|
587
708
|
},
|
|
588
709
|
"sfdcShopperContext": {
|
|
589
710
|
"name": "sfdc_shopper_context",
|
|
590
711
|
"in": "header",
|
|
712
|
+
"description": "Shopper context information (for example clientIP, sourceCode, and customQualifiers)\npassed in from a trusted backend application.",
|
|
591
713
|
"required": false,
|
|
592
714
|
"style": "simple",
|
|
593
715
|
"explode": false,
|
|
@@ -596,9 +718,56 @@
|
|
|
596
718
|
}
|
|
597
719
|
}
|
|
598
720
|
},
|
|
721
|
+
"examples": {
|
|
722
|
+
"PromotionsResult": {
|
|
723
|
+
"summary": "Multiple promotions retrieved by ID",
|
|
724
|
+
"value": {
|
|
725
|
+
"limit": 2,
|
|
726
|
+
"data": [
|
|
727
|
+
{
|
|
728
|
+
"id": "Buy5for50",
|
|
729
|
+
"name": "Buy 5 for $50",
|
|
730
|
+
"calloutMsg": "Buy 5 for $50",
|
|
731
|
+
"details": "Buy any 5 qualifying items and pay only $50. Discount applied at checkout.",
|
|
732
|
+
"currency": "USD",
|
|
733
|
+
"startDate": "2025-01-01T00:00:00Z",
|
|
734
|
+
"endDate": "2025-12-31T23:59:00Z"
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
"id": "$5_off_ties_promotion",
|
|
738
|
+
"name": "$5 Off Ties Promotion",
|
|
739
|
+
"calloutMsg": "$5 off Men's Ties",
|
|
740
|
+
"details": "$5 off Men's Ties when you apply coupon code TIES5.",
|
|
741
|
+
"currency": "USD",
|
|
742
|
+
"startDate": "2025-03-01T00:00:00Z",
|
|
743
|
+
"endDate": "2025-06-30T23:59:00Z",
|
|
744
|
+
"c_promoCategory": "apparel"
|
|
745
|
+
}
|
|
746
|
+
],
|
|
747
|
+
"total": 2
|
|
748
|
+
}
|
|
749
|
+
},
|
|
750
|
+
"PromotionsNotFound404": {
|
|
751
|
+
"value": {
|
|
752
|
+
"type": "/PromotionNotFoundException",
|
|
753
|
+
"detail": "There is no promotion found with the given ID for the requested site.",
|
|
754
|
+
"title": "Not Found",
|
|
755
|
+
"instance": "/foo"
|
|
756
|
+
}
|
|
757
|
+
},
|
|
758
|
+
"InvalidDate400": {
|
|
759
|
+
"value": {
|
|
760
|
+
"type": "/InvalidDateException",
|
|
761
|
+
"detail": "Invalid Start or End Date",
|
|
762
|
+
"title": "Invalid Start or End Date",
|
|
763
|
+
"instance": "/foo"
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
},
|
|
599
767
|
"securitySchemes": {
|
|
600
768
|
"ShopperToken": {
|
|
601
769
|
"type": "oauth2",
|
|
770
|
+
"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",
|
|
602
771
|
"flows": {
|
|
603
772
|
"clientCredentials": {
|
|
604
773
|
"tokenUrl": "https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token",
|
|
@@ -617,6 +786,7 @@
|
|
|
617
786
|
},
|
|
618
787
|
"ShopperClientContextToken": {
|
|
619
788
|
"type": "oauth2",
|
|
789
|
+
"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",
|
|
620
790
|
"flows": {
|
|
621
791
|
"clientCredentials": {
|
|
622
792
|
"tokenUrl": "https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token?hint=client_context",
|