@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": "Campaigns",
|
|
5
|
-
"
|
|
5
|
+
"description": "[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/campaigns/campaigns-oas-v1-public.yaml)\n\n# API Overview\n\nCampaigns enable experiences based on an optional schedule and qualifying criteria.\n\nWhen an experience is assigned to a campaign, the schedule and qualifiers can only refine the containing campaign. A campaign is defined in the context of a site and is not shared among sites. A campaign can be enabled or disabled. A disabled campaign is inactive and not available to consumers. Enabled promotions contained within a disabled campaign are also inactive.\n\n## Qualifiers\n\nQualifiers are requirements that must be met to enable a campaign's experience.\n\n- Schedule: A start and end time and date. This can be open ended at one or both ends.\n- Coupon: A coupon\n- Customer Group: Membership in a customer group.\n- Source Code: A code attached to the site URL that identifies where the customer was redirected from.\n\nFor more details, see [Qualifiers](https://help.salesforce.com/s/articleView?id=cc.b2c_qualifiers.htm&type=5) on the B2C Commerce documentation.\n\n## Experiences\n\nPromotion: A monetary discount or bonus item. Promotions can have additional criteria such as quantity or number of products gating the discount.\n\n## Authentication & Authorization\n\nThe client requesting the campaign information must have access to the Campaign resource. For resource access, you must use a client ID and client secret from Account Manager to request an access token. The access token is used as a bearer token and added to the Authorization header of your API request. The client must first authenticate against Account Manager to log in.\n\nYou must include the relevant scope(s) in the client ID used to generate the token. For details, see [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html)\n\nFor detailed setup instructions, see [Authorization for Admin APIs](https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-admin-apis.html).\n\n## Use Cases\n\n### Flash Sales\n\nUse single date promotions when you want to run a campaign for a short period of time.\n\nFor example, a '20% Off Black Friday' campaign enables a 20% off promotion for registered customers on Black Friday.\n\n### No Date or Time Restrictions\n\nYou can also configure promotions with no time or date restrictions. This is useful when running coupon-coded promotions, or qualifier-based promotions that require certain criteria to be met.\n\nFor example, a 'Free Shipping' campaign enables a free shipping promotion when the coupon code \"freeship\" is added to the cart.\n\n### Redirections\n\nUse redirection promotions to trigger a promotion when a customer arrives at the storefront from a specific location. You may want to use this when partnering with other resources or running external advertisements.\n\nFor example, all users directed from Facebook receive a free hat with purchase.\n\nFor more information, see [Use Source Codes as Qualifiers](https://help.salesforce.com/s/articleView?id=cc.b2c_using_source_codesas_qualifiers.htm&type=5) in the B2C Commerce documentation.\n\n## Related APIs\n\n- [Promotions (Admin)](https://developer.salesforce.com/docs/commerce/commerce-api/references/promotions?meta=Summary) — Manage promotions assigned to campaigns.\n- [Assignments](https://developer.salesforce.com/docs/commerce/commerce-api/references/assignments?meta=Summary) — Assign promotions and discounts to campaigns.\n- [Coupons](https://developer.salesforce.com/docs/commerce/commerce-api/references/coupons?meta=Summary) — Manage coupons used as campaign qualifiers.",
|
|
6
|
+
"version": "1.1.1",
|
|
6
7
|
"x-api-type": "Admin",
|
|
7
8
|
"x-api-family": "Pricing"
|
|
8
9
|
},
|
|
@@ -11,6 +12,7 @@
|
|
|
11
12
|
"url": "https://{shortCode}.api.commercecloud.salesforce.com/pricing/campaigns/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,26 +21,36 @@
|
|
|
19
21
|
"paths": {
|
|
20
22
|
"/organizations/{organizationId}/campaigns": {
|
|
21
23
|
"post": {
|
|
24
|
+
"summary": "Search for campaigns using a search request object that allows filtering on various attributes.",
|
|
25
|
+
"description": "## Supported Query Attributes\n\nThe query attribute specifies a complex query that you can use to narrow down the search. A subset of these attributes can optionally be used to sort the returned results.\n\n| Attribute | Type | Sortable |\n|-----------|--------|----------|\n| campaignId | String | yes |\n| description | String | yes |\n| enabled | Boolean | yes |\n| couponId | String | no |\n| customerGroup | String | no |\n| sourceCode | String | no |\n| startDate | Date | no |\n| endDate | Date | no |\n| lastModified | Date | no |\n\nThese fields can only be used in queries as conjunctions (using `AND`). If the field is used in a disjunction (`OR`), an exception is thrown.",
|
|
22
26
|
"operationId": "campaignsSearch",
|
|
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
|
],
|
|
@@ -58,6 +70,11 @@
|
|
|
58
70
|
"application/json": {
|
|
59
71
|
"schema": {
|
|
60
72
|
"$ref": "#/components/schemas/CampaignSearchResult"
|
|
73
|
+
},
|
|
74
|
+
"examples": {
|
|
75
|
+
"CampaignSearchResult": {
|
|
76
|
+
"$ref": "#/components/examples/PostCampaignSearch"
|
|
77
|
+
}
|
|
61
78
|
}
|
|
62
79
|
}
|
|
63
80
|
}
|
|
@@ -68,6 +85,11 @@
|
|
|
68
85
|
"application/json": {
|
|
69
86
|
"schema": {
|
|
70
87
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
88
|
+
},
|
|
89
|
+
"examples": {
|
|
90
|
+
"InvalidOperation": {
|
|
91
|
+
"$ref": "#/components/examples/InvalidOperation"
|
|
92
|
+
}
|
|
71
93
|
}
|
|
72
94
|
}
|
|
73
95
|
}
|
|
@@ -85,11 +107,13 @@
|
|
|
85
107
|
},
|
|
86
108
|
"/organizations/{organizationId}/campaigns/{campaignId}": {
|
|
87
109
|
"get": {
|
|
110
|
+
"summary": "Get campaign information.",
|
|
88
111
|
"operationId": "getCampaign",
|
|
89
112
|
"parameters": [
|
|
90
113
|
{
|
|
91
114
|
"name": "campaignId",
|
|
92
115
|
"in": "path",
|
|
116
|
+
"description": "The ID of the campaign.",
|
|
93
117
|
"required": true,
|
|
94
118
|
"style": "simple",
|
|
95
119
|
"explode": false,
|
|
@@ -105,21 +129,29 @@
|
|
|
105
129
|
{
|
|
106
130
|
"name": "organizationId",
|
|
107
131
|
"in": "path",
|
|
132
|
+
"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).",
|
|
108
133
|
"required": true,
|
|
109
134
|
"style": "simple",
|
|
110
135
|
"explode": false,
|
|
111
136
|
"schema": {
|
|
112
137
|
"$ref": "#/components/schemas/OrganizationId"
|
|
113
|
-
}
|
|
138
|
+
},
|
|
139
|
+
"example": "f_ecom_zzxy_prd"
|
|
114
140
|
},
|
|
115
141
|
{
|
|
116
142
|
"name": "siteId",
|
|
117
143
|
"in": "query",
|
|
144
|
+
"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.",
|
|
118
145
|
"required": true,
|
|
119
146
|
"style": "form",
|
|
120
147
|
"explode": true,
|
|
121
148
|
"schema": {
|
|
122
149
|
"$ref": "#/components/schemas/SiteId"
|
|
150
|
+
},
|
|
151
|
+
"examples": {
|
|
152
|
+
"SiteId": {
|
|
153
|
+
"value": "RefArch"
|
|
154
|
+
}
|
|
123
155
|
}
|
|
124
156
|
}
|
|
125
157
|
],
|
|
@@ -130,6 +162,11 @@
|
|
|
130
162
|
"application/json": {
|
|
131
163
|
"schema": {
|
|
132
164
|
"$ref": "#/components/schemas/Campaign"
|
|
165
|
+
},
|
|
166
|
+
"examples": {
|
|
167
|
+
"GetCampaign": {
|
|
168
|
+
"$ref": "#/components/examples/GetCampaign"
|
|
169
|
+
}
|
|
133
170
|
}
|
|
134
171
|
}
|
|
135
172
|
}
|
|
@@ -140,6 +177,11 @@
|
|
|
140
177
|
"application/json": {
|
|
141
178
|
"schema": {
|
|
142
179
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
180
|
+
},
|
|
181
|
+
"examples": {
|
|
182
|
+
"getCampaign404": {
|
|
183
|
+
"$ref": "#/components/examples/CampaignNotFound404"
|
|
184
|
+
}
|
|
143
185
|
}
|
|
144
186
|
}
|
|
145
187
|
}
|
|
@@ -155,11 +197,13 @@
|
|
|
155
197
|
]
|
|
156
198
|
},
|
|
157
199
|
"put": {
|
|
200
|
+
"summary": "Create a campaign using the information provided.",
|
|
158
201
|
"operationId": "createCampaign",
|
|
159
202
|
"parameters": [
|
|
160
203
|
{
|
|
161
204
|
"name": "campaignId",
|
|
162
205
|
"in": "path",
|
|
206
|
+
"description": "The ID of the campaign.",
|
|
163
207
|
"required": true,
|
|
164
208
|
"style": "simple",
|
|
165
209
|
"explode": false,
|
|
@@ -175,21 +219,29 @@
|
|
|
175
219
|
{
|
|
176
220
|
"name": "organizationId",
|
|
177
221
|
"in": "path",
|
|
222
|
+
"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).",
|
|
178
223
|
"required": true,
|
|
179
224
|
"style": "simple",
|
|
180
225
|
"explode": false,
|
|
181
226
|
"schema": {
|
|
182
227
|
"$ref": "#/components/schemas/OrganizationId"
|
|
183
|
-
}
|
|
228
|
+
},
|
|
229
|
+
"example": "f_ecom_zzxy_prd"
|
|
184
230
|
},
|
|
185
231
|
{
|
|
186
232
|
"name": "siteId",
|
|
187
233
|
"in": "query",
|
|
234
|
+
"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.",
|
|
188
235
|
"required": true,
|
|
189
236
|
"style": "form",
|
|
190
237
|
"explode": true,
|
|
191
238
|
"schema": {
|
|
192
239
|
"$ref": "#/components/schemas/SiteId"
|
|
240
|
+
},
|
|
241
|
+
"examples": {
|
|
242
|
+
"SiteId": {
|
|
243
|
+
"value": "RefArch"
|
|
244
|
+
}
|
|
193
245
|
}
|
|
194
246
|
}
|
|
195
247
|
],
|
|
@@ -198,6 +250,11 @@
|
|
|
198
250
|
"application/json": {
|
|
199
251
|
"schema": {
|
|
200
252
|
"$ref": "#/components/schemas/Campaign"
|
|
253
|
+
},
|
|
254
|
+
"examples": {
|
|
255
|
+
"PutCampaign": {
|
|
256
|
+
"$ref": "#/components/examples/PutCampaign"
|
|
257
|
+
}
|
|
201
258
|
}
|
|
202
259
|
}
|
|
203
260
|
}
|
|
@@ -209,6 +266,11 @@
|
|
|
209
266
|
"application/json": {
|
|
210
267
|
"schema": {
|
|
211
268
|
"$ref": "#/components/schemas/Campaign"
|
|
269
|
+
},
|
|
270
|
+
"examples": {
|
|
271
|
+
"GetCampaign": {
|
|
272
|
+
"$ref": "#/components/examples/PutCampaign"
|
|
273
|
+
}
|
|
212
274
|
}
|
|
213
275
|
}
|
|
214
276
|
}
|
|
@@ -219,6 +281,11 @@
|
|
|
219
281
|
"application/json": {
|
|
220
282
|
"schema": {
|
|
221
283
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
284
|
+
},
|
|
285
|
+
"examples": {
|
|
286
|
+
"IdConflict400": {
|
|
287
|
+
"$ref": "#/components/examples/IdConflict400"
|
|
288
|
+
}
|
|
222
289
|
}
|
|
223
290
|
}
|
|
224
291
|
}
|
|
@@ -233,11 +300,13 @@
|
|
|
233
300
|
]
|
|
234
301
|
},
|
|
235
302
|
"delete": {
|
|
303
|
+
"summary": "Deletes a campaign with a specified ID.",
|
|
236
304
|
"operationId": "deleteCampaign",
|
|
237
305
|
"parameters": [
|
|
238
306
|
{
|
|
239
307
|
"name": "campaignId",
|
|
240
308
|
"in": "path",
|
|
309
|
+
"description": "The ID of the campaign.",
|
|
241
310
|
"required": true,
|
|
242
311
|
"style": "simple",
|
|
243
312
|
"explode": false,
|
|
@@ -253,21 +322,29 @@
|
|
|
253
322
|
{
|
|
254
323
|
"name": "organizationId",
|
|
255
324
|
"in": "path",
|
|
325
|
+
"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).",
|
|
256
326
|
"required": true,
|
|
257
327
|
"style": "simple",
|
|
258
328
|
"explode": false,
|
|
259
329
|
"schema": {
|
|
260
330
|
"$ref": "#/components/schemas/OrganizationId"
|
|
261
|
-
}
|
|
331
|
+
},
|
|
332
|
+
"example": "f_ecom_zzxy_prd"
|
|
262
333
|
},
|
|
263
334
|
{
|
|
264
335
|
"name": "siteId",
|
|
265
336
|
"in": "query",
|
|
337
|
+
"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.",
|
|
266
338
|
"required": true,
|
|
267
339
|
"style": "form",
|
|
268
340
|
"explode": true,
|
|
269
341
|
"schema": {
|
|
270
342
|
"$ref": "#/components/schemas/SiteId"
|
|
343
|
+
},
|
|
344
|
+
"examples": {
|
|
345
|
+
"SiteId": {
|
|
346
|
+
"value": "RefArch"
|
|
347
|
+
}
|
|
271
348
|
}
|
|
272
349
|
}
|
|
273
350
|
],
|
|
@@ -285,11 +362,13 @@
|
|
|
285
362
|
]
|
|
286
363
|
},
|
|
287
364
|
"patch": {
|
|
365
|
+
"summary": "Update a campaign with the specified information.",
|
|
288
366
|
"operationId": "updateCampaign",
|
|
289
367
|
"parameters": [
|
|
290
368
|
{
|
|
291
369
|
"name": "campaignId",
|
|
292
370
|
"in": "path",
|
|
371
|
+
"description": "The ID of the campaign.",
|
|
293
372
|
"required": true,
|
|
294
373
|
"style": "simple",
|
|
295
374
|
"explode": false,
|
|
@@ -305,21 +384,29 @@
|
|
|
305
384
|
{
|
|
306
385
|
"name": "organizationId",
|
|
307
386
|
"in": "path",
|
|
387
|
+
"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).",
|
|
308
388
|
"required": true,
|
|
309
389
|
"style": "simple",
|
|
310
390
|
"explode": false,
|
|
311
391
|
"schema": {
|
|
312
392
|
"$ref": "#/components/schemas/OrganizationId"
|
|
313
|
-
}
|
|
393
|
+
},
|
|
394
|
+
"example": "f_ecom_zzxy_prd"
|
|
314
395
|
},
|
|
315
396
|
{
|
|
316
397
|
"name": "siteId",
|
|
317
398
|
"in": "query",
|
|
399
|
+
"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.",
|
|
318
400
|
"required": true,
|
|
319
401
|
"style": "form",
|
|
320
402
|
"explode": true,
|
|
321
403
|
"schema": {
|
|
322
404
|
"$ref": "#/components/schemas/SiteId"
|
|
405
|
+
},
|
|
406
|
+
"examples": {
|
|
407
|
+
"SiteId": {
|
|
408
|
+
"value": "RefArch"
|
|
409
|
+
}
|
|
323
410
|
}
|
|
324
411
|
}
|
|
325
412
|
],
|
|
@@ -328,6 +415,11 @@
|
|
|
328
415
|
"application/json": {
|
|
329
416
|
"schema": {
|
|
330
417
|
"$ref": "#/components/schemas/Campaign"
|
|
418
|
+
},
|
|
419
|
+
"examples": {
|
|
420
|
+
"PatchCampaign": {
|
|
421
|
+
"$ref": "#/components/examples/PatchCampaign"
|
|
422
|
+
}
|
|
331
423
|
}
|
|
332
424
|
}
|
|
333
425
|
}
|
|
@@ -339,6 +431,11 @@
|
|
|
339
431
|
"application/json": {
|
|
340
432
|
"schema": {
|
|
341
433
|
"$ref": "#/components/schemas/Campaign"
|
|
434
|
+
},
|
|
435
|
+
"examples": {
|
|
436
|
+
"PutCampaign": {
|
|
437
|
+
"$ref": "#/components/examples/PutCampaign"
|
|
438
|
+
}
|
|
342
439
|
}
|
|
343
440
|
}
|
|
344
441
|
}
|
|
@@ -349,6 +446,11 @@
|
|
|
349
446
|
"application/json": {
|
|
350
447
|
"schema": {
|
|
351
448
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
449
|
+
},
|
|
450
|
+
"examples": {
|
|
451
|
+
"updateCampaign400": {
|
|
452
|
+
"$ref": "#/components/examples/CampaignDuplicate400"
|
|
453
|
+
}
|
|
352
454
|
}
|
|
353
455
|
}
|
|
354
456
|
}
|
|
@@ -359,6 +461,11 @@
|
|
|
359
461
|
"application/json": {
|
|
360
462
|
"schema": {
|
|
361
463
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
464
|
+
},
|
|
465
|
+
"examples": {
|
|
466
|
+
"getCampaign404": {
|
|
467
|
+
"$ref": "#/components/examples/CampaignNotFound404"
|
|
468
|
+
}
|
|
362
469
|
}
|
|
363
470
|
}
|
|
364
471
|
}
|
|
@@ -375,11 +482,13 @@
|
|
|
375
482
|
},
|
|
376
483
|
"/organizations/{organizationId}/campaigns/{campaignId}/promotions": {
|
|
377
484
|
"get": {
|
|
485
|
+
"summary": "List promotions assigned to a campaign.",
|
|
378
486
|
"operationId": "getCampaignPromotionAssignments",
|
|
379
487
|
"parameters": [
|
|
380
488
|
{
|
|
381
489
|
"name": "campaignId",
|
|
382
490
|
"in": "path",
|
|
491
|
+
"description": "The ID of the campaign.",
|
|
383
492
|
"required": true,
|
|
384
493
|
"style": "simple",
|
|
385
494
|
"explode": false,
|
|
@@ -395,21 +504,29 @@
|
|
|
395
504
|
{
|
|
396
505
|
"name": "organizationId",
|
|
397
506
|
"in": "path",
|
|
507
|
+
"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).",
|
|
398
508
|
"required": true,
|
|
399
509
|
"style": "simple",
|
|
400
510
|
"explode": false,
|
|
401
511
|
"schema": {
|
|
402
512
|
"$ref": "#/components/schemas/OrganizationId"
|
|
403
|
-
}
|
|
513
|
+
},
|
|
514
|
+
"example": "f_ecom_zzxy_prd"
|
|
404
515
|
},
|
|
405
516
|
{
|
|
406
517
|
"name": "siteId",
|
|
407
518
|
"in": "query",
|
|
519
|
+
"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.",
|
|
408
520
|
"required": true,
|
|
409
521
|
"style": "form",
|
|
410
522
|
"explode": true,
|
|
411
523
|
"schema": {
|
|
412
524
|
"$ref": "#/components/schemas/SiteId"
|
|
525
|
+
},
|
|
526
|
+
"examples": {
|
|
527
|
+
"SiteId": {
|
|
528
|
+
"value": "RefArch"
|
|
529
|
+
}
|
|
413
530
|
}
|
|
414
531
|
}
|
|
415
532
|
],
|
|
@@ -420,6 +537,11 @@
|
|
|
420
537
|
"application/json": {
|
|
421
538
|
"schema": {
|
|
422
539
|
"$ref": "#/components/schemas/PromotionCampaignAssignmentResult"
|
|
540
|
+
},
|
|
541
|
+
"examples": {
|
|
542
|
+
"GetCampaignPromotionAssignments": {
|
|
543
|
+
"$ref": "#/components/examples/GetCampaignPromotionAssignments"
|
|
544
|
+
}
|
|
423
545
|
}
|
|
424
546
|
}
|
|
425
547
|
}
|
|
@@ -446,11 +568,13 @@
|
|
|
446
568
|
},
|
|
447
569
|
"/organizations/{organizationId}/campaigns/{campaignId}/promotions/{promotionId}": {
|
|
448
570
|
"get": {
|
|
571
|
+
"summary": "Get a promotion campaign assignment.",
|
|
449
572
|
"operationId": "getCampaignPromotionAssignment",
|
|
450
573
|
"parameters": [
|
|
451
574
|
{
|
|
452
575
|
"name": "campaignId",
|
|
453
576
|
"in": "path",
|
|
577
|
+
"description": "The ID of the campaign.",
|
|
454
578
|
"required": true,
|
|
455
579
|
"style": "simple",
|
|
456
580
|
"explode": false,
|
|
@@ -466,11 +590,13 @@
|
|
|
466
590
|
{
|
|
467
591
|
"name": "promotionId",
|
|
468
592
|
"in": "path",
|
|
593
|
+
"description": "The ID of the promotion assigned to the campaign.",
|
|
469
594
|
"required": true,
|
|
470
595
|
"style": "simple",
|
|
471
596
|
"explode": false,
|
|
472
597
|
"schema": {
|
|
473
598
|
"type": "string",
|
|
599
|
+
"example": "10offsku",
|
|
474
600
|
"maxLength": 256,
|
|
475
601
|
"minLength": 1
|
|
476
602
|
}
|
|
@@ -478,21 +604,29 @@
|
|
|
478
604
|
{
|
|
479
605
|
"name": "organizationId",
|
|
480
606
|
"in": "path",
|
|
607
|
+
"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).",
|
|
481
608
|
"required": true,
|
|
482
609
|
"style": "simple",
|
|
483
610
|
"explode": false,
|
|
484
611
|
"schema": {
|
|
485
612
|
"$ref": "#/components/schemas/OrganizationId"
|
|
486
|
-
}
|
|
613
|
+
},
|
|
614
|
+
"example": "f_ecom_zzxy_prd"
|
|
487
615
|
},
|
|
488
616
|
{
|
|
489
617
|
"name": "siteId",
|
|
490
618
|
"in": "query",
|
|
619
|
+
"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.",
|
|
491
620
|
"required": true,
|
|
492
621
|
"style": "form",
|
|
493
622
|
"explode": true,
|
|
494
623
|
"schema": {
|
|
495
624
|
"$ref": "#/components/schemas/SiteId"
|
|
625
|
+
},
|
|
626
|
+
"examples": {
|
|
627
|
+
"SiteId": {
|
|
628
|
+
"value": "RefArch"
|
|
629
|
+
}
|
|
496
630
|
}
|
|
497
631
|
}
|
|
498
632
|
],
|
|
@@ -503,6 +637,11 @@
|
|
|
503
637
|
"application/json": {
|
|
504
638
|
"schema": {
|
|
505
639
|
"$ref": "#/components/schemas/PromotionCampaignAssignment"
|
|
640
|
+
},
|
|
641
|
+
"examples": {
|
|
642
|
+
"GetCampaignPromotionAssignment": {
|
|
643
|
+
"$ref": "#/components/examples/GetCampaignPromotionAssignment"
|
|
644
|
+
}
|
|
506
645
|
}
|
|
507
646
|
}
|
|
508
647
|
}
|
|
@@ -527,11 +666,13 @@
|
|
|
527
666
|
]
|
|
528
667
|
},
|
|
529
668
|
"put": {
|
|
669
|
+
"summary": "Create or replace a promotion campaign assignment.",
|
|
530
670
|
"operationId": "assignPromotionToCampaign",
|
|
531
671
|
"parameters": [
|
|
532
672
|
{
|
|
533
673
|
"name": "campaignId",
|
|
534
674
|
"in": "path",
|
|
675
|
+
"description": "The ID of the campaign.",
|
|
535
676
|
"required": true,
|
|
536
677
|
"style": "simple",
|
|
537
678
|
"explode": false,
|
|
@@ -547,11 +688,13 @@
|
|
|
547
688
|
{
|
|
548
689
|
"name": "promotionId",
|
|
549
690
|
"in": "path",
|
|
691
|
+
"description": "The ID of the promotion assigned to the campaign.",
|
|
550
692
|
"required": true,
|
|
551
693
|
"style": "simple",
|
|
552
694
|
"explode": false,
|
|
553
695
|
"schema": {
|
|
554
696
|
"type": "string",
|
|
697
|
+
"example": "10offsku",
|
|
555
698
|
"maxLength": 256,
|
|
556
699
|
"minLength": 1
|
|
557
700
|
}
|
|
@@ -559,21 +702,29 @@
|
|
|
559
702
|
{
|
|
560
703
|
"name": "organizationId",
|
|
561
704
|
"in": "path",
|
|
705
|
+
"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).",
|
|
562
706
|
"required": true,
|
|
563
707
|
"style": "simple",
|
|
564
708
|
"explode": false,
|
|
565
709
|
"schema": {
|
|
566
710
|
"$ref": "#/components/schemas/OrganizationId"
|
|
567
|
-
}
|
|
711
|
+
},
|
|
712
|
+
"example": "f_ecom_zzxy_prd"
|
|
568
713
|
},
|
|
569
714
|
{
|
|
570
715
|
"name": "siteId",
|
|
571
716
|
"in": "query",
|
|
717
|
+
"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.",
|
|
572
718
|
"required": true,
|
|
573
719
|
"style": "form",
|
|
574
720
|
"explode": true,
|
|
575
721
|
"schema": {
|
|
576
722
|
"$ref": "#/components/schemas/SiteId"
|
|
723
|
+
},
|
|
724
|
+
"examples": {
|
|
725
|
+
"SiteId": {
|
|
726
|
+
"value": "RefArch"
|
|
727
|
+
}
|
|
577
728
|
}
|
|
578
729
|
}
|
|
579
730
|
],
|
|
@@ -582,6 +733,11 @@
|
|
|
582
733
|
"application/json": {
|
|
583
734
|
"schema": {
|
|
584
735
|
"$ref": "#/components/schemas/PromotionCampaignAssignmentRequest"
|
|
736
|
+
},
|
|
737
|
+
"examples": {
|
|
738
|
+
"AssignPromotionToCampaign": {
|
|
739
|
+
"$ref": "#/components/examples/AssignPromotionToCampaign"
|
|
740
|
+
}
|
|
585
741
|
}
|
|
586
742
|
}
|
|
587
743
|
},
|
|
@@ -594,6 +750,11 @@
|
|
|
594
750
|
"application/json": {
|
|
595
751
|
"schema": {
|
|
596
752
|
"$ref": "#/components/schemas/PromotionCampaignAssignment"
|
|
753
|
+
},
|
|
754
|
+
"examples": {
|
|
755
|
+
"AssignPromotionToCampaign": {
|
|
756
|
+
"$ref": "#/components/examples/GetCampaignPromotionAssignment"
|
|
757
|
+
}
|
|
597
758
|
}
|
|
598
759
|
}
|
|
599
760
|
}
|
|
@@ -604,6 +765,11 @@
|
|
|
604
765
|
"application/json": {
|
|
605
766
|
"schema": {
|
|
606
767
|
"$ref": "#/components/schemas/PromotionCampaignAssignment"
|
|
768
|
+
},
|
|
769
|
+
"examples": {
|
|
770
|
+
"AssignPromotionToCampaign": {
|
|
771
|
+
"$ref": "#/components/examples/GetCampaignPromotionAssignment"
|
|
772
|
+
}
|
|
607
773
|
}
|
|
608
774
|
}
|
|
609
775
|
}
|
|
@@ -630,11 +796,13 @@
|
|
|
630
796
|
]
|
|
631
797
|
},
|
|
632
798
|
"delete": {
|
|
799
|
+
"summary": "Unassign a promotion from a campaign.",
|
|
633
800
|
"operationId": "unassignPromotionFromCampaign",
|
|
634
801
|
"parameters": [
|
|
635
802
|
{
|
|
636
803
|
"name": "campaignId",
|
|
637
804
|
"in": "path",
|
|
805
|
+
"description": "The ID of the campaign.",
|
|
638
806
|
"required": true,
|
|
639
807
|
"style": "simple",
|
|
640
808
|
"explode": false,
|
|
@@ -650,11 +818,13 @@
|
|
|
650
818
|
{
|
|
651
819
|
"name": "promotionId",
|
|
652
820
|
"in": "path",
|
|
821
|
+
"description": "The ID of the promotion assigned to the campaign.",
|
|
653
822
|
"required": true,
|
|
654
823
|
"style": "simple",
|
|
655
824
|
"explode": false,
|
|
656
825
|
"schema": {
|
|
657
826
|
"type": "string",
|
|
827
|
+
"example": "10offsku",
|
|
658
828
|
"maxLength": 256,
|
|
659
829
|
"minLength": 1
|
|
660
830
|
}
|
|
@@ -662,21 +832,29 @@
|
|
|
662
832
|
{
|
|
663
833
|
"name": "organizationId",
|
|
664
834
|
"in": "path",
|
|
835
|
+
"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).",
|
|
665
836
|
"required": true,
|
|
666
837
|
"style": "simple",
|
|
667
838
|
"explode": false,
|
|
668
839
|
"schema": {
|
|
669
840
|
"$ref": "#/components/schemas/OrganizationId"
|
|
670
|
-
}
|
|
841
|
+
},
|
|
842
|
+
"example": "f_ecom_zzxy_prd"
|
|
671
843
|
},
|
|
672
844
|
{
|
|
673
845
|
"name": "siteId",
|
|
674
846
|
"in": "query",
|
|
847
|
+
"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.",
|
|
675
848
|
"required": true,
|
|
676
849
|
"style": "form",
|
|
677
850
|
"explode": true,
|
|
678
851
|
"schema": {
|
|
679
852
|
"$ref": "#/components/schemas/SiteId"
|
|
853
|
+
},
|
|
854
|
+
"examples": {
|
|
855
|
+
"SiteId": {
|
|
856
|
+
"value": "RefArch"
|
|
857
|
+
}
|
|
680
858
|
}
|
|
681
859
|
}
|
|
682
860
|
],
|
|
@@ -703,11 +881,13 @@
|
|
|
703
881
|
]
|
|
704
882
|
},
|
|
705
883
|
"patch": {
|
|
884
|
+
"summary": "Update a promotion campaign assignment.",
|
|
706
885
|
"operationId": "updateCampaignPromotionAssignment",
|
|
707
886
|
"parameters": [
|
|
708
887
|
{
|
|
709
888
|
"name": "campaignId",
|
|
710
889
|
"in": "path",
|
|
890
|
+
"description": "The ID of the campaign.",
|
|
711
891
|
"required": true,
|
|
712
892
|
"style": "simple",
|
|
713
893
|
"explode": false,
|
|
@@ -723,11 +903,13 @@
|
|
|
723
903
|
{
|
|
724
904
|
"name": "promotionId",
|
|
725
905
|
"in": "path",
|
|
906
|
+
"description": "The ID of the promotion assigned to the campaign.",
|
|
726
907
|
"required": true,
|
|
727
908
|
"style": "simple",
|
|
728
909
|
"explode": false,
|
|
729
910
|
"schema": {
|
|
730
911
|
"type": "string",
|
|
912
|
+
"example": "10offsku",
|
|
731
913
|
"maxLength": 256,
|
|
732
914
|
"minLength": 1
|
|
733
915
|
}
|
|
@@ -735,21 +917,29 @@
|
|
|
735
917
|
{
|
|
736
918
|
"name": "organizationId",
|
|
737
919
|
"in": "path",
|
|
920
|
+
"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).",
|
|
738
921
|
"required": true,
|
|
739
922
|
"style": "simple",
|
|
740
923
|
"explode": false,
|
|
741
924
|
"schema": {
|
|
742
925
|
"$ref": "#/components/schemas/OrganizationId"
|
|
743
|
-
}
|
|
926
|
+
},
|
|
927
|
+
"example": "f_ecom_zzxy_prd"
|
|
744
928
|
},
|
|
745
929
|
{
|
|
746
930
|
"name": "siteId",
|
|
747
931
|
"in": "query",
|
|
932
|
+
"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.",
|
|
748
933
|
"required": true,
|
|
749
934
|
"style": "form",
|
|
750
935
|
"explode": true,
|
|
751
936
|
"schema": {
|
|
752
937
|
"$ref": "#/components/schemas/SiteId"
|
|
938
|
+
},
|
|
939
|
+
"examples": {
|
|
940
|
+
"SiteId": {
|
|
941
|
+
"value": "RefArch"
|
|
942
|
+
}
|
|
753
943
|
}
|
|
754
944
|
}
|
|
755
945
|
],
|
|
@@ -758,6 +948,11 @@
|
|
|
758
948
|
"application/json": {
|
|
759
949
|
"schema": {
|
|
760
950
|
"$ref": "#/components/schemas/PromotionCampaignAssignmentUpdate"
|
|
951
|
+
},
|
|
952
|
+
"examples": {
|
|
953
|
+
"UpdateCampaignPromotionAssignment": {
|
|
954
|
+
"$ref": "#/components/examples/UpdateCampaignPromotionAssignment"
|
|
955
|
+
}
|
|
761
956
|
}
|
|
762
957
|
}
|
|
763
958
|
},
|
|
@@ -770,6 +965,11 @@
|
|
|
770
965
|
"application/json": {
|
|
771
966
|
"schema": {
|
|
772
967
|
"$ref": "#/components/schemas/PromotionCampaignAssignment"
|
|
968
|
+
},
|
|
969
|
+
"examples": {
|
|
970
|
+
"UpdateCampaignPromotionAssignment": {
|
|
971
|
+
"$ref": "#/components/examples/GetCampaignPromotionAssignment"
|
|
972
|
+
}
|
|
773
973
|
}
|
|
774
974
|
}
|
|
775
975
|
}
|
|
@@ -801,16 +1001,42 @@
|
|
|
801
1001
|
"schemas": {
|
|
802
1002
|
"OrganizationId": {
|
|
803
1003
|
"type": "string",
|
|
1004
|
+
"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).",
|
|
1005
|
+
"example": "f_ecom_zzxy_prd",
|
|
804
1006
|
"pattern": "^f_ecom_[a-z]{4}_(prd|stg|dev|s[0-9]{2}|[0-9]{3})$"
|
|
805
1007
|
},
|
|
806
1008
|
"SiteId": {
|
|
807
1009
|
"type": "string",
|
|
1010
|
+
"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",
|
|
1011
|
+
"example": "RefArch",
|
|
808
1012
|
"maxLength": 32,
|
|
809
1013
|
"minLength": 1
|
|
810
1014
|
},
|
|
811
1015
|
"Query": {
|
|
812
1016
|
"type": "object",
|
|
813
1017
|
"additionalProperties": false,
|
|
1018
|
+
"description": "A set of objects that define criteria used to select records. A query can contain one of the following:\n* `MatchAllQuery`\n - Matches all documents.\n* `TermQuery`\n - Matches one or more documents against one or more document fields.\n* `TextQuery`\n - Matches text against one or more fields.\n* `BoolQuery`\n - Allows construction of a logical expression of multiple queries.\n* `FilteredQuery`\n - Allows a filter to be applied to a query.\n* `NestedQuery`\n - Allows you to query on nested documents.\n - _Only supported by some Commerce APIs. For more details, see the endpoint descriptions in the API documentation._",
|
|
1019
|
+
"example": {
|
|
1020
|
+
"filteredQuery": {
|
|
1021
|
+
"query": {
|
|
1022
|
+
"textQuery": {
|
|
1023
|
+
"fields": [
|
|
1024
|
+
"couponId"
|
|
1025
|
+
],
|
|
1026
|
+
"searchPhrase": "disabled"
|
|
1027
|
+
}
|
|
1028
|
+
},
|
|
1029
|
+
"filter": {
|
|
1030
|
+
"termFilter": {
|
|
1031
|
+
"field": "enabled",
|
|
1032
|
+
"operator": "is",
|
|
1033
|
+
"values": [
|
|
1034
|
+
false
|
|
1035
|
+
]
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
},
|
|
814
1040
|
"maxProperties": 1,
|
|
815
1041
|
"minProperties": 1,
|
|
816
1042
|
"properties": {
|
|
@@ -837,21 +1063,58 @@
|
|
|
837
1063
|
"BoolQuery": {
|
|
838
1064
|
"type": "object",
|
|
839
1065
|
"additionalProperties": false,
|
|
1066
|
+
"description": "A boolean query allows construction of full logical expression trees that are composed of other queries (usually term queries and text queries). A boolean query has three sets of clauses:\n \n - `must`, which combines as an `AND` operator.\n - `should`, which combines as an `OR` operator.\n - `must_not`, which combines as a `NOT` operator.\n \nIf `must`, `mustNot`, or `should` appear in the same boolean query, they are combined logically using the `AND` operator. For example:\n\n (must-1 AND must-1 AND ...)\n AND (should-1 OR should-2 OR ...)\n AND NOT (must_not-1 OR must_not-2 OR ...)\n",
|
|
1067
|
+
"example": {
|
|
1068
|
+
"must": [
|
|
1069
|
+
{
|
|
1070
|
+
"textQuery": {
|
|
1071
|
+
"fields": [
|
|
1072
|
+
"couponId"
|
|
1073
|
+
],
|
|
1074
|
+
"searchPhrase": "DEAL"
|
|
1075
|
+
}
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
"textQuery": {
|
|
1079
|
+
"fields": [
|
|
1080
|
+
"description"
|
|
1081
|
+
],
|
|
1082
|
+
"searchPhrase": "Big bargain deal"
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
],
|
|
1086
|
+
"mustNot": [
|
|
1087
|
+
{
|
|
1088
|
+
"termQuery": {
|
|
1089
|
+
"fields": [
|
|
1090
|
+
"enabled"
|
|
1091
|
+
],
|
|
1092
|
+
"operator": "is",
|
|
1093
|
+
"values": [
|
|
1094
|
+
false
|
|
1095
|
+
]
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
]
|
|
1099
|
+
},
|
|
840
1100
|
"properties": {
|
|
841
1101
|
"must": {
|
|
842
1102
|
"type": "array",
|
|
1103
|
+
"description": "List of queries to be evaluated as an `AND` operator.",
|
|
843
1104
|
"items": {
|
|
844
1105
|
"$ref": "#/components/schemas/Query"
|
|
845
1106
|
}
|
|
846
1107
|
},
|
|
847
1108
|
"mustNot": {
|
|
848
1109
|
"type": "array",
|
|
1110
|
+
"description": "List of queries to be evaluated as a `NOT` operator.",
|
|
849
1111
|
"items": {
|
|
850
1112
|
"$ref": "#/components/schemas/Query"
|
|
851
1113
|
}
|
|
852
1114
|
},
|
|
853
1115
|
"should": {
|
|
854
1116
|
"type": "array",
|
|
1117
|
+
"description": "List of queries to be evaluated as an `OR` operator.",
|
|
855
1118
|
"items": {
|
|
856
1119
|
"$ref": "#/components/schemas/Query"
|
|
857
1120
|
}
|
|
@@ -861,6 +1124,7 @@
|
|
|
861
1124
|
"Filter": {
|
|
862
1125
|
"type": "object",
|
|
863
1126
|
"additionalProperties": false,
|
|
1127
|
+
"description": "Contains a set of objects that define criteria used to select records. A filter can contain one of the following:\n * `TermFilter`\n - Matches records where a field (or fields) exactly matches some simple value (including `null`).\n * `RangeFilter`\n - Matches records where a field value lies within a specified range.\n * `Range2Filter`\n - Matches records in a specified range across fields.\n * `QueryFilter`\n - Matches records based on a query.\n * `BoolFilter`\n - Provides filtering of records using a set of filters combined using a logical operator.",
|
|
864
1128
|
"maxProperties": 1,
|
|
865
1129
|
"minProperties": 1,
|
|
866
1130
|
"properties": {
|
|
@@ -884,20 +1148,47 @@
|
|
|
884
1148
|
"BoolFilter": {
|
|
885
1149
|
"type": "object",
|
|
886
1150
|
"additionalProperties": false,
|
|
1151
|
+
"description": "Allows you to combine other filters into (possibly recursive) logical expression trees. A boolean filter is composed of a logical operator (`AND`, `OR`, `NOT`) and a list of filters that the operator relates to. Multiple filters can be negated with a single `NOT` operator, even when the filters are combined with the `AND` operator.",
|
|
1152
|
+
"example": {
|
|
1153
|
+
"operator": "and",
|
|
1154
|
+
"filters": [
|
|
1155
|
+
{
|
|
1156
|
+
"termFilter": {
|
|
1157
|
+
"field": "id",
|
|
1158
|
+
"operator": "is",
|
|
1159
|
+
"values": [
|
|
1160
|
+
"myId"
|
|
1161
|
+
]
|
|
1162
|
+
}
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
"termFilter": {
|
|
1166
|
+
"field": "couponId",
|
|
1167
|
+
"operator": "is",
|
|
1168
|
+
"values": [
|
|
1169
|
+
"couponOne"
|
|
1170
|
+
]
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
]
|
|
1174
|
+
},
|
|
887
1175
|
"properties": {
|
|
888
1176
|
"filters": {
|
|
889
1177
|
"type": "array",
|
|
1178
|
+
"description": "A list of filters that are logically combined by an operator.",
|
|
890
1179
|
"items": {
|
|
891
1180
|
"$ref": "#/components/schemas/Filter"
|
|
892
1181
|
}
|
|
893
1182
|
},
|
|
894
1183
|
"operator": {
|
|
895
1184
|
"type": "string",
|
|
1185
|
+
"description": "The logical operator that is used to combine the filters.",
|
|
896
1186
|
"enum": [
|
|
897
1187
|
"and",
|
|
898
1188
|
"or",
|
|
899
1189
|
"not"
|
|
900
|
-
]
|
|
1190
|
+
],
|
|
1191
|
+
"example": "and"
|
|
901
1192
|
}
|
|
902
1193
|
},
|
|
903
1194
|
"required": [
|
|
@@ -906,6 +1197,7 @@
|
|
|
906
1197
|
},
|
|
907
1198
|
"QueryFilter": {
|
|
908
1199
|
"type": "object",
|
|
1200
|
+
"description": "Wraps any query and allows it to be used as a filter.",
|
|
909
1201
|
"properties": {
|
|
910
1202
|
"query": {
|
|
911
1203
|
"$ref": "#/components/schemas/Query"
|
|
@@ -917,45 +1209,71 @@
|
|
|
917
1209
|
},
|
|
918
1210
|
"Field": {
|
|
919
1211
|
"type": "string",
|
|
1212
|
+
"description": "Name of the field. Might be a custom field name prefixed with c_.",
|
|
1213
|
+
"example": "couponId",
|
|
920
1214
|
"maxLength": 260
|
|
921
1215
|
},
|
|
922
1216
|
"Range2Filter": {
|
|
923
1217
|
"type": "object",
|
|
924
1218
|
"additionalProperties": false,
|
|
1219
|
+
"description": "Allows you to restrict a search result to hits where a range defined by specified attributes has a certain relationship to a specified range.\n\nThe first range (R1) is defined by a pair of attributes (`fromField` and `toField`) that specify the extent of a range, such as attributes `validFrom` and `validTo`.\n\nThe second range (R2) is defined by `fromValue` and `toValue`.\n\nThe filter mode specifies the method used to compare the two ranges:\n\n* `overlap`: R1 overlaps fully or partially with R2.\n* `containing`: R1 contains R2.\n* `contained`: R1 is contained in R2.\n\nThe range filter supports several value types, and relies on the natural sorting of the value type for range interpretation. Value ranges can be open-ended, but only at one end of the range. You can configure whether the lower bounds and upper bounds are inclusive or exclusive.\n\nA range 2 filter is useful for general restrictions that can be shared between searches (like a static date range) because the filter result is cached in memory. Range filters are not appropriate if the range is expected to be different for every query (for example, if the user controls the date range down to the hour via a UI control). Range filters are inclusive by default.",
|
|
1220
|
+
"example": {
|
|
1221
|
+
"fromField": "validFrom",
|
|
1222
|
+
"toField": "validTo",
|
|
1223
|
+
"filterMode": "overlap",
|
|
1224
|
+
"fromValue": "2007-01-01T00:00:00.000Z",
|
|
1225
|
+
"toValue": "2017-01-01T00:00:00.000Z"
|
|
1226
|
+
},
|
|
925
1227
|
"properties": {
|
|
926
1228
|
"filterMode": {
|
|
927
1229
|
"type": "string",
|
|
928
1230
|
"default": "overlap",
|
|
1231
|
+
"description": "Compare mode: overlap, containing, or contained.",
|
|
929
1232
|
"enum": [
|
|
930
1233
|
"overlap",
|
|
931
1234
|
"containing",
|
|
932
1235
|
"contained"
|
|
933
|
-
]
|
|
1236
|
+
],
|
|
1237
|
+
"example": "overlap"
|
|
934
1238
|
},
|
|
935
1239
|
"fromField": {
|
|
936
1240
|
"allOf": [
|
|
937
1241
|
{
|
|
938
1242
|
"$ref": "#/components/schemas/Field"
|
|
939
1243
|
}
|
|
940
|
-
]
|
|
1244
|
+
],
|
|
1245
|
+
"description": "The field name of the field that starts the first range.",
|
|
1246
|
+
"example": "validFrom"
|
|
941
1247
|
},
|
|
942
1248
|
"fromInclusive": {
|
|
943
1249
|
"type": "boolean",
|
|
944
|
-
"default": true
|
|
1250
|
+
"default": true,
|
|
1251
|
+
"description": "A flag indicating if the lower bound of the second range is inclusive. To make the lower bound exclusive, set to `false`.",
|
|
1252
|
+
"example": true
|
|
1253
|
+
},
|
|
1254
|
+
"fromValue": {
|
|
1255
|
+
"description": "The lower bound of the second range. If not specified, the range is open-ended with respect to the lower bound. You can't leave both the lower and upper bounds open-ended.",
|
|
1256
|
+
"example": "2007-01-01T00:00:00.000Z"
|
|
945
1257
|
},
|
|
946
|
-
"fromValue": {},
|
|
947
1258
|
"toField": {
|
|
948
1259
|
"allOf": [
|
|
949
1260
|
{
|
|
950
1261
|
"$ref": "#/components/schemas/Field"
|
|
951
1262
|
}
|
|
952
|
-
]
|
|
1263
|
+
],
|
|
1264
|
+
"description": "The field name of the field that ends the first range.",
|
|
1265
|
+
"example": "validTo"
|
|
953
1266
|
},
|
|
954
1267
|
"toInclusive": {
|
|
955
1268
|
"type": "boolean",
|
|
956
|
-
"default": true
|
|
1269
|
+
"default": true,
|
|
1270
|
+
"description": "A flag indicating if the upper bound of the second range is inclusive. To make the lower bound exclusive, set to `false`.",
|
|
1271
|
+
"example": true
|
|
957
1272
|
},
|
|
958
|
-
"toValue": {
|
|
1273
|
+
"toValue": {
|
|
1274
|
+
"description": "The upper bound of the second range. If not specified, the range is open-ended with respect to the upper bound. You can't leave both the upper and lower bounds open-ended.",
|
|
1275
|
+
"example": "2017-01-01T00:00:00.000Z"
|
|
1276
|
+
}
|
|
959
1277
|
},
|
|
960
1278
|
"required": [
|
|
961
1279
|
"fromField",
|
|
@@ -964,49 +1282,64 @@
|
|
|
964
1282
|
},
|
|
965
1283
|
"RangeFilter": {
|
|
966
1284
|
"type": "object",
|
|
1285
|
+
"description": "Allows you to restrict a search result to hits that have values for a given attribute that fall within a given value range. The range filter supports several value types and relies on the natural sorting of the value type for range interpretation. Value ranges can be open-ended, but only at one end of the range. You can configure whether the lower bounds and upper bounds are inclusive or exclusive.\n\nA range filter is useful for general restrictions that can be shared between searches (like a static date range) because the filter result is cached in memory. Range filters are not appropriate if the range is expected to be different for every query (for example, if the user controls the date range down to the hour via a UI control). Range filters are inclusive by default.",
|
|
967
1286
|
"properties": {
|
|
968
1287
|
"field": {
|
|
969
1288
|
"allOf": [
|
|
970
1289
|
{
|
|
971
1290
|
"$ref": "#/components/schemas/Field"
|
|
972
1291
|
}
|
|
973
|
-
]
|
|
1292
|
+
],
|
|
1293
|
+
"description": "The search field.",
|
|
1294
|
+
"example": "validFrom"
|
|
974
1295
|
},
|
|
975
1296
|
"from": {
|
|
1297
|
+
"description": "The lower bound of the filter range. If not specified, the range is open-ended with respect to the lower bound. You can't leave both the lower and upper bounds open-ended.",
|
|
976
1298
|
"oneOf": [
|
|
977
1299
|
{
|
|
978
1300
|
"type": "string",
|
|
979
|
-
"format": "date-time"
|
|
1301
|
+
"format": "date-time",
|
|
1302
|
+
"example": "2007-01-01T00:00:00Z"
|
|
980
1303
|
},
|
|
981
1304
|
{
|
|
982
|
-
"type": "integer"
|
|
1305
|
+
"type": "integer",
|
|
1306
|
+
"example": 1
|
|
983
1307
|
},
|
|
984
1308
|
{
|
|
985
|
-
"type": "number"
|
|
1309
|
+
"type": "number",
|
|
1310
|
+
"example": 1
|
|
986
1311
|
}
|
|
987
1312
|
]
|
|
988
1313
|
},
|
|
989
1314
|
"fromInclusive": {
|
|
990
1315
|
"type": "boolean",
|
|
991
|
-
"default": true
|
|
1316
|
+
"default": true,
|
|
1317
|
+
"description": "A flag indicating if the lower bound of the range is inclusive. To make the lower bound exclusive, set to `false`.",
|
|
1318
|
+
"example": true
|
|
992
1319
|
},
|
|
993
1320
|
"to": {
|
|
1321
|
+
"description": "The upper bound of the filter range. If not specified, the range is open-ended with respect to the upper bound. You can't leave both the upper and lower bounds open-ended.",
|
|
994
1322
|
"oneOf": [
|
|
995
1323
|
{
|
|
996
1324
|
"type": "string",
|
|
997
|
-
"format": "date-time"
|
|
1325
|
+
"format": "date-time",
|
|
1326
|
+
"example": "2007-01-02T00:00:00Z"
|
|
998
1327
|
},
|
|
999
1328
|
{
|
|
1000
|
-
"type": "integer"
|
|
1329
|
+
"type": "integer",
|
|
1330
|
+
"example": 2
|
|
1001
1331
|
},
|
|
1002
1332
|
{
|
|
1003
|
-
"type": "number"
|
|
1333
|
+
"type": "number",
|
|
1334
|
+
"example": 2
|
|
1004
1335
|
}
|
|
1005
1336
|
]
|
|
1006
1337
|
},
|
|
1007
1338
|
"toInclusive": {
|
|
1008
1339
|
"type": "boolean",
|
|
1009
|
-
"default": true
|
|
1340
|
+
"default": true,
|
|
1341
|
+
"description": "A flag indicating if the upper bound of the range is inclusive. To make the upper bound exclusive, set to `false`.",
|
|
1342
|
+
"example": true
|
|
1010
1343
|
}
|
|
1011
1344
|
},
|
|
1012
1345
|
"required": [
|
|
@@ -1016,16 +1349,26 @@
|
|
|
1016
1349
|
"TermFilter": {
|
|
1017
1350
|
"type": "object",
|
|
1018
1351
|
"additionalProperties": false,
|
|
1352
|
+
"description": "Allows you to restrict a search result to hits that match exactly one of the values configured for the filter. A term filter is useful for general restrictions that can be shared between searches. Use term filters whenever the criteria you filter on is a shared property of multiple searches (for example, like filtering by an order status). Use term filters for fields that have a discrete and small set of values only.",
|
|
1353
|
+
"example": {
|
|
1354
|
+
"field": "id",
|
|
1355
|
+
"operator": "is",
|
|
1356
|
+
"values": [
|
|
1357
|
+
"myId"
|
|
1358
|
+
]
|
|
1359
|
+
},
|
|
1019
1360
|
"properties": {
|
|
1020
1361
|
"field": {
|
|
1021
1362
|
"allOf": [
|
|
1022
1363
|
{
|
|
1023
1364
|
"$ref": "#/components/schemas/Field"
|
|
1024
1365
|
}
|
|
1025
|
-
]
|
|
1366
|
+
],
|
|
1367
|
+
"description": "The filter field."
|
|
1026
1368
|
},
|
|
1027
1369
|
"operator": {
|
|
1028
1370
|
"type": "string",
|
|
1371
|
+
"description": "The operator used to compare the field's values with the given values.",
|
|
1029
1372
|
"enum": [
|
|
1030
1373
|
"is",
|
|
1031
1374
|
"one_of",
|
|
@@ -1035,12 +1378,15 @@
|
|
|
1035
1378
|
"greater",
|
|
1036
1379
|
"not_in",
|
|
1037
1380
|
"neq"
|
|
1038
|
-
]
|
|
1381
|
+
],
|
|
1382
|
+
"example": "is"
|
|
1039
1383
|
},
|
|
1040
1384
|
"values": {
|
|
1041
1385
|
"type": "array",
|
|
1386
|
+
"description": "The filter values.",
|
|
1042
1387
|
"items": {
|
|
1043
|
-
"type": "string"
|
|
1388
|
+
"type": "string",
|
|
1389
|
+
"example": "myId"
|
|
1044
1390
|
}
|
|
1045
1391
|
}
|
|
1046
1392
|
},
|
|
@@ -1052,6 +1398,26 @@
|
|
|
1052
1398
|
"FilteredQuery": {
|
|
1053
1399
|
"type": "object",
|
|
1054
1400
|
"additionalProperties": false,
|
|
1401
|
+
"description": "Allows to filter the result of a possibly complex query using a possibly complex filter.",
|
|
1402
|
+
"example": {
|
|
1403
|
+
"query": {
|
|
1404
|
+
"textQuery": {
|
|
1405
|
+
"fields": [
|
|
1406
|
+
"couponId"
|
|
1407
|
+
],
|
|
1408
|
+
"searchPhrase": "disabled"
|
|
1409
|
+
}
|
|
1410
|
+
},
|
|
1411
|
+
"filter": {
|
|
1412
|
+
"termFilter": {
|
|
1413
|
+
"field": "enabled",
|
|
1414
|
+
"operator": "is",
|
|
1415
|
+
"values": [
|
|
1416
|
+
false
|
|
1417
|
+
]
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
},
|
|
1055
1421
|
"properties": {
|
|
1056
1422
|
"filter": {
|
|
1057
1423
|
"$ref": "#/components/schemas/Filter"
|
|
@@ -1066,14 +1432,62 @@
|
|
|
1066
1432
|
]
|
|
1067
1433
|
},
|
|
1068
1434
|
"MatchAllQuery": {
|
|
1069
|
-
"type": "object"
|
|
1435
|
+
"type": "object",
|
|
1436
|
+
"description": "Matches all documents (namespace and document type). This query comes in handy if you just want to filter a search result or really do not have any constraints."
|
|
1070
1437
|
},
|
|
1071
1438
|
"NestedQuery": {
|
|
1072
1439
|
"type": "object",
|
|
1073
1440
|
"additionalProperties": false,
|
|
1441
|
+
"description": "Allows you to query nested documents that are part of a larger document. Say, for example, that you have a main product with variations in one big document, and you want to constrain a search to main products that have variations that match multiple constraints. \n\nA `NestedQuery` is only supported by some Commerce APIs. For more details, see the endpoint descriptions in the API documentation.\n",
|
|
1442
|
+
"example": {
|
|
1443
|
+
"path": "order.shippingAddresses",
|
|
1444
|
+
"query": {
|
|
1445
|
+
"boolQuery": {
|
|
1446
|
+
"must": [
|
|
1447
|
+
{
|
|
1448
|
+
"boolQuery": {
|
|
1449
|
+
"must": [
|
|
1450
|
+
{
|
|
1451
|
+
"termQuery": {
|
|
1452
|
+
"fields": [
|
|
1453
|
+
"order.shippingAddresses.firstName"
|
|
1454
|
+
],
|
|
1455
|
+
"operator": "is",
|
|
1456
|
+
"values": [
|
|
1457
|
+
"John"
|
|
1458
|
+
]
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
]
|
|
1462
|
+
}
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
"boolQuery": {
|
|
1466
|
+
"must": [
|
|
1467
|
+
{
|
|
1468
|
+
"termQuery": {
|
|
1469
|
+
"fields": [
|
|
1470
|
+
"order.shippingAddresses.lastName"
|
|
1471
|
+
],
|
|
1472
|
+
"operator": "is",
|
|
1473
|
+
"values": [
|
|
1474
|
+
"Doe"
|
|
1475
|
+
]
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
]
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
]
|
|
1482
|
+
}
|
|
1483
|
+
},
|
|
1484
|
+
"scoreMode": "avg"
|
|
1485
|
+
},
|
|
1074
1486
|
"properties": {
|
|
1075
1487
|
"path": {
|
|
1076
1488
|
"type": "string",
|
|
1489
|
+
"description": "The path to the nested document.",
|
|
1490
|
+
"example": "order.shippingAddresses",
|
|
1077
1491
|
"maxLength": 2048
|
|
1078
1492
|
},
|
|
1079
1493
|
"query": {
|
|
@@ -1081,12 +1495,14 @@
|
|
|
1081
1495
|
},
|
|
1082
1496
|
"scoreMode": {
|
|
1083
1497
|
"type": "string",
|
|
1498
|
+
"description": "Indicates how scores for matching child objects affect the root parent document’s relevance score.",
|
|
1084
1499
|
"enum": [
|
|
1085
1500
|
"avg",
|
|
1086
1501
|
"total",
|
|
1087
1502
|
"max",
|
|
1088
1503
|
"none"
|
|
1089
|
-
]
|
|
1504
|
+
],
|
|
1505
|
+
"example": "avg"
|
|
1090
1506
|
}
|
|
1091
1507
|
},
|
|
1092
1508
|
"required": [
|
|
@@ -1096,9 +1512,11 @@
|
|
|
1096
1512
|
},
|
|
1097
1513
|
"TermQuery": {
|
|
1098
1514
|
"type": "object",
|
|
1515
|
+
"description": "A term query matches one or more values against one or more document fields. A document is considered a hit if one of the values matches exactly with at least one of the given fields. The operator `is` can only take one value, while `one_of` can take multiple values. If multiple fields are specified, they are combined using a logical `OR` operator.\n\n**Limitations:**\n\n* The `greater` and `less` operators are not supported under certain conditions. Both operators are permitted unless the API documentation states otherwise.\n* A subset of Commerce APIs handle queries with multiple fields differently. If the query has multiple fields, the query is internally handled as a logical `OR` of `DisjointMaxQueries` (with the dismax matching a value against all fields). The dismax makes sure that a document carrying a single term in multiple fields does not get higher scores than a document matching multiple terms in multiple fields.",
|
|
1099
1516
|
"properties": {
|
|
1100
1517
|
"fields": {
|
|
1101
1518
|
"type": "array",
|
|
1519
|
+
"description": "The document fields that the values are matched against, combined with the operator.",
|
|
1102
1520
|
"items": {
|
|
1103
1521
|
"$ref": "#/components/schemas/Field"
|
|
1104
1522
|
},
|
|
@@ -1106,6 +1524,7 @@
|
|
|
1106
1524
|
},
|
|
1107
1525
|
"operator": {
|
|
1108
1526
|
"type": "string",
|
|
1527
|
+
"description": "Returns the operator to use for the term query.",
|
|
1109
1528
|
"enum": [
|
|
1110
1529
|
"is",
|
|
1111
1530
|
"one_of",
|
|
@@ -1115,23 +1534,30 @@
|
|
|
1115
1534
|
"greater",
|
|
1116
1535
|
"not_in",
|
|
1117
1536
|
"neq"
|
|
1118
|
-
]
|
|
1537
|
+
],
|
|
1538
|
+
"example": "is"
|
|
1119
1539
|
},
|
|
1120
1540
|
"values": {
|
|
1121
1541
|
"type": "array",
|
|
1542
|
+
"description": "The values that the fields are compared against, combined with the operator.",
|
|
1122
1543
|
"items": {
|
|
1544
|
+
"example": "myCouponId",
|
|
1123
1545
|
"oneOf": [
|
|
1124
1546
|
{
|
|
1125
|
-
"type": "string"
|
|
1547
|
+
"type": "string",
|
|
1548
|
+
"example": "myCouponId"
|
|
1126
1549
|
},
|
|
1127
1550
|
{
|
|
1128
|
-
"type": "number"
|
|
1551
|
+
"type": "number",
|
|
1552
|
+
"example": 1
|
|
1129
1553
|
},
|
|
1130
1554
|
{
|
|
1131
|
-
"type": "boolean"
|
|
1555
|
+
"type": "boolean",
|
|
1556
|
+
"example": true
|
|
1132
1557
|
},
|
|
1133
1558
|
{
|
|
1134
|
-
"type": "integer"
|
|
1559
|
+
"type": "integer",
|
|
1560
|
+
"example": 1
|
|
1135
1561
|
}
|
|
1136
1562
|
]
|
|
1137
1563
|
}
|
|
@@ -1145,16 +1571,26 @@
|
|
|
1145
1571
|
"TextQuery": {
|
|
1146
1572
|
"type": "object",
|
|
1147
1573
|
"additionalProperties": false,
|
|
1574
|
+
"description": "A text query is used to match some text (for example, a search phrase possibly consisting of multiple terms) against one or more fields. When multiple fields are provided, the phrase conceptually forms a logical `OR` over the fields. In this case, the terms of the phrase basically have to match within the text, that would result in concatenating all given fields.",
|
|
1575
|
+
"example": {
|
|
1576
|
+
"fields": [
|
|
1577
|
+
"couponId"
|
|
1578
|
+
],
|
|
1579
|
+
"searchPhrase": "limit"
|
|
1580
|
+
},
|
|
1148
1581
|
"properties": {
|
|
1149
1582
|
"fields": {
|
|
1150
1583
|
"type": "array",
|
|
1584
|
+
"description": "The document fields that the search phrase matches against.",
|
|
1151
1585
|
"items": {
|
|
1152
1586
|
"$ref": "#/components/schemas/Field"
|
|
1153
1587
|
},
|
|
1154
1588
|
"minItems": 1
|
|
1155
1589
|
},
|
|
1156
1590
|
"searchPhrase": {
|
|
1157
|
-
"type": "string"
|
|
1591
|
+
"type": "string",
|
|
1592
|
+
"description": "A search phrase, which can include multiple terms separated by spaces.",
|
|
1593
|
+
"example": "campaign summer"
|
|
1158
1594
|
}
|
|
1159
1595
|
},
|
|
1160
1596
|
"required": [
|
|
@@ -1165,18 +1601,27 @@
|
|
|
1165
1601
|
"Sort": {
|
|
1166
1602
|
"type": "object",
|
|
1167
1603
|
"additionalProperties": false,
|
|
1604
|
+
"description": "Document representing a sort request. Each API has a different default sort configuration that can be modified in the request.",
|
|
1605
|
+
"example": {
|
|
1606
|
+
"field": "couponId",
|
|
1607
|
+
"sortOrder": "desc"
|
|
1608
|
+
},
|
|
1168
1609
|
"properties": {
|
|
1169
1610
|
"field": {
|
|
1170
1611
|
"type": "string",
|
|
1612
|
+
"description": "The name of the field to sort on.",
|
|
1613
|
+
"example": "couponId",
|
|
1171
1614
|
"maxLength": 256
|
|
1172
1615
|
},
|
|
1173
1616
|
"sortOrder": {
|
|
1174
1617
|
"type": "string",
|
|
1175
1618
|
"default": "asc",
|
|
1619
|
+
"description": "The sort order to be applied when sorting. When omitted, the default sort order (asc) is used.",
|
|
1176
1620
|
"enum": [
|
|
1177
1621
|
"asc",
|
|
1178
1622
|
"desc"
|
|
1179
|
-
]
|
|
1623
|
+
],
|
|
1624
|
+
"example": "asc"
|
|
1180
1625
|
}
|
|
1181
1626
|
},
|
|
1182
1627
|
"required": [
|
|
@@ -1187,14 +1632,19 @@
|
|
|
1187
1632
|
"type": "integer",
|
|
1188
1633
|
"format": "int32",
|
|
1189
1634
|
"default": 0,
|
|
1635
|
+
"description": "The zero-based index of the first hit/data to include in the result.",
|
|
1636
|
+
"example": 0,
|
|
1190
1637
|
"minimum": 0
|
|
1191
1638
|
},
|
|
1192
1639
|
"SearchRequest": {
|
|
1193
1640
|
"type": "object",
|
|
1641
|
+
"description": "Document representing a search request for retrieving items within the Data API. The query is a potentially complex set of expressions. The fields and expands that each query supports are defined within the search resource.",
|
|
1194
1642
|
"properties": {
|
|
1195
1643
|
"limit": {
|
|
1196
1644
|
"type": "integer",
|
|
1197
1645
|
"format": "int32",
|
|
1646
|
+
"description": "Maximum records to retrieve per request, not to exceed 200.",
|
|
1647
|
+
"example": 10,
|
|
1198
1648
|
"maximum": 200,
|
|
1199
1649
|
"minimum": 1
|
|
1200
1650
|
},
|
|
@@ -1203,6 +1653,7 @@
|
|
|
1203
1653
|
},
|
|
1204
1654
|
"sorts": {
|
|
1205
1655
|
"type": "array",
|
|
1656
|
+
"description": "The list of sort clauses configured for the search request. Sort clauses are optional. See the description of the search endpoint for details on the default sorting behavior that is used when explicit sorts are not passed.",
|
|
1206
1657
|
"items": {
|
|
1207
1658
|
"$ref": "#/components/schemas/Sort"
|
|
1208
1659
|
}
|
|
@@ -1219,14 +1670,19 @@
|
|
|
1219
1670
|
"type": "integer",
|
|
1220
1671
|
"format": "int32",
|
|
1221
1672
|
"default": 0,
|
|
1673
|
+
"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.",
|
|
1674
|
+
"example": 10,
|
|
1222
1675
|
"minimum": 0
|
|
1223
1676
|
},
|
|
1224
1677
|
"ResultBase": {
|
|
1225
1678
|
"type": "object",
|
|
1679
|
+
"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.",
|
|
1226
1680
|
"properties": {
|
|
1227
1681
|
"limit": {
|
|
1228
1682
|
"type": "integer",
|
|
1229
|
-
"format": "int32"
|
|
1683
|
+
"format": "int32",
|
|
1684
|
+
"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.",
|
|
1685
|
+
"example": 10
|
|
1230
1686
|
},
|
|
1231
1687
|
"total": {
|
|
1232
1688
|
"$ref": "#/components/schemas/Total"
|
|
@@ -1243,6 +1699,7 @@
|
|
|
1243
1699
|
"$ref": "#/components/schemas/ResultBase"
|
|
1244
1700
|
}
|
|
1245
1701
|
],
|
|
1702
|
+
"description": "Schema defining generic pageable result. Each response schema of a resource requiring pagination should extend this schema. \nIf you use this extend this schema directly, it needs to be defined what data is returned. Allowed names for the data field is `data`.",
|
|
1246
1703
|
"properties": {
|
|
1247
1704
|
"offset": {
|
|
1248
1705
|
"$ref": "#/components/schemas/Offset"
|
|
@@ -1261,18 +1718,67 @@
|
|
|
1261
1718
|
"$ref": "#/components/schemas/PaginatedResultBase"
|
|
1262
1719
|
}
|
|
1263
1720
|
],
|
|
1721
|
+
"description": "Document representing a generic search result. Each search resource should extend this to define what is returned in the `hits`.",
|
|
1722
|
+
"example": {
|
|
1723
|
+
"limit": 1,
|
|
1724
|
+
"hits": [
|
|
1725
|
+
{
|
|
1726
|
+
"couponId": "coupon1",
|
|
1727
|
+
"creationDate": "2019-10-20T12:00:00Z",
|
|
1728
|
+
"description": "This coupon is used to give 10% off stuff.",
|
|
1729
|
+
"enabled": false,
|
|
1730
|
+
"exportedCodeCount": 0,
|
|
1731
|
+
"lastModified": "2019-10-30T04:23:59Z",
|
|
1732
|
+
"redemptionCount": 3,
|
|
1733
|
+
"redemptionLimits": {
|
|
1734
|
+
"limitPerCode": 1,
|
|
1735
|
+
"limitPerCustomer": 1,
|
|
1736
|
+
"limitPerTimeFrame": {
|
|
1737
|
+
"limit": 2,
|
|
1738
|
+
"redemptionTimeFrame": 24
|
|
1739
|
+
}
|
|
1740
|
+
},
|
|
1741
|
+
"singleCode": "MyCode",
|
|
1742
|
+
"systemCodesConfig": {
|
|
1743
|
+
"codePrefix": "SG",
|
|
1744
|
+
"numberOfCodes": 500000
|
|
1745
|
+
},
|
|
1746
|
+
"totalCodesCount": 50,
|
|
1747
|
+
"type": "single_code"
|
|
1748
|
+
}
|
|
1749
|
+
],
|
|
1750
|
+
"query": {
|
|
1751
|
+
"textQuery": {
|
|
1752
|
+
"fields": [
|
|
1753
|
+
"id",
|
|
1754
|
+
"description"
|
|
1755
|
+
],
|
|
1756
|
+
"searchPhrase": "stuff"
|
|
1757
|
+
}
|
|
1758
|
+
},
|
|
1759
|
+
"sorts": [
|
|
1760
|
+
{
|
|
1761
|
+
"field": "couponId",
|
|
1762
|
+
"sortOrder": "desc"
|
|
1763
|
+
}
|
|
1764
|
+
],
|
|
1765
|
+
"offset": 2,
|
|
1766
|
+
"total": 8
|
|
1767
|
+
},
|
|
1264
1768
|
"properties": {
|
|
1265
1769
|
"query": {
|
|
1266
1770
|
"$ref": "#/components/schemas/Query"
|
|
1267
1771
|
},
|
|
1268
1772
|
"sorts": {
|
|
1269
1773
|
"type": "array",
|
|
1774
|
+
"description": "The sorting that was applied to the result.",
|
|
1270
1775
|
"items": {
|
|
1271
1776
|
"$ref": "#/components/schemas/Sort"
|
|
1272
1777
|
}
|
|
1273
1778
|
},
|
|
1274
1779
|
"hits": {
|
|
1275
1780
|
"type": "array",
|
|
1781
|
+
"description": "The sorted array of search hits. Can be empty.",
|
|
1276
1782
|
"items": {
|
|
1277
1783
|
"type": "object"
|
|
1278
1784
|
}
|
|
@@ -1284,71 +1790,111 @@
|
|
|
1284
1790
|
},
|
|
1285
1791
|
"CampaignId": {
|
|
1286
1792
|
"type": "string",
|
|
1793
|
+
"description": "The ID of the campaign.",
|
|
1794
|
+
"example": "NewYearCampaign",
|
|
1287
1795
|
"maxLength": 256,
|
|
1288
1796
|
"minLength": 1
|
|
1289
1797
|
},
|
|
1290
1798
|
"CouponId": {
|
|
1291
1799
|
"type": "string",
|
|
1800
|
+
"description": "The ID of the coupon.",
|
|
1801
|
+
"example": "20%offOrder",
|
|
1292
1802
|
"maxLength": 256,
|
|
1293
1803
|
"minLength": 1
|
|
1294
1804
|
},
|
|
1295
1805
|
"CustomerGroupId": {
|
|
1296
1806
|
"type": "string",
|
|
1807
|
+
"description": "The ID of the customer group.",
|
|
1808
|
+
"example": "Registered",
|
|
1297
1809
|
"maxLength": 256,
|
|
1298
1810
|
"minLength": 1
|
|
1299
1811
|
},
|
|
1300
1812
|
"SourceCodeGroupId": {
|
|
1301
1813
|
"type": "string",
|
|
1814
|
+
"description": "The ID of source code group.",
|
|
1815
|
+
"example": "TV-Email",
|
|
1302
1816
|
"maxLength": 28,
|
|
1303
1817
|
"minLength": 1
|
|
1304
1818
|
},
|
|
1305
1819
|
"Campaign": {
|
|
1306
1820
|
"type": "object",
|
|
1307
|
-
"additionalProperties": {
|
|
1821
|
+
"additionalProperties": {
|
|
1822
|
+
"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.",
|
|
1823
|
+
"example": "c_trackingId",
|
|
1824
|
+
"title": "Additional Property Support"
|
|
1825
|
+
},
|
|
1826
|
+
"description": "Document representing a campaign.",
|
|
1308
1827
|
"properties": {
|
|
1309
1828
|
"campaignId": {
|
|
1310
1829
|
"$ref": "#/components/schemas/CampaignId"
|
|
1311
1830
|
},
|
|
1312
1831
|
"coupons": {
|
|
1313
1832
|
"type": "array",
|
|
1833
|
+
"description": "The array of assigned coupon IDs, not sorted.",
|
|
1834
|
+
"example": [
|
|
1835
|
+
"20%offOrder",
|
|
1836
|
+
"10%offWelcomeNewUser"
|
|
1837
|
+
],
|
|
1314
1838
|
"items": {
|
|
1315
1839
|
"$ref": "#/components/schemas/CouponId"
|
|
1316
1840
|
}
|
|
1317
1841
|
},
|
|
1318
1842
|
"creationDate": {
|
|
1319
1843
|
"type": "string",
|
|
1320
|
-
"format": "date-time"
|
|
1844
|
+
"format": "date-time",
|
|
1845
|
+
"description": "Returns the value of attribute 'creationDate'.",
|
|
1846
|
+
"example": "2019-10-03T19:36:56Z"
|
|
1321
1847
|
},
|
|
1322
1848
|
"customerGroups": {
|
|
1323
1849
|
"type": "array",
|
|
1850
|
+
"description": "The array of assigned customer groups, not sorted.",
|
|
1851
|
+
"example": [
|
|
1852
|
+
"BigShoppers",
|
|
1853
|
+
"NorthAmericanShoppers"
|
|
1854
|
+
],
|
|
1324
1855
|
"items": {
|
|
1325
1856
|
"$ref": "#/components/schemas/CustomerGroupId"
|
|
1326
1857
|
}
|
|
1327
1858
|
},
|
|
1328
1859
|
"description": {
|
|
1329
1860
|
"type": "string",
|
|
1861
|
+
"description": "The description of the campaign.",
|
|
1862
|
+
"example": "Campaign for the New Year",
|
|
1330
1863
|
"maxLength": 4000
|
|
1331
1864
|
},
|
|
1332
1865
|
"enabled": {
|
|
1333
|
-
"type": "boolean"
|
|
1866
|
+
"type": "boolean",
|
|
1867
|
+
"description": "The enabled flag for campaign.",
|
|
1868
|
+
"example": true
|
|
1334
1869
|
},
|
|
1335
1870
|
"endDate": {
|
|
1336
1871
|
"type": "string",
|
|
1337
|
-
"format": "date-time"
|
|
1872
|
+
"format": "date-time",
|
|
1873
|
+
"description": "The date the scenario ends.",
|
|
1874
|
+
"example": "2019-10-03T19:36:56Z"
|
|
1338
1875
|
},
|
|
1339
1876
|
"lastModified": {
|
|
1340
1877
|
"type": "string",
|
|
1341
|
-
"format": "date-time"
|
|
1878
|
+
"format": "date-time",
|
|
1879
|
+
"description": "Returns the value of attribute 'lastModified'.",
|
|
1880
|
+
"example": "2019-10-03T19:36:56Z"
|
|
1342
1881
|
},
|
|
1343
1882
|
"sourceCodeGroups": {
|
|
1344
1883
|
"type": "array",
|
|
1884
|
+
"description": "The array of assigned source code groups, not sorted.",
|
|
1885
|
+
"example": [
|
|
1886
|
+
"affiliate-email",
|
|
1887
|
+
"gaming-email"
|
|
1888
|
+
],
|
|
1345
1889
|
"items": {
|
|
1346
1890
|
"$ref": "#/components/schemas/SourceCodeGroupId"
|
|
1347
1891
|
}
|
|
1348
1892
|
},
|
|
1349
1893
|
"startDate": {
|
|
1350
1894
|
"type": "string",
|
|
1351
|
-
"format": "date-time"
|
|
1895
|
+
"format": "date-time",
|
|
1896
|
+
"description": "The date the scenario begins.",
|
|
1897
|
+
"example": "2019-10-03T19:36:56Z"
|
|
1352
1898
|
}
|
|
1353
1899
|
}
|
|
1354
1900
|
},
|
|
@@ -1358,9 +1904,11 @@
|
|
|
1358
1904
|
"$ref": "#/components/schemas/PaginatedSearchResult"
|
|
1359
1905
|
}
|
|
1360
1906
|
],
|
|
1907
|
+
"description": "Document representing a campaign search result.",
|
|
1361
1908
|
"properties": {
|
|
1362
1909
|
"hits": {
|
|
1363
1910
|
"type": "array",
|
|
1911
|
+
"description": "The sorted array of campaign search hits. Can be empty.",
|
|
1364
1912
|
"items": {
|
|
1365
1913
|
"$ref": "#/components/schemas/Campaign"
|
|
1366
1914
|
}
|
|
@@ -1376,17 +1924,25 @@
|
|
|
1376
1924
|
"properties": {
|
|
1377
1925
|
"title": {
|
|
1378
1926
|
"type": "string",
|
|
1927
|
+
"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",
|
|
1928
|
+
"example": "You do not have enough credit",
|
|
1379
1929
|
"maxLength": 256
|
|
1380
1930
|
},
|
|
1381
1931
|
"type": {
|
|
1382
1932
|
"type": "string",
|
|
1933
|
+
"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",
|
|
1934
|
+
"example": "NotEnoughMoney",
|
|
1383
1935
|
"maxLength": 2048
|
|
1384
1936
|
},
|
|
1385
1937
|
"detail": {
|
|
1386
|
-
"type": "string"
|
|
1938
|
+
"type": "string",
|
|
1939
|
+
"description": "A human-readable explanation specific to this occurrence of the problem.",
|
|
1940
|
+
"example": "Your current balance is 30, but that costs 50"
|
|
1387
1941
|
},
|
|
1388
1942
|
"instance": {
|
|
1389
1943
|
"type": "string",
|
|
1944
|
+
"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",
|
|
1945
|
+
"example": "/account/12345/msgs/abc",
|
|
1390
1946
|
"maxLength": 2048
|
|
1391
1947
|
}
|
|
1392
1948
|
},
|
|
@@ -1397,41 +1953,52 @@
|
|
|
1397
1953
|
]
|
|
1398
1954
|
},
|
|
1399
1955
|
"CouponsBased": {
|
|
1400
|
-
"type": "boolean"
|
|
1956
|
+
"type": "boolean",
|
|
1957
|
+
"description": "Whether the coupons qualifier participates in the assignment's qualification rule. When true, the\nassigned coupons gate the promotion (combined with campaign-level coupons). When omitted, defaults to\ntrue if a non-empty coupons array is supplied, otherwise false.",
|
|
1958
|
+
"example": false
|
|
1401
1959
|
},
|
|
1402
1960
|
"CustomerGroupsBased": {
|
|
1403
|
-
"type": "boolean"
|
|
1961
|
+
"type": "boolean",
|
|
1962
|
+
"description": "Whether the customer-groups qualifier participates in the assignment's qualification rule. When true,\nthe assigned customer groups gate the promotion (combined with campaign-level customer groups). When\nomitted, defaults to true if a non-empty customerGroups array is supplied, otherwise false.",
|
|
1963
|
+
"example": false
|
|
1404
1964
|
},
|
|
1405
1965
|
"RequiredQualifier": {
|
|
1406
1966
|
"type": "string",
|
|
1407
1967
|
"default": "any",
|
|
1968
|
+
"description": "Controls how the active qualifier types (coupons, customer groups, source-code groups) combine.\n'all' requires every active qualifier type to be satisfied (AND); 'any' requires at least one (OR).\nDefaults to 'any' when omitted.",
|
|
1408
1969
|
"enum": [
|
|
1409
1970
|
"all",
|
|
1410
1971
|
"any"
|
|
1411
|
-
]
|
|
1972
|
+
],
|
|
1973
|
+
"example": "any"
|
|
1412
1974
|
},
|
|
1413
1975
|
"TimeOfDay": {
|
|
1414
1976
|
"type": "object",
|
|
1415
1977
|
"additionalProperties": false,
|
|
1978
|
+
"description": "Document representing a time schedule within a single day.",
|
|
1416
1979
|
"properties": {
|
|
1417
1980
|
"timeFrom": {
|
|
1418
|
-
"type": "string"
|
|
1981
|
+
"type": "string",
|
|
1982
|
+
"description": "The time to start from. Time format: HH:mm or HH:mm:ss. Seconds are ignored and set to 0.",
|
|
1983
|
+
"example": "09:00:00",
|
|
1984
|
+
"pattern": "^([01][0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?$"
|
|
1419
1985
|
},
|
|
1420
1986
|
"timeTo": {
|
|
1421
|
-
"type": "string"
|
|
1987
|
+
"type": "string",
|
|
1988
|
+
"description": "The time to end on. Time format: HH:mm or HH:mm:ss. Seconds are ignored and set to 0.",
|
|
1989
|
+
"example": "17:00:00",
|
|
1990
|
+
"pattern": "^([01][0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?$"
|
|
1422
1991
|
}
|
|
1423
|
-
}
|
|
1424
|
-
"required": [
|
|
1425
|
-
"timeFrom",
|
|
1426
|
-
"timeTo"
|
|
1427
|
-
]
|
|
1992
|
+
}
|
|
1428
1993
|
},
|
|
1429
1994
|
"Recurrence": {
|
|
1430
1995
|
"type": "object",
|
|
1431
1996
|
"additionalProperties": false,
|
|
1997
|
+
"description": "Document representing a schedule recurrence.",
|
|
1432
1998
|
"properties": {
|
|
1433
1999
|
"dayOfWeek": {
|
|
1434
2000
|
"type": "array",
|
|
2001
|
+
"description": "The days of week for recurrence.",
|
|
1435
2002
|
"items": {
|
|
1436
2003
|
"type": "string",
|
|
1437
2004
|
"enum": [
|
|
@@ -1442,7 +2009,8 @@
|
|
|
1442
2009
|
"friday",
|
|
1443
2010
|
"saturday",
|
|
1444
2011
|
"sunday"
|
|
1445
|
-
]
|
|
2012
|
+
],
|
|
2013
|
+
"example": "monday"
|
|
1446
2014
|
}
|
|
1447
2015
|
},
|
|
1448
2016
|
"timeOfDay": {
|
|
@@ -1450,60 +2018,70 @@
|
|
|
1450
2018
|
{
|
|
1451
2019
|
"$ref": "#/components/schemas/TimeOfDay"
|
|
1452
2020
|
}
|
|
1453
|
-
]
|
|
2021
|
+
],
|
|
2022
|
+
"description": "The time of the day for recurrence."
|
|
1454
2023
|
}
|
|
1455
|
-
}
|
|
1456
|
-
"required": [
|
|
1457
|
-
"dayOfWeek",
|
|
1458
|
-
"timeOfDay"
|
|
1459
|
-
]
|
|
2024
|
+
}
|
|
1460
2025
|
},
|
|
1461
2026
|
"Schedule": {
|
|
1462
2027
|
"type": "object",
|
|
1463
2028
|
"additionalProperties": false,
|
|
2029
|
+
"description": "Document representing a time schedule. Defines an optional validity window (startDate/endDate) and an optional recurrence. Omitting a bound leaves that side of the window open (unbounded).",
|
|
1464
2030
|
"properties": {
|
|
2031
|
+
"startDate": {
|
|
2032
|
+
"type": "string",
|
|
2033
|
+
"format": "date-time",
|
|
2034
|
+
"description": "The date to start validity. ISO8601 date time format: yyyy-MM-dd'T'HH:mm:ssZ.",
|
|
2035
|
+
"example": "2026-01-01T00:00:00Z"
|
|
2036
|
+
},
|
|
1465
2037
|
"endDate": {
|
|
1466
2038
|
"type": "string",
|
|
1467
|
-
"format": "date-time"
|
|
2039
|
+
"format": "date-time",
|
|
2040
|
+
"description": "The date to end of validity. ISO8601 date time format: yyyy-MM-dd'T'HH:mm:ssZ.",
|
|
2041
|
+
"example": "2026-01-31T23:59:59Z"
|
|
1468
2042
|
},
|
|
1469
2043
|
"recurrence": {
|
|
1470
2044
|
"allOf": [
|
|
1471
2045
|
{
|
|
1472
2046
|
"$ref": "#/components/schemas/Recurrence"
|
|
1473
2047
|
}
|
|
1474
|
-
]
|
|
1475
|
-
|
|
1476
|
-
"startDate": {
|
|
1477
|
-
"type": "string",
|
|
1478
|
-
"format": "date-time"
|
|
2048
|
+
],
|
|
2049
|
+
"description": "The recurrence of the schedule by day of week and time of day. Not all schedules support a recurrence."
|
|
1479
2050
|
}
|
|
1480
|
-
}
|
|
1481
|
-
"required": [
|
|
1482
|
-
"endDate",
|
|
1483
|
-
"startDate"
|
|
1484
|
-
]
|
|
2051
|
+
}
|
|
1485
2052
|
},
|
|
1486
2053
|
"SourceCodeBased": {
|
|
1487
|
-
"type": "boolean"
|
|
2054
|
+
"type": "boolean",
|
|
2055
|
+
"description": "Whether the source-code-groups qualifier participates in the assignment's qualification rule. When true,\nthe assigned source-code groups gate the promotion (combined with campaign-level source-code groups).\nWhen omitted, defaults to true if a non-empty sourceCodeGroups array is supplied, otherwise false.",
|
|
2056
|
+
"example": false
|
|
1488
2057
|
},
|
|
1489
2058
|
"PromotionCampaignAssignment": {
|
|
1490
2059
|
"type": "object",
|
|
1491
|
-
"additionalProperties": {
|
|
2060
|
+
"additionalProperties": {
|
|
2061
|
+
"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.",
|
|
2062
|
+
"example": "c_trackingId",
|
|
2063
|
+
"title": "Additional Property Support"
|
|
2064
|
+
},
|
|
2065
|
+
"description": "Document representing a promotion campaign assignment.",
|
|
1492
2066
|
"properties": {
|
|
1493
2067
|
"campaign": {
|
|
1494
2068
|
"allOf": [
|
|
1495
2069
|
{
|
|
1496
2070
|
"$ref": "#/components/schemas/Campaign"
|
|
1497
2071
|
}
|
|
1498
|
-
]
|
|
2072
|
+
],
|
|
2073
|
+
"description": "The campaign."
|
|
1499
2074
|
},
|
|
1500
2075
|
"campaignId": {
|
|
1501
2076
|
"type": "string",
|
|
2077
|
+
"description": "The ID of the campaign.",
|
|
2078
|
+
"example": "NewYearCampaign",
|
|
1502
2079
|
"maxLength": 256,
|
|
1503
2080
|
"minLength": 1
|
|
1504
2081
|
},
|
|
1505
2082
|
"coupons": {
|
|
1506
2083
|
"type": "array",
|
|
2084
|
+
"description": "The sorted array of assigned coupon IDs.",
|
|
1507
2085
|
"items": {
|
|
1508
2086
|
"$ref": "#/components/schemas/CouponId"
|
|
1509
2087
|
}
|
|
@@ -1513,6 +2091,7 @@
|
|
|
1513
2091
|
},
|
|
1514
2092
|
"customerGroups": {
|
|
1515
2093
|
"type": "array",
|
|
2094
|
+
"description": "The sorted array of assigned customer groups.",
|
|
1516
2095
|
"items": {
|
|
1517
2096
|
"$ref": "#/components/schemas/CustomerGroupId"
|
|
1518
2097
|
}
|
|
@@ -1522,16 +2101,22 @@
|
|
|
1522
2101
|
},
|
|
1523
2102
|
"enabled": {
|
|
1524
2103
|
"type": "boolean",
|
|
2104
|
+
"description": "Read-only. True if the assigned promotion is enabled. Derived from the promotion's enabled state; cannot be set on the assignment. Use the Promotions API to change it.",
|
|
2105
|
+
"example": true,
|
|
1525
2106
|
"readOnly": true
|
|
1526
2107
|
},
|
|
1527
2108
|
"promotionId": {
|
|
1528
2109
|
"type": "string",
|
|
2110
|
+
"description": "The ID of the promotion. Use the Promotions API to fetch the full promotion.",
|
|
2111
|
+
"example": "10offsku",
|
|
1529
2112
|
"maxLength": 256,
|
|
1530
2113
|
"minLength": 1
|
|
1531
2114
|
},
|
|
1532
2115
|
"rank": {
|
|
1533
2116
|
"type": "integer",
|
|
1534
|
-
"format": "int32"
|
|
2117
|
+
"format": "int32",
|
|
2118
|
+
"description": "The rank of promotion campaign assignment.",
|
|
2119
|
+
"example": 1
|
|
1535
2120
|
},
|
|
1536
2121
|
"requiredQualifier": {
|
|
1537
2122
|
"$ref": "#/components/schemas/RequiredQualifier"
|
|
@@ -1541,13 +2126,15 @@
|
|
|
1541
2126
|
{
|
|
1542
2127
|
"$ref": "#/components/schemas/Schedule"
|
|
1543
2128
|
}
|
|
1544
|
-
]
|
|
2129
|
+
],
|
|
2130
|
+
"description": "The schedule of the assignment resource."
|
|
1545
2131
|
},
|
|
1546
2132
|
"sourceCodeBased": {
|
|
1547
2133
|
"$ref": "#/components/schemas/SourceCodeBased"
|
|
1548
2134
|
},
|
|
1549
2135
|
"sourceCodeGroups": {
|
|
1550
2136
|
"type": "array",
|
|
2137
|
+
"description": "The sorted array of assigned source code groups.",
|
|
1551
2138
|
"items": {
|
|
1552
2139
|
"$ref": "#/components/schemas/SourceCodeGroupId"
|
|
1553
2140
|
}
|
|
@@ -1575,9 +2162,11 @@
|
|
|
1575
2162
|
"$ref": "#/components/schemas/ResultBase"
|
|
1576
2163
|
}
|
|
1577
2164
|
],
|
|
2165
|
+
"description": "Result document representing a list of promotion campaign assignments assigned to a campaign.",
|
|
1578
2166
|
"properties": {
|
|
1579
2167
|
"data": {
|
|
1580
2168
|
"type": "array",
|
|
2169
|
+
"description": "The array of promotion campaign assignments, ordered by rank ascending. Can be empty.",
|
|
1581
2170
|
"items": {
|
|
1582
2171
|
"$ref": "#/components/schemas/PromotionCampaignAssignment"
|
|
1583
2172
|
}
|
|
@@ -1593,6 +2182,7 @@
|
|
|
1593
2182
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
1594
2183
|
}
|
|
1595
2184
|
],
|
|
2185
|
+
"description": "Returned when no campaign with the given ID exists for the requested site.",
|
|
1596
2186
|
"properties": {
|
|
1597
2187
|
"campaignId": {
|
|
1598
2188
|
"$ref": "#/components/schemas/CampaignId"
|
|
@@ -1608,12 +2198,15 @@
|
|
|
1608
2198
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
1609
2199
|
}
|
|
1610
2200
|
],
|
|
2201
|
+
"description": "Returned when the promotion is not assigned to the campaign for the requested site.",
|
|
1611
2202
|
"properties": {
|
|
1612
2203
|
"campaignId": {
|
|
1613
2204
|
"$ref": "#/components/schemas/CampaignId"
|
|
1614
2205
|
},
|
|
1615
2206
|
"promotionId": {
|
|
1616
2207
|
"type": "string",
|
|
2208
|
+
"description": "The ID of the promotion.",
|
|
2209
|
+
"example": "10offsku",
|
|
1617
2210
|
"maxLength": 256,
|
|
1618
2211
|
"minLength": 1
|
|
1619
2212
|
},
|
|
@@ -1624,15 +2217,23 @@
|
|
|
1624
2217
|
},
|
|
1625
2218
|
"PromotionCampaignAssignmentRequest": {
|
|
1626
2219
|
"type": "object",
|
|
1627
|
-
"additionalProperties": {
|
|
2220
|
+
"additionalProperties": {
|
|
2221
|
+
"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.",
|
|
2222
|
+
"example": "c_trackingId",
|
|
2223
|
+
"title": "Additional Property Support"
|
|
2224
|
+
},
|
|
2225
|
+
"description": "Request body for creating or replacing a promotion campaign assignment (PUT). Omits the read-only nested\ncampaign and promotion courtesy copies, which are response-only.",
|
|
1628
2226
|
"properties": {
|
|
1629
2227
|
"campaignId": {
|
|
1630
2228
|
"type": "string",
|
|
2229
|
+
"description": "The ID of the campaign. If supplied, must equal the campaignId path parameter.",
|
|
2230
|
+
"example": "NewYearCampaign",
|
|
1631
2231
|
"maxLength": 256,
|
|
1632
2232
|
"minLength": 1
|
|
1633
2233
|
},
|
|
1634
2234
|
"coupons": {
|
|
1635
2235
|
"type": "array",
|
|
2236
|
+
"description": "The sorted array of assigned coupon IDs.",
|
|
1636
2237
|
"items": {
|
|
1637
2238
|
"$ref": "#/components/schemas/CouponId"
|
|
1638
2239
|
}
|
|
@@ -1642,6 +2243,7 @@
|
|
|
1642
2243
|
},
|
|
1643
2244
|
"customerGroups": {
|
|
1644
2245
|
"type": "array",
|
|
2246
|
+
"description": "The sorted array of assigned customer groups.",
|
|
1645
2247
|
"items": {
|
|
1646
2248
|
"$ref": "#/components/schemas/CustomerGroupId"
|
|
1647
2249
|
}
|
|
@@ -1651,12 +2253,19 @@
|
|
|
1651
2253
|
},
|
|
1652
2254
|
"promotionId": {
|
|
1653
2255
|
"type": "string",
|
|
2256
|
+
"description": "The ID of the promotion. If supplied, must equal the promotionId path parameter.",
|
|
2257
|
+
"example": "10offsku",
|
|
1654
2258
|
"maxLength": 256,
|
|
1655
2259
|
"minLength": 1
|
|
1656
2260
|
},
|
|
1657
2261
|
"rank": {
|
|
1658
2262
|
"type": "integer",
|
|
1659
|
-
"format": "int32"
|
|
2263
|
+
"format": "int32",
|
|
2264
|
+
"description": "The rank of the promotion campaign assignment. Must be null or a multiple of 10\nfrom 0 to 100 (0, 10, 20, ..., 100).",
|
|
2265
|
+
"example": 10,
|
|
2266
|
+
"maximum": 100,
|
|
2267
|
+
"minimum": 0,
|
|
2268
|
+
"multipleOf": 10
|
|
1660
2269
|
},
|
|
1661
2270
|
"requiredQualifier": {
|
|
1662
2271
|
"$ref": "#/components/schemas/RequiredQualifier"
|
|
@@ -1666,13 +2275,15 @@
|
|
|
1666
2275
|
{
|
|
1667
2276
|
"$ref": "#/components/schemas/Schedule"
|
|
1668
2277
|
}
|
|
1669
|
-
]
|
|
2278
|
+
],
|
|
2279
|
+
"description": "The schedule of the assignment resource."
|
|
1670
2280
|
},
|
|
1671
2281
|
"sourceCodeBased": {
|
|
1672
2282
|
"$ref": "#/components/schemas/SourceCodeBased"
|
|
1673
2283
|
},
|
|
1674
2284
|
"sourceCodeGroups": {
|
|
1675
2285
|
"type": "array",
|
|
2286
|
+
"description": "The sorted array of assigned source code groups.",
|
|
1676
2287
|
"items": {
|
|
1677
2288
|
"$ref": "#/components/schemas/SourceCodeGroupId"
|
|
1678
2289
|
}
|
|
@@ -1687,14 +2298,16 @@
|
|
|
1687
2298
|
{
|
|
1688
2299
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
1689
2300
|
}
|
|
1690
|
-
]
|
|
2301
|
+
],
|
|
2302
|
+
"description": "Returned when the composite key in the request body does not match the campaignId or promotionId path parameters."
|
|
1691
2303
|
},
|
|
1692
2304
|
"AssignmentBusinessRuleViolationErrorResponse": {
|
|
1693
2305
|
"allOf": [
|
|
1694
2306
|
{
|
|
1695
2307
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
1696
2308
|
}
|
|
1697
|
-
]
|
|
2309
|
+
],
|
|
2310
|
+
"description": "Returned when a backend business rule rejects the assignment (for example, an invalid schedule or qualifier combination)."
|
|
1698
2311
|
},
|
|
1699
2312
|
"PromotionNotFoundErrorResponse": {
|
|
1700
2313
|
"allOf": [
|
|
@@ -1702,9 +2315,12 @@
|
|
|
1702
2315
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
1703
2316
|
}
|
|
1704
2317
|
],
|
|
2318
|
+
"description": "Returned when the promotion referenced by the request does not exist for the requested site.",
|
|
1705
2319
|
"properties": {
|
|
1706
2320
|
"promotionId": {
|
|
1707
2321
|
"type": "string",
|
|
2322
|
+
"description": "The ID of the promotion.",
|
|
2323
|
+
"example": "10offsku",
|
|
1708
2324
|
"maxLength": 256,
|
|
1709
2325
|
"minLength": 1
|
|
1710
2326
|
},
|
|
@@ -1715,15 +2331,23 @@
|
|
|
1715
2331
|
},
|
|
1716
2332
|
"PromotionCampaignAssignmentUpdate": {
|
|
1717
2333
|
"type": "object",
|
|
1718
|
-
"additionalProperties": {
|
|
2334
|
+
"additionalProperties": {
|
|
2335
|
+
"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.",
|
|
2336
|
+
"example": "c_trackingId",
|
|
2337
|
+
"title": "Additional Property Support"
|
|
2338
|
+
},
|
|
2339
|
+
"description": "Request body for partially updating a promotion campaign assignment (PATCH). Same properties as the create\nrequest, but all properties are optional. Omits the read-only nested campaign and promotion courtesy copies.",
|
|
1719
2340
|
"properties": {
|
|
1720
2341
|
"campaignId": {
|
|
1721
2342
|
"type": "string",
|
|
2343
|
+
"description": "The ID of the campaign. If supplied, must equal the campaignId path parameter.",
|
|
2344
|
+
"example": "NewYearCampaign",
|
|
1722
2345
|
"maxLength": 256,
|
|
1723
2346
|
"minLength": 1
|
|
1724
2347
|
},
|
|
1725
2348
|
"coupons": {
|
|
1726
2349
|
"type": "array",
|
|
2350
|
+
"description": "The sorted array of assigned coupon IDs.",
|
|
1727
2351
|
"items": {
|
|
1728
2352
|
"$ref": "#/components/schemas/CouponId"
|
|
1729
2353
|
}
|
|
@@ -1733,6 +2357,7 @@
|
|
|
1733
2357
|
},
|
|
1734
2358
|
"customerGroups": {
|
|
1735
2359
|
"type": "array",
|
|
2360
|
+
"description": "The sorted array of assigned customer groups.",
|
|
1736
2361
|
"items": {
|
|
1737
2362
|
"$ref": "#/components/schemas/CustomerGroupId"
|
|
1738
2363
|
}
|
|
@@ -1742,12 +2367,19 @@
|
|
|
1742
2367
|
},
|
|
1743
2368
|
"promotionId": {
|
|
1744
2369
|
"type": "string",
|
|
2370
|
+
"description": "The ID of the promotion. If supplied, must equal the promotionId path parameter.",
|
|
2371
|
+
"example": "10offsku",
|
|
1745
2372
|
"maxLength": 256,
|
|
1746
2373
|
"minLength": 1
|
|
1747
2374
|
},
|
|
1748
2375
|
"rank": {
|
|
1749
2376
|
"type": "integer",
|
|
1750
|
-
"format": "int32"
|
|
2377
|
+
"format": "int32",
|
|
2378
|
+
"description": "The rank of the promotion campaign assignment. Must be null or a multiple of 10\nfrom 0 to 100 (0, 10, 20, ..., 100).",
|
|
2379
|
+
"example": 10,
|
|
2380
|
+
"maximum": 100,
|
|
2381
|
+
"minimum": 0,
|
|
2382
|
+
"multipleOf": 10
|
|
1751
2383
|
},
|
|
1752
2384
|
"requiredQualifier": {
|
|
1753
2385
|
"$ref": "#/components/schemas/RequiredQualifier"
|
|
@@ -1757,13 +2389,15 @@
|
|
|
1757
2389
|
{
|
|
1758
2390
|
"$ref": "#/components/schemas/Schedule"
|
|
1759
2391
|
}
|
|
1760
|
-
]
|
|
2392
|
+
],
|
|
2393
|
+
"description": "The schedule of the assignment resource. Send schedule null to clear the assignment-level schedule."
|
|
1761
2394
|
},
|
|
1762
2395
|
"sourceCodeBased": {
|
|
1763
2396
|
"$ref": "#/components/schemas/SourceCodeBased"
|
|
1764
2397
|
},
|
|
1765
2398
|
"sourceCodeGroups": {
|
|
1766
2399
|
"type": "array",
|
|
2400
|
+
"description": "The sorted array of assigned source code groups.",
|
|
1767
2401
|
"items": {
|
|
1768
2402
|
"$ref": "#/components/schemas/SourceCodeGroupId"
|
|
1769
2403
|
}
|
|
@@ -1778,6 +2412,11 @@
|
|
|
1778
2412
|
"application/problem+json": {
|
|
1779
2413
|
"schema": {
|
|
1780
2414
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
2415
|
+
},
|
|
2416
|
+
"examples": {
|
|
2417
|
+
"UnauthorizedExample": {
|
|
2418
|
+
"$ref": "#/components/examples/UnauthorizedExample"
|
|
2419
|
+
}
|
|
1781
2420
|
}
|
|
1782
2421
|
}
|
|
1783
2422
|
}
|
|
@@ -1788,6 +2427,11 @@
|
|
|
1788
2427
|
"application/problem+json": {
|
|
1789
2428
|
"schema": {
|
|
1790
2429
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
2430
|
+
},
|
|
2431
|
+
"examples": {
|
|
2432
|
+
"ForbiddenExample": {
|
|
2433
|
+
"$ref": "#/components/examples/ForbiddenExample"
|
|
2434
|
+
}
|
|
1791
2435
|
}
|
|
1792
2436
|
}
|
|
1793
2437
|
}
|
|
@@ -1798,6 +2442,11 @@
|
|
|
1798
2442
|
"application/problem+json": {
|
|
1799
2443
|
"schema": {
|
|
1800
2444
|
"$ref": "#/components/schemas/CampaignNotFoundErrorResponse"
|
|
2445
|
+
},
|
|
2446
|
+
"examples": {
|
|
2447
|
+
"CampaignNotFoundErrorResponseExample": {
|
|
2448
|
+
"$ref": "#/components/examples/CampaignNotFoundErrorResponseExample"
|
|
2449
|
+
}
|
|
1801
2450
|
}
|
|
1802
2451
|
}
|
|
1803
2452
|
}
|
|
@@ -1815,6 +2464,14 @@
|
|
|
1815
2464
|
"$ref": "#/components/schemas/PromotionCampaignAssignmentNotFoundErrorResponse"
|
|
1816
2465
|
}
|
|
1817
2466
|
]
|
|
2467
|
+
},
|
|
2468
|
+
"examples": {
|
|
2469
|
+
"CampaignNotFoundErrorResponseExample": {
|
|
2470
|
+
"$ref": "#/components/examples/CampaignNotFoundErrorResponseExample"
|
|
2471
|
+
},
|
|
2472
|
+
"PromotionCampaignAssignmentNotFoundErrorResponseExample": {
|
|
2473
|
+
"$ref": "#/components/examples/PromotionCampaignAssignmentNotFoundErrorResponseExample"
|
|
2474
|
+
}
|
|
1818
2475
|
}
|
|
1819
2476
|
}
|
|
1820
2477
|
}
|
|
@@ -1832,6 +2489,14 @@
|
|
|
1832
2489
|
"$ref": "#/components/schemas/AssignmentBusinessRuleViolationErrorResponse"
|
|
1833
2490
|
}
|
|
1834
2491
|
]
|
|
2492
|
+
},
|
|
2493
|
+
"examples": {
|
|
2494
|
+
"AssignmentIdMismatchErrorResponseExample": {
|
|
2495
|
+
"$ref": "#/components/examples/AssignmentIdMismatchErrorResponseExample"
|
|
2496
|
+
},
|
|
2497
|
+
"AssignmentBusinessRuleViolationErrorResponseExample": {
|
|
2498
|
+
"$ref": "#/components/examples/AssignmentBusinessRuleViolationErrorResponseExample"
|
|
2499
|
+
}
|
|
1835
2500
|
}
|
|
1836
2501
|
}
|
|
1837
2502
|
}
|
|
@@ -1849,6 +2514,14 @@
|
|
|
1849
2514
|
"$ref": "#/components/schemas/PromotionNotFoundErrorResponse"
|
|
1850
2515
|
}
|
|
1851
2516
|
]
|
|
2517
|
+
},
|
|
2518
|
+
"examples": {
|
|
2519
|
+
"CampaignNotFoundErrorResponseExample": {
|
|
2520
|
+
"$ref": "#/components/examples/CampaignNotFoundErrorResponseExample"
|
|
2521
|
+
},
|
|
2522
|
+
"PromotionNotFoundErrorResponseExample": {
|
|
2523
|
+
"$ref": "#/components/examples/PromotionNotFoundErrorResponseExample"
|
|
2524
|
+
}
|
|
1852
2525
|
}
|
|
1853
2526
|
}
|
|
1854
2527
|
}
|
|
@@ -1858,26 +2531,35 @@
|
|
|
1858
2531
|
"organizationId": {
|
|
1859
2532
|
"name": "organizationId",
|
|
1860
2533
|
"in": "path",
|
|
2534
|
+
"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).",
|
|
1861
2535
|
"required": true,
|
|
1862
2536
|
"style": "simple",
|
|
1863
2537
|
"explode": false,
|
|
1864
2538
|
"schema": {
|
|
1865
2539
|
"$ref": "#/components/schemas/OrganizationId"
|
|
1866
|
-
}
|
|
2540
|
+
},
|
|
2541
|
+
"example": "f_ecom_zzxy_prd"
|
|
1867
2542
|
},
|
|
1868
2543
|
"siteId": {
|
|
1869
2544
|
"name": "siteId",
|
|
1870
2545
|
"in": "query",
|
|
2546
|
+
"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.",
|
|
1871
2547
|
"required": true,
|
|
1872
2548
|
"style": "form",
|
|
1873
2549
|
"explode": true,
|
|
1874
2550
|
"schema": {
|
|
1875
2551
|
"$ref": "#/components/schemas/SiteId"
|
|
2552
|
+
},
|
|
2553
|
+
"examples": {
|
|
2554
|
+
"SiteId": {
|
|
2555
|
+
"value": "RefArch"
|
|
2556
|
+
}
|
|
1876
2557
|
}
|
|
1877
2558
|
},
|
|
1878
2559
|
"campaignId": {
|
|
1879
2560
|
"name": "campaignId",
|
|
1880
2561
|
"in": "path",
|
|
2562
|
+
"description": "The ID of the campaign.",
|
|
1881
2563
|
"required": true,
|
|
1882
2564
|
"style": "simple",
|
|
1883
2565
|
"explode": false,
|
|
@@ -1893,19 +2575,357 @@
|
|
|
1893
2575
|
"promotionId": {
|
|
1894
2576
|
"name": "promotionId",
|
|
1895
2577
|
"in": "path",
|
|
2578
|
+
"description": "The ID of the promotion assigned to the campaign.",
|
|
1896
2579
|
"required": true,
|
|
1897
2580
|
"style": "simple",
|
|
1898
2581
|
"explode": false,
|
|
1899
2582
|
"schema": {
|
|
1900
2583
|
"type": "string",
|
|
2584
|
+
"example": "10offsku",
|
|
1901
2585
|
"maxLength": 256,
|
|
1902
2586
|
"minLength": 1
|
|
1903
2587
|
}
|
|
1904
2588
|
}
|
|
1905
2589
|
},
|
|
2590
|
+
"examples": {
|
|
2591
|
+
"PostCampaignSearch": {
|
|
2592
|
+
"value": {
|
|
2593
|
+
"limit": 2,
|
|
2594
|
+
"hits": [
|
|
2595
|
+
{
|
|
2596
|
+
"campaignId": "mens-clothing-dress-shirts",
|
|
2597
|
+
"creationDate": "2019-11-06T21:12:35.000Z",
|
|
2598
|
+
"customerGroups": [
|
|
2599
|
+
"Everyone"
|
|
2600
|
+
],
|
|
2601
|
+
"description": "This a campaign for the Mens Dress Shirts Category offering a specific banner as well as a 20% off dress shirts promotion, and a custom sort rule of product name ascending",
|
|
2602
|
+
"enabled": false,
|
|
2603
|
+
"lastModified": "2019-11-06T21:12:35.000Z"
|
|
2604
|
+
},
|
|
2605
|
+
{
|
|
2606
|
+
"campaignId": "mens-clothing-suits",
|
|
2607
|
+
"creationDate": "2019-11-06T21:12:35.000Z",
|
|
2608
|
+
"customerGroups": [
|
|
2609
|
+
"Everyone"
|
|
2610
|
+
],
|
|
2611
|
+
"description": "This is a campaign that displays a landing banner, with a 25% discount on all suits and default sorting rule of top selling suits.",
|
|
2612
|
+
"enabled": false,
|
|
2613
|
+
"lastModified": "2019-11-06T21:12:35.000Z"
|
|
2614
|
+
}
|
|
2615
|
+
],
|
|
2616
|
+
"query": {
|
|
2617
|
+
"textQuery": {
|
|
2618
|
+
"fields": [
|
|
2619
|
+
"id",
|
|
2620
|
+
"description"
|
|
2621
|
+
],
|
|
2622
|
+
"searchPhrase": "campaign"
|
|
2623
|
+
}
|
|
2624
|
+
},
|
|
2625
|
+
"offset": 1,
|
|
2626
|
+
"total": 4
|
|
2627
|
+
}
|
|
2628
|
+
},
|
|
2629
|
+
"InvalidOperation": {
|
|
2630
|
+
"value": {
|
|
2631
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-operation",
|
|
2632
|
+
"detail": "Failed to execute search query: wrong syntax.",
|
|
2633
|
+
"title": "Incorrect Syntax"
|
|
2634
|
+
}
|
|
2635
|
+
},
|
|
2636
|
+
"GetCampaign": {
|
|
2637
|
+
"value": {
|
|
2638
|
+
"campaignId": "NewYearCampaign",
|
|
2639
|
+
"coupons": [
|
|
2640
|
+
"20%offOrdersAbove100",
|
|
2641
|
+
"10%offties"
|
|
2642
|
+
],
|
|
2643
|
+
"creationDate": "2019-10-03T19:36:56.000Z",
|
|
2644
|
+
"customerGroups": [
|
|
2645
|
+
"Registered"
|
|
2646
|
+
],
|
|
2647
|
+
"description": "Campaign for the New Year",
|
|
2648
|
+
"enabled": true,
|
|
2649
|
+
"endDate": "2020-07-31T23:09:08.000Z",
|
|
2650
|
+
"lastModified": "2019-10-10T14:27:00.867Z",
|
|
2651
|
+
"sourceCodeGroups": [
|
|
2652
|
+
"affiliate-email",
|
|
2653
|
+
"gaming-email"
|
|
2654
|
+
],
|
|
2655
|
+
"startDate": "2019-04-01T11:30:15.000Z"
|
|
2656
|
+
}
|
|
2657
|
+
},
|
|
2658
|
+
"CampaignNotFound404": {
|
|
2659
|
+
"value": {
|
|
2660
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/campaign-not-found",
|
|
2661
|
+
"detail": "No campaign with ID 'SpecialCampaign' in site 'SiteGenesis' could be found.",
|
|
2662
|
+
"title": "Not Found Error"
|
|
2663
|
+
}
|
|
2664
|
+
},
|
|
2665
|
+
"PutCampaign": {
|
|
2666
|
+
"value": {
|
|
2667
|
+
"campaignId": "NewWinterCampaign",
|
|
2668
|
+
"coupons": [
|
|
2669
|
+
"WinterSpecial"
|
|
2670
|
+
],
|
|
2671
|
+
"creationDate": "2019-10-03T19:36:56.000Z",
|
|
2672
|
+
"customerGroups": [
|
|
2673
|
+
"Registered"
|
|
2674
|
+
],
|
|
2675
|
+
"description": "Campaign for winter specials",
|
|
2676
|
+
"enabled": true,
|
|
2677
|
+
"endDate": "2020-07-31T23:09:08.000Z",
|
|
2678
|
+
"lastModified": "2019-10-10T14:52:47.356Z",
|
|
2679
|
+
"startDate": "2019-04-01T11:30:15.000Z"
|
|
2680
|
+
}
|
|
2681
|
+
},
|
|
2682
|
+
"IdConflict400": {
|
|
2683
|
+
"value": {
|
|
2684
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/id-conflict",
|
|
2685
|
+
"detail": "The ID in the request body ('CampaignXYZ') doesn't match the ID in the URL ('NewWinterCampaign')",
|
|
2686
|
+
"title": "Duplicate Error"
|
|
2687
|
+
}
|
|
2688
|
+
},
|
|
2689
|
+
"PatchCampaign": {
|
|
2690
|
+
"value": {
|
|
2691
|
+
"description": "Thanksgiving campaign enabling special promotions",
|
|
2692
|
+
"enabled": true,
|
|
2693
|
+
"coupons": [
|
|
2694
|
+
"thanksgiving",
|
|
2695
|
+
"special"
|
|
2696
|
+
]
|
|
2697
|
+
}
|
|
2698
|
+
},
|
|
2699
|
+
"CampaignDuplicate400": {
|
|
2700
|
+
"value": {
|
|
2701
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/campaign-duplicate",
|
|
2702
|
+
"detail": "The campaign couldn't be created because of duplicate ID 'CampaignXYZ'.",
|
|
2703
|
+
"title": "Duplicate Error"
|
|
2704
|
+
}
|
|
2705
|
+
},
|
|
2706
|
+
"GetCampaignPromotionAssignments": {
|
|
2707
|
+
"value": {
|
|
2708
|
+
"limit": 2,
|
|
2709
|
+
"data": [
|
|
2710
|
+
{
|
|
2711
|
+
"campaign": {
|
|
2712
|
+
"campaignId": "NewYearCampaign",
|
|
2713
|
+
"description": "Campaign for the New Year",
|
|
2714
|
+
"enabled": true
|
|
2715
|
+
},
|
|
2716
|
+
"campaignId": "NewYearCampaign",
|
|
2717
|
+
"coupons": [
|
|
2718
|
+
"10offsku"
|
|
2719
|
+
],
|
|
2720
|
+
"couponsBased": true,
|
|
2721
|
+
"customerGroups": [
|
|
2722
|
+
"Registered"
|
|
2723
|
+
],
|
|
2724
|
+
"customerGroupsBased": true,
|
|
2725
|
+
"enabled": true,
|
|
2726
|
+
"promotionId": "10offsku",
|
|
2727
|
+
"rank": 1,
|
|
2728
|
+
"requiredQualifier": "all",
|
|
2729
|
+
"schedule": {
|
|
2730
|
+
"startDate": "2026-01-01T00:00:00.000Z",
|
|
2731
|
+
"endDate": "2026-01-31T23:59:59.000Z",
|
|
2732
|
+
"recurrence": {
|
|
2733
|
+
"dayOfWeek": [
|
|
2734
|
+
"monday",
|
|
2735
|
+
"tuesday"
|
|
2736
|
+
],
|
|
2737
|
+
"timeOfDay": {
|
|
2738
|
+
"timeFrom": "09:00:00",
|
|
2739
|
+
"timeTo": "17:00:00"
|
|
2740
|
+
}
|
|
2741
|
+
}
|
|
2742
|
+
},
|
|
2743
|
+
"sourceCodeBased": true,
|
|
2744
|
+
"sourceCodeGroups": [
|
|
2745
|
+
"affiliate-email"
|
|
2746
|
+
]
|
|
2747
|
+
},
|
|
2748
|
+
{
|
|
2749
|
+
"campaign": {
|
|
2750
|
+
"campaignId": "NewYearCampaign",
|
|
2751
|
+
"description": "Campaign for the New Year",
|
|
2752
|
+
"enabled": true
|
|
2753
|
+
},
|
|
2754
|
+
"campaignId": "NewYearCampaign",
|
|
2755
|
+
"coupons": [],
|
|
2756
|
+
"couponsBased": false,
|
|
2757
|
+
"customerGroups": [],
|
|
2758
|
+
"customerGroupsBased": false,
|
|
2759
|
+
"enabled": true,
|
|
2760
|
+
"promotionId": "freeshipping50",
|
|
2761
|
+
"rank": 2,
|
|
2762
|
+
"requiredQualifier": "any",
|
|
2763
|
+
"schedule": {
|
|
2764
|
+
"startDate": "2026-01-01T00:00:00.000Z",
|
|
2765
|
+
"endDate": "2026-01-31T23:59:59.000Z",
|
|
2766
|
+
"recurrence": {
|
|
2767
|
+
"dayOfWeek": [
|
|
2768
|
+
"saturday",
|
|
2769
|
+
"sunday"
|
|
2770
|
+
],
|
|
2771
|
+
"timeOfDay": {
|
|
2772
|
+
"timeFrom": "00:00:00",
|
|
2773
|
+
"timeTo": "23:59:59"
|
|
2774
|
+
}
|
|
2775
|
+
}
|
|
2776
|
+
},
|
|
2777
|
+
"sourceCodeBased": false,
|
|
2778
|
+
"sourceCodeGroups": []
|
|
2779
|
+
}
|
|
2780
|
+
],
|
|
2781
|
+
"total": 2
|
|
2782
|
+
}
|
|
2783
|
+
},
|
|
2784
|
+
"UnauthorizedExample": {
|
|
2785
|
+
"value": {
|
|
2786
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
|
|
2787
|
+
"title": "Unauthorized",
|
|
2788
|
+
"detail": "Unauthorized request"
|
|
2789
|
+
}
|
|
2790
|
+
},
|
|
2791
|
+
"ForbiddenExample": {
|
|
2792
|
+
"value": {
|
|
2793
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
|
|
2794
|
+
"title": "Forbidden",
|
|
2795
|
+
"detail": "Access to requested resource forbidden"
|
|
2796
|
+
}
|
|
2797
|
+
},
|
|
2798
|
+
"GetCampaignPromotionAssignment": {
|
|
2799
|
+
"value": {
|
|
2800
|
+
"campaign": {
|
|
2801
|
+
"campaignId": "NewYearCampaign",
|
|
2802
|
+
"description": "Campaign for the New Year",
|
|
2803
|
+
"enabled": true,
|
|
2804
|
+
"startDate": "2026-01-01T00:00:00.000Z",
|
|
2805
|
+
"endDate": "2026-01-31T23:59:59.000Z"
|
|
2806
|
+
},
|
|
2807
|
+
"campaignId": "NewYearCampaign",
|
|
2808
|
+
"coupons": [
|
|
2809
|
+
"10offsku"
|
|
2810
|
+
],
|
|
2811
|
+
"couponsBased": true,
|
|
2812
|
+
"customerGroups": [
|
|
2813
|
+
"Registered"
|
|
2814
|
+
],
|
|
2815
|
+
"customerGroupsBased": true,
|
|
2816
|
+
"enabled": true,
|
|
2817
|
+
"promotionId": "10offsku",
|
|
2818
|
+
"rank": 1,
|
|
2819
|
+
"requiredQualifier": "any",
|
|
2820
|
+
"schedule": {
|
|
2821
|
+
"startDate": "2026-01-01T00:00:00.000Z",
|
|
2822
|
+
"endDate": "2026-01-31T23:59:59.000Z",
|
|
2823
|
+
"recurrence": {
|
|
2824
|
+
"dayOfWeek": [
|
|
2825
|
+
"monday",
|
|
2826
|
+
"tuesday",
|
|
2827
|
+
"wednesday",
|
|
2828
|
+
"thursday",
|
|
2829
|
+
"friday"
|
|
2830
|
+
],
|
|
2831
|
+
"timeOfDay": {
|
|
2832
|
+
"timeFrom": "09:00:00",
|
|
2833
|
+
"timeTo": "17:00:00"
|
|
2834
|
+
}
|
|
2835
|
+
}
|
|
2836
|
+
},
|
|
2837
|
+
"sourceCodeBased": true,
|
|
2838
|
+
"sourceCodeGroups": [
|
|
2839
|
+
"affiliate-email"
|
|
2840
|
+
]
|
|
2841
|
+
}
|
|
2842
|
+
},
|
|
2843
|
+
"AssignPromotionToCampaign": {
|
|
2844
|
+
"value": {
|
|
2845
|
+
"campaignId": "NewYearCampaign",
|
|
2846
|
+
"promotionId": "10offsku",
|
|
2847
|
+
"rank": 10,
|
|
2848
|
+
"coupons": [
|
|
2849
|
+
"10offsku"
|
|
2850
|
+
],
|
|
2851
|
+
"couponsBased": true,
|
|
2852
|
+
"customerGroups": [
|
|
2853
|
+
"Registered"
|
|
2854
|
+
],
|
|
2855
|
+
"customerGroupsBased": true,
|
|
2856
|
+
"sourceCodeGroups": [
|
|
2857
|
+
"affiliate-email"
|
|
2858
|
+
],
|
|
2859
|
+
"sourceCodeBased": true,
|
|
2860
|
+
"requiredQualifier": "all",
|
|
2861
|
+
"schedule": {
|
|
2862
|
+
"startDate": "2026-01-01T00:00:00.000Z",
|
|
2863
|
+
"endDate": "2026-01-31T23:59:59.000Z",
|
|
2864
|
+
"recurrence": {
|
|
2865
|
+
"dayOfWeek": [
|
|
2866
|
+
"monday",
|
|
2867
|
+
"tuesday",
|
|
2868
|
+
"wednesday",
|
|
2869
|
+
"thursday",
|
|
2870
|
+
"friday"
|
|
2871
|
+
],
|
|
2872
|
+
"timeOfDay": {
|
|
2873
|
+
"timeFrom": "09:00:00",
|
|
2874
|
+
"timeTo": "17:00:00"
|
|
2875
|
+
}
|
|
2876
|
+
}
|
|
2877
|
+
}
|
|
2878
|
+
}
|
|
2879
|
+
},
|
|
2880
|
+
"UpdateCampaignPromotionAssignment": {
|
|
2881
|
+
"value": {
|
|
2882
|
+
"rank": 20,
|
|
2883
|
+
"coupons": [
|
|
2884
|
+
"10offsku",
|
|
2885
|
+
"15offsku"
|
|
2886
|
+
]
|
|
2887
|
+
}
|
|
2888
|
+
},
|
|
2889
|
+
"CampaignNotFoundErrorResponseExample": {
|
|
2890
|
+
"value": {
|
|
2891
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/campaign-not-found",
|
|
2892
|
+
"detail": "No campaign with ID 'NewYearCampaign' was found for site 'RefArch'.",
|
|
2893
|
+
"title": "Campaign Not Found"
|
|
2894
|
+
}
|
|
2895
|
+
},
|
|
2896
|
+
"PromotionCampaignAssignmentNotFoundErrorResponseExample": {
|
|
2897
|
+
"value": {
|
|
2898
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/promotion-campaign-assignment-not-found",
|
|
2899
|
+
"detail": "No assignment of promotion '10offsku' to campaign 'NewYearCampaign' was found for site 'RefArch'.",
|
|
2900
|
+
"title": "Promotion Campaign Assignment Not Found"
|
|
2901
|
+
}
|
|
2902
|
+
},
|
|
2903
|
+
"AssignmentIdMismatchErrorResponseExample": {
|
|
2904
|
+
"value": {
|
|
2905
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/assignment-id-mismatch",
|
|
2906
|
+
"detail": "The campaignId or promotionId in the request body does not match the IDs in the request path.",
|
|
2907
|
+
"title": "Assignment Id Mismatch"
|
|
2908
|
+
}
|
|
2909
|
+
},
|
|
2910
|
+
"AssignmentBusinessRuleViolationErrorResponseExample": {
|
|
2911
|
+
"value": {
|
|
2912
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/assignment-business-rule-violation",
|
|
2913
|
+
"detail": "The promotion campaign assignment could not be saved because a business rule was violated.",
|
|
2914
|
+
"title": "Assignment Business Rule Violation"
|
|
2915
|
+
}
|
|
2916
|
+
},
|
|
2917
|
+
"PromotionNotFoundErrorResponseExample": {
|
|
2918
|
+
"value": {
|
|
2919
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/promotion-not-found",
|
|
2920
|
+
"detail": "No promotion with ID '10offsku' was found for site 'RefArch'.",
|
|
2921
|
+
"title": "Promotion Not Found"
|
|
2922
|
+
}
|
|
2923
|
+
}
|
|
2924
|
+
},
|
|
1906
2925
|
"securitySchemes": {
|
|
1907
2926
|
"AmOAuth2": {
|
|
1908
2927
|
"type": "oauth2",
|
|
2928
|
+
"description": "AccountManager OAuth 2.0 bearer token Authentication.",
|
|
1909
2929
|
"flows": {
|
|
1910
2930
|
"clientCredentials": {
|
|
1911
2931
|
"tokenUrl": "https://account.demandware.com/dwsso/oauth2/access_token",
|
|
@@ -1917,10 +2937,8 @@
|
|
|
1917
2937
|
"authorizationCode": {
|
|
1918
2938
|
"authorizationUrl": "https://account.demandware.com/dwsso/oauth2/authorize",
|
|
1919
2939
|
"tokenUrl": "https://account.demandware.com/dwsso/oauth2/access_token",
|
|
1920
|
-
"
|
|
1921
|
-
|
|
1922
|
-
"sfcc.promotions.rw": "promotions read/write"
|
|
1923
|
-
}
|
|
2940
|
+
"refreshUrl": "https://account.demandware.com/dwsso/oauth2/access_token",
|
|
2941
|
+
"scopes": {}
|
|
1924
2942
|
}
|
|
1925
2943
|
}
|
|
1926
2944
|
}
|