commerce-sdk-isomorphic 4.0.1-preview-shopper-configurations.0 → 4.0.1
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/README.md +3 -61
- package/lib/index.cjs.d.ts +6 -748
- package/lib/index.cjs.js +1 -1
- package/lib/index.esm.d.ts +6 -748
- package/lib/index.esm.js +1 -1
- package/package.json +27 -94
- package/lib/clientConfig.cjs.d.ts +0 -52
- package/lib/clientConfig.cjs.js +0 -1
- package/lib/clientConfig.d.ts +0 -52
- package/lib/clientConfig.js +0 -1
- package/lib/config.cjs.d.ts +0 -2
- package/lib/config.cjs.js +0 -1
- package/lib/config.d.ts +0 -2
- package/lib/config.js +0 -1
- package/lib/helpers.cjs.d.ts +0 -2225
- package/lib/helpers.cjs.js +0 -1
- package/lib/helpers.d.ts +0 -2225
- package/lib/helpers.js +0 -1
- package/lib/responseError.cjs.d.ts +0 -12
- package/lib/responseError.cjs.js +0 -1
- package/lib/responseError.d.ts +0 -12
- package/lib/responseError.js +0 -1
- package/lib/shopperBaskets.cjs.d.ts +0 -10259
- package/lib/shopperBaskets.cjs.js +0 -1
- package/lib/shopperBaskets.d.ts +0 -10259
- package/lib/shopperBaskets.js +0 -1
- package/lib/shopperBasketsv2.cjs.d.ts +0 -10453
- package/lib/shopperBasketsv2.cjs.js +0 -1
- package/lib/shopperBasketsv2.d.ts +0 -10453
- package/lib/shopperBasketsv2.js +0 -1
- package/lib/shopperConfigurations.cjs.d.ts +0 -601
- package/lib/shopperConfigurations.cjs.js +0 -1
- package/lib/shopperConfigurations.d.ts +0 -601
- package/lib/shopperConfigurations.js +0 -1
- package/lib/shopperConsents.cjs.d.ts +0 -1142
- package/lib/shopperConsents.cjs.js +0 -1
- package/lib/shopperConsents.d.ts +0 -1142
- package/lib/shopperConsents.js +0 -1
- package/lib/shopperContext.cjs.d.ts +0 -1401
- package/lib/shopperContext.cjs.js +0 -1
- package/lib/shopperContext.d.ts +0 -1401
- package/lib/shopperContext.js +0 -1
- package/lib/shopperCustomers.cjs.d.ts +0 -12425
- package/lib/shopperCustomers.cjs.js +0 -1
- package/lib/shopperCustomers.d.ts +0 -12425
- package/lib/shopperCustomers.js +0 -1
- package/lib/shopperExperience.cjs.d.ts +0 -1169
- package/lib/shopperExperience.cjs.js +0 -1
- package/lib/shopperExperience.d.ts +0 -1169
- package/lib/shopperExperience.js +0 -1
- package/lib/shopperGiftCertificates.cjs.d.ts +0 -729
- package/lib/shopperGiftCertificates.cjs.js +0 -1
- package/lib/shopperGiftCertificates.d.ts +0 -729
- package/lib/shopperGiftCertificates.js +0 -1
- package/lib/shopperLogin.cjs.d.ts +0 -3842
- package/lib/shopperLogin.cjs.js +0 -1
- package/lib/shopperLogin.d.ts +0 -3842
- package/lib/shopperLogin.js +0 -1
- package/lib/shopperOrders.cjs.d.ts +0 -5393
- package/lib/shopperOrders.cjs.js +0 -1
- package/lib/shopperOrders.d.ts +0 -5393
- package/lib/shopperOrders.js +0 -1
- package/lib/shopperProducts.cjs.d.ts +0 -3479
- package/lib/shopperProducts.cjs.js +0 -1
- package/lib/shopperProducts.d.ts +0 -3479
- package/lib/shopperProducts.js +0 -1
- package/lib/shopperPromotions.cjs.d.ts +0 -1001
- package/lib/shopperPromotions.cjs.js +0 -1
- package/lib/shopperPromotions.d.ts +0 -1001
- package/lib/shopperPromotions.js +0 -1
- package/lib/shopperSearch.cjs.d.ts +0 -3352
- package/lib/shopperSearch.cjs.js +0 -1
- package/lib/shopperSearch.d.ts +0 -3352
- package/lib/shopperSearch.js +0 -1
- package/lib/shopperSeo.cjs.d.ts +0 -769
- package/lib/shopperSeo.cjs.js +0 -1
- package/lib/shopperSeo.d.ts +0 -769
- package/lib/shopperSeo.js +0 -1
- package/lib/shopperStores.cjs.d.ts +0 -1289
- package/lib/shopperStores.cjs.js +0 -1
- package/lib/shopperStores.d.ts +0 -1289
- package/lib/shopperStores.js +0 -1
- package/lib/templateUrl.cjs.d.ts +0 -76
- package/lib/templateUrl.cjs.js +0 -1
- package/lib/templateUrl.d.ts +0 -76
- package/lib/templateUrl.js +0 -1
- package/lib/version.cjs.d.ts +0 -3
- package/lib/version.cjs.js +0 -1
- package/lib/version.d.ts +0 -3
- package/lib/version.js +0 -1
package/lib/shopperProducts.d.ts
DELETED
|
@@ -1,3479 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2021, salesforce.com, inc.
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
-
*/
|
|
7
|
-
import { RequestInit as NodeRequestInit } from "node-fetch";
|
|
8
|
-
/*
|
|
9
|
-
* Copyright (c) 2025, Salesforce, Inc.
|
|
10
|
-
* All rights reserved.
|
|
11
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
13
|
-
*/
|
|
14
|
-
declare const defaultBaseUri = "https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/v1";
|
|
15
|
-
/**
|
|
16
|
-
* Makes a type easier to read.
|
|
17
|
-
*/
|
|
18
|
-
type Prettify<T> = NonNullable<{
|
|
19
|
-
[K in keyof T]: T[K];
|
|
20
|
-
}>;
|
|
21
|
-
/**
|
|
22
|
-
* Generates the types required on a method, based on those provided in the config.
|
|
23
|
-
*/
|
|
24
|
-
type CompositeParameters<MethodParameters extends Record<string, unknown>, ConfigParameters extends Record<string, unknown>> = Prettify<Omit<MethodParameters, keyof ConfigParameters> & Partial<MethodParameters>>;
|
|
25
|
-
/**
|
|
26
|
-
* If an object has a `parameters` property, and the `parameters` object has required properties,
|
|
27
|
-
* then the `parameters` property on the root object is marked as required.
|
|
28
|
-
*/
|
|
29
|
-
type RequireParametersUnlessAllAreOptional<T extends {
|
|
30
|
-
parameters?: Record<string, unknown>;
|
|
31
|
-
}> = Record<string, never> extends NonNullable<T["parameters"]> ? T : Prettify<T & Required<Pick<T, "parameters">>>;
|
|
32
|
-
/**
|
|
33
|
-
* Template parameters used in the base URI of all API endpoints. `version` will default to `"v1"`
|
|
34
|
-
* if not specified.
|
|
35
|
-
*/
|
|
36
|
-
interface BaseUriParameters {
|
|
37
|
-
shortCode: string;
|
|
38
|
-
}
|
|
39
|
-
type LocaleCode = {
|
|
40
|
-
[key: string]: any;
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Generic interface for path parameters.
|
|
44
|
-
*/
|
|
45
|
-
interface PathParameters {
|
|
46
|
-
[key: string]: string | number | boolean;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Generic interface for query parameters.
|
|
50
|
-
*/
|
|
51
|
-
interface QueryParameters {
|
|
52
|
-
[key: string]: string | number | boolean | string[] | number[] | LocaleCode;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Alias for `RequestInit` from TypeScript's DOM lib, to more clearly differentiate
|
|
56
|
-
* it from the `RequestInit` provided by node-fetch.
|
|
57
|
-
*/
|
|
58
|
-
type BrowserRequestInit = RequestInit;
|
|
59
|
-
/**
|
|
60
|
-
* Any properties supported in either the browser or node are accepted.
|
|
61
|
-
* Using the right properties in the right context is left to the user.
|
|
62
|
-
*/
|
|
63
|
-
type FetchOptions = NodeRequestInit & BrowserRequestInit;
|
|
64
|
-
/**
|
|
65
|
-
* Base options that can be passed to the `ClientConfig` class.
|
|
66
|
-
*/
|
|
67
|
-
interface ClientConfigInit<Params extends BaseUriParameters> {
|
|
68
|
-
baseUri?: string;
|
|
69
|
-
proxy?: string;
|
|
70
|
-
headers?: {
|
|
71
|
-
[key: string]: string;
|
|
72
|
-
};
|
|
73
|
-
parameters: Params;
|
|
74
|
-
fetchOptions?: FetchOptions;
|
|
75
|
-
transformRequest?: (data: unknown, headers: {
|
|
76
|
-
[key: string]: string;
|
|
77
|
-
}) => Required<FetchOptions>["body"];
|
|
78
|
-
throwOnBadResponse?: boolean;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Configuration parameters common to Commerce SDK clients
|
|
82
|
-
*/
|
|
83
|
-
declare class ClientConfig<Params extends BaseUriParameters> implements ClientConfigInit<Params> {
|
|
84
|
-
baseUri?: string;
|
|
85
|
-
proxy?: string;
|
|
86
|
-
headers: {
|
|
87
|
-
[key: string]: string;
|
|
88
|
-
};
|
|
89
|
-
parameters: Params;
|
|
90
|
-
fetchOptions: FetchOptions;
|
|
91
|
-
transformRequest: NonNullable<ClientConfigInit<Params>["transformRequest"]>;
|
|
92
|
-
throwOnBadResponse: boolean;
|
|
93
|
-
constructor(config: ClientConfigInit<Params>);
|
|
94
|
-
static readonly defaults: Pick<Required<ClientConfigInit<never>>, "transformRequest">;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* @type Image: Product image
|
|
98
|
-
*
|
|
99
|
-
* @property alt: The localized alternative text of the image.
|
|
100
|
-
*
|
|
101
|
-
* @property disBaseLink: Base URL for the Dynamic Image Service (DIS) address. This is only shown if the image is stored on the server and DIS is enabled.
|
|
102
|
-
*
|
|
103
|
-
* @property link: The URL of the actual image.
|
|
104
|
-
* - **Min Length:** 1
|
|
105
|
-
*
|
|
106
|
-
* @property title: The localized title of the image.
|
|
107
|
-
*
|
|
108
|
-
*/
|
|
109
|
-
type Image = {
|
|
110
|
-
alt?: string;
|
|
111
|
-
disBaseLink?: string;
|
|
112
|
-
link: string;
|
|
113
|
-
title?: string;
|
|
114
|
-
} & {
|
|
115
|
-
[key: string]: any;
|
|
116
|
-
};
|
|
117
|
-
/**
|
|
118
|
-
* @type VariationAttributeValue: Document representing a variation attribute value.
|
|
119
|
-
*
|
|
120
|
-
* @property description: The localized description of the variation value.
|
|
121
|
-
*
|
|
122
|
-
* @property image: The first product image for the configured viewtype and this variation value.
|
|
123
|
-
*
|
|
124
|
-
* @property imageSwatch: The first product image for the configured viewtype and this variation value (typically the swatch image).
|
|
125
|
-
*
|
|
126
|
-
* @property name: The localized display name of the variation value.
|
|
127
|
-
*
|
|
128
|
-
* @property orderable: A flag indicating whether at least one variant with this variation attribute value is available to sell.
|
|
129
|
-
*
|
|
130
|
-
* @property value: The actual variation value.
|
|
131
|
-
* - **Min Length:** 1
|
|
132
|
-
*
|
|
133
|
-
*/
|
|
134
|
-
type VariationAttributeValue = {
|
|
135
|
-
description?: string;
|
|
136
|
-
image?: Image;
|
|
137
|
-
imageSwatch?: Image;
|
|
138
|
-
name?: string;
|
|
139
|
-
orderable?: boolean;
|
|
140
|
-
value: string;
|
|
141
|
-
} & {
|
|
142
|
-
[key: string]: any;
|
|
143
|
-
};
|
|
144
|
-
/**
|
|
145
|
-
* @type VariationAttribute: Document representing a variation attribute.
|
|
146
|
-
*
|
|
147
|
-
* @property id: The ID of the variation attribute.
|
|
148
|
-
* - **Min Length:** 1
|
|
149
|
-
*
|
|
150
|
-
* @property name: The localized display name of the variation attribute.
|
|
151
|
-
*
|
|
152
|
-
* @property values: The sorted array of variation values. This array can be empty.
|
|
153
|
-
*
|
|
154
|
-
*/
|
|
155
|
-
type VariationAttribute = {
|
|
156
|
-
id: string;
|
|
157
|
-
name?: string;
|
|
158
|
-
values?: Array<VariationAttributeValue>;
|
|
159
|
-
} & {
|
|
160
|
-
[key: string]: any;
|
|
161
|
-
};
|
|
162
|
-
/**
|
|
163
|
-
* @type VariationGroup: Representation of a group of variant products by an attribute. This is a non-buyable entity, provides inheritable attributes for its product variants, and is used for navigation. *Doesn\'t have a SKU.*
|
|
164
|
-
*
|
|
165
|
-
* @property orderable: A flag indicating whether the variation group is orderable.
|
|
166
|
-
*
|
|
167
|
-
* @property price: The sales price of the variation group.
|
|
168
|
-
*
|
|
169
|
-
* @property productId: The ID (SKU) of the variation group.
|
|
170
|
-
* - **Min Length:** 1
|
|
171
|
-
* - **Max Length:** 100
|
|
172
|
-
*
|
|
173
|
-
* @property variationValues: The actual variation attribute ID - value pairs.
|
|
174
|
-
*
|
|
175
|
-
*/
|
|
176
|
-
type VariationGroup = {
|
|
177
|
-
orderable: boolean;
|
|
178
|
-
price: number;
|
|
179
|
-
productId: string;
|
|
180
|
-
variationValues: {
|
|
181
|
-
[key: string]: string;
|
|
182
|
-
};
|
|
183
|
-
} & {
|
|
184
|
-
[key: string]: any;
|
|
185
|
-
};
|
|
186
|
-
/**
|
|
187
|
-
* @type ProductType: Document representing a product type.
|
|
188
|
-
*
|
|
189
|
-
* @property bundle: A flag indicating whether the product is a bundle.
|
|
190
|
-
*
|
|
191
|
-
* @property item: A flag indicating whether the product is a standard item.
|
|
192
|
-
*
|
|
193
|
-
* @property master: A flag indicating whether the product is a master.
|
|
194
|
-
*
|
|
195
|
-
* @property option: A flag indicating whether the product is an option.
|
|
196
|
-
*
|
|
197
|
-
* @property set: A flag indicating whether the product is a set.
|
|
198
|
-
*
|
|
199
|
-
* @property variant: A flag indicating whether the product is a variant.
|
|
200
|
-
*
|
|
201
|
-
* @property variationGroup: A flag indicating whether the product is a variation group.
|
|
202
|
-
*
|
|
203
|
-
*/
|
|
204
|
-
type ProductType = {
|
|
205
|
-
bundle?: boolean;
|
|
206
|
-
item?: boolean;
|
|
207
|
-
master?: boolean;
|
|
208
|
-
option?: boolean;
|
|
209
|
-
set?: boolean;
|
|
210
|
-
variant?: boolean;
|
|
211
|
-
variationGroup?: boolean;
|
|
212
|
-
} & {
|
|
213
|
-
[key: string]: any;
|
|
214
|
-
};
|
|
215
|
-
/**
|
|
216
|
-
* @type ProductPriceTable: Tiered Price Level Object
|
|
217
|
-
*
|
|
218
|
-
* @property price: Price for the product for the specified tier for the specified pricebook
|
|
219
|
-
*
|
|
220
|
-
* @property pricebook: The active pricebook for which this price is defined
|
|
221
|
-
*
|
|
222
|
-
* @property quantity: Quantity tier for which the price is defined.
|
|
223
|
-
*
|
|
224
|
-
*/
|
|
225
|
-
type ProductPriceTable = {
|
|
226
|
-
price?: number;
|
|
227
|
-
pricebook?: string;
|
|
228
|
-
quantity?: number;
|
|
229
|
-
} & {
|
|
230
|
-
[key: string]: any;
|
|
231
|
-
};
|
|
232
|
-
/**
|
|
233
|
-
* @type RecommendationType: Document representing a recommendation type.
|
|
234
|
-
*
|
|
235
|
-
* @property displayValue: The localized display value of the recommendation type.
|
|
236
|
-
*
|
|
237
|
-
* @property value: The value of the recommendation type.
|
|
238
|
-
*
|
|
239
|
-
*/
|
|
240
|
-
type RecommendationType = {
|
|
241
|
-
displayValue: string;
|
|
242
|
-
value: number;
|
|
243
|
-
} & {
|
|
244
|
-
[key: string]: any;
|
|
245
|
-
};
|
|
246
|
-
/**
|
|
247
|
-
* @type Recommendation: Document representing a product recommendation.
|
|
248
|
-
*
|
|
249
|
-
* @property calloutMsg: The localized callout message of the recommendation.
|
|
250
|
-
*
|
|
251
|
-
* @property image:
|
|
252
|
-
*
|
|
253
|
-
* @property longDescription: The localized long description of the recommendation.
|
|
254
|
-
*
|
|
255
|
-
* @property name: The localized name of the recommendation.
|
|
256
|
-
*
|
|
257
|
-
* @property recommendationType:
|
|
258
|
-
*
|
|
259
|
-
* @property recommendedItemId: The recommended item ID of the recommendation.
|
|
260
|
-
*
|
|
261
|
-
* @property shortDescription: The localized short description of the recommendation.
|
|
262
|
-
*
|
|
263
|
-
*/
|
|
264
|
-
type Recommendation = {
|
|
265
|
-
calloutMsg?: string;
|
|
266
|
-
image?: Image;
|
|
267
|
-
longDescription?: string;
|
|
268
|
-
name?: string;
|
|
269
|
-
recommendationType: RecommendationType;
|
|
270
|
-
recommendedItemId?: string;
|
|
271
|
-
shortDescription?: string;
|
|
272
|
-
} & {
|
|
273
|
-
[key: string]: any;
|
|
274
|
-
};
|
|
275
|
-
/**
|
|
276
|
-
* @type PriceRange: Document representing price ranges for a product which happens to be a master product (per Pricebook)
|
|
277
|
-
*
|
|
278
|
-
* @property maxPrice: Maximum price for the given pricebook (usually for a master Product would be the price for the Variant which has the highest price out of all Variants in that pricebook)
|
|
279
|
-
*
|
|
280
|
-
* @property minPrice: Minimum price for the given pricebook (usually for a master Product would be the price for the Variant which has the least price out of all Variants in that pricebook)
|
|
281
|
-
*
|
|
282
|
-
* @property pricebook: The active pricebook from which the min and the max prices are calculated. The pricebook is based on the site context of the request as defined in ECOM.
|
|
283
|
-
*
|
|
284
|
-
*/
|
|
285
|
-
type PriceRange = {
|
|
286
|
-
maxPrice?: number;
|
|
287
|
-
minPrice?: number;
|
|
288
|
-
pricebook?: string;
|
|
289
|
-
} & {
|
|
290
|
-
[key: string]: any;
|
|
291
|
-
};
|
|
292
|
-
/**
|
|
293
|
-
* @type ProductPromotion: Document representing a product promotion.
|
|
294
|
-
*
|
|
295
|
-
* @property calloutMsg: The localized call-out message of the promotion.
|
|
296
|
-
*
|
|
297
|
-
* @property promotionId: The unique ID of the promotion.
|
|
298
|
-
*
|
|
299
|
-
* @property promotionalPrice: The promotional price for this product.
|
|
300
|
-
*
|
|
301
|
-
*/
|
|
302
|
-
type ProductPromotion = {
|
|
303
|
-
calloutMsg: string;
|
|
304
|
-
promotionId: string;
|
|
305
|
-
promotionalPrice: number;
|
|
306
|
-
} & {
|
|
307
|
-
[key: string]: any;
|
|
308
|
-
};
|
|
309
|
-
/**
|
|
310
|
-
* A specialized value indicating the lack of definition of a currency, for example, if the value of the monetary value of the currency is an undefined number.
|
|
311
|
-
*/
|
|
312
|
-
type NoValue = "N/A";
|
|
313
|
-
/**
|
|
314
|
-
* @type CurrencyCode
|
|
315
|
-
* A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.
|
|
316
|
-
*/
|
|
317
|
-
type CurrencyCode = NoValue | string;
|
|
318
|
-
/**
|
|
319
|
-
* @type Master: The master product is a representation of a group of variant products. This is a non-buyable entity, provides inheritable attributes for its product variants, and is used for navigation. *Doesn\'t have a SKU.*
|
|
320
|
-
*
|
|
321
|
-
* @property masterId: The ID (SKU) of the master product.
|
|
322
|
-
* - **Min Length:** 1
|
|
323
|
-
* - **Max Length:** 100
|
|
324
|
-
*
|
|
325
|
-
* @property orderable: A flag indicating whether at least one of the variants can be ordered.
|
|
326
|
-
*
|
|
327
|
-
* @property price: The minimum sales price of the related variants.
|
|
328
|
-
*
|
|
329
|
-
* @property priceMax: The maximum sales price of the related variants.
|
|
330
|
-
*
|
|
331
|
-
* @property prices: List of sale prices.
|
|
332
|
-
*
|
|
333
|
-
*/
|
|
334
|
-
type Master = {
|
|
335
|
-
masterId: string;
|
|
336
|
-
orderable?: boolean;
|
|
337
|
-
price?: number;
|
|
338
|
-
priceMax?: number;
|
|
339
|
-
prices?: {
|
|
340
|
-
[key: string]: number;
|
|
341
|
-
};
|
|
342
|
-
} & {
|
|
343
|
-
[key: string]: any;
|
|
344
|
-
};
|
|
345
|
-
/**
|
|
346
|
-
* @type Variant: A product which is a variation within a master product that describes different colors, sizes, or other variation attributes. *Has a SKU.*
|
|
347
|
-
*
|
|
348
|
-
* @property orderable: A flag indicating whether the variant is orderable.
|
|
349
|
-
*
|
|
350
|
-
* @property price: The sales price of the variant.
|
|
351
|
-
*
|
|
352
|
-
* @property productId: The ID (SKU) of the variant.
|
|
353
|
-
* - **Min Length:** 1
|
|
354
|
-
* - **Max Length:** 100
|
|
355
|
-
*
|
|
356
|
-
* @property tieredPrices: List of tiered prices if the product is a variant
|
|
357
|
-
*
|
|
358
|
-
* @property variationValues: The actual variation attribute ID - value pairs.
|
|
359
|
-
*
|
|
360
|
-
*/
|
|
361
|
-
type Variant = {
|
|
362
|
-
orderable?: boolean;
|
|
363
|
-
price?: number;
|
|
364
|
-
productId: string;
|
|
365
|
-
tieredPrices?: Array<ProductPriceTable>;
|
|
366
|
-
variationValues?: {
|
|
367
|
-
[key: string]: string;
|
|
368
|
-
};
|
|
369
|
-
} & {
|
|
370
|
-
[key: string]: any;
|
|
371
|
-
};
|
|
372
|
-
/**
|
|
373
|
-
* @type PageMetaTag: Document representing a Page Meta Tag object.
|
|
374
|
-
*
|
|
375
|
-
* @property id: The ID of the Page Meta Tag.
|
|
376
|
-
*
|
|
377
|
-
* @property value: Locale-specific value of the Page Meta Tag, evaluated by resolving the rule set for the given Business Manager ID.
|
|
378
|
-
*
|
|
379
|
-
*/
|
|
380
|
-
type PageMetaTag = {
|
|
381
|
-
id?: string;
|
|
382
|
-
value?: string;
|
|
383
|
-
} & {
|
|
384
|
-
[key: string]: any;
|
|
385
|
-
};
|
|
386
|
-
/**
|
|
387
|
-
* @type ProductLink: Document representing a link between two products. It contains the ID of the source and target products, the type of product link, and the URLs to retrieve product data.
|
|
388
|
-
*
|
|
389
|
-
* @property sourceProductId: The semantic ID of the product this product link is coming from.
|
|
390
|
-
* - **Min Length:** 1
|
|
391
|
-
* - **Max Length:** 100
|
|
392
|
-
*
|
|
393
|
-
* @property sourceProductLink: The URL addressing the product this product link is coming from.
|
|
394
|
-
*
|
|
395
|
-
* @property targetProductId: The semantic ID of the product this product link is pointing to.
|
|
396
|
-
* - **Min Length:** 1
|
|
397
|
-
* - **Max Length:** 100
|
|
398
|
-
*
|
|
399
|
-
* @property targetProductLink: The URL addressing the product this product link is pointing to.
|
|
400
|
-
*
|
|
401
|
-
* @property type: The type of product link.
|
|
402
|
-
*
|
|
403
|
-
*/
|
|
404
|
-
type ProductLink = {
|
|
405
|
-
sourceProductId: string;
|
|
406
|
-
sourceProductLink: string;
|
|
407
|
-
targetProductId: string;
|
|
408
|
-
targetProductLink: string;
|
|
409
|
-
type: ProductLinkTypeEnum;
|
|
410
|
-
} & {
|
|
411
|
-
[key: string]: any;
|
|
412
|
-
};
|
|
413
|
-
type ProductLinkTypeEnum = "cross_sell" | "replacement" | "up_sell" | "accessory" | "newer_version" | "alt_orderunit" | "spare_part" | "other";
|
|
414
|
-
/**
|
|
415
|
-
* @type OptionValue: Document representing an option value.
|
|
416
|
-
*
|
|
417
|
-
* @property default: A flag indicating whether this option value is the default one.
|
|
418
|
-
*
|
|
419
|
-
* @property id: The ID of the option value.
|
|
420
|
-
* - **Min Length:** 1
|
|
421
|
-
* - **Max Length:** 100
|
|
422
|
-
*
|
|
423
|
-
* @property name: The localized name of the option value.
|
|
424
|
-
*
|
|
425
|
-
* @property price: The effective price of the option value.
|
|
426
|
-
*
|
|
427
|
-
*/
|
|
428
|
-
type OptionValue = {
|
|
429
|
-
default?: boolean;
|
|
430
|
-
id: string;
|
|
431
|
-
name?: string;
|
|
432
|
-
price?: number;
|
|
433
|
-
} & {
|
|
434
|
-
[key: string]: any;
|
|
435
|
-
};
|
|
436
|
-
/**
|
|
437
|
-
* @type Option: Product options enable you to sell configurable products that have optional accessories, upgrades, or additional services. Options are always purchased with a product and can\'t be purchased separately. *Product Option has a SKU and a price associated with it.*
|
|
438
|
-
*
|
|
439
|
-
* @property description: The localized description of the option.
|
|
440
|
-
*
|
|
441
|
-
* @property id: The ID of the option.
|
|
442
|
-
* - **Min Length:** 1
|
|
443
|
-
* - **Max Length:** 100
|
|
444
|
-
*
|
|
445
|
-
* @property image: The URL to the option image.
|
|
446
|
-
*
|
|
447
|
-
* @property name: The localized name of the option.
|
|
448
|
-
*
|
|
449
|
-
* @property values: The array of option values. This array can be empty.
|
|
450
|
-
*
|
|
451
|
-
*/
|
|
452
|
-
type Option = {
|
|
453
|
-
description?: string;
|
|
454
|
-
id: string;
|
|
455
|
-
image?: string;
|
|
456
|
-
name?: string;
|
|
457
|
-
values?: Array<OptionValue>;
|
|
458
|
-
} & {
|
|
459
|
-
[key: string]: any;
|
|
460
|
-
};
|
|
461
|
-
/**
|
|
462
|
-
* @type ImageGroup: Document representing an image group containing a list of images for a particular view type and an optional variation value.
|
|
463
|
-
*
|
|
464
|
-
* @property images: The images of the image group.
|
|
465
|
-
*
|
|
466
|
-
* @property variationAttributes: Returns a list of variation attributes applying to this image group.
|
|
467
|
-
*
|
|
468
|
-
* @property viewType: The image view type.
|
|
469
|
-
*
|
|
470
|
-
*/
|
|
471
|
-
type ImageGroup = {
|
|
472
|
-
images: Array<Image>;
|
|
473
|
-
variationAttributes?: Array<VariationAttribute>;
|
|
474
|
-
viewType: string;
|
|
475
|
-
} & {
|
|
476
|
-
[key: string]: any;
|
|
477
|
-
};
|
|
478
|
-
/**
|
|
479
|
-
* @type Inventory: Document representing inventory information of the current product for a particular inventory list.
|
|
480
|
-
*
|
|
481
|
-
* @property ats: The Available To Sell (ATS) of the product. If it is infinity, the return value is 999999. The value can be overwritten by the OCAPI setting \'product.inventory.ats.max_threshold\'.
|
|
482
|
-
*
|
|
483
|
-
* @property backorderable: A flag indicating whether the product is backorderable.
|
|
484
|
-
*
|
|
485
|
-
* @property id: The inventory ID.
|
|
486
|
-
* - **Min Length:** 1
|
|
487
|
-
* - **Max Length:** 256
|
|
488
|
-
*
|
|
489
|
-
* @property inStockDate: A flag indicating the date when the product will be in stock.
|
|
490
|
-
*
|
|
491
|
-
* @property orderable: A flag indicating whether at least one of the products is available to sell.
|
|
492
|
-
*
|
|
493
|
-
* @property preorderable: A flag indicating whether the product is preorderable.
|
|
494
|
-
*
|
|
495
|
-
* @property stockLevel: The stock level of the product. If it is infinity, the return value is 999999. The value can be overwritten by the OCAPI setting \'product.inventory.stock_level.max_threshold\'.
|
|
496
|
-
*
|
|
497
|
-
*/
|
|
498
|
-
type Inventory = {
|
|
499
|
-
ats?: number;
|
|
500
|
-
backorderable?: boolean;
|
|
501
|
-
id: string;
|
|
502
|
-
inStockDate?: string;
|
|
503
|
-
orderable?: boolean;
|
|
504
|
-
preorderable?: boolean;
|
|
505
|
-
stockLevel?: number;
|
|
506
|
-
} & {
|
|
507
|
-
[key: string]: any;
|
|
508
|
-
};
|
|
509
|
-
/**
|
|
510
|
-
* @type Product: Any product that is sold, shown alone, and does not have variations such as different sizes or colors. A product has no reliance on any other product for inheritance. *A product has a SKU and can have a product option, which has a different SKU*.
|
|
511
|
-
*
|
|
512
|
-
* @property brand: The product\'s brand.
|
|
513
|
-
*
|
|
514
|
-
* @property bundledProducts: The array of all bundled products of this product.
|
|
515
|
-
*
|
|
516
|
-
* @property currency:
|
|
517
|
-
*
|
|
518
|
-
* @property ean: The European Article Number of the product.
|
|
519
|
-
*
|
|
520
|
-
* @property fetchDate:
|
|
521
|
-
*
|
|
522
|
-
* @property id: The id (SKU) of the product.
|
|
523
|
-
* - **Min Length:** 1
|
|
524
|
-
* - **Max Length:** 100
|
|
525
|
-
*
|
|
526
|
-
* @property imageGroups: The array of product image groups.
|
|
527
|
-
*
|
|
528
|
-
* @property inventories: The array of product inventories explicitly requested via the \'inventory_ids\' query parameter. This property is only returned in context of the \'availability\' expansion.
|
|
529
|
-
*
|
|
530
|
-
* @property inventory: The site default inventory information. This property is only returned in context of the \'availability\' expansion.
|
|
531
|
-
*
|
|
532
|
-
* @property longDescription: The localized product\'s long description.
|
|
533
|
-
*
|
|
534
|
-
* @property manufacturerName: The product\'s manufacturer name.
|
|
535
|
-
*
|
|
536
|
-
* @property manufacturerSku: The product\'s manufacturer SKU.
|
|
537
|
-
*
|
|
538
|
-
* @property master: The master product information, only for types: master, variation group, and variant.
|
|
539
|
-
*
|
|
540
|
-
* @property minOrderQuantity: The minimum order quantity for this product.
|
|
541
|
-
*
|
|
542
|
-
* @property name: The localized product name.
|
|
543
|
-
*
|
|
544
|
-
* @property options: The array of product options, only for type option. This array can be empty.
|
|
545
|
-
*
|
|
546
|
-
* @property pageDescription: The localized product\'s page description.
|
|
547
|
-
*
|
|
548
|
-
* @property pageKeywords: The localized product\'s page description.
|
|
549
|
-
*
|
|
550
|
-
* @property pageTitle: The localized product\'s page title.
|
|
551
|
-
*
|
|
552
|
-
* @property pageMetaTags: Page Meta tags associated with the given product.
|
|
553
|
-
*
|
|
554
|
-
* @property price: The sales price of the product. In case of complex products, like master or set, this is the minimum price of related child products.
|
|
555
|
-
*
|
|
556
|
-
* @property pricePerUnit: The price per unit if defined for the product
|
|
557
|
-
*
|
|
558
|
-
* @property pricePerUnitMax: The max price per unit typically for a master product\'s variant.
|
|
559
|
-
*
|
|
560
|
-
* @property priceMax: The maximum sales of related child products in complex products like master or set.
|
|
561
|
-
*
|
|
562
|
-
* @property priceRanges: Array of one or more price range objects representing one or more Pricebooks in context for the site.
|
|
563
|
-
*
|
|
564
|
-
* @property prices: The prices map with pricebook IDs and their values.
|
|
565
|
-
*
|
|
566
|
-
* @property primaryCategoryId: The ID of the products primary category.
|
|
567
|
-
*
|
|
568
|
-
* @property productLinks: The array of source and target product links information.
|
|
569
|
-
*
|
|
570
|
-
* @property productPromotions: An array of active customer product promotions for this product, sorted by promotion priority using SORT_BY_EXCLUSIVITY ordering (exclusivity → rank → promotion class → discount type → best discount → ID). This array can be empty. Coupon promotions are not returned in this array. See [PromotionPlan.SORT_BY_EXCLUSIVITY](https://salesforcecommercecloud.github.io/b2c-dev-doc/docs/current/scriptapi/html/index.html?target=class_dw_campaign_PromotionPlan.html) for more details.
|
|
571
|
-
*
|
|
572
|
-
* @property recommendations: Returns a list of recommendations.
|
|
573
|
-
*
|
|
574
|
-
* @property setProducts: The array of set products of this product.
|
|
575
|
-
*
|
|
576
|
-
* @property shortDescription: The localized product short description.
|
|
577
|
-
*
|
|
578
|
-
* @property slugUrl: The complete link to this product\'s storefront page.
|
|
579
|
-
*
|
|
580
|
-
* @property stepQuantity: The steps in which the order amount of the product can be increased.
|
|
581
|
-
*
|
|
582
|
-
* @property tieredPrices: The document represents list of tiered prices if the product is a variant
|
|
583
|
-
*
|
|
584
|
-
* @property type: The product type information. Can be one or more of the following values: item, master, variation_group, variant, bundle, and set.
|
|
585
|
-
*
|
|
586
|
-
* @property unit: The sales unit of the product.
|
|
587
|
-
*
|
|
588
|
-
* @property upc: The Universal Product Code (UPC).
|
|
589
|
-
*
|
|
590
|
-
* @property validFrom: The time a product is valid from.
|
|
591
|
-
*
|
|
592
|
-
* @property validTo: The time a product is valid to.
|
|
593
|
-
*
|
|
594
|
-
* @property variants: The array of actual variants. Only for master, variation group, and variant types. This array can be empty.
|
|
595
|
-
*
|
|
596
|
-
* @property variationAttributes: Sorted array of variation attributes information. Only for master, variation group, and variant types. This array can be empty.
|
|
597
|
-
*
|
|
598
|
-
* @property variationGroups: The array of actual variation groups. Only for master, variation group, and variant types. This array can be empty.
|
|
599
|
-
*
|
|
600
|
-
* @property variationValues: The actual variation attribute ID - value pairs. Only for variant and variation group types.
|
|
601
|
-
*
|
|
602
|
-
*/
|
|
603
|
-
type Product = {
|
|
604
|
-
brand?: string;
|
|
605
|
-
bundledProducts?: Array<BundledProduct>;
|
|
606
|
-
currency?: CurrencyCode;
|
|
607
|
-
ean?: string;
|
|
608
|
-
fetchDate?: number;
|
|
609
|
-
id: string;
|
|
610
|
-
imageGroups?: Array<ImageGroup>;
|
|
611
|
-
inventories?: Array<Inventory>;
|
|
612
|
-
inventory?: Inventory;
|
|
613
|
-
longDescription?: string;
|
|
614
|
-
manufacturerName?: string;
|
|
615
|
-
manufacturerSku?: string;
|
|
616
|
-
master?: Master;
|
|
617
|
-
minOrderQuantity?: number;
|
|
618
|
-
name?: string;
|
|
619
|
-
options?: Array<Option>;
|
|
620
|
-
pageDescription?: string;
|
|
621
|
-
pageKeywords?: string;
|
|
622
|
-
pageTitle?: string;
|
|
623
|
-
pageMetaTags?: Array<PageMetaTag>;
|
|
624
|
-
price?: number;
|
|
625
|
-
pricePerUnit?: number;
|
|
626
|
-
pricePerUnitMax?: number;
|
|
627
|
-
priceMax?: number;
|
|
628
|
-
priceRanges?: Array<PriceRange>;
|
|
629
|
-
prices?: {
|
|
630
|
-
[key: string]: number;
|
|
631
|
-
};
|
|
632
|
-
primaryCategoryId?: string;
|
|
633
|
-
productLinks?: Array<ProductLink>;
|
|
634
|
-
productPromotions?: Array<ProductPromotion>;
|
|
635
|
-
recommendations?: Array<Recommendation>;
|
|
636
|
-
setProducts?: Array<Product>;
|
|
637
|
-
shortDescription?: string;
|
|
638
|
-
slugUrl?: string;
|
|
639
|
-
stepQuantity?: number;
|
|
640
|
-
tieredPrices?: Array<ProductPriceTable>;
|
|
641
|
-
type?: ProductType;
|
|
642
|
-
unit?: string;
|
|
643
|
-
upc?: string;
|
|
644
|
-
validFrom?: string;
|
|
645
|
-
validTo?: string;
|
|
646
|
-
variants?: Array<Variant>;
|
|
647
|
-
variationAttributes?: Array<VariationAttribute>;
|
|
648
|
-
variationGroups?: Array<VariationGroup>;
|
|
649
|
-
variationValues?: {
|
|
650
|
-
[key: string]: string;
|
|
651
|
-
};
|
|
652
|
-
} & {
|
|
653
|
-
[key: string]: any;
|
|
654
|
-
};
|
|
655
|
-
/**
|
|
656
|
-
* @type BundledProduct: A bundle of products that can be bought together (all or nothing). Each product in the bundle can itself be bought independently, but this is outside of the context of the bundle. A bundle is a purchasing convenience. *Product bundle has a SKU and price.*
|
|
657
|
-
*
|
|
658
|
-
* @property id:
|
|
659
|
-
*
|
|
660
|
-
* @property product: The product being bundled.
|
|
661
|
-
*
|
|
662
|
-
* @property quantity: For the product being bundled, the quantity added to the bundle.
|
|
663
|
-
*
|
|
664
|
-
*/
|
|
665
|
-
type BundledProduct = {
|
|
666
|
-
id: string;
|
|
667
|
-
product: Product;
|
|
668
|
-
quantity: number;
|
|
669
|
-
} & {
|
|
670
|
-
[key: string]: any;
|
|
671
|
-
};
|
|
672
|
-
/**
|
|
673
|
-
* @type PathRecord: Document representing most basic info (id and name) of a category or catalog.
|
|
674
|
-
*
|
|
675
|
-
* @property id: The id of the category path.
|
|
676
|
-
*
|
|
677
|
-
* @property name: The name of the category path.
|
|
678
|
-
*
|
|
679
|
-
*/
|
|
680
|
-
type PathRecord = {
|
|
681
|
-
id?: string;
|
|
682
|
-
name?: string;
|
|
683
|
-
} & {
|
|
684
|
-
[key: string]: any;
|
|
685
|
-
};
|
|
686
|
-
/**
|
|
687
|
-
* @type Category: Categories allow products to be organized into hierarchical structures. Categories can have relationships to other parent categories. Each category can also provide a context inherited by subcategories. For example, a category may have an attribute value assigned to it, and any product assigned to the category or a subcategory would inherit the attribute value as long as the product is assigned. Once the product is removed from the category those attribute values would no longer be in the context of the product. Linking of categories is also used for Site hierarchical navigation. For example, inside \'Clothing\' you may have \'Mens\', and inside \'Mens\' you may have \'Pants\'. Categories are not *Tags.*
|
|
688
|
-
*
|
|
689
|
-
* @property categories: Array of subcategories. Can be empty.
|
|
690
|
-
*
|
|
691
|
-
* @property description: The localized description of the category.
|
|
692
|
-
*
|
|
693
|
-
* @property id: The ID of the category.
|
|
694
|
-
* - **Min Length:** 1
|
|
695
|
-
* - **Max Length:** 256
|
|
696
|
-
*
|
|
697
|
-
* @property image: The URL of the category image.
|
|
698
|
-
*
|
|
699
|
-
* @property name: The localized name of the category.
|
|
700
|
-
*
|
|
701
|
-
* @property onlineSubCategoriesCount: The total number of online sub-categories. This information will be available from B2C Commerce version 24.5.
|
|
702
|
-
*
|
|
703
|
-
* @property pageDescription: The localized page description of the category.
|
|
704
|
-
*
|
|
705
|
-
* @property pageKeywords: The localized page keywords of the category.
|
|
706
|
-
*
|
|
707
|
-
* @property pageTitle: The localized page title of the category.
|
|
708
|
-
*
|
|
709
|
-
* @property parentCategoryId: The ID of the parent category.
|
|
710
|
-
*
|
|
711
|
-
* @property parentCategoryTree: The List of the parent categories.
|
|
712
|
-
*
|
|
713
|
-
* @property thumbnail: The URL of the category thumbnail.
|
|
714
|
-
*
|
|
715
|
-
*/
|
|
716
|
-
type Category = {
|
|
717
|
-
categories?: Array<Category>;
|
|
718
|
-
description?: string;
|
|
719
|
-
id: string;
|
|
720
|
-
image?: string;
|
|
721
|
-
name?: string;
|
|
722
|
-
onlineSubCategoriesCount?: number;
|
|
723
|
-
pageDescription?: string;
|
|
724
|
-
pageKeywords?: string;
|
|
725
|
-
pageTitle?: string;
|
|
726
|
-
parentCategoryId?: string;
|
|
727
|
-
parentCategoryTree?: Array<PathRecord>;
|
|
728
|
-
thumbnail?: string;
|
|
729
|
-
} & {
|
|
730
|
-
[key: string]: any;
|
|
731
|
-
};
|
|
732
|
-
/**
|
|
733
|
-
* @type CategoryResult: Result document containing an array of categories.
|
|
734
|
-
*
|
|
735
|
-
* @property data: The array of category documents.
|
|
736
|
-
*
|
|
737
|
-
* @property limit: Maximum records to retrieve per request, not to exceed the maximum defined. A limit must be at least 1 so at least one record is returned (if any match the criteria).
|
|
738
|
-
*
|
|
739
|
-
* @property total: 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.
|
|
740
|
-
*
|
|
741
|
-
*/
|
|
742
|
-
type CategoryResult = {
|
|
743
|
-
data: Array<Category>;
|
|
744
|
-
limit: number;
|
|
745
|
-
total: number;
|
|
746
|
-
} & {
|
|
747
|
-
[key: string]: any;
|
|
748
|
-
};
|
|
749
|
-
/**
|
|
750
|
-
* A specialized value indicating the system default values for locales.
|
|
751
|
-
*/
|
|
752
|
-
type DefaultFallback = "default";
|
|
753
|
-
/**
|
|
754
|
-
* @type ErrorResponse:
|
|
755
|
-
*
|
|
756
|
-
* @property title: A short, human-readable summary of the problem type. It will not change from occurrence to occurrence of the problem, except for purposes of localization
|
|
757
|
-
* - **Max Length:** 256
|
|
758
|
-
*
|
|
759
|
-
* @property type: A URI reference [RFC3986] that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be \"about:blank\". It accepts relative URIs; this means that they must be resolved relative to the document\'s base URI, as per [RFC3986], Section 5.
|
|
760
|
-
* - **Max Length:** 2048
|
|
761
|
-
*
|
|
762
|
-
* @property detail: A human-readable explanation specific to this occurrence of the problem.
|
|
763
|
-
*
|
|
764
|
-
* @property instance: A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. It accepts relative URIs; this means that they must be resolved relative to the document\'s base URI, as per [RFC3986], Section 5.
|
|
765
|
-
* - **Max Length:** 2048
|
|
766
|
-
*
|
|
767
|
-
*/
|
|
768
|
-
type ErrorResponse = {
|
|
769
|
-
title: string;
|
|
770
|
-
type: string;
|
|
771
|
-
detail: string;
|
|
772
|
-
instance?: string;
|
|
773
|
-
} & {
|
|
774
|
-
[key: string]: any;
|
|
775
|
-
};
|
|
776
|
-
/**
|
|
777
|
-
* @type LocaleCode
|
|
778
|
-
* A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
|
|
779
|
-
*/
|
|
780
|
-
type LocaleCode$0 = DefaultFallback | string;
|
|
781
|
-
/**
|
|
782
|
-
* @type ProductResult: Result document containing an array of products.
|
|
783
|
-
*
|
|
784
|
-
* @property limit: The number of returned documents.
|
|
785
|
-
*
|
|
786
|
-
* @property data: The array of product documents.
|
|
787
|
-
*
|
|
788
|
-
* @property total: The total number of documents.
|
|
789
|
-
*
|
|
790
|
-
*/
|
|
791
|
-
type ProductResult = {
|
|
792
|
-
limit: number;
|
|
793
|
-
data: Array<Product>;
|
|
794
|
-
total: number;
|
|
795
|
-
} & {
|
|
796
|
-
[key: string]: any;
|
|
797
|
-
};
|
|
798
|
-
/**
|
|
799
|
-
* @type ResultBase: Schema defining generic list result. Each response schema of a resource requiring a list response should extend this schema. Additionally it needs to be defined what data is returned.
|
|
800
|
-
*
|
|
801
|
-
* @property limit: Maximum records to retrieve per request, not to exceed the maximum defined. A limit must be at least 1 so at least one record is returned (if any match the criteria).
|
|
802
|
-
*
|
|
803
|
-
* @property total: 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.
|
|
804
|
-
*
|
|
805
|
-
*/
|
|
806
|
-
type ResultBase = {
|
|
807
|
-
limit: number;
|
|
808
|
-
total: number;
|
|
809
|
-
} & {
|
|
810
|
-
[key: string]: any;
|
|
811
|
-
};
|
|
812
|
-
type GetCategoriesLevelsEnum = 0 | 1 | 2;
|
|
813
|
-
type GetCategoryLevelsEnum = 0 | 1 | 2;
|
|
814
|
-
type GetProductExpandEnum = "none" | "availability" | "bundled_products" | "links" | "promotions" | "options" | "images" | "prices" | "variations" | "set_products" | "recommendations" | "page_meta_tags";
|
|
815
|
-
type GetProductsExpandEnum = "none" | "availability" | "links" | "promotions" | "options" | "images" | "prices" | "variations" | "recommendations" | "page_meta_tags";
|
|
816
|
-
type getCategoriesQueryParameters = {
|
|
817
|
-
ids: Array<string>;
|
|
818
|
-
levels?: 0 | 1 | 2;
|
|
819
|
-
locale?: LocaleCode$0;
|
|
820
|
-
siteId: string;
|
|
821
|
-
};
|
|
822
|
-
type getCategoriesPathParameters = {
|
|
823
|
-
organizationId: string;
|
|
824
|
-
};
|
|
825
|
-
type getCategoryQueryParameters = {
|
|
826
|
-
levels?: 0 | 1 | 2;
|
|
827
|
-
locale?: LocaleCode$0;
|
|
828
|
-
siteId: string;
|
|
829
|
-
};
|
|
830
|
-
type getCategoryPathParameters = {
|
|
831
|
-
id: string;
|
|
832
|
-
organizationId: string;
|
|
833
|
-
};
|
|
834
|
-
type getProductQueryParameters = {
|
|
835
|
-
inventoryIds?: Array<string>;
|
|
836
|
-
expand?: Array<"none" | "availability" | "bundled_products" | "links" | "promotions" | "options" | "images" | "prices" | "variations" | "set_products" | "recommendations" | "page_meta_tags">;
|
|
837
|
-
allImages?: boolean;
|
|
838
|
-
perPricebook?: boolean;
|
|
839
|
-
select?: string;
|
|
840
|
-
currency?: CurrencyCode;
|
|
841
|
-
locale?: LocaleCode$0;
|
|
842
|
-
siteId: string;
|
|
843
|
-
};
|
|
844
|
-
type getProductPathParameters = {
|
|
845
|
-
organizationId: string;
|
|
846
|
-
id: string;
|
|
847
|
-
};
|
|
848
|
-
type getProductsQueryParameters = {
|
|
849
|
-
ids: Array<string>;
|
|
850
|
-
inventoryIds?: Array<string>;
|
|
851
|
-
expand?: Array<"none" | "availability" | "links" | "promotions" | "options" | "images" | "prices" | "variations" | "recommendations" | "page_meta_tags">;
|
|
852
|
-
allImages?: boolean;
|
|
853
|
-
perPricebook?: boolean;
|
|
854
|
-
siteId: string;
|
|
855
|
-
select?: string;
|
|
856
|
-
locale?: LocaleCode$0;
|
|
857
|
-
currency?: CurrencyCode;
|
|
858
|
-
};
|
|
859
|
-
type getProductsPathParameters = {
|
|
860
|
-
organizationId: string;
|
|
861
|
-
};
|
|
862
|
-
/**
|
|
863
|
-
* All path parameters that are used by at least one ShopperProducts method.
|
|
864
|
-
*/
|
|
865
|
-
type ShopperProductsPathParameters = Partial<getCategoriesPathParameters & getCategoryPathParameters & getProductPathParameters & getProductsPathParameters & {}>;
|
|
866
|
-
/**
|
|
867
|
-
* All query parameters that are used by at least one ShopperProducts method.
|
|
868
|
-
*/
|
|
869
|
-
type ShopperProductsQueryParameters = Partial<getCategoriesQueryParameters & getCategoryQueryParameters & getProductQueryParameters & getProductsQueryParameters & {}>;
|
|
870
|
-
/**
|
|
871
|
-
* All parameters that are used by ShopperProducts.
|
|
872
|
-
*/
|
|
873
|
-
type ShopperProductsParameters = ShopperProductsPathParameters & BaseUriParameters & ShopperProductsQueryParameters;
|
|
874
|
-
/**
|
|
875
|
-
* [Shopper Products](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-products:Summary)
|
|
876
|
-
* ==================================
|
|
877
|
-
*
|
|
878
|
-
* *# API Overview
|
|
879
|
-
|
|
880
|
-
The Shopper Products API enables you to access product details for products that are online, merchandised to a particular site catalog, and ready to be sold. You can use these product details to merchandise the product on other ecommerce channels. To set up category navigation paths on other commerce apps or storefronts, you can use the Categories API.
|
|
881
|
-
|
|
882
|
-
Caching is provided for the Shopper Products API. For details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html)
|
|
883
|
-
|
|
884
|
-
## Authentication & Authorization
|
|
885
|
-
|
|
886
|
-
The client requesting the product information must have access to the Products resource. The Shopper Products API requires a shopper access token from the Shopper Login and API Access Service (SLAS).
|
|
887
|
-
|
|
888
|
-
For details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html#guest-user) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html#guest-user) in the SLAS guides.
|
|
889
|
-
|
|
890
|
-
## Use Cases
|
|
891
|
-
|
|
892
|
-
### Populate Product Listing Pages
|
|
893
|
-
|
|
894
|
-
Use the Shopper Product API so that a customer, browsing on a commerce shopping app built using Commerce Cloud APIs, can see a list of products. For example, hydrate a list of products (max 24). The API returns product details including images, prices, promotions, and product availability.
|
|
895
|
-
|
|
896
|
-

|
|
897
|
-
|
|
898
|
-
### Get Variation Product Details on an Ecommerce Channel
|
|
899
|
-
|
|
900
|
-
Use the API so that a customer, browsing on a commerce shopping app built using Commerce Cloud APIs, can switch between different variation products. The API returns product details including images, prices, promotions, and available to sell inventory.
|
|
901
|
-
|
|
902
|
-

|
|
903
|
-
|
|
904
|
-
### Retrieve Promotion Information
|
|
905
|
-
|
|
906
|
-
Promotions provide discounts to shoppers when they meet certain purchase requirements.
|
|
907
|
-
|
|
908
|
-
Promotion information is described in detail in [Promotion Details](https://developer.salesforce.com/docs/commerce/commerce-api/guide/promotion-details.html), but the following list provides several key points:
|
|
909
|
-
|
|
910
|
-
- Pricing discounts for basket and shipping promotions are NEVER returned by the 'getProduct' or 'getProducts' endpoint.
|
|
911
|
-
- Promotional pricing is ONLY returned for products that are included with non-conditional promotions.
|
|
912
|
-
- Callout messages are ALWAYS returned by the 'getProduct' and 'getProducts' endpoints.
|
|
913
|
-
|
|
914
|
-
By default, 'getProduct' and 'getProducts' return promotion information for a queried product. Promotion information includes both pricing and callout message information. However, the specific pricing and callout information that is fetched is determined by:
|
|
915
|
-
|
|
916
|
-
- Promotion Type
|
|
917
|
-
- Product Type
|
|
918
|
-
- Product Purchase Requirements
|
|
919
|
-
|
|
920
|
-
Some promotions can be displayed on a Product Data Page (PDP) or Product Listing page (PLP), while other promotions are displayed in the context of a basket, such as an order level promotion: "add the product to your basket to view price information". It is important to understand what is included in the response when designing a PDP or PLP on top of SCAPI to ensure your design aligns with implementable features.
|
|
921
|
-
|
|
922
|
-
#### Shopper Personalization
|
|
923
|
-
|
|
924
|
-
The SCAPI response can be personalized using the Shopper Context API or hooks. By setting specific values in the Shopper Context API, you can modify the response of the 'getProduct' or 'getProducts' endpoint based on the shopper's context. For instance, you can offer a 5% discount or free shipping to shoppers using mobile devices.
|
|
925
|
-
|
|
926
|
-
#### JWA Caching
|
|
927
|
-
|
|
928
|
-
The response is cached in JWA, which means promotion data contained in the response is also cached based on the TTL (Time to Live) specified in the Business Manager [Feature Switches](https://help.salesforce.com/s/articleView?id=cc.b2c_feature_switches.htm&type=5) configuration.
|
|
929
|
-
When the shopper context value is updated, a check is conducted to see if the updated shopper context affects the retrieval of product-promotion data. If it does, then the response is fetched from the source and cached in the JWA.
|
|
930
|
-
|
|
931
|
-
For details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html)
|
|
932
|
-
|
|
933
|
-
### Use Hooks
|
|
934
|
-
|
|
935
|
-
For details working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html)
|
|
936
|
-
|
|
937
|
-
### Test Description Changes
|
|
938
|
-
|
|
939
|
-
uoweefhewihpfhweipfiphwefhipwehfiewpifhewifiphehipeipwhfhipewfhiihpefipew
|
|
940
|
-
|
|
941
|
-
## Resources
|
|
942
|
-
|
|
943
|
-
### Product
|
|
944
|
-
|
|
945
|
-
A full representation of a product or service that is to merchandise. A ready to merchandise product is one that is online, categorized, and published to a channel. The information associated with a product includes, the product name, description, custom and system attributes, variations, price, availability, and images.
|
|
946
|
-
|
|
947
|
-
### Category
|
|
948
|
-
|
|
949
|
-
Categories and subcategories are the structure by which products are organized and grouped in a catalog and on a storefront. Categories can have relationships to other categories. Further, each category can provide context that is inherited by subcategories. For example, a category can have an assigned attribute. A product assigned to that category or any subcategory inherits the categories’s attribute value. Once the product is removed from the category, the attribute value is no longer inherited by the product. You can also use category linking for site hierarchical navigation. For example, inside the Clothing category you may have Men’s, and inside the Men’s category you may have Pants.
|
|
950
|
-
|
|
951
|
-
Categories are not tags.
|
|
952
|
-
|
|
953
|
-
## Endpoints
|
|
954
|
-
|
|
955
|
-
### GET /products
|
|
956
|
-
|
|
957
|
-
Returns product details for up to 24 products in one API request. You can use this API for use cases that require populating or hydrating multiple products at a time, such as populating the Product Listing Pages.
|
|
958
|
-
|
|
959
|
-
The response data includes availability, promotions, images, and prices, along with the basic product information for the products requested.
|
|
960
|
-
|
|
961
|
-
### GET /products/{id}
|
|
962
|
-
|
|
963
|
-
Returns product details about a single product. Use this API for use cases that require populating or hydrating one product at a time, such as the Product Detail Pages.
|
|
964
|
-
|
|
965
|
-
The response data includes availability, promotions, options, images, prices, variations, bundled_products, set_products, recommendations, and the basic product information for the product requested.
|
|
966
|
-
|
|
967
|
-
### GET /categories
|
|
968
|
-
|
|
969
|
-
Returns category details including the parent child relationships for one or more categories. The limit on depth for the parent-child relationship is 2.*<br />
|
|
970
|
-
*
|
|
971
|
-
* Simple example:
|
|
972
|
-
*
|
|
973
|
-
* ```typescript
|
|
974
|
-
* import { ShopperProducts } from "commerce-sdk-isomorphic";
|
|
975
|
-
*
|
|
976
|
-
* const clientConfig = {
|
|
977
|
-
* parameters: {
|
|
978
|
-
* clientId: "XXXXXX",
|
|
979
|
-
* organizationId: "XXXX",
|
|
980
|
-
* shortCode: "XXX",
|
|
981
|
-
* siteId: "XX"
|
|
982
|
-
* }
|
|
983
|
-
* };
|
|
984
|
-
* const shopperProductsClient = new ShopperProducts(clientConfig);
|
|
985
|
-
* ```
|
|
986
|
-
*
|
|
987
|
-
* <span style="font-size:.7em; display:block; text-align: right">
|
|
988
|
-
* API Version: 0.0.33<br />
|
|
989
|
-
* Last Updated: <br />
|
|
990
|
-
* </span>
|
|
991
|
-
*
|
|
992
|
-
*
|
|
993
|
-
*/
|
|
994
|
-
declare class ShopperProducts<ConfigParameters extends ShopperProductsParameters & Record<string, unknown>> {
|
|
995
|
-
// baseUri is not required on ClientConfig, but we know that we provide one in the class constructor
|
|
996
|
-
clientConfig: ClientConfig<ConfigParameters> & {
|
|
997
|
-
baseUri: string;
|
|
998
|
-
};
|
|
999
|
-
static readonly defaultBaseUri = "https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/v1";
|
|
1000
|
-
static readonly apiPaths: {
|
|
1001
|
-
getCategories: string;
|
|
1002
|
-
getCategory: string;
|
|
1003
|
-
getProduct: string;
|
|
1004
|
-
getProducts: string;
|
|
1005
|
-
};
|
|
1006
|
-
constructor(config: ClientConfigInit<ConfigParameters>);
|
|
1007
|
-
static readonly paramKeys: {
|
|
1008
|
-
readonly getCategories: readonly [
|
|
1009
|
-
"organizationId",
|
|
1010
|
-
"ids",
|
|
1011
|
-
"siteId",
|
|
1012
|
-
"levels",
|
|
1013
|
-
"locale"
|
|
1014
|
-
];
|
|
1015
|
-
readonly getCategoriesRequired: readonly [
|
|
1016
|
-
"organizationId",
|
|
1017
|
-
"ids",
|
|
1018
|
-
"siteId"
|
|
1019
|
-
];
|
|
1020
|
-
readonly getCategory: readonly [
|
|
1021
|
-
"id",
|
|
1022
|
-
"organizationId",
|
|
1023
|
-
"siteId",
|
|
1024
|
-
"levels",
|
|
1025
|
-
"locale"
|
|
1026
|
-
];
|
|
1027
|
-
readonly getCategoryRequired: readonly [
|
|
1028
|
-
"id",
|
|
1029
|
-
"organizationId",
|
|
1030
|
-
"siteId"
|
|
1031
|
-
];
|
|
1032
|
-
readonly getProduct: readonly [
|
|
1033
|
-
"organizationId",
|
|
1034
|
-
"id",
|
|
1035
|
-
"siteId",
|
|
1036
|
-
"inventoryIds",
|
|
1037
|
-
"expand",
|
|
1038
|
-
"allImages",
|
|
1039
|
-
"perPricebook",
|
|
1040
|
-
"select",
|
|
1041
|
-
"currency",
|
|
1042
|
-
"locale"
|
|
1043
|
-
];
|
|
1044
|
-
readonly getProductRequired: readonly [
|
|
1045
|
-
"organizationId",
|
|
1046
|
-
"id",
|
|
1047
|
-
"siteId"
|
|
1048
|
-
];
|
|
1049
|
-
readonly getProducts: readonly [
|
|
1050
|
-
"organizationId",
|
|
1051
|
-
"ids",
|
|
1052
|
-
"siteId",
|
|
1053
|
-
"inventoryIds",
|
|
1054
|
-
"expand",
|
|
1055
|
-
"allImages",
|
|
1056
|
-
"perPricebook",
|
|
1057
|
-
"select",
|
|
1058
|
-
"locale",
|
|
1059
|
-
"currency"
|
|
1060
|
-
];
|
|
1061
|
-
readonly getProductsRequired: readonly [
|
|
1062
|
-
"organizationId",
|
|
1063
|
-
"ids",
|
|
1064
|
-
"siteId"
|
|
1065
|
-
];
|
|
1066
|
-
};
|
|
1067
|
-
/**
|
|
1068
|
-
* When you use the URL template, the server returns multiple categories (a result object of category documents). You can use this template to obtain up to 50 categories in a single request. You must enclose the list of IDs in parentheses. If a category identifier contains parenthesis or the separator sign, you must URL encode the character.
|
|
1069
|
-
*
|
|
1070
|
-
* If you would like to get a raw Response object use the other getCategories function.
|
|
1071
|
-
*
|
|
1072
|
-
* @param options - An object containing the options for this method.
|
|
1073
|
-
* @param options.parameters - An object containing the parameters for this method.
|
|
1074
|
-
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
|
|
1075
|
-
* @param options.parameters.ids - The comma separated list of category IDs (max 50).
|
|
1076
|
-
* @param options.parameters.siteId - 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.
|
|
1077
|
-
* @param options.parameters.levels - Specifies how many levels of nested subcategories you want the server to return. The default value is 1. Valid values are 0, 1, or 2. Only online subcategories are returned.
|
|
1078
|
-
* @param options.parameters.locale - A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
|
|
1079
|
-
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
|
|
1080
|
-
*
|
|
1081
|
-
* @returns A promise of type CategoryResult.
|
|
1082
|
-
*/
|
|
1083
|
-
getCategories(options?: RequireParametersUnlessAllAreOptional<{
|
|
1084
|
-
parameters?: CompositeParameters<{
|
|
1085
|
-
organizationId: string;
|
|
1086
|
-
ids: Array<string>;
|
|
1087
|
-
siteId: string;
|
|
1088
|
-
levels?: GetCategoriesLevelsEnum;
|
|
1089
|
-
locale?: LocaleCode$0;
|
|
1090
|
-
} & QueryParameters, ConfigParameters>;
|
|
1091
|
-
headers?: {
|
|
1092
|
-
[key: string]: string;
|
|
1093
|
-
};
|
|
1094
|
-
}>): Promise<CategoryResult>;
|
|
1095
|
-
/**
|
|
1096
|
-
* When you use the URL template, the server returns multiple categories (a result object of category documents). You can use this template to obtain up to 50 categories in a single request. You must enclose the list of IDs in parentheses. If a category identifier contains parenthesis or the separator sign, you must URL encode the character.
|
|
1097
|
-
*
|
|
1098
|
-
* @param options - An object containing the options for this method.
|
|
1099
|
-
* @param options.parameters - An object containing the parameters for this method.
|
|
1100
|
-
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
|
|
1101
|
-
* @param options.parameters.ids - The comma separated list of category IDs (max 50).
|
|
1102
|
-
* @param options.parameters.siteId - 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.
|
|
1103
|
-
* @param options.parameters.levels - Specifies how many levels of nested subcategories you want the server to return. The default value is 1. Valid values are 0, 1, or 2. Only online subcategories are returned.
|
|
1104
|
-
* @param options.parameters.locale - A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
|
|
1105
|
-
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
|
|
1106
|
-
* @param rawResponse - Set to true to return entire Response object instead of DTO.
|
|
1107
|
-
*
|
|
1108
|
-
* @returns A promise of type Response if rawResponse is true, a promise of type CategoryResult otherwise.
|
|
1109
|
-
*/
|
|
1110
|
-
getCategories<T extends boolean>(options?: RequireParametersUnlessAllAreOptional<{
|
|
1111
|
-
parameters?: CompositeParameters<{
|
|
1112
|
-
organizationId: string;
|
|
1113
|
-
ids: Array<string>;
|
|
1114
|
-
siteId: string;
|
|
1115
|
-
levels?: GetCategoriesLevelsEnum;
|
|
1116
|
-
locale?: LocaleCode$0;
|
|
1117
|
-
} & QueryParameters, ConfigParameters>;
|
|
1118
|
-
headers?: {
|
|
1119
|
-
[key: string]: string;
|
|
1120
|
-
};
|
|
1121
|
-
}>, rawResponse?: T): Promise<T extends true ? Response : CategoryResult>;
|
|
1122
|
-
/**
|
|
1123
|
-
* When you use the URL template, the server returns a category identified by the ID. By default, the server
|
|
1124
|
-
also returns the first level of subcategories, but you can specify an additional level using the levels
|
|
1125
|
-
parameter.
|
|
1126
|
-
|
|
1127
|
-
This endpoint fetches both online and offline categories. For offline categories, only the top-level
|
|
1128
|
-
category is returned, not offline subcategories.
|
|
1129
|
-
|
|
1130
|
-
Using a large value for levels can cause performance issues when there is a large and deep category tree.
|
|
1131
|
-
*
|
|
1132
|
-
* If you would like to get a raw Response object use the other getCategory function.
|
|
1133
|
-
*
|
|
1134
|
-
* @param options - An object containing the options for this method.
|
|
1135
|
-
* @param options.parameters - An object containing the parameters for this method.
|
|
1136
|
-
* @param options.parameters.id - The ID of the requested category.
|
|
1137
|
-
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
|
|
1138
|
-
* @param options.parameters.siteId - 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.
|
|
1139
|
-
* @param options.parameters.levels - Specifies how many levels of nested subcategories you want the server to return. The default value is 1. Valid values are 0, 1, or 2. Only online subcategories are returned.
|
|
1140
|
-
* @param options.parameters.locale - A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
|
|
1141
|
-
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
|
|
1142
|
-
*
|
|
1143
|
-
* @returns A promise of type Category.
|
|
1144
|
-
*/
|
|
1145
|
-
getCategory(options?: RequireParametersUnlessAllAreOptional<{
|
|
1146
|
-
parameters?: CompositeParameters<{
|
|
1147
|
-
id: string;
|
|
1148
|
-
organizationId: string;
|
|
1149
|
-
siteId: string;
|
|
1150
|
-
levels?: GetCategoryLevelsEnum;
|
|
1151
|
-
locale?: LocaleCode$0;
|
|
1152
|
-
} & QueryParameters, ConfigParameters>;
|
|
1153
|
-
headers?: {
|
|
1154
|
-
[key: string]: string;
|
|
1155
|
-
};
|
|
1156
|
-
}>): Promise<Category>;
|
|
1157
|
-
/**
|
|
1158
|
-
* When you use the URL template, the server returns a category identified by the ID. By default, the server
|
|
1159
|
-
also returns the first level of subcategories, but you can specify an additional level using the levels
|
|
1160
|
-
parameter.
|
|
1161
|
-
|
|
1162
|
-
This endpoint fetches both online and offline categories. For offline categories, only the top-level
|
|
1163
|
-
category is returned, not offline subcategories.
|
|
1164
|
-
|
|
1165
|
-
Using a large value for levels can cause performance issues when there is a large and deep category tree.
|
|
1166
|
-
*
|
|
1167
|
-
* @param options - An object containing the options for this method.
|
|
1168
|
-
* @param options.parameters - An object containing the parameters for this method.
|
|
1169
|
-
* @param options.parameters.id - The ID of the requested category.
|
|
1170
|
-
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
|
|
1171
|
-
* @param options.parameters.siteId - 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.
|
|
1172
|
-
* @param options.parameters.levels - Specifies how many levels of nested subcategories you want the server to return. The default value is 1. Valid values are 0, 1, or 2. Only online subcategories are returned.
|
|
1173
|
-
* @param options.parameters.locale - A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
|
|
1174
|
-
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
|
|
1175
|
-
* @param rawResponse - Set to true to return entire Response object instead of DTO.
|
|
1176
|
-
*
|
|
1177
|
-
* @returns A promise of type Response if rawResponse is true, a promise of type Category otherwise.
|
|
1178
|
-
*/
|
|
1179
|
-
getCategory<T extends boolean>(options?: RequireParametersUnlessAllAreOptional<{
|
|
1180
|
-
parameters?: CompositeParameters<{
|
|
1181
|
-
id: string;
|
|
1182
|
-
organizationId: string;
|
|
1183
|
-
siteId: string;
|
|
1184
|
-
levels?: GetCategoryLevelsEnum;
|
|
1185
|
-
locale?: LocaleCode$0;
|
|
1186
|
-
} & QueryParameters, ConfigParameters>;
|
|
1187
|
-
headers?: {
|
|
1188
|
-
[key: string]: string;
|
|
1189
|
-
};
|
|
1190
|
-
}>, rawResponse?: T): Promise<T extends true ? Response : Category>;
|
|
1191
|
-
/**
|
|
1192
|
-
* Allows access to product details for a single product ID. Only products that are online and assigned to a site catalog are returned. In addition to product details, the availability, images, price, bundled_products, set_products, recommedations, product options, variations, and promotions for the products are included, as applicable.
|
|
1193
|
-
*
|
|
1194
|
-
* If you would like to get a raw Response object use the other getProduct function.
|
|
1195
|
-
*
|
|
1196
|
-
* @param options - An object containing the options for this method.
|
|
1197
|
-
* @param options.parameters - An object containing the parameters for this method.
|
|
1198
|
-
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
|
|
1199
|
-
* @param options.parameters.id - The ID of the requested product.
|
|
1200
|
-
* @param options.parameters.siteId - 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.
|
|
1201
|
-
* @param options.parameters.inventoryIds - The optional inventory list IDs, for which the availability should be shown (comma-separated, max 5 inventoryListIDs).
|
|
1202
|
-
* @param options.parameters.expand - All expand parameters except page_meta_tags are used for the request when no expand parameter is provided.
|
|
1203
|
-
The value "none" may be used to turn off all expand options.
|
|
1204
|
-
The page_meta_tags expand value is optional and available starting from B2C Commerce version 25.2.
|
|
1205
|
-
* @param options.parameters.allImages - The flag that indicates whether to retrieve the whole image model for the requested product.
|
|
1206
|
-
* @param options.parameters.perPricebook - The flag that indicates whether to retrieve the per PriceBook prices and tiered prices (if available) for requested Products. Available end of June, 2021.
|
|
1207
|
-
* @param options.parameters.select - The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names or work with wildcards. You can also specify array operations and filter expressions. The actual selector value must be enclosed within parentheses.
|
|
1208
|
-
* @param options.parameters.currency - A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.
|
|
1209
|
-
* @param options.parameters.locale - A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
|
|
1210
|
-
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
|
|
1211
|
-
*
|
|
1212
|
-
* @returns A promise of type Product.
|
|
1213
|
-
*/
|
|
1214
|
-
getProduct(options?: RequireParametersUnlessAllAreOptional<{
|
|
1215
|
-
parameters?: CompositeParameters<{
|
|
1216
|
-
organizationId: string;
|
|
1217
|
-
id: string;
|
|
1218
|
-
siteId: string;
|
|
1219
|
-
inventoryIds?: Array<string>;
|
|
1220
|
-
expand?: Array<GetProductExpandEnum>;
|
|
1221
|
-
allImages?: boolean;
|
|
1222
|
-
perPricebook?: boolean;
|
|
1223
|
-
select?: string;
|
|
1224
|
-
currency?: CurrencyCode;
|
|
1225
|
-
locale?: LocaleCode$0;
|
|
1226
|
-
} & QueryParameters, ConfigParameters>;
|
|
1227
|
-
headers?: {
|
|
1228
|
-
[key: string]: string;
|
|
1229
|
-
};
|
|
1230
|
-
}>): Promise<Product>;
|
|
1231
|
-
/**
|
|
1232
|
-
* Allows access to product details for a single product ID. Only products that are online and assigned to a site catalog are returned. In addition to product details, the availability, images, price, bundled_products, set_products, recommedations, product options, variations, and promotions for the products are included, as applicable.
|
|
1233
|
-
*
|
|
1234
|
-
* @param options - An object containing the options for this method.
|
|
1235
|
-
* @param options.parameters - An object containing the parameters for this method.
|
|
1236
|
-
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
|
|
1237
|
-
* @param options.parameters.id - The ID of the requested product.
|
|
1238
|
-
* @param options.parameters.siteId - 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.
|
|
1239
|
-
* @param options.parameters.inventoryIds - The optional inventory list IDs, for which the availability should be shown (comma-separated, max 5 inventoryListIDs).
|
|
1240
|
-
* @param options.parameters.expand - All expand parameters except page_meta_tags are used for the request when no expand parameter is provided.
|
|
1241
|
-
The value "none" may be used to turn off all expand options.
|
|
1242
|
-
The page_meta_tags expand value is optional and available starting from B2C Commerce version 25.2.
|
|
1243
|
-
* @param options.parameters.allImages - The flag that indicates whether to retrieve the whole image model for the requested product.
|
|
1244
|
-
* @param options.parameters.perPricebook - The flag that indicates whether to retrieve the per PriceBook prices and tiered prices (if available) for requested Products. Available end of June, 2021.
|
|
1245
|
-
* @param options.parameters.select - The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names or work with wildcards. You can also specify array operations and filter expressions. The actual selector value must be enclosed within parentheses.
|
|
1246
|
-
* @param options.parameters.currency - A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.
|
|
1247
|
-
* @param options.parameters.locale - A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
|
|
1248
|
-
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
|
|
1249
|
-
* @param rawResponse - Set to true to return entire Response object instead of DTO.
|
|
1250
|
-
*
|
|
1251
|
-
* @returns A promise of type Response if rawResponse is true, a promise of type Product otherwise.
|
|
1252
|
-
*/
|
|
1253
|
-
getProduct<T extends boolean>(options?: RequireParametersUnlessAllAreOptional<{
|
|
1254
|
-
parameters?: CompositeParameters<{
|
|
1255
|
-
organizationId: string;
|
|
1256
|
-
id: string;
|
|
1257
|
-
siteId: string;
|
|
1258
|
-
inventoryIds?: Array<string>;
|
|
1259
|
-
expand?: Array<GetProductExpandEnum>;
|
|
1260
|
-
allImages?: boolean;
|
|
1261
|
-
perPricebook?: boolean;
|
|
1262
|
-
select?: string;
|
|
1263
|
-
currency?: CurrencyCode;
|
|
1264
|
-
locale?: LocaleCode$0;
|
|
1265
|
-
} & QueryParameters, ConfigParameters>;
|
|
1266
|
-
headers?: {
|
|
1267
|
-
[key: string]: string;
|
|
1268
|
-
};
|
|
1269
|
-
}>, rawResponse?: T): Promise<T extends true ? Response : Product>;
|
|
1270
|
-
/**
|
|
1271
|
-
* Allows access to multiple product details with a single request. Only products that are online and assigned to a site catalog are returned. The maximum number of product IDs that you can request is 24. In addition to product details, the availability, product options, images, price, promotions, and variations for the valid products are included, as applicable.
|
|
1272
|
-
*
|
|
1273
|
-
* If you would like to get a raw Response object use the other getProducts function.
|
|
1274
|
-
*
|
|
1275
|
-
* @param options - An object containing the options for this method.
|
|
1276
|
-
* @param options.parameters - An object containing the parameters for this method.
|
|
1277
|
-
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
|
|
1278
|
-
* @param options.parameters.ids - The IDs of the requested products (comma-separated, max 24 IDs).
|
|
1279
|
-
* @param options.parameters.siteId - 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.
|
|
1280
|
-
* @param options.parameters.inventoryIds - The optional inventory list IDs, for which the availability should be shown (comma-separated, max 5 inventoryListIDs).
|
|
1281
|
-
* @param options.parameters.expand - All expand parameters except page_meta_tags are used for the request when no expand parameter is provided.
|
|
1282
|
-
The value "none" may be used to turn off all expand options.
|
|
1283
|
-
The page_meta_tags expand value is optional and available starting from B2C Commerce version 25.2.
|
|
1284
|
-
* @param options.parameters.allImages - The flag that indicates whether to retrieve the whole image model for the requested product.
|
|
1285
|
-
* @param options.parameters.perPricebook - The flag that indicates whether to retrieve the per PriceBook prices and tiered prices (if available) for requested Products. Available end of June, 2021.
|
|
1286
|
-
* @param options.parameters.select - The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names or work with wildcards. You can also specify array operations and filter expressions. The actual selector value must be enclosed within parentheses.
|
|
1287
|
-
* @param options.parameters.locale - A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
|
|
1288
|
-
* @param options.parameters.currency - A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.
|
|
1289
|
-
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
|
|
1290
|
-
*
|
|
1291
|
-
* @returns A promise of type ProductResult.
|
|
1292
|
-
*/
|
|
1293
|
-
getProducts(options?: RequireParametersUnlessAllAreOptional<{
|
|
1294
|
-
parameters?: CompositeParameters<{
|
|
1295
|
-
organizationId: string;
|
|
1296
|
-
ids: Array<string>;
|
|
1297
|
-
siteId: string;
|
|
1298
|
-
inventoryIds?: Array<string>;
|
|
1299
|
-
expand?: Array<GetProductsExpandEnum>;
|
|
1300
|
-
allImages?: boolean;
|
|
1301
|
-
perPricebook?: boolean;
|
|
1302
|
-
select?: string;
|
|
1303
|
-
locale?: LocaleCode$0;
|
|
1304
|
-
currency?: CurrencyCode;
|
|
1305
|
-
} & QueryParameters, ConfigParameters>;
|
|
1306
|
-
headers?: {
|
|
1307
|
-
[key: string]: string;
|
|
1308
|
-
};
|
|
1309
|
-
}>): Promise<ProductResult>;
|
|
1310
|
-
/**
|
|
1311
|
-
* Allows access to multiple product details with a single request. Only products that are online and assigned to a site catalog are returned. The maximum number of product IDs that you can request is 24. In addition to product details, the availability, product options, images, price, promotions, and variations for the valid products are included, as applicable.
|
|
1312
|
-
*
|
|
1313
|
-
* @param options - An object containing the options for this method.
|
|
1314
|
-
* @param options.parameters - An object containing the parameters for this method.
|
|
1315
|
-
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
|
|
1316
|
-
* @param options.parameters.ids - The IDs of the requested products (comma-separated, max 24 IDs).
|
|
1317
|
-
* @param options.parameters.siteId - 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.
|
|
1318
|
-
* @param options.parameters.inventoryIds - The optional inventory list IDs, for which the availability should be shown (comma-separated, max 5 inventoryListIDs).
|
|
1319
|
-
* @param options.parameters.expand - All expand parameters except page_meta_tags are used for the request when no expand parameter is provided.
|
|
1320
|
-
The value "none" may be used to turn off all expand options.
|
|
1321
|
-
The page_meta_tags expand value is optional and available starting from B2C Commerce version 25.2.
|
|
1322
|
-
* @param options.parameters.allImages - The flag that indicates whether to retrieve the whole image model for the requested product.
|
|
1323
|
-
* @param options.parameters.perPricebook - The flag that indicates whether to retrieve the per PriceBook prices and tiered prices (if available) for requested Products. Available end of June, 2021.
|
|
1324
|
-
* @param options.parameters.select - The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names or work with wildcards. You can also specify array operations and filter expressions. The actual selector value must be enclosed within parentheses.
|
|
1325
|
-
* @param options.parameters.locale - A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
|
|
1326
|
-
* @param options.parameters.currency - A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.
|
|
1327
|
-
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
|
|
1328
|
-
* @param rawResponse - Set to true to return entire Response object instead of DTO.
|
|
1329
|
-
*
|
|
1330
|
-
* @returns A promise of type Response if rawResponse is true, a promise of type ProductResult otherwise.
|
|
1331
|
-
*/
|
|
1332
|
-
getProducts<T extends boolean>(options?: RequireParametersUnlessAllAreOptional<{
|
|
1333
|
-
parameters?: CompositeParameters<{
|
|
1334
|
-
organizationId: string;
|
|
1335
|
-
ids: Array<string>;
|
|
1336
|
-
siteId: string;
|
|
1337
|
-
inventoryIds?: Array<string>;
|
|
1338
|
-
expand?: Array<GetProductsExpandEnum>;
|
|
1339
|
-
allImages?: boolean;
|
|
1340
|
-
perPricebook?: boolean;
|
|
1341
|
-
select?: string;
|
|
1342
|
-
locale?: LocaleCode$0;
|
|
1343
|
-
currency?: CurrencyCode;
|
|
1344
|
-
} & QueryParameters, ConfigParameters>;
|
|
1345
|
-
headers?: {
|
|
1346
|
-
[key: string]: string;
|
|
1347
|
-
};
|
|
1348
|
-
}>, rawResponse?: T): Promise<T extends true ? Response : ProductResult>;
|
|
1349
|
-
}
|
|
1350
|
-
declare namespace ShopperProductsApiTypes {
|
|
1351
|
-
/*
|
|
1352
|
-
* Copyright (c) 2023, Salesforce, Inc.
|
|
1353
|
-
* All rights reserved.
|
|
1354
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1355
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
1356
|
-
*/
|
|
1357
|
-
/**
|
|
1358
|
-
* Makes a type easier to read.
|
|
1359
|
-
*/
|
|
1360
|
-
type Prettify<T> = NonNullable<{
|
|
1361
|
-
[K in keyof T]: T[K];
|
|
1362
|
-
}>;
|
|
1363
|
-
/**
|
|
1364
|
-
* Generates the types required on a method, based on those provided in the config.
|
|
1365
|
-
*/
|
|
1366
|
-
type CompositeParameters<MethodParameters extends Record<string, unknown>, ConfigParameters extends Record<string, unknown>> = Prettify<Omit<MethodParameters, keyof ConfigParameters> & Partial<MethodParameters>>;
|
|
1367
|
-
/**
|
|
1368
|
-
* If an object has a `parameters` property, and the `parameters` object has required properties,
|
|
1369
|
-
* then the `parameters` property on the root object is marked as required.
|
|
1370
|
-
*/
|
|
1371
|
-
type RequireParametersUnlessAllAreOptional<T extends {
|
|
1372
|
-
parameters?: Record<string, unknown>;
|
|
1373
|
-
}> = Record<string, never> extends NonNullable<T["parameters"]> ? T : Prettify<T & Required<Pick<T, "parameters">>>;
|
|
1374
|
-
/**
|
|
1375
|
-
* Template parameters used in the base URI of all API endpoints. `version` will default to `"v1"`
|
|
1376
|
-
* if not specified.
|
|
1377
|
-
*/
|
|
1378
|
-
interface BaseUriParameters {
|
|
1379
|
-
shortCode: string;
|
|
1380
|
-
}
|
|
1381
|
-
type LocaleCode = {
|
|
1382
|
-
[key: string]: any;
|
|
1383
|
-
};
|
|
1384
|
-
/**
|
|
1385
|
-
* Generic interface for path parameters.
|
|
1386
|
-
*/
|
|
1387
|
-
interface PathParameters {
|
|
1388
|
-
[key: string]: string | number | boolean;
|
|
1389
|
-
}
|
|
1390
|
-
/**
|
|
1391
|
-
* Generic interface for query parameters.
|
|
1392
|
-
*/
|
|
1393
|
-
interface QueryParameters {
|
|
1394
|
-
[key: string]: string | number | boolean | string[] | number[] | LocaleCode;
|
|
1395
|
-
}
|
|
1396
|
-
/**
|
|
1397
|
-
* Generic interface for all parameter types.
|
|
1398
|
-
*/
|
|
1399
|
-
type UrlParameters = PathParameters | QueryParameters;
|
|
1400
|
-
/**
|
|
1401
|
-
* Custom query parameter type with any string prefixed with `c_` as the key and the allowed
|
|
1402
|
-
* types for query parameters for the value.
|
|
1403
|
-
*/
|
|
1404
|
-
type CustomQueryParameters = {
|
|
1405
|
-
[key in `c_${string}`]: string | number | boolean | string[] | number[];
|
|
1406
|
-
};
|
|
1407
|
-
/**
|
|
1408
|
-
* Custom body request type with any string prefixed with `c_` as the key and the allowed
|
|
1409
|
-
* types for the value.
|
|
1410
|
-
*/
|
|
1411
|
-
type CustomRequestBody = {
|
|
1412
|
-
[key in `c_${string}`]: string | number | boolean | string[] | number[] | {
|
|
1413
|
-
[key: string]: unknown;
|
|
1414
|
-
};
|
|
1415
|
-
};
|
|
1416
|
-
/**
|
|
1417
|
-
* Alias for `RequestInit` from TypeScript's DOM lib, to more clearly differentiate
|
|
1418
|
-
* it from the `RequestInit` provided by node-fetch.
|
|
1419
|
-
*/
|
|
1420
|
-
type BrowserRequestInit = RequestInit;
|
|
1421
|
-
/**
|
|
1422
|
-
* Any properties supported in either the browser or node are accepted.
|
|
1423
|
-
* Using the right properties in the right context is left to the user.
|
|
1424
|
-
*/
|
|
1425
|
-
type FetchOptions = NodeRequestInit & BrowserRequestInit;
|
|
1426
|
-
/**
|
|
1427
|
-
* Base options that can be passed to the `ClientConfig` class.
|
|
1428
|
-
*/
|
|
1429
|
-
interface ClientConfigInit<Params extends BaseUriParameters> {
|
|
1430
|
-
baseUri?: string;
|
|
1431
|
-
proxy?: string;
|
|
1432
|
-
headers?: {
|
|
1433
|
-
[key: string]: string;
|
|
1434
|
-
};
|
|
1435
|
-
parameters: Params;
|
|
1436
|
-
fetchOptions?: FetchOptions;
|
|
1437
|
-
transformRequest?: (data: unknown, headers: {
|
|
1438
|
-
[key: string]: string;
|
|
1439
|
-
}) => Required<FetchOptions>["body"];
|
|
1440
|
-
throwOnBadResponse?: boolean;
|
|
1441
|
-
}
|
|
1442
|
-
type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
|
|
1443
|
-
/**
|
|
1444
|
-
* Configuration parameters common to Commerce SDK clients
|
|
1445
|
-
*/
|
|
1446
|
-
class ClientConfig<Params extends BaseUriParameters> implements ClientConfigInit<Params> {
|
|
1447
|
-
baseUri?: string;
|
|
1448
|
-
proxy?: string;
|
|
1449
|
-
headers: {
|
|
1450
|
-
[key: string]: string;
|
|
1451
|
-
};
|
|
1452
|
-
parameters: Params;
|
|
1453
|
-
fetchOptions: FetchOptions;
|
|
1454
|
-
transformRequest: NonNullable<ClientConfigInit<Params>["transformRequest"]>;
|
|
1455
|
-
throwOnBadResponse: boolean;
|
|
1456
|
-
constructor(config: ClientConfigInit<Params>);
|
|
1457
|
-
static readonly defaults: Pick<Required<ClientConfigInit<never>>, "transformRequest">;
|
|
1458
|
-
}
|
|
1459
|
-
/**
|
|
1460
|
-
* @type Image: Product image
|
|
1461
|
-
*
|
|
1462
|
-
* @property alt: The localized alternative text of the image.
|
|
1463
|
-
*
|
|
1464
|
-
* @property disBaseLink: Base URL for the Dynamic Image Service (DIS) address. This is only shown if the image is stored on the server and DIS is enabled.
|
|
1465
|
-
*
|
|
1466
|
-
* @property link: The URL of the actual image.
|
|
1467
|
-
* - **Min Length:** 1
|
|
1468
|
-
*
|
|
1469
|
-
* @property title: The localized title of the image.
|
|
1470
|
-
*
|
|
1471
|
-
*/
|
|
1472
|
-
type Image = {
|
|
1473
|
-
alt?: string;
|
|
1474
|
-
disBaseLink?: string;
|
|
1475
|
-
link: string;
|
|
1476
|
-
title?: string;
|
|
1477
|
-
} & {
|
|
1478
|
-
[key: string]: any;
|
|
1479
|
-
};
|
|
1480
|
-
/**
|
|
1481
|
-
* @type VariationAttributeValue: Document representing a variation attribute value.
|
|
1482
|
-
*
|
|
1483
|
-
* @property description: The localized description of the variation value.
|
|
1484
|
-
*
|
|
1485
|
-
* @property image: The first product image for the configured viewtype and this variation value.
|
|
1486
|
-
*
|
|
1487
|
-
* @property imageSwatch: The first product image for the configured viewtype and this variation value (typically the swatch image).
|
|
1488
|
-
*
|
|
1489
|
-
* @property name: The localized display name of the variation value.
|
|
1490
|
-
*
|
|
1491
|
-
* @property orderable: A flag indicating whether at least one variant with this variation attribute value is available to sell.
|
|
1492
|
-
*
|
|
1493
|
-
* @property value: The actual variation value.
|
|
1494
|
-
* - **Min Length:** 1
|
|
1495
|
-
*
|
|
1496
|
-
*/
|
|
1497
|
-
type VariationAttributeValue = {
|
|
1498
|
-
description?: string;
|
|
1499
|
-
image?: Image;
|
|
1500
|
-
imageSwatch?: Image;
|
|
1501
|
-
name?: string;
|
|
1502
|
-
orderable?: boolean;
|
|
1503
|
-
value: string;
|
|
1504
|
-
} & {
|
|
1505
|
-
[key: string]: any;
|
|
1506
|
-
};
|
|
1507
|
-
/**
|
|
1508
|
-
* @type VariationAttribute: Document representing a variation attribute.
|
|
1509
|
-
*
|
|
1510
|
-
* @property id: The ID of the variation attribute.
|
|
1511
|
-
* - **Min Length:** 1
|
|
1512
|
-
*
|
|
1513
|
-
* @property name: The localized display name of the variation attribute.
|
|
1514
|
-
*
|
|
1515
|
-
* @property values: The sorted array of variation values. This array can be empty.
|
|
1516
|
-
*
|
|
1517
|
-
*/
|
|
1518
|
-
type VariationAttribute = {
|
|
1519
|
-
id: string;
|
|
1520
|
-
name?: string;
|
|
1521
|
-
values?: Array<VariationAttributeValue>;
|
|
1522
|
-
} & {
|
|
1523
|
-
[key: string]: any;
|
|
1524
|
-
};
|
|
1525
|
-
/**
|
|
1526
|
-
* @type VariationGroup: Representation of a group of variant products by an attribute. This is a non-buyable entity, provides inheritable attributes for its product variants, and is used for navigation. *Doesn\'t have a SKU.*
|
|
1527
|
-
*
|
|
1528
|
-
* @property orderable: A flag indicating whether the variation group is orderable.
|
|
1529
|
-
*
|
|
1530
|
-
* @property price: The sales price of the variation group.
|
|
1531
|
-
*
|
|
1532
|
-
* @property productId: The ID (SKU) of the variation group.
|
|
1533
|
-
* - **Min Length:** 1
|
|
1534
|
-
* - **Max Length:** 100
|
|
1535
|
-
*
|
|
1536
|
-
* @property variationValues: The actual variation attribute ID - value pairs.
|
|
1537
|
-
*
|
|
1538
|
-
*/
|
|
1539
|
-
type VariationGroup = {
|
|
1540
|
-
orderable: boolean;
|
|
1541
|
-
price: number;
|
|
1542
|
-
productId: string;
|
|
1543
|
-
variationValues: {
|
|
1544
|
-
[key: string]: string;
|
|
1545
|
-
};
|
|
1546
|
-
} & {
|
|
1547
|
-
[key: string]: any;
|
|
1548
|
-
};
|
|
1549
|
-
/**
|
|
1550
|
-
* @type ProductType: Document representing a product type.
|
|
1551
|
-
*
|
|
1552
|
-
* @property bundle: A flag indicating whether the product is a bundle.
|
|
1553
|
-
*
|
|
1554
|
-
* @property item: A flag indicating whether the product is a standard item.
|
|
1555
|
-
*
|
|
1556
|
-
* @property master: A flag indicating whether the product is a master.
|
|
1557
|
-
*
|
|
1558
|
-
* @property option: A flag indicating whether the product is an option.
|
|
1559
|
-
*
|
|
1560
|
-
* @property set: A flag indicating whether the product is a set.
|
|
1561
|
-
*
|
|
1562
|
-
* @property variant: A flag indicating whether the product is a variant.
|
|
1563
|
-
*
|
|
1564
|
-
* @property variationGroup: A flag indicating whether the product is a variation group.
|
|
1565
|
-
*
|
|
1566
|
-
*/
|
|
1567
|
-
type ProductType = {
|
|
1568
|
-
bundle?: boolean;
|
|
1569
|
-
item?: boolean;
|
|
1570
|
-
master?: boolean;
|
|
1571
|
-
option?: boolean;
|
|
1572
|
-
set?: boolean;
|
|
1573
|
-
variant?: boolean;
|
|
1574
|
-
variationGroup?: boolean;
|
|
1575
|
-
} & {
|
|
1576
|
-
[key: string]: any;
|
|
1577
|
-
};
|
|
1578
|
-
/**
|
|
1579
|
-
* @type ProductPriceTable: Tiered Price Level Object
|
|
1580
|
-
*
|
|
1581
|
-
* @property price: Price for the product for the specified tier for the specified pricebook
|
|
1582
|
-
*
|
|
1583
|
-
* @property pricebook: The active pricebook for which this price is defined
|
|
1584
|
-
*
|
|
1585
|
-
* @property quantity: Quantity tier for which the price is defined.
|
|
1586
|
-
*
|
|
1587
|
-
*/
|
|
1588
|
-
type ProductPriceTable = {
|
|
1589
|
-
price?: number;
|
|
1590
|
-
pricebook?: string;
|
|
1591
|
-
quantity?: number;
|
|
1592
|
-
} & {
|
|
1593
|
-
[key: string]: any;
|
|
1594
|
-
};
|
|
1595
|
-
/**
|
|
1596
|
-
* @type RecommendationType: Document representing a recommendation type.
|
|
1597
|
-
*
|
|
1598
|
-
* @property displayValue: The localized display value of the recommendation type.
|
|
1599
|
-
*
|
|
1600
|
-
* @property value: The value of the recommendation type.
|
|
1601
|
-
*
|
|
1602
|
-
*/
|
|
1603
|
-
type RecommendationType = {
|
|
1604
|
-
displayValue: string;
|
|
1605
|
-
value: number;
|
|
1606
|
-
} & {
|
|
1607
|
-
[key: string]: any;
|
|
1608
|
-
};
|
|
1609
|
-
/**
|
|
1610
|
-
* @type Recommendation: Document representing a product recommendation.
|
|
1611
|
-
*
|
|
1612
|
-
* @property calloutMsg: The localized callout message of the recommendation.
|
|
1613
|
-
*
|
|
1614
|
-
* @property image:
|
|
1615
|
-
*
|
|
1616
|
-
* @property longDescription: The localized long description of the recommendation.
|
|
1617
|
-
*
|
|
1618
|
-
* @property name: The localized name of the recommendation.
|
|
1619
|
-
*
|
|
1620
|
-
* @property recommendationType:
|
|
1621
|
-
*
|
|
1622
|
-
* @property recommendedItemId: The recommended item ID of the recommendation.
|
|
1623
|
-
*
|
|
1624
|
-
* @property shortDescription: The localized short description of the recommendation.
|
|
1625
|
-
*
|
|
1626
|
-
*/
|
|
1627
|
-
type Recommendation = {
|
|
1628
|
-
calloutMsg?: string;
|
|
1629
|
-
image?: Image;
|
|
1630
|
-
longDescription?: string;
|
|
1631
|
-
name?: string;
|
|
1632
|
-
recommendationType: RecommendationType;
|
|
1633
|
-
recommendedItemId?: string;
|
|
1634
|
-
shortDescription?: string;
|
|
1635
|
-
} & {
|
|
1636
|
-
[key: string]: any;
|
|
1637
|
-
};
|
|
1638
|
-
/**
|
|
1639
|
-
* @type PriceRange: Document representing price ranges for a product which happens to be a master product (per Pricebook)
|
|
1640
|
-
*
|
|
1641
|
-
* @property maxPrice: Maximum price for the given pricebook (usually for a master Product would be the price for the Variant which has the highest price out of all Variants in that pricebook)
|
|
1642
|
-
*
|
|
1643
|
-
* @property minPrice: Minimum price for the given pricebook (usually for a master Product would be the price for the Variant which has the least price out of all Variants in that pricebook)
|
|
1644
|
-
*
|
|
1645
|
-
* @property pricebook: The active pricebook from which the min and the max prices are calculated. The pricebook is based on the site context of the request as defined in ECOM.
|
|
1646
|
-
*
|
|
1647
|
-
*/
|
|
1648
|
-
type PriceRange = {
|
|
1649
|
-
maxPrice?: number;
|
|
1650
|
-
minPrice?: number;
|
|
1651
|
-
pricebook?: string;
|
|
1652
|
-
} & {
|
|
1653
|
-
[key: string]: any;
|
|
1654
|
-
};
|
|
1655
|
-
/**
|
|
1656
|
-
* @type ProductPromotion: Document representing a product promotion.
|
|
1657
|
-
*
|
|
1658
|
-
* @property calloutMsg: The localized call-out message of the promotion.
|
|
1659
|
-
*
|
|
1660
|
-
* @property promotionId: The unique ID of the promotion.
|
|
1661
|
-
*
|
|
1662
|
-
* @property promotionalPrice: The promotional price for this product.
|
|
1663
|
-
*
|
|
1664
|
-
*/
|
|
1665
|
-
type ProductPromotion = {
|
|
1666
|
-
calloutMsg: string;
|
|
1667
|
-
promotionId: string;
|
|
1668
|
-
promotionalPrice: number;
|
|
1669
|
-
} & {
|
|
1670
|
-
[key: string]: any;
|
|
1671
|
-
};
|
|
1672
|
-
/**
|
|
1673
|
-
* A specialized value indicating the lack of definition of a currency, for example, if the value of the monetary value of the currency is an undefined number.
|
|
1674
|
-
*/
|
|
1675
|
-
type NoValue = "N/A";
|
|
1676
|
-
/**
|
|
1677
|
-
* @type CurrencyCode
|
|
1678
|
-
* A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.
|
|
1679
|
-
*/
|
|
1680
|
-
type CurrencyCode = NoValue | string;
|
|
1681
|
-
/**
|
|
1682
|
-
* @type Master: The master product is a representation of a group of variant products. This is a non-buyable entity, provides inheritable attributes for its product variants, and is used for navigation. *Doesn\'t have a SKU.*
|
|
1683
|
-
*
|
|
1684
|
-
* @property masterId: The ID (SKU) of the master product.
|
|
1685
|
-
* - **Min Length:** 1
|
|
1686
|
-
* - **Max Length:** 100
|
|
1687
|
-
*
|
|
1688
|
-
* @property orderable: A flag indicating whether at least one of the variants can be ordered.
|
|
1689
|
-
*
|
|
1690
|
-
* @property price: The minimum sales price of the related variants.
|
|
1691
|
-
*
|
|
1692
|
-
* @property priceMax: The maximum sales price of the related variants.
|
|
1693
|
-
*
|
|
1694
|
-
* @property prices: List of sale prices.
|
|
1695
|
-
*
|
|
1696
|
-
*/
|
|
1697
|
-
type Master = {
|
|
1698
|
-
masterId: string;
|
|
1699
|
-
orderable?: boolean;
|
|
1700
|
-
price?: number;
|
|
1701
|
-
priceMax?: number;
|
|
1702
|
-
prices?: {
|
|
1703
|
-
[key: string]: number;
|
|
1704
|
-
};
|
|
1705
|
-
} & {
|
|
1706
|
-
[key: string]: any;
|
|
1707
|
-
};
|
|
1708
|
-
/**
|
|
1709
|
-
* @type Variant: A product which is a variation within a master product that describes different colors, sizes, or other variation attributes. *Has a SKU.*
|
|
1710
|
-
*
|
|
1711
|
-
* @property orderable: A flag indicating whether the variant is orderable.
|
|
1712
|
-
*
|
|
1713
|
-
* @property price: The sales price of the variant.
|
|
1714
|
-
*
|
|
1715
|
-
* @property productId: The ID (SKU) of the variant.
|
|
1716
|
-
* - **Min Length:** 1
|
|
1717
|
-
* - **Max Length:** 100
|
|
1718
|
-
*
|
|
1719
|
-
* @property tieredPrices: List of tiered prices if the product is a variant
|
|
1720
|
-
*
|
|
1721
|
-
* @property variationValues: The actual variation attribute ID - value pairs.
|
|
1722
|
-
*
|
|
1723
|
-
*/
|
|
1724
|
-
type Variant = {
|
|
1725
|
-
orderable?: boolean;
|
|
1726
|
-
price?: number;
|
|
1727
|
-
productId: string;
|
|
1728
|
-
tieredPrices?: Array<ProductPriceTable>;
|
|
1729
|
-
variationValues?: {
|
|
1730
|
-
[key: string]: string;
|
|
1731
|
-
};
|
|
1732
|
-
} & {
|
|
1733
|
-
[key: string]: any;
|
|
1734
|
-
};
|
|
1735
|
-
/**
|
|
1736
|
-
* @type PageMetaTag: Document representing a Page Meta Tag object.
|
|
1737
|
-
*
|
|
1738
|
-
* @property id: The ID of the Page Meta Tag.
|
|
1739
|
-
*
|
|
1740
|
-
* @property value: Locale-specific value of the Page Meta Tag, evaluated by resolving the rule set for the given Business Manager ID.
|
|
1741
|
-
*
|
|
1742
|
-
*/
|
|
1743
|
-
type PageMetaTag = {
|
|
1744
|
-
id?: string;
|
|
1745
|
-
value?: string;
|
|
1746
|
-
} & {
|
|
1747
|
-
[key: string]: any;
|
|
1748
|
-
};
|
|
1749
|
-
/**
|
|
1750
|
-
* @type ProductLink: Document representing a link between two products. It contains the ID of the source and target products, the type of product link, and the URLs to retrieve product data.
|
|
1751
|
-
*
|
|
1752
|
-
* @property sourceProductId: The semantic ID of the product this product link is coming from.
|
|
1753
|
-
* - **Min Length:** 1
|
|
1754
|
-
* - **Max Length:** 100
|
|
1755
|
-
*
|
|
1756
|
-
* @property sourceProductLink: The URL addressing the product this product link is coming from.
|
|
1757
|
-
*
|
|
1758
|
-
* @property targetProductId: The semantic ID of the product this product link is pointing to.
|
|
1759
|
-
* - **Min Length:** 1
|
|
1760
|
-
* - **Max Length:** 100
|
|
1761
|
-
*
|
|
1762
|
-
* @property targetProductLink: The URL addressing the product this product link is pointing to.
|
|
1763
|
-
*
|
|
1764
|
-
* @property type: The type of product link.
|
|
1765
|
-
*
|
|
1766
|
-
*/
|
|
1767
|
-
type ProductLink = {
|
|
1768
|
-
sourceProductId: string;
|
|
1769
|
-
sourceProductLink: string;
|
|
1770
|
-
targetProductId: string;
|
|
1771
|
-
targetProductLink: string;
|
|
1772
|
-
type: ProductLinkTypeEnum;
|
|
1773
|
-
} & {
|
|
1774
|
-
[key: string]: any;
|
|
1775
|
-
};
|
|
1776
|
-
type ProductLinkTypeEnum = "cross_sell" | "replacement" | "up_sell" | "accessory" | "newer_version" | "alt_orderunit" | "spare_part" | "other";
|
|
1777
|
-
/**
|
|
1778
|
-
* @type OptionValue: Document representing an option value.
|
|
1779
|
-
*
|
|
1780
|
-
* @property default: A flag indicating whether this option value is the default one.
|
|
1781
|
-
*
|
|
1782
|
-
* @property id: The ID of the option value.
|
|
1783
|
-
* - **Min Length:** 1
|
|
1784
|
-
* - **Max Length:** 100
|
|
1785
|
-
*
|
|
1786
|
-
* @property name: The localized name of the option value.
|
|
1787
|
-
*
|
|
1788
|
-
* @property price: The effective price of the option value.
|
|
1789
|
-
*
|
|
1790
|
-
*/
|
|
1791
|
-
type OptionValue = {
|
|
1792
|
-
default?: boolean;
|
|
1793
|
-
id: string;
|
|
1794
|
-
name?: string;
|
|
1795
|
-
price?: number;
|
|
1796
|
-
} & {
|
|
1797
|
-
[key: string]: any;
|
|
1798
|
-
};
|
|
1799
|
-
/**
|
|
1800
|
-
* @type Option: Product options enable you to sell configurable products that have optional accessories, upgrades, or additional services. Options are always purchased with a product and can\'t be purchased separately. *Product Option has a SKU and a price associated with it.*
|
|
1801
|
-
*
|
|
1802
|
-
* @property description: The localized description of the option.
|
|
1803
|
-
*
|
|
1804
|
-
* @property id: The ID of the option.
|
|
1805
|
-
* - **Min Length:** 1
|
|
1806
|
-
* - **Max Length:** 100
|
|
1807
|
-
*
|
|
1808
|
-
* @property image: The URL to the option image.
|
|
1809
|
-
*
|
|
1810
|
-
* @property name: The localized name of the option.
|
|
1811
|
-
*
|
|
1812
|
-
* @property values: The array of option values. This array can be empty.
|
|
1813
|
-
*
|
|
1814
|
-
*/
|
|
1815
|
-
type Option = {
|
|
1816
|
-
description?: string;
|
|
1817
|
-
id: string;
|
|
1818
|
-
image?: string;
|
|
1819
|
-
name?: string;
|
|
1820
|
-
values?: Array<OptionValue>;
|
|
1821
|
-
} & {
|
|
1822
|
-
[key: string]: any;
|
|
1823
|
-
};
|
|
1824
|
-
/**
|
|
1825
|
-
* @type ImageGroup: Document representing an image group containing a list of images for a particular view type and an optional variation value.
|
|
1826
|
-
*
|
|
1827
|
-
* @property images: The images of the image group.
|
|
1828
|
-
*
|
|
1829
|
-
* @property variationAttributes: Returns a list of variation attributes applying to this image group.
|
|
1830
|
-
*
|
|
1831
|
-
* @property viewType: The image view type.
|
|
1832
|
-
*
|
|
1833
|
-
*/
|
|
1834
|
-
type ImageGroup = {
|
|
1835
|
-
images: Array<Image>;
|
|
1836
|
-
variationAttributes?: Array<VariationAttribute>;
|
|
1837
|
-
viewType: string;
|
|
1838
|
-
} & {
|
|
1839
|
-
[key: string]: any;
|
|
1840
|
-
};
|
|
1841
|
-
/**
|
|
1842
|
-
* @type Inventory: Document representing inventory information of the current product for a particular inventory list.
|
|
1843
|
-
*
|
|
1844
|
-
* @property ats: The Available To Sell (ATS) of the product. If it is infinity, the return value is 999999. The value can be overwritten by the OCAPI setting \'product.inventory.ats.max_threshold\'.
|
|
1845
|
-
*
|
|
1846
|
-
* @property backorderable: A flag indicating whether the product is backorderable.
|
|
1847
|
-
*
|
|
1848
|
-
* @property id: The inventory ID.
|
|
1849
|
-
* - **Min Length:** 1
|
|
1850
|
-
* - **Max Length:** 256
|
|
1851
|
-
*
|
|
1852
|
-
* @property inStockDate: A flag indicating the date when the product will be in stock.
|
|
1853
|
-
*
|
|
1854
|
-
* @property orderable: A flag indicating whether at least one of the products is available to sell.
|
|
1855
|
-
*
|
|
1856
|
-
* @property preorderable: A flag indicating whether the product is preorderable.
|
|
1857
|
-
*
|
|
1858
|
-
* @property stockLevel: The stock level of the product. If it is infinity, the return value is 999999. The value can be overwritten by the OCAPI setting \'product.inventory.stock_level.max_threshold\'.
|
|
1859
|
-
*
|
|
1860
|
-
*/
|
|
1861
|
-
type Inventory = {
|
|
1862
|
-
ats?: number;
|
|
1863
|
-
backorderable?: boolean;
|
|
1864
|
-
id: string;
|
|
1865
|
-
inStockDate?: string;
|
|
1866
|
-
orderable?: boolean;
|
|
1867
|
-
preorderable?: boolean;
|
|
1868
|
-
stockLevel?: number;
|
|
1869
|
-
} & {
|
|
1870
|
-
[key: string]: any;
|
|
1871
|
-
};
|
|
1872
|
-
/**
|
|
1873
|
-
* @type Product: Any product that is sold, shown alone, and does not have variations such as different sizes or colors. A product has no reliance on any other product for inheritance. *A product has a SKU and can have a product option, which has a different SKU*.
|
|
1874
|
-
*
|
|
1875
|
-
* @property brand: The product\'s brand.
|
|
1876
|
-
*
|
|
1877
|
-
* @property bundledProducts: The array of all bundled products of this product.
|
|
1878
|
-
*
|
|
1879
|
-
* @property currency:
|
|
1880
|
-
*
|
|
1881
|
-
* @property ean: The European Article Number of the product.
|
|
1882
|
-
*
|
|
1883
|
-
* @property fetchDate:
|
|
1884
|
-
*
|
|
1885
|
-
* @property id: The id (SKU) of the product.
|
|
1886
|
-
* - **Min Length:** 1
|
|
1887
|
-
* - **Max Length:** 100
|
|
1888
|
-
*
|
|
1889
|
-
* @property imageGroups: The array of product image groups.
|
|
1890
|
-
*
|
|
1891
|
-
* @property inventories: The array of product inventories explicitly requested via the \'inventory_ids\' query parameter. This property is only returned in context of the \'availability\' expansion.
|
|
1892
|
-
*
|
|
1893
|
-
* @property inventory: The site default inventory information. This property is only returned in context of the \'availability\' expansion.
|
|
1894
|
-
*
|
|
1895
|
-
* @property longDescription: The localized product\'s long description.
|
|
1896
|
-
*
|
|
1897
|
-
* @property manufacturerName: The product\'s manufacturer name.
|
|
1898
|
-
*
|
|
1899
|
-
* @property manufacturerSku: The product\'s manufacturer SKU.
|
|
1900
|
-
*
|
|
1901
|
-
* @property master: The master product information, only for types: master, variation group, and variant.
|
|
1902
|
-
*
|
|
1903
|
-
* @property minOrderQuantity: The minimum order quantity for this product.
|
|
1904
|
-
*
|
|
1905
|
-
* @property name: The localized product name.
|
|
1906
|
-
*
|
|
1907
|
-
* @property options: The array of product options, only for type option. This array can be empty.
|
|
1908
|
-
*
|
|
1909
|
-
* @property pageDescription: The localized product\'s page description.
|
|
1910
|
-
*
|
|
1911
|
-
* @property pageKeywords: The localized product\'s page description.
|
|
1912
|
-
*
|
|
1913
|
-
* @property pageTitle: The localized product\'s page title.
|
|
1914
|
-
*
|
|
1915
|
-
* @property pageMetaTags: Page Meta tags associated with the given product.
|
|
1916
|
-
*
|
|
1917
|
-
* @property price: The sales price of the product. In case of complex products, like master or set, this is the minimum price of related child products.
|
|
1918
|
-
*
|
|
1919
|
-
* @property pricePerUnit: The price per unit if defined for the product
|
|
1920
|
-
*
|
|
1921
|
-
* @property pricePerUnitMax: The max price per unit typically for a master product\'s variant.
|
|
1922
|
-
*
|
|
1923
|
-
* @property priceMax: The maximum sales of related child products in complex products like master or set.
|
|
1924
|
-
*
|
|
1925
|
-
* @property priceRanges: Array of one or more price range objects representing one or more Pricebooks in context for the site.
|
|
1926
|
-
*
|
|
1927
|
-
* @property prices: The prices map with pricebook IDs and their values.
|
|
1928
|
-
*
|
|
1929
|
-
* @property primaryCategoryId: The ID of the products primary category.
|
|
1930
|
-
*
|
|
1931
|
-
* @property productLinks: The array of source and target product links information.
|
|
1932
|
-
*
|
|
1933
|
-
* @property productPromotions: An array of active customer product promotions for this product, sorted by promotion priority using SORT_BY_EXCLUSIVITY ordering (exclusivity → rank → promotion class → discount type → best discount → ID). This array can be empty. Coupon promotions are not returned in this array. See [PromotionPlan.SORT_BY_EXCLUSIVITY](https://salesforcecommercecloud.github.io/b2c-dev-doc/docs/current/scriptapi/html/index.html?target=class_dw_campaign_PromotionPlan.html) for more details.
|
|
1934
|
-
*
|
|
1935
|
-
* @property recommendations: Returns a list of recommendations.
|
|
1936
|
-
*
|
|
1937
|
-
* @property setProducts: The array of set products of this product.
|
|
1938
|
-
*
|
|
1939
|
-
* @property shortDescription: The localized product short description.
|
|
1940
|
-
*
|
|
1941
|
-
* @property slugUrl: The complete link to this product\'s storefront page.
|
|
1942
|
-
*
|
|
1943
|
-
* @property stepQuantity: The steps in which the order amount of the product can be increased.
|
|
1944
|
-
*
|
|
1945
|
-
* @property tieredPrices: The document represents list of tiered prices if the product is a variant
|
|
1946
|
-
*
|
|
1947
|
-
* @property type: The product type information. Can be one or more of the following values: item, master, variation_group, variant, bundle, and set.
|
|
1948
|
-
*
|
|
1949
|
-
* @property unit: The sales unit of the product.
|
|
1950
|
-
*
|
|
1951
|
-
* @property upc: The Universal Product Code (UPC).
|
|
1952
|
-
*
|
|
1953
|
-
* @property validFrom: The time a product is valid from.
|
|
1954
|
-
*
|
|
1955
|
-
* @property validTo: The time a product is valid to.
|
|
1956
|
-
*
|
|
1957
|
-
* @property variants: The array of actual variants. Only for master, variation group, and variant types. This array can be empty.
|
|
1958
|
-
*
|
|
1959
|
-
* @property variationAttributes: Sorted array of variation attributes information. Only for master, variation group, and variant types. This array can be empty.
|
|
1960
|
-
*
|
|
1961
|
-
* @property variationGroups: The array of actual variation groups. Only for master, variation group, and variant types. This array can be empty.
|
|
1962
|
-
*
|
|
1963
|
-
* @property variationValues: The actual variation attribute ID - value pairs. Only for variant and variation group types.
|
|
1964
|
-
*
|
|
1965
|
-
*/
|
|
1966
|
-
type Product = {
|
|
1967
|
-
brand?: string;
|
|
1968
|
-
bundledProducts?: Array<BundledProduct>;
|
|
1969
|
-
currency?: CurrencyCode;
|
|
1970
|
-
ean?: string;
|
|
1971
|
-
fetchDate?: number;
|
|
1972
|
-
id: string;
|
|
1973
|
-
imageGroups?: Array<ImageGroup>;
|
|
1974
|
-
inventories?: Array<Inventory>;
|
|
1975
|
-
inventory?: Inventory;
|
|
1976
|
-
longDescription?: string;
|
|
1977
|
-
manufacturerName?: string;
|
|
1978
|
-
manufacturerSku?: string;
|
|
1979
|
-
master?: Master;
|
|
1980
|
-
minOrderQuantity?: number;
|
|
1981
|
-
name?: string;
|
|
1982
|
-
options?: Array<Option>;
|
|
1983
|
-
pageDescription?: string;
|
|
1984
|
-
pageKeywords?: string;
|
|
1985
|
-
pageTitle?: string;
|
|
1986
|
-
pageMetaTags?: Array<PageMetaTag>;
|
|
1987
|
-
price?: number;
|
|
1988
|
-
pricePerUnit?: number;
|
|
1989
|
-
pricePerUnitMax?: number;
|
|
1990
|
-
priceMax?: number;
|
|
1991
|
-
priceRanges?: Array<PriceRange>;
|
|
1992
|
-
prices?: {
|
|
1993
|
-
[key: string]: number;
|
|
1994
|
-
};
|
|
1995
|
-
primaryCategoryId?: string;
|
|
1996
|
-
productLinks?: Array<ProductLink>;
|
|
1997
|
-
productPromotions?: Array<ProductPromotion>;
|
|
1998
|
-
recommendations?: Array<Recommendation>;
|
|
1999
|
-
setProducts?: Array<Product>;
|
|
2000
|
-
shortDescription?: string;
|
|
2001
|
-
slugUrl?: string;
|
|
2002
|
-
stepQuantity?: number;
|
|
2003
|
-
tieredPrices?: Array<ProductPriceTable>;
|
|
2004
|
-
type?: ProductType;
|
|
2005
|
-
unit?: string;
|
|
2006
|
-
upc?: string;
|
|
2007
|
-
validFrom?: string;
|
|
2008
|
-
validTo?: string;
|
|
2009
|
-
variants?: Array<Variant>;
|
|
2010
|
-
variationAttributes?: Array<VariationAttribute>;
|
|
2011
|
-
variationGroups?: Array<VariationGroup>;
|
|
2012
|
-
variationValues?: {
|
|
2013
|
-
[key: string]: string;
|
|
2014
|
-
};
|
|
2015
|
-
} & {
|
|
2016
|
-
[key: string]: any;
|
|
2017
|
-
};
|
|
2018
|
-
/**
|
|
2019
|
-
* @type BundledProduct: A bundle of products that can be bought together (all or nothing). Each product in the bundle can itself be bought independently, but this is outside of the context of the bundle. A bundle is a purchasing convenience. *Product bundle has a SKU and price.*
|
|
2020
|
-
*
|
|
2021
|
-
* @property id:
|
|
2022
|
-
*
|
|
2023
|
-
* @property product: The product being bundled.
|
|
2024
|
-
*
|
|
2025
|
-
* @property quantity: For the product being bundled, the quantity added to the bundle.
|
|
2026
|
-
*
|
|
2027
|
-
*/
|
|
2028
|
-
type BundledProduct = {
|
|
2029
|
-
id: string;
|
|
2030
|
-
product: Product;
|
|
2031
|
-
quantity: number;
|
|
2032
|
-
} & {
|
|
2033
|
-
[key: string]: any;
|
|
2034
|
-
};
|
|
2035
|
-
/**
|
|
2036
|
-
* @type PathRecord: Document representing most basic info (id and name) of a category or catalog.
|
|
2037
|
-
*
|
|
2038
|
-
* @property id: The id of the category path.
|
|
2039
|
-
*
|
|
2040
|
-
* @property name: The name of the category path.
|
|
2041
|
-
*
|
|
2042
|
-
*/
|
|
2043
|
-
type PathRecord = {
|
|
2044
|
-
id?: string;
|
|
2045
|
-
name?: string;
|
|
2046
|
-
} & {
|
|
2047
|
-
[key: string]: any;
|
|
2048
|
-
};
|
|
2049
|
-
/**
|
|
2050
|
-
* @type Category: Categories allow products to be organized into hierarchical structures. Categories can have relationships to other parent categories. Each category can also provide a context inherited by subcategories. For example, a category may have an attribute value assigned to it, and any product assigned to the category or a subcategory would inherit the attribute value as long as the product is assigned. Once the product is removed from the category those attribute values would no longer be in the context of the product. Linking of categories is also used for Site hierarchical navigation. For example, inside \'Clothing\' you may have \'Mens\', and inside \'Mens\' you may have \'Pants\'. Categories are not *Tags.*
|
|
2051
|
-
*
|
|
2052
|
-
* @property categories: Array of subcategories. Can be empty.
|
|
2053
|
-
*
|
|
2054
|
-
* @property description: The localized description of the category.
|
|
2055
|
-
*
|
|
2056
|
-
* @property id: The ID of the category.
|
|
2057
|
-
* - **Min Length:** 1
|
|
2058
|
-
* - **Max Length:** 256
|
|
2059
|
-
*
|
|
2060
|
-
* @property image: The URL of the category image.
|
|
2061
|
-
*
|
|
2062
|
-
* @property name: The localized name of the category.
|
|
2063
|
-
*
|
|
2064
|
-
* @property onlineSubCategoriesCount: The total number of online sub-categories. This information will be available from B2C Commerce version 24.5.
|
|
2065
|
-
*
|
|
2066
|
-
* @property pageDescription: The localized page description of the category.
|
|
2067
|
-
*
|
|
2068
|
-
* @property pageKeywords: The localized page keywords of the category.
|
|
2069
|
-
*
|
|
2070
|
-
* @property pageTitle: The localized page title of the category.
|
|
2071
|
-
*
|
|
2072
|
-
* @property parentCategoryId: The ID of the parent category.
|
|
2073
|
-
*
|
|
2074
|
-
* @property parentCategoryTree: The List of the parent categories.
|
|
2075
|
-
*
|
|
2076
|
-
* @property thumbnail: The URL of the category thumbnail.
|
|
2077
|
-
*
|
|
2078
|
-
*/
|
|
2079
|
-
type Category = {
|
|
2080
|
-
categories?: Array<Category>;
|
|
2081
|
-
description?: string;
|
|
2082
|
-
id: string;
|
|
2083
|
-
image?: string;
|
|
2084
|
-
name?: string;
|
|
2085
|
-
onlineSubCategoriesCount?: number;
|
|
2086
|
-
pageDescription?: string;
|
|
2087
|
-
pageKeywords?: string;
|
|
2088
|
-
pageTitle?: string;
|
|
2089
|
-
parentCategoryId?: string;
|
|
2090
|
-
parentCategoryTree?: Array<PathRecord>;
|
|
2091
|
-
thumbnail?: string;
|
|
2092
|
-
} & {
|
|
2093
|
-
[key: string]: any;
|
|
2094
|
-
};
|
|
2095
|
-
/**
|
|
2096
|
-
* @type CategoryResult: Result document containing an array of categories.
|
|
2097
|
-
*
|
|
2098
|
-
* @property data: The array of category documents.
|
|
2099
|
-
*
|
|
2100
|
-
* @property limit: Maximum records to retrieve per request, not to exceed the maximum defined. A limit must be at least 1 so at least one record is returned (if any match the criteria).
|
|
2101
|
-
*
|
|
2102
|
-
* @property total: 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.
|
|
2103
|
-
*
|
|
2104
|
-
*/
|
|
2105
|
-
type CategoryResult = {
|
|
2106
|
-
data: Array<Category>;
|
|
2107
|
-
limit: number;
|
|
2108
|
-
total: number;
|
|
2109
|
-
} & {
|
|
2110
|
-
[key: string]: any;
|
|
2111
|
-
};
|
|
2112
|
-
/**
|
|
2113
|
-
* A specialized value indicating the system default values for locales.
|
|
2114
|
-
*/
|
|
2115
|
-
type DefaultFallback = "default";
|
|
2116
|
-
/**
|
|
2117
|
-
* @type ErrorResponse:
|
|
2118
|
-
*
|
|
2119
|
-
* @property title: A short, human-readable summary of the problem type. It will not change from occurrence to occurrence of the problem, except for purposes of localization
|
|
2120
|
-
* - **Max Length:** 256
|
|
2121
|
-
*
|
|
2122
|
-
* @property type: A URI reference [RFC3986] that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be \"about:blank\". It accepts relative URIs; this means that they must be resolved relative to the document\'s base URI, as per [RFC3986], Section 5.
|
|
2123
|
-
* - **Max Length:** 2048
|
|
2124
|
-
*
|
|
2125
|
-
* @property detail: A human-readable explanation specific to this occurrence of the problem.
|
|
2126
|
-
*
|
|
2127
|
-
* @property instance: A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. It accepts relative URIs; this means that they must be resolved relative to the document\'s base URI, as per [RFC3986], Section 5.
|
|
2128
|
-
* - **Max Length:** 2048
|
|
2129
|
-
*
|
|
2130
|
-
*/
|
|
2131
|
-
type ErrorResponse = {
|
|
2132
|
-
title: string;
|
|
2133
|
-
type: string;
|
|
2134
|
-
detail: string;
|
|
2135
|
-
instance?: string;
|
|
2136
|
-
} & {
|
|
2137
|
-
[key: string]: any;
|
|
2138
|
-
};
|
|
2139
|
-
/**
|
|
2140
|
-
* @type LocaleCode
|
|
2141
|
-
* A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
|
|
2142
|
-
*/
|
|
2143
|
-
type LocaleCode$0 = DefaultFallback | string;
|
|
2144
|
-
/**
|
|
2145
|
-
* @type ProductResult: Result document containing an array of products.
|
|
2146
|
-
*
|
|
2147
|
-
* @property limit: The number of returned documents.
|
|
2148
|
-
*
|
|
2149
|
-
* @property data: The array of product documents.
|
|
2150
|
-
*
|
|
2151
|
-
* @property total: The total number of documents.
|
|
2152
|
-
*
|
|
2153
|
-
*/
|
|
2154
|
-
type ProductResult = {
|
|
2155
|
-
limit: number;
|
|
2156
|
-
data: Array<Product>;
|
|
2157
|
-
total: number;
|
|
2158
|
-
} & {
|
|
2159
|
-
[key: string]: any;
|
|
2160
|
-
};
|
|
2161
|
-
/**
|
|
2162
|
-
* @type ResultBase: Schema defining generic list result. Each response schema of a resource requiring a list response should extend this schema. Additionally it needs to be defined what data is returned.
|
|
2163
|
-
*
|
|
2164
|
-
* @property limit: Maximum records to retrieve per request, not to exceed the maximum defined. A limit must be at least 1 so at least one record is returned (if any match the criteria).
|
|
2165
|
-
*
|
|
2166
|
-
* @property total: 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.
|
|
2167
|
-
*
|
|
2168
|
-
*/
|
|
2169
|
-
type ResultBase = {
|
|
2170
|
-
limit: number;
|
|
2171
|
-
total: number;
|
|
2172
|
-
} & {
|
|
2173
|
-
[key: string]: any;
|
|
2174
|
-
};
|
|
2175
|
-
type GetCategoriesLevelsEnum = 0 | 1 | 2;
|
|
2176
|
-
type GetCategoryLevelsEnum = 0 | 1 | 2;
|
|
2177
|
-
type GetProductExpandEnum = "none" | "availability" | "bundled_products" | "links" | "promotions" | "options" | "images" | "prices" | "variations" | "set_products" | "recommendations" | "page_meta_tags";
|
|
2178
|
-
type GetProductsExpandEnum = "none" | "availability" | "links" | "promotions" | "options" | "images" | "prices" | "variations" | "recommendations" | "page_meta_tags";
|
|
2179
|
-
type getCategoriesQueryParameters = {
|
|
2180
|
-
ids: Array<string>;
|
|
2181
|
-
levels?: 0 | 1 | 2;
|
|
2182
|
-
locale?: LocaleCode$0;
|
|
2183
|
-
siteId: string;
|
|
2184
|
-
};
|
|
2185
|
-
type getCategoriesPathParameters = {
|
|
2186
|
-
organizationId: string;
|
|
2187
|
-
};
|
|
2188
|
-
type getCategoryQueryParameters = {
|
|
2189
|
-
levels?: 0 | 1 | 2;
|
|
2190
|
-
locale?: LocaleCode$0;
|
|
2191
|
-
siteId: string;
|
|
2192
|
-
};
|
|
2193
|
-
type getCategoryPathParameters = {
|
|
2194
|
-
id: string;
|
|
2195
|
-
organizationId: string;
|
|
2196
|
-
};
|
|
2197
|
-
type getProductQueryParameters = {
|
|
2198
|
-
inventoryIds?: Array<string>;
|
|
2199
|
-
expand?: Array<"none" | "availability" | "bundled_products" | "links" | "promotions" | "options" | "images" | "prices" | "variations" | "set_products" | "recommendations" | "page_meta_tags">;
|
|
2200
|
-
allImages?: boolean;
|
|
2201
|
-
perPricebook?: boolean;
|
|
2202
|
-
select?: string;
|
|
2203
|
-
currency?: CurrencyCode;
|
|
2204
|
-
locale?: LocaleCode$0;
|
|
2205
|
-
siteId: string;
|
|
2206
|
-
};
|
|
2207
|
-
type getProductPathParameters = {
|
|
2208
|
-
organizationId: string;
|
|
2209
|
-
id: string;
|
|
2210
|
-
};
|
|
2211
|
-
type getProductsQueryParameters = {
|
|
2212
|
-
ids: Array<string>;
|
|
2213
|
-
inventoryIds?: Array<string>;
|
|
2214
|
-
expand?: Array<"none" | "availability" | "links" | "promotions" | "options" | "images" | "prices" | "variations" | "recommendations" | "page_meta_tags">;
|
|
2215
|
-
allImages?: boolean;
|
|
2216
|
-
perPricebook?: boolean;
|
|
2217
|
-
siteId: string;
|
|
2218
|
-
select?: string;
|
|
2219
|
-
locale?: LocaleCode$0;
|
|
2220
|
-
currency?: CurrencyCode;
|
|
2221
|
-
};
|
|
2222
|
-
type getProductsPathParameters = {
|
|
2223
|
-
organizationId: string;
|
|
2224
|
-
};
|
|
2225
|
-
/**
|
|
2226
|
-
* All path parameters that are used by at least one ShopperProducts method.
|
|
2227
|
-
*/
|
|
2228
|
-
type ShopperProductsPathParameters = Partial<getCategoriesPathParameters & getCategoryPathParameters & getProductPathParameters & getProductsPathParameters & {}>;
|
|
2229
|
-
/**
|
|
2230
|
-
* All query parameters that are used by at least one ShopperProducts method.
|
|
2231
|
-
*/
|
|
2232
|
-
type ShopperProductsQueryParameters = Partial<getCategoriesQueryParameters & getCategoryQueryParameters & getProductQueryParameters & getProductsQueryParameters & {}>;
|
|
2233
|
-
/**
|
|
2234
|
-
* All parameters that are used by ShopperProducts.
|
|
2235
|
-
*/
|
|
2236
|
-
type ShopperProductsParameters = ShopperProductsPathParameters & BaseUriParameters & ShopperProductsQueryParameters;
|
|
2237
|
-
/**
|
|
2238
|
-
* [Shopper Products](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-products:Summary)
|
|
2239
|
-
* ==================================
|
|
2240
|
-
*
|
|
2241
|
-
* *# API Overview
|
|
2242
|
-
|
|
2243
|
-
The Shopper Products API enables you to access product details for products that are online, merchandised to a particular site catalog, and ready to be sold. You can use these product details to merchandise the product on other ecommerce channels. To set up category navigation paths on other commerce apps or storefronts, you can use the Categories API.
|
|
2244
|
-
|
|
2245
|
-
Caching is provided for the Shopper Products API. For details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html)
|
|
2246
|
-
|
|
2247
|
-
## Authentication & Authorization
|
|
2248
|
-
|
|
2249
|
-
The client requesting the product information must have access to the Products resource. The Shopper Products API requires a shopper access token from the Shopper Login and API Access Service (SLAS).
|
|
2250
|
-
|
|
2251
|
-
For details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html#guest-user) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html#guest-user) in the SLAS guides.
|
|
2252
|
-
|
|
2253
|
-
## Use Cases
|
|
2254
|
-
|
|
2255
|
-
### Populate Product Listing Pages
|
|
2256
|
-
|
|
2257
|
-
Use the Shopper Product API so that a customer, browsing on a commerce shopping app built using Commerce Cloud APIs, can see a list of products. For example, hydrate a list of products (max 24). The API returns product details including images, prices, promotions, and product availability.
|
|
2258
|
-
|
|
2259
|
-

|
|
2260
|
-
|
|
2261
|
-
### Get Variation Product Details on an Ecommerce Channel
|
|
2262
|
-
|
|
2263
|
-
Use the API so that a customer, browsing on a commerce shopping app built using Commerce Cloud APIs, can switch between different variation products. The API returns product details including images, prices, promotions, and available to sell inventory.
|
|
2264
|
-
|
|
2265
|
-

|
|
2266
|
-
|
|
2267
|
-
### Retrieve Promotion Information
|
|
2268
|
-
|
|
2269
|
-
Promotions provide discounts to shoppers when they meet certain purchase requirements.
|
|
2270
|
-
|
|
2271
|
-
Promotion information is described in detail in [Promotion Details](https://developer.salesforce.com/docs/commerce/commerce-api/guide/promotion-details.html), but the following list provides several key points:
|
|
2272
|
-
|
|
2273
|
-
- Pricing discounts for basket and shipping promotions are NEVER returned by the 'getProduct' or 'getProducts' endpoint.
|
|
2274
|
-
- Promotional pricing is ONLY returned for products that are included with non-conditional promotions.
|
|
2275
|
-
- Callout messages are ALWAYS returned by the 'getProduct' and 'getProducts' endpoints.
|
|
2276
|
-
|
|
2277
|
-
By default, 'getProduct' and 'getProducts' return promotion information for a queried product. Promotion information includes both pricing and callout message information. However, the specific pricing and callout information that is fetched is determined by:
|
|
2278
|
-
|
|
2279
|
-
- Promotion Type
|
|
2280
|
-
- Product Type
|
|
2281
|
-
- Product Purchase Requirements
|
|
2282
|
-
|
|
2283
|
-
Some promotions can be displayed on a Product Data Page (PDP) or Product Listing page (PLP), while other promotions are displayed in the context of a basket, such as an order level promotion: "add the product to your basket to view price information". It is important to understand what is included in the response when designing a PDP or PLP on top of SCAPI to ensure your design aligns with implementable features.
|
|
2284
|
-
|
|
2285
|
-
#### Shopper Personalization
|
|
2286
|
-
|
|
2287
|
-
The SCAPI response can be personalized using the Shopper Context API or hooks. By setting specific values in the Shopper Context API, you can modify the response of the 'getProduct' or 'getProducts' endpoint based on the shopper's context. For instance, you can offer a 5% discount or free shipping to shoppers using mobile devices.
|
|
2288
|
-
|
|
2289
|
-
#### JWA Caching
|
|
2290
|
-
|
|
2291
|
-
The response is cached in JWA, which means promotion data contained in the response is also cached based on the TTL (Time to Live) specified in the Business Manager [Feature Switches](https://help.salesforce.com/s/articleView?id=cc.b2c_feature_switches.htm&type=5) configuration.
|
|
2292
|
-
When the shopper context value is updated, a check is conducted to see if the updated shopper context affects the retrieval of product-promotion data. If it does, then the response is fetched from the source and cached in the JWA.
|
|
2293
|
-
|
|
2294
|
-
For details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html)
|
|
2295
|
-
|
|
2296
|
-
### Use Hooks
|
|
2297
|
-
|
|
2298
|
-
For details working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html)
|
|
2299
|
-
|
|
2300
|
-
### Test Description Changes
|
|
2301
|
-
|
|
2302
|
-
uoweefhewihpfhweipfiphwefhipwehfiewpifhewifiphehipeipwhfhipewfhiihpefipew
|
|
2303
|
-
|
|
2304
|
-
## Resources
|
|
2305
|
-
|
|
2306
|
-
### Product
|
|
2307
|
-
|
|
2308
|
-
A full representation of a product or service that is to merchandise. A ready to merchandise product is one that is online, categorized, and published to a channel. The information associated with a product includes, the product name, description, custom and system attributes, variations, price, availability, and images.
|
|
2309
|
-
|
|
2310
|
-
### Category
|
|
2311
|
-
|
|
2312
|
-
Categories and subcategories are the structure by which products are organized and grouped in a catalog and on a storefront. Categories can have relationships to other categories. Further, each category can provide context that is inherited by subcategories. For example, a category can have an assigned attribute. A product assigned to that category or any subcategory inherits the categories’s attribute value. Once the product is removed from the category, the attribute value is no longer inherited by the product. You can also use category linking for site hierarchical navigation. For example, inside the Clothing category you may have Men’s, and inside the Men’s category you may have Pants.
|
|
2313
|
-
|
|
2314
|
-
Categories are not tags.
|
|
2315
|
-
|
|
2316
|
-
## Endpoints
|
|
2317
|
-
|
|
2318
|
-
### GET /products
|
|
2319
|
-
|
|
2320
|
-
Returns product details for up to 24 products in one API request. You can use this API for use cases that require populating or hydrating multiple products at a time, such as populating the Product Listing Pages.
|
|
2321
|
-
|
|
2322
|
-
The response data includes availability, promotions, images, and prices, along with the basic product information for the products requested.
|
|
2323
|
-
|
|
2324
|
-
### GET /products/{id}
|
|
2325
|
-
|
|
2326
|
-
Returns product details about a single product. Use this API for use cases that require populating or hydrating one product at a time, such as the Product Detail Pages.
|
|
2327
|
-
|
|
2328
|
-
The response data includes availability, promotions, options, images, prices, variations, bundled_products, set_products, recommendations, and the basic product information for the product requested.
|
|
2329
|
-
|
|
2330
|
-
### GET /categories
|
|
2331
|
-
|
|
2332
|
-
Returns category details including the parent child relationships for one or more categories. The limit on depth for the parent-child relationship is 2.*<br />
|
|
2333
|
-
*
|
|
2334
|
-
* Simple example:
|
|
2335
|
-
*
|
|
2336
|
-
* ```typescript
|
|
2337
|
-
* import { ShopperProducts } from "commerce-sdk-isomorphic";
|
|
2338
|
-
*
|
|
2339
|
-
* const clientConfig = {
|
|
2340
|
-
* parameters: {
|
|
2341
|
-
* clientId: "XXXXXX",
|
|
2342
|
-
* organizationId: "XXXX",
|
|
2343
|
-
* shortCode: "XXX",
|
|
2344
|
-
* siteId: "XX"
|
|
2345
|
-
* }
|
|
2346
|
-
* };
|
|
2347
|
-
* const shopperProductsClient = new ShopperProducts(clientConfig);
|
|
2348
|
-
* ```
|
|
2349
|
-
*
|
|
2350
|
-
* <span style="font-size:.7em; display:block; text-align: right">
|
|
2351
|
-
* API Version: 0.0.33<br />
|
|
2352
|
-
* Last Updated: <br />
|
|
2353
|
-
* </span>
|
|
2354
|
-
*
|
|
2355
|
-
*
|
|
2356
|
-
*/
|
|
2357
|
-
class ShopperProducts<ConfigParameters extends ShopperProductsParameters & Record<string, unknown>> {
|
|
2358
|
-
// baseUri is not required on ClientConfig, but we know that we provide one in the class constructor
|
|
2359
|
-
clientConfig: ClientConfig<ConfigParameters> & {
|
|
2360
|
-
baseUri: string;
|
|
2361
|
-
};
|
|
2362
|
-
static readonly defaultBaseUri = "https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/v1";
|
|
2363
|
-
static readonly apiPaths: {
|
|
2364
|
-
getCategories: string;
|
|
2365
|
-
getCategory: string;
|
|
2366
|
-
getProduct: string;
|
|
2367
|
-
getProducts: string;
|
|
2368
|
-
};
|
|
2369
|
-
constructor(config: ClientConfigInit<ConfigParameters>);
|
|
2370
|
-
static readonly paramKeys: {
|
|
2371
|
-
readonly getCategories: readonly [
|
|
2372
|
-
"organizationId",
|
|
2373
|
-
"ids",
|
|
2374
|
-
"siteId",
|
|
2375
|
-
"levels",
|
|
2376
|
-
"locale"
|
|
2377
|
-
];
|
|
2378
|
-
readonly getCategoriesRequired: readonly [
|
|
2379
|
-
"organizationId",
|
|
2380
|
-
"ids",
|
|
2381
|
-
"siteId"
|
|
2382
|
-
];
|
|
2383
|
-
readonly getCategory: readonly [
|
|
2384
|
-
"id",
|
|
2385
|
-
"organizationId",
|
|
2386
|
-
"siteId",
|
|
2387
|
-
"levels",
|
|
2388
|
-
"locale"
|
|
2389
|
-
];
|
|
2390
|
-
readonly getCategoryRequired: readonly [
|
|
2391
|
-
"id",
|
|
2392
|
-
"organizationId",
|
|
2393
|
-
"siteId"
|
|
2394
|
-
];
|
|
2395
|
-
readonly getProduct: readonly [
|
|
2396
|
-
"organizationId",
|
|
2397
|
-
"id",
|
|
2398
|
-
"siteId",
|
|
2399
|
-
"inventoryIds",
|
|
2400
|
-
"expand",
|
|
2401
|
-
"allImages",
|
|
2402
|
-
"perPricebook",
|
|
2403
|
-
"select",
|
|
2404
|
-
"currency",
|
|
2405
|
-
"locale"
|
|
2406
|
-
];
|
|
2407
|
-
readonly getProductRequired: readonly [
|
|
2408
|
-
"organizationId",
|
|
2409
|
-
"id",
|
|
2410
|
-
"siteId"
|
|
2411
|
-
];
|
|
2412
|
-
readonly getProducts: readonly [
|
|
2413
|
-
"organizationId",
|
|
2414
|
-
"ids",
|
|
2415
|
-
"siteId",
|
|
2416
|
-
"inventoryIds",
|
|
2417
|
-
"expand",
|
|
2418
|
-
"allImages",
|
|
2419
|
-
"perPricebook",
|
|
2420
|
-
"select",
|
|
2421
|
-
"locale",
|
|
2422
|
-
"currency"
|
|
2423
|
-
];
|
|
2424
|
-
readonly getProductsRequired: readonly [
|
|
2425
|
-
"organizationId",
|
|
2426
|
-
"ids",
|
|
2427
|
-
"siteId"
|
|
2428
|
-
];
|
|
2429
|
-
};
|
|
2430
|
-
/**
|
|
2431
|
-
* When you use the URL template, the server returns multiple categories (a result object of category documents). You can use this template to obtain up to 50 categories in a single request. You must enclose the list of IDs in parentheses. If a category identifier contains parenthesis or the separator sign, you must URL encode the character.
|
|
2432
|
-
*
|
|
2433
|
-
* If you would like to get a raw Response object use the other getCategories function.
|
|
2434
|
-
*
|
|
2435
|
-
* @param options - An object containing the options for this method.
|
|
2436
|
-
* @param options.parameters - An object containing the parameters for this method.
|
|
2437
|
-
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
|
|
2438
|
-
* @param options.parameters.ids - The comma separated list of category IDs (max 50).
|
|
2439
|
-
* @param options.parameters.siteId - 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.
|
|
2440
|
-
* @param options.parameters.levels - Specifies how many levels of nested subcategories you want the server to return. The default value is 1. Valid values are 0, 1, or 2. Only online subcategories are returned.
|
|
2441
|
-
* @param options.parameters.locale - A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
|
|
2442
|
-
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
|
|
2443
|
-
*
|
|
2444
|
-
* @returns A promise of type CategoryResult.
|
|
2445
|
-
*/
|
|
2446
|
-
getCategories(options?: RequireParametersUnlessAllAreOptional<{
|
|
2447
|
-
parameters?: CompositeParameters<{
|
|
2448
|
-
organizationId: string;
|
|
2449
|
-
ids: Array<string>;
|
|
2450
|
-
siteId: string;
|
|
2451
|
-
levels?: GetCategoriesLevelsEnum;
|
|
2452
|
-
locale?: LocaleCode$0;
|
|
2453
|
-
} & QueryParameters, ConfigParameters>;
|
|
2454
|
-
headers?: {
|
|
2455
|
-
[key: string]: string;
|
|
2456
|
-
};
|
|
2457
|
-
}>): Promise<CategoryResult>;
|
|
2458
|
-
/**
|
|
2459
|
-
* When you use the URL template, the server returns multiple categories (a result object of category documents). You can use this template to obtain up to 50 categories in a single request. You must enclose the list of IDs in parentheses. If a category identifier contains parenthesis or the separator sign, you must URL encode the character.
|
|
2460
|
-
*
|
|
2461
|
-
* @param options - An object containing the options for this method.
|
|
2462
|
-
* @param options.parameters - An object containing the parameters for this method.
|
|
2463
|
-
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
|
|
2464
|
-
* @param options.parameters.ids - The comma separated list of category IDs (max 50).
|
|
2465
|
-
* @param options.parameters.siteId - 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.
|
|
2466
|
-
* @param options.parameters.levels - Specifies how many levels of nested subcategories you want the server to return. The default value is 1. Valid values are 0, 1, or 2. Only online subcategories are returned.
|
|
2467
|
-
* @param options.parameters.locale - A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
|
|
2468
|
-
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
|
|
2469
|
-
* @param rawResponse - Set to true to return entire Response object instead of DTO.
|
|
2470
|
-
*
|
|
2471
|
-
* @returns A promise of type Response if rawResponse is true, a promise of type CategoryResult otherwise.
|
|
2472
|
-
*/
|
|
2473
|
-
getCategories<T extends boolean>(options?: RequireParametersUnlessAllAreOptional<{
|
|
2474
|
-
parameters?: CompositeParameters<{
|
|
2475
|
-
organizationId: string;
|
|
2476
|
-
ids: Array<string>;
|
|
2477
|
-
siteId: string;
|
|
2478
|
-
levels?: GetCategoriesLevelsEnum;
|
|
2479
|
-
locale?: LocaleCode$0;
|
|
2480
|
-
} & QueryParameters, ConfigParameters>;
|
|
2481
|
-
headers?: {
|
|
2482
|
-
[key: string]: string;
|
|
2483
|
-
};
|
|
2484
|
-
}>, rawResponse?: T): Promise<T extends true ? Response : CategoryResult>;
|
|
2485
|
-
/**
|
|
2486
|
-
* When you use the URL template, the server returns a category identified by the ID. By default, the server
|
|
2487
|
-
also returns the first level of subcategories, but you can specify an additional level using the levels
|
|
2488
|
-
parameter.
|
|
2489
|
-
|
|
2490
|
-
This endpoint fetches both online and offline categories. For offline categories, only the top-level
|
|
2491
|
-
category is returned, not offline subcategories.
|
|
2492
|
-
|
|
2493
|
-
Using a large value for levels can cause performance issues when there is a large and deep category tree.
|
|
2494
|
-
*
|
|
2495
|
-
* If you would like to get a raw Response object use the other getCategory function.
|
|
2496
|
-
*
|
|
2497
|
-
* @param options - An object containing the options for this method.
|
|
2498
|
-
* @param options.parameters - An object containing the parameters for this method.
|
|
2499
|
-
* @param options.parameters.id - The ID of the requested category.
|
|
2500
|
-
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
|
|
2501
|
-
* @param options.parameters.siteId - 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.
|
|
2502
|
-
* @param options.parameters.levels - Specifies how many levels of nested subcategories you want the server to return. The default value is 1. Valid values are 0, 1, or 2. Only online subcategories are returned.
|
|
2503
|
-
* @param options.parameters.locale - A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
|
|
2504
|
-
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
|
|
2505
|
-
*
|
|
2506
|
-
* @returns A promise of type Category.
|
|
2507
|
-
*/
|
|
2508
|
-
getCategory(options?: RequireParametersUnlessAllAreOptional<{
|
|
2509
|
-
parameters?: CompositeParameters<{
|
|
2510
|
-
id: string;
|
|
2511
|
-
organizationId: string;
|
|
2512
|
-
siteId: string;
|
|
2513
|
-
levels?: GetCategoryLevelsEnum;
|
|
2514
|
-
locale?: LocaleCode$0;
|
|
2515
|
-
} & QueryParameters, ConfigParameters>;
|
|
2516
|
-
headers?: {
|
|
2517
|
-
[key: string]: string;
|
|
2518
|
-
};
|
|
2519
|
-
}>): Promise<Category>;
|
|
2520
|
-
/**
|
|
2521
|
-
* When you use the URL template, the server returns a category identified by the ID. By default, the server
|
|
2522
|
-
also returns the first level of subcategories, but you can specify an additional level using the levels
|
|
2523
|
-
parameter.
|
|
2524
|
-
|
|
2525
|
-
This endpoint fetches both online and offline categories. For offline categories, only the top-level
|
|
2526
|
-
category is returned, not offline subcategories.
|
|
2527
|
-
|
|
2528
|
-
Using a large value for levels can cause performance issues when there is a large and deep category tree.
|
|
2529
|
-
*
|
|
2530
|
-
* @param options - An object containing the options for this method.
|
|
2531
|
-
* @param options.parameters - An object containing the parameters for this method.
|
|
2532
|
-
* @param options.parameters.id - The ID of the requested category.
|
|
2533
|
-
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
|
|
2534
|
-
* @param options.parameters.siteId - 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.
|
|
2535
|
-
* @param options.parameters.levels - Specifies how many levels of nested subcategories you want the server to return. The default value is 1. Valid values are 0, 1, or 2. Only online subcategories are returned.
|
|
2536
|
-
* @param options.parameters.locale - A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
|
|
2537
|
-
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
|
|
2538
|
-
* @param rawResponse - Set to true to return entire Response object instead of DTO.
|
|
2539
|
-
*
|
|
2540
|
-
* @returns A promise of type Response if rawResponse is true, a promise of type Category otherwise.
|
|
2541
|
-
*/
|
|
2542
|
-
getCategory<T extends boolean>(options?: RequireParametersUnlessAllAreOptional<{
|
|
2543
|
-
parameters?: CompositeParameters<{
|
|
2544
|
-
id: string;
|
|
2545
|
-
organizationId: string;
|
|
2546
|
-
siteId: string;
|
|
2547
|
-
levels?: GetCategoryLevelsEnum;
|
|
2548
|
-
locale?: LocaleCode$0;
|
|
2549
|
-
} & QueryParameters, ConfigParameters>;
|
|
2550
|
-
headers?: {
|
|
2551
|
-
[key: string]: string;
|
|
2552
|
-
};
|
|
2553
|
-
}>, rawResponse?: T): Promise<T extends true ? Response : Category>;
|
|
2554
|
-
/**
|
|
2555
|
-
* Allows access to product details for a single product ID. Only products that are online and assigned to a site catalog are returned. In addition to product details, the availability, images, price, bundled_products, set_products, recommedations, product options, variations, and promotions for the products are included, as applicable.
|
|
2556
|
-
*
|
|
2557
|
-
* If you would like to get a raw Response object use the other getProduct function.
|
|
2558
|
-
*
|
|
2559
|
-
* @param options - An object containing the options for this method.
|
|
2560
|
-
* @param options.parameters - An object containing the parameters for this method.
|
|
2561
|
-
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
|
|
2562
|
-
* @param options.parameters.id - The ID of the requested product.
|
|
2563
|
-
* @param options.parameters.siteId - 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.
|
|
2564
|
-
* @param options.parameters.inventoryIds - The optional inventory list IDs, for which the availability should be shown (comma-separated, max 5 inventoryListIDs).
|
|
2565
|
-
* @param options.parameters.expand - All expand parameters except page_meta_tags are used for the request when no expand parameter is provided.
|
|
2566
|
-
The value "none" may be used to turn off all expand options.
|
|
2567
|
-
The page_meta_tags expand value is optional and available starting from B2C Commerce version 25.2.
|
|
2568
|
-
* @param options.parameters.allImages - The flag that indicates whether to retrieve the whole image model for the requested product.
|
|
2569
|
-
* @param options.parameters.perPricebook - The flag that indicates whether to retrieve the per PriceBook prices and tiered prices (if available) for requested Products. Available end of June, 2021.
|
|
2570
|
-
* @param options.parameters.select - The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names or work with wildcards. You can also specify array operations and filter expressions. The actual selector value must be enclosed within parentheses.
|
|
2571
|
-
* @param options.parameters.currency - A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.
|
|
2572
|
-
* @param options.parameters.locale - A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
|
|
2573
|
-
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
|
|
2574
|
-
*
|
|
2575
|
-
* @returns A promise of type Product.
|
|
2576
|
-
*/
|
|
2577
|
-
getProduct(options?: RequireParametersUnlessAllAreOptional<{
|
|
2578
|
-
parameters?: CompositeParameters<{
|
|
2579
|
-
organizationId: string;
|
|
2580
|
-
id: string;
|
|
2581
|
-
siteId: string;
|
|
2582
|
-
inventoryIds?: Array<string>;
|
|
2583
|
-
expand?: Array<GetProductExpandEnum>;
|
|
2584
|
-
allImages?: boolean;
|
|
2585
|
-
perPricebook?: boolean;
|
|
2586
|
-
select?: string;
|
|
2587
|
-
currency?: CurrencyCode;
|
|
2588
|
-
locale?: LocaleCode$0;
|
|
2589
|
-
} & QueryParameters, ConfigParameters>;
|
|
2590
|
-
headers?: {
|
|
2591
|
-
[key: string]: string;
|
|
2592
|
-
};
|
|
2593
|
-
}>): Promise<Product>;
|
|
2594
|
-
/**
|
|
2595
|
-
* Allows access to product details for a single product ID. Only products that are online and assigned to a site catalog are returned. In addition to product details, the availability, images, price, bundled_products, set_products, recommedations, product options, variations, and promotions for the products are included, as applicable.
|
|
2596
|
-
*
|
|
2597
|
-
* @param options - An object containing the options for this method.
|
|
2598
|
-
* @param options.parameters - An object containing the parameters for this method.
|
|
2599
|
-
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
|
|
2600
|
-
* @param options.parameters.id - The ID of the requested product.
|
|
2601
|
-
* @param options.parameters.siteId - 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.
|
|
2602
|
-
* @param options.parameters.inventoryIds - The optional inventory list IDs, for which the availability should be shown (comma-separated, max 5 inventoryListIDs).
|
|
2603
|
-
* @param options.parameters.expand - All expand parameters except page_meta_tags are used for the request when no expand parameter is provided.
|
|
2604
|
-
The value "none" may be used to turn off all expand options.
|
|
2605
|
-
The page_meta_tags expand value is optional and available starting from B2C Commerce version 25.2.
|
|
2606
|
-
* @param options.parameters.allImages - The flag that indicates whether to retrieve the whole image model for the requested product.
|
|
2607
|
-
* @param options.parameters.perPricebook - The flag that indicates whether to retrieve the per PriceBook prices and tiered prices (if available) for requested Products. Available end of June, 2021.
|
|
2608
|
-
* @param options.parameters.select - The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names or work with wildcards. You can also specify array operations and filter expressions. The actual selector value must be enclosed within parentheses.
|
|
2609
|
-
* @param options.parameters.currency - A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.
|
|
2610
|
-
* @param options.parameters.locale - A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
|
|
2611
|
-
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
|
|
2612
|
-
* @param rawResponse - Set to true to return entire Response object instead of DTO.
|
|
2613
|
-
*
|
|
2614
|
-
* @returns A promise of type Response if rawResponse is true, a promise of type Product otherwise.
|
|
2615
|
-
*/
|
|
2616
|
-
getProduct<T extends boolean>(options?: RequireParametersUnlessAllAreOptional<{
|
|
2617
|
-
parameters?: CompositeParameters<{
|
|
2618
|
-
organizationId: string;
|
|
2619
|
-
id: string;
|
|
2620
|
-
siteId: string;
|
|
2621
|
-
inventoryIds?: Array<string>;
|
|
2622
|
-
expand?: Array<GetProductExpandEnum>;
|
|
2623
|
-
allImages?: boolean;
|
|
2624
|
-
perPricebook?: boolean;
|
|
2625
|
-
select?: string;
|
|
2626
|
-
currency?: CurrencyCode;
|
|
2627
|
-
locale?: LocaleCode$0;
|
|
2628
|
-
} & QueryParameters, ConfigParameters>;
|
|
2629
|
-
headers?: {
|
|
2630
|
-
[key: string]: string;
|
|
2631
|
-
};
|
|
2632
|
-
}>, rawResponse?: T): Promise<T extends true ? Response : Product>;
|
|
2633
|
-
/**
|
|
2634
|
-
* Allows access to multiple product details with a single request. Only products that are online and assigned to a site catalog are returned. The maximum number of product IDs that you can request is 24. In addition to product details, the availability, product options, images, price, promotions, and variations for the valid products are included, as applicable.
|
|
2635
|
-
*
|
|
2636
|
-
* If you would like to get a raw Response object use the other getProducts function.
|
|
2637
|
-
*
|
|
2638
|
-
* @param options - An object containing the options for this method.
|
|
2639
|
-
* @param options.parameters - An object containing the parameters for this method.
|
|
2640
|
-
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
|
|
2641
|
-
* @param options.parameters.ids - The IDs of the requested products (comma-separated, max 24 IDs).
|
|
2642
|
-
* @param options.parameters.siteId - 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.
|
|
2643
|
-
* @param options.parameters.inventoryIds - The optional inventory list IDs, for which the availability should be shown (comma-separated, max 5 inventoryListIDs).
|
|
2644
|
-
* @param options.parameters.expand - All expand parameters except page_meta_tags are used for the request when no expand parameter is provided.
|
|
2645
|
-
The value "none" may be used to turn off all expand options.
|
|
2646
|
-
The page_meta_tags expand value is optional and available starting from B2C Commerce version 25.2.
|
|
2647
|
-
* @param options.parameters.allImages - The flag that indicates whether to retrieve the whole image model for the requested product.
|
|
2648
|
-
* @param options.parameters.perPricebook - The flag that indicates whether to retrieve the per PriceBook prices and tiered prices (if available) for requested Products. Available end of June, 2021.
|
|
2649
|
-
* @param options.parameters.select - The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names or work with wildcards. You can also specify array operations and filter expressions. The actual selector value must be enclosed within parentheses.
|
|
2650
|
-
* @param options.parameters.locale - A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
|
|
2651
|
-
* @param options.parameters.currency - A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.
|
|
2652
|
-
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
|
|
2653
|
-
*
|
|
2654
|
-
* @returns A promise of type ProductResult.
|
|
2655
|
-
*/
|
|
2656
|
-
getProducts(options?: RequireParametersUnlessAllAreOptional<{
|
|
2657
|
-
parameters?: CompositeParameters<{
|
|
2658
|
-
organizationId: string;
|
|
2659
|
-
ids: Array<string>;
|
|
2660
|
-
siteId: string;
|
|
2661
|
-
inventoryIds?: Array<string>;
|
|
2662
|
-
expand?: Array<GetProductsExpandEnum>;
|
|
2663
|
-
allImages?: boolean;
|
|
2664
|
-
perPricebook?: boolean;
|
|
2665
|
-
select?: string;
|
|
2666
|
-
locale?: LocaleCode$0;
|
|
2667
|
-
currency?: CurrencyCode;
|
|
2668
|
-
} & QueryParameters, ConfigParameters>;
|
|
2669
|
-
headers?: {
|
|
2670
|
-
[key: string]: string;
|
|
2671
|
-
};
|
|
2672
|
-
}>): Promise<ProductResult>;
|
|
2673
|
-
/**
|
|
2674
|
-
* Allows access to multiple product details with a single request. Only products that are online and assigned to a site catalog are returned. The maximum number of product IDs that you can request is 24. In addition to product details, the availability, product options, images, price, promotions, and variations for the valid products are included, as applicable.
|
|
2675
|
-
*
|
|
2676
|
-
* @param options - An object containing the options for this method.
|
|
2677
|
-
* @param options.parameters - An object containing the parameters for this method.
|
|
2678
|
-
* @param options.parameters.organizationId - An identifier for the organization the request is being made by
|
|
2679
|
-
* @param options.parameters.ids - The IDs of the requested products (comma-separated, max 24 IDs).
|
|
2680
|
-
* @param options.parameters.siteId - 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.
|
|
2681
|
-
* @param options.parameters.inventoryIds - The optional inventory list IDs, for which the availability should be shown (comma-separated, max 5 inventoryListIDs).
|
|
2682
|
-
* @param options.parameters.expand - All expand parameters except page_meta_tags are used for the request when no expand parameter is provided.
|
|
2683
|
-
The value "none" may be used to turn off all expand options.
|
|
2684
|
-
The page_meta_tags expand value is optional and available starting from B2C Commerce version 25.2.
|
|
2685
|
-
* @param options.parameters.allImages - The flag that indicates whether to retrieve the whole image model for the requested product.
|
|
2686
|
-
* @param options.parameters.perPricebook - The flag that indicates whether to retrieve the per PriceBook prices and tiered prices (if available) for requested Products. Available end of June, 2021.
|
|
2687
|
-
* @param options.parameters.select - The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names or work with wildcards. You can also specify array operations and filter expressions. The actual selector value must be enclosed within parentheses.
|
|
2688
|
-
* @param options.parameters.locale - A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
|
|
2689
|
-
* @param options.parameters.currency - A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.
|
|
2690
|
-
* @param options.headers - An object literal of key value pairs of the headers to be sent with this request.
|
|
2691
|
-
* @param rawResponse - Set to true to return entire Response object instead of DTO.
|
|
2692
|
-
*
|
|
2693
|
-
* @returns A promise of type Response if rawResponse is true, a promise of type ProductResult otherwise.
|
|
2694
|
-
*/
|
|
2695
|
-
getProducts<T extends boolean>(options?: RequireParametersUnlessAllAreOptional<{
|
|
2696
|
-
parameters?: CompositeParameters<{
|
|
2697
|
-
organizationId: string;
|
|
2698
|
-
ids: Array<string>;
|
|
2699
|
-
siteId: string;
|
|
2700
|
-
inventoryIds?: Array<string>;
|
|
2701
|
-
expand?: Array<GetProductsExpandEnum>;
|
|
2702
|
-
allImages?: boolean;
|
|
2703
|
-
perPricebook?: boolean;
|
|
2704
|
-
select?: string;
|
|
2705
|
-
locale?: LocaleCode$0;
|
|
2706
|
-
currency?: CurrencyCode;
|
|
2707
|
-
} & QueryParameters, ConfigParameters>;
|
|
2708
|
-
headers?: {
|
|
2709
|
-
[key: string]: string;
|
|
2710
|
-
};
|
|
2711
|
-
}>, rawResponse?: T): Promise<T extends true ? Response : ProductResult>;
|
|
2712
|
-
}
|
|
2713
|
-
}
|
|
2714
|
-
declare namespace ShopperProductsModelTypes {
|
|
2715
|
-
/**
|
|
2716
|
-
* @type Image: Product image
|
|
2717
|
-
*
|
|
2718
|
-
* @property alt: The localized alternative text of the image.
|
|
2719
|
-
*
|
|
2720
|
-
* @property disBaseLink: Base URL for the Dynamic Image Service (DIS) address. This is only shown if the image is stored on the server and DIS is enabled.
|
|
2721
|
-
*
|
|
2722
|
-
* @property link: The URL of the actual image.
|
|
2723
|
-
* - **Min Length:** 1
|
|
2724
|
-
*
|
|
2725
|
-
* @property title: The localized title of the image.
|
|
2726
|
-
*
|
|
2727
|
-
*/
|
|
2728
|
-
type Image = {
|
|
2729
|
-
alt?: string;
|
|
2730
|
-
disBaseLink?: string;
|
|
2731
|
-
link: string;
|
|
2732
|
-
title?: string;
|
|
2733
|
-
} & {
|
|
2734
|
-
[key: string]: any;
|
|
2735
|
-
};
|
|
2736
|
-
/**
|
|
2737
|
-
* @type VariationAttributeValue: Document representing a variation attribute value.
|
|
2738
|
-
*
|
|
2739
|
-
* @property description: The localized description of the variation value.
|
|
2740
|
-
*
|
|
2741
|
-
* @property image: The first product image for the configured viewtype and this variation value.
|
|
2742
|
-
*
|
|
2743
|
-
* @property imageSwatch: The first product image for the configured viewtype and this variation value (typically the swatch image).
|
|
2744
|
-
*
|
|
2745
|
-
* @property name: The localized display name of the variation value.
|
|
2746
|
-
*
|
|
2747
|
-
* @property orderable: A flag indicating whether at least one variant with this variation attribute value is available to sell.
|
|
2748
|
-
*
|
|
2749
|
-
* @property value: The actual variation value.
|
|
2750
|
-
* - **Min Length:** 1
|
|
2751
|
-
*
|
|
2752
|
-
*/
|
|
2753
|
-
type VariationAttributeValue = {
|
|
2754
|
-
description?: string;
|
|
2755
|
-
image?: Image;
|
|
2756
|
-
imageSwatch?: Image;
|
|
2757
|
-
name?: string;
|
|
2758
|
-
orderable?: boolean;
|
|
2759
|
-
value: string;
|
|
2760
|
-
} & {
|
|
2761
|
-
[key: string]: any;
|
|
2762
|
-
};
|
|
2763
|
-
/**
|
|
2764
|
-
* @type VariationAttribute: Document representing a variation attribute.
|
|
2765
|
-
*
|
|
2766
|
-
* @property id: The ID of the variation attribute.
|
|
2767
|
-
* - **Min Length:** 1
|
|
2768
|
-
*
|
|
2769
|
-
* @property name: The localized display name of the variation attribute.
|
|
2770
|
-
*
|
|
2771
|
-
* @property values: The sorted array of variation values. This array can be empty.
|
|
2772
|
-
*
|
|
2773
|
-
*/
|
|
2774
|
-
type VariationAttribute = {
|
|
2775
|
-
id: string;
|
|
2776
|
-
name?: string;
|
|
2777
|
-
values?: Array<VariationAttributeValue>;
|
|
2778
|
-
} & {
|
|
2779
|
-
[key: string]: any;
|
|
2780
|
-
};
|
|
2781
|
-
/**
|
|
2782
|
-
* @type VariationGroup: Representation of a group of variant products by an attribute. This is a non-buyable entity, provides inheritable attributes for its product variants, and is used for navigation. *Doesn\'t have a SKU.*
|
|
2783
|
-
*
|
|
2784
|
-
* @property orderable: A flag indicating whether the variation group is orderable.
|
|
2785
|
-
*
|
|
2786
|
-
* @property price: The sales price of the variation group.
|
|
2787
|
-
*
|
|
2788
|
-
* @property productId: The ID (SKU) of the variation group.
|
|
2789
|
-
* - **Min Length:** 1
|
|
2790
|
-
* - **Max Length:** 100
|
|
2791
|
-
*
|
|
2792
|
-
* @property variationValues: The actual variation attribute ID - value pairs.
|
|
2793
|
-
*
|
|
2794
|
-
*/
|
|
2795
|
-
type VariationGroup = {
|
|
2796
|
-
orderable: boolean;
|
|
2797
|
-
price: number;
|
|
2798
|
-
productId: string;
|
|
2799
|
-
variationValues: {
|
|
2800
|
-
[key: string]: string;
|
|
2801
|
-
};
|
|
2802
|
-
} & {
|
|
2803
|
-
[key: string]: any;
|
|
2804
|
-
};
|
|
2805
|
-
/**
|
|
2806
|
-
* @type ProductType: Document representing a product type.
|
|
2807
|
-
*
|
|
2808
|
-
* @property bundle: A flag indicating whether the product is a bundle.
|
|
2809
|
-
*
|
|
2810
|
-
* @property item: A flag indicating whether the product is a standard item.
|
|
2811
|
-
*
|
|
2812
|
-
* @property master: A flag indicating whether the product is a master.
|
|
2813
|
-
*
|
|
2814
|
-
* @property option: A flag indicating whether the product is an option.
|
|
2815
|
-
*
|
|
2816
|
-
* @property set: A flag indicating whether the product is a set.
|
|
2817
|
-
*
|
|
2818
|
-
* @property variant: A flag indicating whether the product is a variant.
|
|
2819
|
-
*
|
|
2820
|
-
* @property variationGroup: A flag indicating whether the product is a variation group.
|
|
2821
|
-
*
|
|
2822
|
-
*/
|
|
2823
|
-
type ProductType = {
|
|
2824
|
-
bundle?: boolean;
|
|
2825
|
-
item?: boolean;
|
|
2826
|
-
master?: boolean;
|
|
2827
|
-
option?: boolean;
|
|
2828
|
-
set?: boolean;
|
|
2829
|
-
variant?: boolean;
|
|
2830
|
-
variationGroup?: boolean;
|
|
2831
|
-
} & {
|
|
2832
|
-
[key: string]: any;
|
|
2833
|
-
};
|
|
2834
|
-
/**
|
|
2835
|
-
* @type ProductPriceTable: Tiered Price Level Object
|
|
2836
|
-
*
|
|
2837
|
-
* @property price: Price for the product for the specified tier for the specified pricebook
|
|
2838
|
-
*
|
|
2839
|
-
* @property pricebook: The active pricebook for which this price is defined
|
|
2840
|
-
*
|
|
2841
|
-
* @property quantity: Quantity tier for which the price is defined.
|
|
2842
|
-
*
|
|
2843
|
-
*/
|
|
2844
|
-
type ProductPriceTable = {
|
|
2845
|
-
price?: number;
|
|
2846
|
-
pricebook?: string;
|
|
2847
|
-
quantity?: number;
|
|
2848
|
-
} & {
|
|
2849
|
-
[key: string]: any;
|
|
2850
|
-
};
|
|
2851
|
-
/**
|
|
2852
|
-
* @type RecommendationType: Document representing a recommendation type.
|
|
2853
|
-
*
|
|
2854
|
-
* @property displayValue: The localized display value of the recommendation type.
|
|
2855
|
-
*
|
|
2856
|
-
* @property value: The value of the recommendation type.
|
|
2857
|
-
*
|
|
2858
|
-
*/
|
|
2859
|
-
type RecommendationType = {
|
|
2860
|
-
displayValue: string;
|
|
2861
|
-
value: number;
|
|
2862
|
-
} & {
|
|
2863
|
-
[key: string]: any;
|
|
2864
|
-
};
|
|
2865
|
-
/**
|
|
2866
|
-
* @type Recommendation: Document representing a product recommendation.
|
|
2867
|
-
*
|
|
2868
|
-
* @property calloutMsg: The localized callout message of the recommendation.
|
|
2869
|
-
*
|
|
2870
|
-
* @property image:
|
|
2871
|
-
*
|
|
2872
|
-
* @property longDescription: The localized long description of the recommendation.
|
|
2873
|
-
*
|
|
2874
|
-
* @property name: The localized name of the recommendation.
|
|
2875
|
-
*
|
|
2876
|
-
* @property recommendationType:
|
|
2877
|
-
*
|
|
2878
|
-
* @property recommendedItemId: The recommended item ID of the recommendation.
|
|
2879
|
-
*
|
|
2880
|
-
* @property shortDescription: The localized short description of the recommendation.
|
|
2881
|
-
*
|
|
2882
|
-
*/
|
|
2883
|
-
type Recommendation = {
|
|
2884
|
-
calloutMsg?: string;
|
|
2885
|
-
image?: Image;
|
|
2886
|
-
longDescription?: string;
|
|
2887
|
-
name?: string;
|
|
2888
|
-
recommendationType: RecommendationType;
|
|
2889
|
-
recommendedItemId?: string;
|
|
2890
|
-
shortDescription?: string;
|
|
2891
|
-
} & {
|
|
2892
|
-
[key: string]: any;
|
|
2893
|
-
};
|
|
2894
|
-
/**
|
|
2895
|
-
* @type PriceRange: Document representing price ranges for a product which happens to be a master product (per Pricebook)
|
|
2896
|
-
*
|
|
2897
|
-
* @property maxPrice: Maximum price for the given pricebook (usually for a master Product would be the price for the Variant which has the highest price out of all Variants in that pricebook)
|
|
2898
|
-
*
|
|
2899
|
-
* @property minPrice: Minimum price for the given pricebook (usually for a master Product would be the price for the Variant which has the least price out of all Variants in that pricebook)
|
|
2900
|
-
*
|
|
2901
|
-
* @property pricebook: The active pricebook from which the min and the max prices are calculated. The pricebook is based on the site context of the request as defined in ECOM.
|
|
2902
|
-
*
|
|
2903
|
-
*/
|
|
2904
|
-
type PriceRange = {
|
|
2905
|
-
maxPrice?: number;
|
|
2906
|
-
minPrice?: number;
|
|
2907
|
-
pricebook?: string;
|
|
2908
|
-
} & {
|
|
2909
|
-
[key: string]: any;
|
|
2910
|
-
};
|
|
2911
|
-
/**
|
|
2912
|
-
* @type ProductPromotion: Document representing a product promotion.
|
|
2913
|
-
*
|
|
2914
|
-
* @property calloutMsg: The localized call-out message of the promotion.
|
|
2915
|
-
*
|
|
2916
|
-
* @property promotionId: The unique ID of the promotion.
|
|
2917
|
-
*
|
|
2918
|
-
* @property promotionalPrice: The promotional price for this product.
|
|
2919
|
-
*
|
|
2920
|
-
*/
|
|
2921
|
-
type ProductPromotion = {
|
|
2922
|
-
calloutMsg: string;
|
|
2923
|
-
promotionId: string;
|
|
2924
|
-
promotionalPrice: number;
|
|
2925
|
-
} & {
|
|
2926
|
-
[key: string]: any;
|
|
2927
|
-
};
|
|
2928
|
-
/**
|
|
2929
|
-
* A specialized value indicating the lack of definition of a currency, for example, if the value of the monetary value of the currency is an undefined number.
|
|
2930
|
-
*/
|
|
2931
|
-
type NoValue = "N/A";
|
|
2932
|
-
/**
|
|
2933
|
-
* @type CurrencyCode
|
|
2934
|
-
* A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.
|
|
2935
|
-
*/
|
|
2936
|
-
type CurrencyCode = NoValue | string;
|
|
2937
|
-
/**
|
|
2938
|
-
* @type Master: The master product is a representation of a group of variant products. This is a non-buyable entity, provides inheritable attributes for its product variants, and is used for navigation. *Doesn\'t have a SKU.*
|
|
2939
|
-
*
|
|
2940
|
-
* @property masterId: The ID (SKU) of the master product.
|
|
2941
|
-
* - **Min Length:** 1
|
|
2942
|
-
* - **Max Length:** 100
|
|
2943
|
-
*
|
|
2944
|
-
* @property orderable: A flag indicating whether at least one of the variants can be ordered.
|
|
2945
|
-
*
|
|
2946
|
-
* @property price: The minimum sales price of the related variants.
|
|
2947
|
-
*
|
|
2948
|
-
* @property priceMax: The maximum sales price of the related variants.
|
|
2949
|
-
*
|
|
2950
|
-
* @property prices: List of sale prices.
|
|
2951
|
-
*
|
|
2952
|
-
*/
|
|
2953
|
-
type Master = {
|
|
2954
|
-
masterId: string;
|
|
2955
|
-
orderable?: boolean;
|
|
2956
|
-
price?: number;
|
|
2957
|
-
priceMax?: number;
|
|
2958
|
-
prices?: {
|
|
2959
|
-
[key: string]: number;
|
|
2960
|
-
};
|
|
2961
|
-
} & {
|
|
2962
|
-
[key: string]: any;
|
|
2963
|
-
};
|
|
2964
|
-
/**
|
|
2965
|
-
* @type Variant: A product which is a variation within a master product that describes different colors, sizes, or other variation attributes. *Has a SKU.*
|
|
2966
|
-
*
|
|
2967
|
-
* @property orderable: A flag indicating whether the variant is orderable.
|
|
2968
|
-
*
|
|
2969
|
-
* @property price: The sales price of the variant.
|
|
2970
|
-
*
|
|
2971
|
-
* @property productId: The ID (SKU) of the variant.
|
|
2972
|
-
* - **Min Length:** 1
|
|
2973
|
-
* - **Max Length:** 100
|
|
2974
|
-
*
|
|
2975
|
-
* @property tieredPrices: List of tiered prices if the product is a variant
|
|
2976
|
-
*
|
|
2977
|
-
* @property variationValues: The actual variation attribute ID - value pairs.
|
|
2978
|
-
*
|
|
2979
|
-
*/
|
|
2980
|
-
type Variant = {
|
|
2981
|
-
orderable?: boolean;
|
|
2982
|
-
price?: number;
|
|
2983
|
-
productId: string;
|
|
2984
|
-
tieredPrices?: Array<ProductPriceTable>;
|
|
2985
|
-
variationValues?: {
|
|
2986
|
-
[key: string]: string;
|
|
2987
|
-
};
|
|
2988
|
-
} & {
|
|
2989
|
-
[key: string]: any;
|
|
2990
|
-
};
|
|
2991
|
-
/**
|
|
2992
|
-
* @type PageMetaTag: Document representing a Page Meta Tag object.
|
|
2993
|
-
*
|
|
2994
|
-
* @property id: The ID of the Page Meta Tag.
|
|
2995
|
-
*
|
|
2996
|
-
* @property value: Locale-specific value of the Page Meta Tag, evaluated by resolving the rule set for the given Business Manager ID.
|
|
2997
|
-
*
|
|
2998
|
-
*/
|
|
2999
|
-
type PageMetaTag = {
|
|
3000
|
-
id?: string;
|
|
3001
|
-
value?: string;
|
|
3002
|
-
} & {
|
|
3003
|
-
[key: string]: any;
|
|
3004
|
-
};
|
|
3005
|
-
/**
|
|
3006
|
-
* @type ProductLink: Document representing a link between two products. It contains the ID of the source and target products, the type of product link, and the URLs to retrieve product data.
|
|
3007
|
-
*
|
|
3008
|
-
* @property sourceProductId: The semantic ID of the product this product link is coming from.
|
|
3009
|
-
* - **Min Length:** 1
|
|
3010
|
-
* - **Max Length:** 100
|
|
3011
|
-
*
|
|
3012
|
-
* @property sourceProductLink: The URL addressing the product this product link is coming from.
|
|
3013
|
-
*
|
|
3014
|
-
* @property targetProductId: The semantic ID of the product this product link is pointing to.
|
|
3015
|
-
* - **Min Length:** 1
|
|
3016
|
-
* - **Max Length:** 100
|
|
3017
|
-
*
|
|
3018
|
-
* @property targetProductLink: The URL addressing the product this product link is pointing to.
|
|
3019
|
-
*
|
|
3020
|
-
* @property type: The type of product link.
|
|
3021
|
-
*
|
|
3022
|
-
*/
|
|
3023
|
-
type ProductLink = {
|
|
3024
|
-
sourceProductId: string;
|
|
3025
|
-
sourceProductLink: string;
|
|
3026
|
-
targetProductId: string;
|
|
3027
|
-
targetProductLink: string;
|
|
3028
|
-
type: ProductLinkTypeEnum;
|
|
3029
|
-
} & {
|
|
3030
|
-
[key: string]: any;
|
|
3031
|
-
};
|
|
3032
|
-
type ProductLinkTypeEnum = "cross_sell" | "replacement" | "up_sell" | "accessory" | "newer_version" | "alt_orderunit" | "spare_part" | "other";
|
|
3033
|
-
/**
|
|
3034
|
-
* @type OptionValue: Document representing an option value.
|
|
3035
|
-
*
|
|
3036
|
-
* @property default: A flag indicating whether this option value is the default one.
|
|
3037
|
-
*
|
|
3038
|
-
* @property id: The ID of the option value.
|
|
3039
|
-
* - **Min Length:** 1
|
|
3040
|
-
* - **Max Length:** 100
|
|
3041
|
-
*
|
|
3042
|
-
* @property name: The localized name of the option value.
|
|
3043
|
-
*
|
|
3044
|
-
* @property price: The effective price of the option value.
|
|
3045
|
-
*
|
|
3046
|
-
*/
|
|
3047
|
-
type OptionValue = {
|
|
3048
|
-
default?: boolean;
|
|
3049
|
-
id: string;
|
|
3050
|
-
name?: string;
|
|
3051
|
-
price?: number;
|
|
3052
|
-
} & {
|
|
3053
|
-
[key: string]: any;
|
|
3054
|
-
};
|
|
3055
|
-
/**
|
|
3056
|
-
* @type Option: Product options enable you to sell configurable products that have optional accessories, upgrades, or additional services. Options are always purchased with a product and can\'t be purchased separately. *Product Option has a SKU and a price associated with it.*
|
|
3057
|
-
*
|
|
3058
|
-
* @property description: The localized description of the option.
|
|
3059
|
-
*
|
|
3060
|
-
* @property id: The ID of the option.
|
|
3061
|
-
* - **Min Length:** 1
|
|
3062
|
-
* - **Max Length:** 100
|
|
3063
|
-
*
|
|
3064
|
-
* @property image: The URL to the option image.
|
|
3065
|
-
*
|
|
3066
|
-
* @property name: The localized name of the option.
|
|
3067
|
-
*
|
|
3068
|
-
* @property values: The array of option values. This array can be empty.
|
|
3069
|
-
*
|
|
3070
|
-
*/
|
|
3071
|
-
type Option = {
|
|
3072
|
-
description?: string;
|
|
3073
|
-
id: string;
|
|
3074
|
-
image?: string;
|
|
3075
|
-
name?: string;
|
|
3076
|
-
values?: Array<OptionValue>;
|
|
3077
|
-
} & {
|
|
3078
|
-
[key: string]: any;
|
|
3079
|
-
};
|
|
3080
|
-
/**
|
|
3081
|
-
* @type ImageGroup: Document representing an image group containing a list of images for a particular view type and an optional variation value.
|
|
3082
|
-
*
|
|
3083
|
-
* @property images: The images of the image group.
|
|
3084
|
-
*
|
|
3085
|
-
* @property variationAttributes: Returns a list of variation attributes applying to this image group.
|
|
3086
|
-
*
|
|
3087
|
-
* @property viewType: The image view type.
|
|
3088
|
-
*
|
|
3089
|
-
*/
|
|
3090
|
-
type ImageGroup = {
|
|
3091
|
-
images: Array<Image>;
|
|
3092
|
-
variationAttributes?: Array<VariationAttribute>;
|
|
3093
|
-
viewType: string;
|
|
3094
|
-
} & {
|
|
3095
|
-
[key: string]: any;
|
|
3096
|
-
};
|
|
3097
|
-
/**
|
|
3098
|
-
* @type Inventory: Document representing inventory information of the current product for a particular inventory list.
|
|
3099
|
-
*
|
|
3100
|
-
* @property ats: The Available To Sell (ATS) of the product. If it is infinity, the return value is 999999. The value can be overwritten by the OCAPI setting \'product.inventory.ats.max_threshold\'.
|
|
3101
|
-
*
|
|
3102
|
-
* @property backorderable: A flag indicating whether the product is backorderable.
|
|
3103
|
-
*
|
|
3104
|
-
* @property id: The inventory ID.
|
|
3105
|
-
* - **Min Length:** 1
|
|
3106
|
-
* - **Max Length:** 256
|
|
3107
|
-
*
|
|
3108
|
-
* @property inStockDate: A flag indicating the date when the product will be in stock.
|
|
3109
|
-
*
|
|
3110
|
-
* @property orderable: A flag indicating whether at least one of the products is available to sell.
|
|
3111
|
-
*
|
|
3112
|
-
* @property preorderable: A flag indicating whether the product is preorderable.
|
|
3113
|
-
*
|
|
3114
|
-
* @property stockLevel: The stock level of the product. If it is infinity, the return value is 999999. The value can be overwritten by the OCAPI setting \'product.inventory.stock_level.max_threshold\'.
|
|
3115
|
-
*
|
|
3116
|
-
*/
|
|
3117
|
-
type Inventory = {
|
|
3118
|
-
ats?: number;
|
|
3119
|
-
backorderable?: boolean;
|
|
3120
|
-
id: string;
|
|
3121
|
-
inStockDate?: string;
|
|
3122
|
-
orderable?: boolean;
|
|
3123
|
-
preorderable?: boolean;
|
|
3124
|
-
stockLevel?: number;
|
|
3125
|
-
} & {
|
|
3126
|
-
[key: string]: any;
|
|
3127
|
-
};
|
|
3128
|
-
/**
|
|
3129
|
-
* @type Product: Any product that is sold, shown alone, and does not have variations such as different sizes or colors. A product has no reliance on any other product for inheritance. *A product has a SKU and can have a product option, which has a different SKU*.
|
|
3130
|
-
*
|
|
3131
|
-
* @property brand: The product\'s brand.
|
|
3132
|
-
*
|
|
3133
|
-
* @property bundledProducts: The array of all bundled products of this product.
|
|
3134
|
-
*
|
|
3135
|
-
* @property currency:
|
|
3136
|
-
*
|
|
3137
|
-
* @property ean: The European Article Number of the product.
|
|
3138
|
-
*
|
|
3139
|
-
* @property fetchDate:
|
|
3140
|
-
*
|
|
3141
|
-
* @property id: The id (SKU) of the product.
|
|
3142
|
-
* - **Min Length:** 1
|
|
3143
|
-
* - **Max Length:** 100
|
|
3144
|
-
*
|
|
3145
|
-
* @property imageGroups: The array of product image groups.
|
|
3146
|
-
*
|
|
3147
|
-
* @property inventories: The array of product inventories explicitly requested via the \'inventory_ids\' query parameter. This property is only returned in context of the \'availability\' expansion.
|
|
3148
|
-
*
|
|
3149
|
-
* @property inventory: The site default inventory information. This property is only returned in context of the \'availability\' expansion.
|
|
3150
|
-
*
|
|
3151
|
-
* @property longDescription: The localized product\'s long description.
|
|
3152
|
-
*
|
|
3153
|
-
* @property manufacturerName: The product\'s manufacturer name.
|
|
3154
|
-
*
|
|
3155
|
-
* @property manufacturerSku: The product\'s manufacturer SKU.
|
|
3156
|
-
*
|
|
3157
|
-
* @property master: The master product information, only for types: master, variation group, and variant.
|
|
3158
|
-
*
|
|
3159
|
-
* @property minOrderQuantity: The minimum order quantity for this product.
|
|
3160
|
-
*
|
|
3161
|
-
* @property name: The localized product name.
|
|
3162
|
-
*
|
|
3163
|
-
* @property options: The array of product options, only for type option. This array can be empty.
|
|
3164
|
-
*
|
|
3165
|
-
* @property pageDescription: The localized product\'s page description.
|
|
3166
|
-
*
|
|
3167
|
-
* @property pageKeywords: The localized product\'s page description.
|
|
3168
|
-
*
|
|
3169
|
-
* @property pageTitle: The localized product\'s page title.
|
|
3170
|
-
*
|
|
3171
|
-
* @property pageMetaTags: Page Meta tags associated with the given product.
|
|
3172
|
-
*
|
|
3173
|
-
* @property price: The sales price of the product. In case of complex products, like master or set, this is the minimum price of related child products.
|
|
3174
|
-
*
|
|
3175
|
-
* @property pricePerUnit: The price per unit if defined for the product
|
|
3176
|
-
*
|
|
3177
|
-
* @property pricePerUnitMax: The max price per unit typically for a master product\'s variant.
|
|
3178
|
-
*
|
|
3179
|
-
* @property priceMax: The maximum sales of related child products in complex products like master or set.
|
|
3180
|
-
*
|
|
3181
|
-
* @property priceRanges: Array of one or more price range objects representing one or more Pricebooks in context for the site.
|
|
3182
|
-
*
|
|
3183
|
-
* @property prices: The prices map with pricebook IDs and their values.
|
|
3184
|
-
*
|
|
3185
|
-
* @property primaryCategoryId: The ID of the products primary category.
|
|
3186
|
-
*
|
|
3187
|
-
* @property productLinks: The array of source and target product links information.
|
|
3188
|
-
*
|
|
3189
|
-
* @property productPromotions: An array of active customer product promotions for this product, sorted by promotion priority using SORT_BY_EXCLUSIVITY ordering (exclusivity → rank → promotion class → discount type → best discount → ID). This array can be empty. Coupon promotions are not returned in this array. See [PromotionPlan.SORT_BY_EXCLUSIVITY](https://salesforcecommercecloud.github.io/b2c-dev-doc/docs/current/scriptapi/html/index.html?target=class_dw_campaign_PromotionPlan.html) for more details.
|
|
3190
|
-
*
|
|
3191
|
-
* @property recommendations: Returns a list of recommendations.
|
|
3192
|
-
*
|
|
3193
|
-
* @property setProducts: The array of set products of this product.
|
|
3194
|
-
*
|
|
3195
|
-
* @property shortDescription: The localized product short description.
|
|
3196
|
-
*
|
|
3197
|
-
* @property slugUrl: The complete link to this product\'s storefront page.
|
|
3198
|
-
*
|
|
3199
|
-
* @property stepQuantity: The steps in which the order amount of the product can be increased.
|
|
3200
|
-
*
|
|
3201
|
-
* @property tieredPrices: The document represents list of tiered prices if the product is a variant
|
|
3202
|
-
*
|
|
3203
|
-
* @property type: The product type information. Can be one or more of the following values: item, master, variation_group, variant, bundle, and set.
|
|
3204
|
-
*
|
|
3205
|
-
* @property unit: The sales unit of the product.
|
|
3206
|
-
*
|
|
3207
|
-
* @property upc: The Universal Product Code (UPC).
|
|
3208
|
-
*
|
|
3209
|
-
* @property validFrom: The time a product is valid from.
|
|
3210
|
-
*
|
|
3211
|
-
* @property validTo: The time a product is valid to.
|
|
3212
|
-
*
|
|
3213
|
-
* @property variants: The array of actual variants. Only for master, variation group, and variant types. This array can be empty.
|
|
3214
|
-
*
|
|
3215
|
-
* @property variationAttributes: Sorted array of variation attributes information. Only for master, variation group, and variant types. This array can be empty.
|
|
3216
|
-
*
|
|
3217
|
-
* @property variationGroups: The array of actual variation groups. Only for master, variation group, and variant types. This array can be empty.
|
|
3218
|
-
*
|
|
3219
|
-
* @property variationValues: The actual variation attribute ID - value pairs. Only for variant and variation group types.
|
|
3220
|
-
*
|
|
3221
|
-
*/
|
|
3222
|
-
type Product = {
|
|
3223
|
-
brand?: string;
|
|
3224
|
-
bundledProducts?: Array<BundledProduct>;
|
|
3225
|
-
currency?: CurrencyCode;
|
|
3226
|
-
ean?: string;
|
|
3227
|
-
fetchDate?: number;
|
|
3228
|
-
id: string;
|
|
3229
|
-
imageGroups?: Array<ImageGroup>;
|
|
3230
|
-
inventories?: Array<Inventory>;
|
|
3231
|
-
inventory?: Inventory;
|
|
3232
|
-
longDescription?: string;
|
|
3233
|
-
manufacturerName?: string;
|
|
3234
|
-
manufacturerSku?: string;
|
|
3235
|
-
master?: Master;
|
|
3236
|
-
minOrderQuantity?: number;
|
|
3237
|
-
name?: string;
|
|
3238
|
-
options?: Array<Option>;
|
|
3239
|
-
pageDescription?: string;
|
|
3240
|
-
pageKeywords?: string;
|
|
3241
|
-
pageTitle?: string;
|
|
3242
|
-
pageMetaTags?: Array<PageMetaTag>;
|
|
3243
|
-
price?: number;
|
|
3244
|
-
pricePerUnit?: number;
|
|
3245
|
-
pricePerUnitMax?: number;
|
|
3246
|
-
priceMax?: number;
|
|
3247
|
-
priceRanges?: Array<PriceRange>;
|
|
3248
|
-
prices?: {
|
|
3249
|
-
[key: string]: number;
|
|
3250
|
-
};
|
|
3251
|
-
primaryCategoryId?: string;
|
|
3252
|
-
productLinks?: Array<ProductLink>;
|
|
3253
|
-
productPromotions?: Array<ProductPromotion>;
|
|
3254
|
-
recommendations?: Array<Recommendation>;
|
|
3255
|
-
setProducts?: Array<Product>;
|
|
3256
|
-
shortDescription?: string;
|
|
3257
|
-
slugUrl?: string;
|
|
3258
|
-
stepQuantity?: number;
|
|
3259
|
-
tieredPrices?: Array<ProductPriceTable>;
|
|
3260
|
-
type?: ProductType;
|
|
3261
|
-
unit?: string;
|
|
3262
|
-
upc?: string;
|
|
3263
|
-
validFrom?: string;
|
|
3264
|
-
validTo?: string;
|
|
3265
|
-
variants?: Array<Variant>;
|
|
3266
|
-
variationAttributes?: Array<VariationAttribute>;
|
|
3267
|
-
variationGroups?: Array<VariationGroup>;
|
|
3268
|
-
variationValues?: {
|
|
3269
|
-
[key: string]: string;
|
|
3270
|
-
};
|
|
3271
|
-
} & {
|
|
3272
|
-
[key: string]: any;
|
|
3273
|
-
};
|
|
3274
|
-
/**
|
|
3275
|
-
* @type BundledProduct: A bundle of products that can be bought together (all or nothing). Each product in the bundle can itself be bought independently, but this is outside of the context of the bundle. A bundle is a purchasing convenience. *Product bundle has a SKU and price.*
|
|
3276
|
-
*
|
|
3277
|
-
* @property id:
|
|
3278
|
-
*
|
|
3279
|
-
* @property product: The product being bundled.
|
|
3280
|
-
*
|
|
3281
|
-
* @property quantity: For the product being bundled, the quantity added to the bundle.
|
|
3282
|
-
*
|
|
3283
|
-
*/
|
|
3284
|
-
type BundledProduct = {
|
|
3285
|
-
id: string;
|
|
3286
|
-
product: Product;
|
|
3287
|
-
quantity: number;
|
|
3288
|
-
} & {
|
|
3289
|
-
[key: string]: any;
|
|
3290
|
-
};
|
|
3291
|
-
/**
|
|
3292
|
-
* @type PathRecord: Document representing most basic info (id and name) of a category or catalog.
|
|
3293
|
-
*
|
|
3294
|
-
* @property id: The id of the category path.
|
|
3295
|
-
*
|
|
3296
|
-
* @property name: The name of the category path.
|
|
3297
|
-
*
|
|
3298
|
-
*/
|
|
3299
|
-
type PathRecord = {
|
|
3300
|
-
id?: string;
|
|
3301
|
-
name?: string;
|
|
3302
|
-
} & {
|
|
3303
|
-
[key: string]: any;
|
|
3304
|
-
};
|
|
3305
|
-
/**
|
|
3306
|
-
* @type Category: Categories allow products to be organized into hierarchical structures. Categories can have relationships to other parent categories. Each category can also provide a context inherited by subcategories. For example, a category may have an attribute value assigned to it, and any product assigned to the category or a subcategory would inherit the attribute value as long as the product is assigned. Once the product is removed from the category those attribute values would no longer be in the context of the product. Linking of categories is also used for Site hierarchical navigation. For example, inside \'Clothing\' you may have \'Mens\', and inside \'Mens\' you may have \'Pants\'. Categories are not *Tags.*
|
|
3307
|
-
*
|
|
3308
|
-
* @property categories: Array of subcategories. Can be empty.
|
|
3309
|
-
*
|
|
3310
|
-
* @property description: The localized description of the category.
|
|
3311
|
-
*
|
|
3312
|
-
* @property id: The ID of the category.
|
|
3313
|
-
* - **Min Length:** 1
|
|
3314
|
-
* - **Max Length:** 256
|
|
3315
|
-
*
|
|
3316
|
-
* @property image: The URL of the category image.
|
|
3317
|
-
*
|
|
3318
|
-
* @property name: The localized name of the category.
|
|
3319
|
-
*
|
|
3320
|
-
* @property onlineSubCategoriesCount: The total number of online sub-categories. This information will be available from B2C Commerce version 24.5.
|
|
3321
|
-
*
|
|
3322
|
-
* @property pageDescription: The localized page description of the category.
|
|
3323
|
-
*
|
|
3324
|
-
* @property pageKeywords: The localized page keywords of the category.
|
|
3325
|
-
*
|
|
3326
|
-
* @property pageTitle: The localized page title of the category.
|
|
3327
|
-
*
|
|
3328
|
-
* @property parentCategoryId: The ID of the parent category.
|
|
3329
|
-
*
|
|
3330
|
-
* @property parentCategoryTree: The List of the parent categories.
|
|
3331
|
-
*
|
|
3332
|
-
* @property thumbnail: The URL of the category thumbnail.
|
|
3333
|
-
*
|
|
3334
|
-
*/
|
|
3335
|
-
type Category = {
|
|
3336
|
-
categories?: Array<Category>;
|
|
3337
|
-
description?: string;
|
|
3338
|
-
id: string;
|
|
3339
|
-
image?: string;
|
|
3340
|
-
name?: string;
|
|
3341
|
-
onlineSubCategoriesCount?: number;
|
|
3342
|
-
pageDescription?: string;
|
|
3343
|
-
pageKeywords?: string;
|
|
3344
|
-
pageTitle?: string;
|
|
3345
|
-
parentCategoryId?: string;
|
|
3346
|
-
parentCategoryTree?: Array<PathRecord>;
|
|
3347
|
-
thumbnail?: string;
|
|
3348
|
-
} & {
|
|
3349
|
-
[key: string]: any;
|
|
3350
|
-
};
|
|
3351
|
-
/**
|
|
3352
|
-
* @type CategoryResult: Result document containing an array of categories.
|
|
3353
|
-
*
|
|
3354
|
-
* @property data: The array of category documents.
|
|
3355
|
-
*
|
|
3356
|
-
* @property limit: Maximum records to retrieve per request, not to exceed the maximum defined. A limit must be at least 1 so at least one record is returned (if any match the criteria).
|
|
3357
|
-
*
|
|
3358
|
-
* @property total: 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.
|
|
3359
|
-
*
|
|
3360
|
-
*/
|
|
3361
|
-
type CategoryResult = {
|
|
3362
|
-
data: Array<Category>;
|
|
3363
|
-
limit: number;
|
|
3364
|
-
total: number;
|
|
3365
|
-
} & {
|
|
3366
|
-
[key: string]: any;
|
|
3367
|
-
};
|
|
3368
|
-
/**
|
|
3369
|
-
* A specialized value indicating the system default values for locales.
|
|
3370
|
-
*/
|
|
3371
|
-
type DefaultFallback = "default";
|
|
3372
|
-
/**
|
|
3373
|
-
* @type ErrorResponse:
|
|
3374
|
-
*
|
|
3375
|
-
* @property title: A short, human-readable summary of the problem type. It will not change from occurrence to occurrence of the problem, except for purposes of localization
|
|
3376
|
-
* - **Max Length:** 256
|
|
3377
|
-
*
|
|
3378
|
-
* @property type: A URI reference [RFC3986] that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be \"about:blank\". It accepts relative URIs; this means that they must be resolved relative to the document\'s base URI, as per [RFC3986], Section 5.
|
|
3379
|
-
* - **Max Length:** 2048
|
|
3380
|
-
*
|
|
3381
|
-
* @property detail: A human-readable explanation specific to this occurrence of the problem.
|
|
3382
|
-
*
|
|
3383
|
-
* @property instance: A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. It accepts relative URIs; this means that they must be resolved relative to the document\'s base URI, as per [RFC3986], Section 5.
|
|
3384
|
-
* - **Max Length:** 2048
|
|
3385
|
-
*
|
|
3386
|
-
*/
|
|
3387
|
-
type ErrorResponse = {
|
|
3388
|
-
title: string;
|
|
3389
|
-
type: string;
|
|
3390
|
-
detail: string;
|
|
3391
|
-
instance?: string;
|
|
3392
|
-
} & {
|
|
3393
|
-
[key: string]: any;
|
|
3394
|
-
};
|
|
3395
|
-
/**
|
|
3396
|
-
* @type LocaleCode
|
|
3397
|
-
* A descriptor for a geographical region by both a language and country code. By combining these two, regional differences in a language can be addressed, such as with the request header parameter `Accept-Language` following [RFC 2616](https://tools.ietf.org/html/rfc2616) & [RFC 1766](https://tools.ietf.org/html/rfc1766). This can also just refer to a language code, also RFC 2616/1766 compliant, as a default if there is no specific match for a country. Finally, can also be used to define default behavior if there is no locale specified.
|
|
3398
|
-
*/
|
|
3399
|
-
type LocaleCode = DefaultFallback | string;
|
|
3400
|
-
/**
|
|
3401
|
-
* @type ProductResult: Result document containing an array of products.
|
|
3402
|
-
*
|
|
3403
|
-
* @property limit: The number of returned documents.
|
|
3404
|
-
*
|
|
3405
|
-
* @property data: The array of product documents.
|
|
3406
|
-
*
|
|
3407
|
-
* @property total: The total number of documents.
|
|
3408
|
-
*
|
|
3409
|
-
*/
|
|
3410
|
-
type ProductResult = {
|
|
3411
|
-
limit: number;
|
|
3412
|
-
data: Array<Product>;
|
|
3413
|
-
total: number;
|
|
3414
|
-
} & {
|
|
3415
|
-
[key: string]: any;
|
|
3416
|
-
};
|
|
3417
|
-
/**
|
|
3418
|
-
* @type ResultBase: Schema defining generic list result. Each response schema of a resource requiring a list response should extend this schema. Additionally it needs to be defined what data is returned.
|
|
3419
|
-
*
|
|
3420
|
-
* @property limit: Maximum records to retrieve per request, not to exceed the maximum defined. A limit must be at least 1 so at least one record is returned (if any match the criteria).
|
|
3421
|
-
*
|
|
3422
|
-
* @property total: 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.
|
|
3423
|
-
*
|
|
3424
|
-
*/
|
|
3425
|
-
type ResultBase = {
|
|
3426
|
-
limit: number;
|
|
3427
|
-
total: number;
|
|
3428
|
-
} & {
|
|
3429
|
-
[key: string]: any;
|
|
3430
|
-
};
|
|
3431
|
-
}
|
|
3432
|
-
declare namespace ShopperProductsTypes {
|
|
3433
|
-
type ShopperProductsPathParameters = ShopperProductsApiTypes.ShopperProductsPathParameters;
|
|
3434
|
-
type ShopperProductsQueryParameters = ShopperProductsApiTypes.ShopperProductsQueryParameters;
|
|
3435
|
-
type GetCategoriesLevelsEnum = ShopperProductsApiTypes.GetCategoriesLevelsEnum;
|
|
3436
|
-
type getCategoriesQueryParameters = ShopperProductsApiTypes.getCategoriesQueryParameters;
|
|
3437
|
-
type getCategoriesPathParameters = ShopperProductsApiTypes.getCategoriesPathParameters;
|
|
3438
|
-
type GetCategoryLevelsEnum = ShopperProductsApiTypes.GetCategoryLevelsEnum;
|
|
3439
|
-
type getCategoryQueryParameters = ShopperProductsApiTypes.getCategoryQueryParameters;
|
|
3440
|
-
type getCategoryPathParameters = ShopperProductsApiTypes.getCategoryPathParameters;
|
|
3441
|
-
type GetProductExpandEnum = ShopperProductsApiTypes.GetProductExpandEnum;
|
|
3442
|
-
type getProductQueryParameters = ShopperProductsApiTypes.getProductQueryParameters;
|
|
3443
|
-
type getProductPathParameters = ShopperProductsApiTypes.getProductPathParameters;
|
|
3444
|
-
type GetProductsExpandEnum = ShopperProductsApiTypes.GetProductsExpandEnum;
|
|
3445
|
-
type getProductsQueryParameters = ShopperProductsApiTypes.getProductsQueryParameters;
|
|
3446
|
-
type getProductsPathParameters = ShopperProductsApiTypes.getProductsPathParameters;
|
|
3447
|
-
type BundledProduct = ShopperProductsModelTypes.BundledProduct;
|
|
3448
|
-
type Category = ShopperProductsModelTypes.Category;
|
|
3449
|
-
type CategoryResult = ShopperProductsModelTypes.CategoryResult;
|
|
3450
|
-
type CurrencyCode = ShopperProductsModelTypes.CurrencyCode;
|
|
3451
|
-
type DefaultFallback = ShopperProductsModelTypes.DefaultFallback;
|
|
3452
|
-
type ErrorResponse = ShopperProductsModelTypes.ErrorResponse;
|
|
3453
|
-
type Image = ShopperProductsModelTypes.Image;
|
|
3454
|
-
type ImageGroup = ShopperProductsModelTypes.ImageGroup;
|
|
3455
|
-
type Inventory = ShopperProductsModelTypes.Inventory;
|
|
3456
|
-
type LocaleCode = ShopperProductsModelTypes.LocaleCode;
|
|
3457
|
-
type Master = ShopperProductsModelTypes.Master;
|
|
3458
|
-
type NoValue = ShopperProductsModelTypes.NoValue;
|
|
3459
|
-
type Option = ShopperProductsModelTypes.Option;
|
|
3460
|
-
type OptionValue = ShopperProductsModelTypes.OptionValue;
|
|
3461
|
-
type PageMetaTag = ShopperProductsModelTypes.PageMetaTag;
|
|
3462
|
-
type PathRecord = ShopperProductsModelTypes.PathRecord;
|
|
3463
|
-
type PriceRange = ShopperProductsModelTypes.PriceRange;
|
|
3464
|
-
type Product = ShopperProductsModelTypes.Product;
|
|
3465
|
-
type ProductLink = ShopperProductsModelTypes.ProductLink;
|
|
3466
|
-
type ProductLinkTypeEnum = ShopperProductsModelTypes.ProductLinkTypeEnum;
|
|
3467
|
-
type ProductPriceTable = ShopperProductsModelTypes.ProductPriceTable;
|
|
3468
|
-
type ProductPromotion = ShopperProductsModelTypes.ProductPromotion;
|
|
3469
|
-
type ProductResult = ShopperProductsModelTypes.ProductResult;
|
|
3470
|
-
type ProductType = ShopperProductsModelTypes.ProductType;
|
|
3471
|
-
type Recommendation = ShopperProductsModelTypes.Recommendation;
|
|
3472
|
-
type RecommendationType = ShopperProductsModelTypes.RecommendationType;
|
|
3473
|
-
type ResultBase = ShopperProductsModelTypes.ResultBase;
|
|
3474
|
-
type Variant = ShopperProductsModelTypes.Variant;
|
|
3475
|
-
type VariationAttribute = ShopperProductsModelTypes.VariationAttribute;
|
|
3476
|
-
type VariationAttributeValue = ShopperProductsModelTypes.VariationAttributeValue;
|
|
3477
|
-
type VariationGroup = ShopperProductsModelTypes.VariationGroup;
|
|
3478
|
-
}
|
|
3479
|
-
export { defaultBaseUri, GetCategoriesLevelsEnum, GetCategoryLevelsEnum, GetProductExpandEnum, GetProductsExpandEnum, getCategoriesQueryParameters, getCategoriesPathParameters, getCategoryQueryParameters, getCategoryPathParameters, getProductQueryParameters, getProductPathParameters, getProductsQueryParameters, getProductsPathParameters, ShopperProductsPathParameters, ShopperProductsQueryParameters, ShopperProductsParameters, ShopperProducts, BundledProduct, Category, CategoryResult, CurrencyCode, DefaultFallback, ErrorResponse, Image, ImageGroup, Inventory, LocaleCode$0 as LocaleCode, Master, NoValue, Option, OptionValue, PageMetaTag, PathRecord, PriceRange, Product, ProductLink, ProductLinkTypeEnum, ProductPriceTable, ProductPromotion, ProductResult, ProductType, Recommendation, RecommendationType, ResultBase, Variant, VariationAttribute, VariationAttributeValue, VariationGroup, ShopperProductsTypes };
|