ebay-api 8.2.0 → 8.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -21,7 +21,7 @@ It supports `client credentials grant` and `authorization code grant` \(Auth'N'A
21
21
 
22
22
  ## Changelog
23
23
 
24
- * `v8.2.0` is the latest release.
24
+ * `v8.3.0` is the latest release.
25
25
  * See [here](https://github.com/hendt/ebay-api/blob/master/CHANGELOG.md) for the full changelog.
26
26
 
27
27
  ## Implementation status
@@ -34,7 +34,7 @@ It supports `client credentials grant` and `authorization code grant` \(Auth'N'A
34
34
  | **Commerce API** | ✔ Catalog API<br>✔ Charity API `v1.2.0`<br>✔ Identity API<br>✔ Notification API `v1.2.0`<br>✔ Taxonomy API `v1.0.0`<br>✔ Translation API `v1_beta.1.4` |
35
35
  | **Developer API** | ✔ Analytics API |
36
36
  | **Post Order API** | ✔ Cancellation API<br>✔ Case Management API<br>✔ Inquiry API<br>✔ Return API |
37
- | **Sell API** | ✔ Account API `v1.9.0`<br>✔ Analytics API `v1.3.0`<br>✔ Compliance API `v1.4.1`<br>✔ Feed API<br>✔ Finance API `v1.9.0`<br>✔ Fulfillment API `v1.19.10`<br>✔ Inventory API `v1.14.0`<br>✔ Listing API<br>✔ Logistics API<br>✔ Marketing API `v1.10.0`<br>✔ Metadata API<br>✔ Negotiation API `v1.1.0`<br>✔ Recommendation API `v1.1.0` |
37
+ | **Sell API** | ✔ Account API `v1.9.0`<br>✔ Analytics API `v1.3.0`<br>✔ Compliance API `v1.4.1`<br>✔ Feed API<br>✔ Finance API `v1.9.0`<br>✔ Fulfillment API `v1.19.10`<br>✔ Inventory API `v1.14.0`<br>✔ Listing API<br>✔ Logistics API<br>✔ Marketing API `v1.14.0`<br>✔ Metadata API<br>✔ Negotiation API `v1.1.0`<br>✔ Recommendation API `v1.1.0` |
38
38
 
39
39
  ### Traditional API
40
40
 
@@ -1,5 +1,5 @@
1
+ import { BulkCreateAdRequest, BulkCreateAdsByInventoryReferenceRequest, BulkCreateKeywordRequest, BulkCreateNegativeKeywordRequest, BulkDeleteAdRequest, BulkDeleteAdsByInventoryReferenceRequest, BulkUpdateAdStatusByListingIdRequest, BulkUpdateAdStatusRequest, BulkUpdateKeywordRequest, BulkUpdateNegativeKeywordRequest, CloneCampaignRequest, CreateAdGroupRequest, CreateAdRequest, CreateAdsByInventoryReferenceRequest, CreateCampaignRequest, CreateKeywordRequest, CreateNegativeKeywordRequest, CreateReportTask, ItemPriceMarkdown, ItemPromotion, TargetedBidRequest, TargetedKeywordRequest, UpdateAdGroupRequest, UpdateAdrateStrategyRequest, UpdateBidPercentageRequest, UpdateCampaignBudgetRequest, UpdateCampaignIdentificationRequest, UpdateKeywordRequest, UpdateNegativeKeywordRequest } from '../../../../types/index.js';
1
2
  import Restful from '../../index.js';
2
- import { BulkCreateAdRequest, BulkCreateAdsByInventoryReferenceRequest, BulkDeleteAdRequest, BulkDeleteAdsByInventoryReferenceRequest, CloneCampaignRequest, CreateAdRequest, CreateAdsByInventoryReferenceRequest, CreateCampaignRequest, CreateReportTask, ItemPriceMarkdown, ItemPromotion, UpdateBidPercentageRequest, UpdateCampaignIdentificationRequest } from '../../../../types/index.js';
3
3
  /**
4
4
  * <p>The <i>Marketing API </i> offers two platforms that sellers can use to promote and advertise their products:
5
5
  * </p> <ul><li><b>Promoted Listings</b> is an eBay ad service that lets sellers set up <i>ad campaigns </i>
@@ -61,6 +61,22 @@ export default class Marketing extends Restful {
61
61
  * @param body Container for the bulk request to update ads.
62
62
  */
63
63
  bulkUpdateAdsBidByListingId(campaignId: string, body: BulkCreateAdRequest): Promise<any>;
64
+ /**
65
+ * This method is only available for select partners who have been approved for the eBay Promoted Listings Advanced (PLA) program.
66
+ *
67
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
68
+ * a seller's campaign IDs by calling getCampaigns.
69
+ * @param body The bulk request to update the ads.
70
+ */
71
+ bulkUpdateAdsStatus(campaignId: string, body: BulkUpdateAdStatusRequest): Promise<any>;
72
+ /**
73
+ * This method is only available for select partners who have been approved for the eBay Promoted Listings Advanced (PLA) program.
74
+ *
75
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
76
+ * a seller's campaign IDs by calling getCampaigns.
77
+ * @param body The bulk request to update ads.
78
+ */
79
+ bulkUpdateAdsStatusByListingId(campaignId: string, body: BulkUpdateAdStatusByListingIdRequest): Promise<any>;
64
80
  /**
65
81
  * This method retrieves all the ads for the specified campaign.
66
82
  *
@@ -140,6 +156,57 @@ export default class Marketing extends Restful {
140
156
  * @param body This type defines the fields for the updateBid request.
141
157
  */
142
158
  updateBid(campaignId: string, adId: string, body: UpdateBidPercentageRequest): Promise<any>;
159
+ /**
160
+ *
161
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
162
+ * a seller's campaign IDs by calling getCampaigns.
163
+ * @param adGroupStatus A comma-separated list of ad group statuses.
164
+ * @param limit The number of results, from the current result set, to be returned in a single page.
165
+ * @param offset The number of results that will be skipped in the result set.
166
+ */
167
+ getAdGroups(campaignId: string, { adGroupStatus, limit, offset }?: {
168
+ adGroupStatus?: string;
169
+ limit?: number;
170
+ offset?: number;
171
+ }): Promise<any>;
172
+ /**
173
+ *
174
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
175
+ * a seller's campaign IDs by calling getCampaigns.
176
+ * @param body This type defines the fields for the <b>createAdGroup</b> request.
177
+ */
178
+ createAdGroup(campaignId: string, body: CreateAdGroupRequest): Promise<any>;
179
+ /**
180
+ *
181
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
182
+ * a seller's campaign IDs by calling getCampaigns.
183
+ * @param adGroupId The ID of the ad group that shall be retrieved.
184
+ */
185
+ getAdGroup(campaignId: string, adGroupId: string): Promise<any>;
186
+ /**
187
+ *
188
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
189
+ * a seller's campaign IDs by calling getCampaigns.
190
+ * @param adGroupId The ID of the ad group that shall be retrieved.
191
+ * @param body This type defines the fields for the <b>UpdateAdGroup</b> request.
192
+ */
193
+ updateAdGroup(campaignId: string, adGroupId: string, body: UpdateAdGroupRequest): Promise<any>;
194
+ /**
195
+ *
196
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
197
+ * a seller's campaign IDs by calling getCampaigns.
198
+ * @param adGroupId The ID of the ad group that shall be retrieved.
199
+ * @param body The data requested to retrieve the suggested bids.
200
+ */
201
+ suggestBids(campaignId: string, adGroupId: string, body: TargetedBidRequest): Promise<any>;
202
+ /**
203
+ *
204
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
205
+ * a seller's campaign IDs by calling getCampaigns.
206
+ * @param adGroupId The ID of the ad group that shall be retrieved.
207
+ * @param body The required data to retrieve suggested keywords.
208
+ */
209
+ suggestKeywords(campaignId: string, adGroupId: string, body: TargetedKeywordRequest): Promise<any>;
143
210
  /**
144
211
  * This method clones (makes a copy of) the specified campaign.
145
212
  *
@@ -236,6 +303,30 @@ export default class Marketing extends Restful {
236
303
  * a seller's campaign IDs by calling getCampaigns.
237
304
  */
238
305
  resumeCampaign(campaignId: string): Promise<any>;
306
+ /**
307
+ *
308
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that is generated when a campaign is created.
309
+ * @param categoryIds Specifies the category ID that is used to limit the results.
310
+ * @param limit Specifies the maximum number of campaigns to return on a page in the paginated response.
311
+ * @param offset Specifies the number of campaigns to skip in the result set before returning the first report in the paginated response.
312
+ */
313
+ suggestItems(campaignId: string, { categoryIds, limit, offset }?: {
314
+ categoryIds?: string;
315
+ limit?: number;
316
+ offset?: number;
317
+ }): Promise<any>;
318
+ /**
319
+ *
320
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that is generated when a campaign is created.
321
+ * @param body This type defines the request fields for the ad rate strategy that shall be updated.
322
+ */
323
+ updateAdRateStrategy(campaignId: string, body: UpdateAdrateStrategyRequest): Promise<any>;
324
+ /**
325
+ *
326
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that is generated when a campaign is created.
327
+ * @param body This type defines the request fields for the budget details that shall be updated.
328
+ */
329
+ updateCampaignBudget(campaignId: string, body: UpdateCampaignBudgetRequest): Promise<any>;
239
330
  /**
240
331
  * This method replaces the name and the start and end dates of a campaign.
241
332
  *
@@ -244,6 +335,98 @@ export default class Marketing extends Restful {
244
335
  * @param body This type defines the fields to updated the campaign name and start and end dates.
245
336
  */
246
337
  updateCampaignIdentification(campaignId: string, body: UpdateCampaignIdentificationRequest): Promise<any>;
338
+ /**
339
+ *
340
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
341
+ * a seller's campaign IDs by calling getCampaigns.
342
+ * @param body A type that defines the fields for the bulk request to create keywords.
343
+ */
344
+ bulkCreateKeyword(campaignId: string, body: BulkCreateKeywordRequest): Promise<any>;
345
+ /**
346
+ *
347
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
348
+ * a seller's campaign IDs by calling getCampaigns.
349
+ * @param body A type that defines the fields for the bulk request to update keywords.
350
+ */
351
+ bulkUpdateKeyword(campaignId: string, body: BulkUpdateKeywordRequest): Promise<any>;
352
+ /**
353
+ *
354
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
355
+ * a seller's campaign IDs by calling getCampaigns.
356
+ * @param adGroupIds A comma-separated list of ad group IDs.
357
+ * @param keywordStatus A comma-separated list of keyword statuses.
358
+ * @param limit Specifies the maximum number of results to return on a page in the paginated response.
359
+ * @param offset Specifies the number of results to skip in the result set before returning the first report in the paginated response.
360
+ */
361
+ getKeywords(campaignId: string, { adGroupIds, keywordStatus, limit, offset }?: {
362
+ adGroupIds?: string;
363
+ keywordStatus?: string;
364
+ limit?: number;
365
+ offset?: number;
366
+ }): Promise<any>;
367
+ /**
368
+ *
369
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
370
+ * a seller's campaign IDs by calling getCampaigns.
371
+ * @param body A type that defines the fields for the request to create a keyword.
372
+ */
373
+ createKeyword(campaignId: string, body: CreateKeywordRequest): Promise<any>;
374
+ /**
375
+ *
376
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
377
+ * a seller's campaign IDs by calling getCampaigns.
378
+ * @param keywordId This path parameter is used to identify the keyword to retrieve.
379
+ */
380
+ getKeyword(campaignId: string, keywordId: string): Promise<any>;
381
+ /**
382
+ *
383
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
384
+ * a seller's campaign IDs by calling getCampaigns.
385
+ * @param keywordId This path parameter is used to identify the keyword to retrieve.
386
+ * @param body A type that defines the fields for the request to update a keyword.
387
+ */
388
+ updateKeyword(campaignId: string, keywordId: string, body: UpdateKeywordRequest): Promise<any>;
389
+ /**
390
+ *
391
+ * @param body A type that defines the fields for the bulk request to create negative keywords.
392
+ */
393
+ bulkCreateNegativeKeyword(body: BulkCreateNegativeKeywordRequest): Promise<any>;
394
+ /**
395
+ *
396
+ * @param body A type that defines the fields for the bulk request to create negative keywords.
397
+ */
398
+ bulkUpdateNegativeKeyword(body: BulkUpdateNegativeKeywordRequest): Promise<any>;
399
+ /**
400
+ *
401
+ * @param adGroupIds A comma-separated list of ad group IDs.
402
+ * @param campaignIds A unique eBay-assigned ID for an ad campaign that is generated when a campaign is created.
403
+ * @param limit The number of results, from the current result set, to be returned in a single page.
404
+ * @param negativeKeywordStatus A comma-separated list of negative keyword statuses.
405
+ * @param offset The number of results that will be skipped in the result set.
406
+ */
407
+ getNegativeKeywords({ adGroupIds, campaignIds, limit, negativeKeywordStatus, offset }?: {
408
+ adGroupIds?: string;
409
+ campaignIds?: string;
410
+ limit?: number;
411
+ negativeKeywordStatus?: string;
412
+ offset?: number;
413
+ }): Promise<any>;
414
+ /**
415
+ *
416
+ * @param body A type that defines the fields for the request to create a negative keyword.
417
+ */
418
+ createNegativeKeyword(body: CreateNegativeKeywordRequest): Promise<any>;
419
+ /**
420
+ *
421
+ * @param negativeKeywordId The unique identifier for the negative keyword.
422
+ */
423
+ getNegativeKeyword(negativeKeywordId: string): Promise<any>;
424
+ /**
425
+ *
426
+ * @param negativeKeywordId The unique identifier for the negative keyword.
427
+ * @param body A type that defines the fields for the request to update a negative keyword.
428
+ */
429
+ updateNegativeKeyword(negativeKeywordId: string, body: UpdateNegativeKeywordRequest): Promise<any>;
247
430
  /**
248
431
  * This call downloads the report as specified by the report_id path parameter.
249
432
  *
@@ -79,6 +79,28 @@ export default class Marketing extends Restful {
79
79
  campaignId = encodeURIComponent(campaignId);
80
80
  return this.post(`/ad_campaign/${campaignId}/bulk_update_ads_bid_by_listing_id`, body);
81
81
  }
82
+ /**
83
+ * This method is only available for select partners who have been approved for the eBay Promoted Listings Advanced (PLA) program.
84
+ *
85
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
86
+ * a seller's campaign IDs by calling getCampaigns.
87
+ * @param body The bulk request to update the ads.
88
+ */
89
+ bulkUpdateAdsStatus(campaignId, body) {
90
+ campaignId = encodeURIComponent(campaignId);
91
+ return this.post(`/ad_campaign/${campaignId}/bulk_update_ads_status`, body);
92
+ }
93
+ /**
94
+ * This method is only available for select partners who have been approved for the eBay Promoted Listings Advanced (PLA) program.
95
+ *
96
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
97
+ * a seller's campaign IDs by calling getCampaigns.
98
+ * @param body The bulk request to update ads.
99
+ */
100
+ bulkUpdateAdsStatusByListingId(campaignId, body) {
101
+ campaignId = encodeURIComponent(campaignId);
102
+ return this.post(`/ad_campaign/${campaignId}/bulk_update_ads_status_by_listing_id`, body);
103
+ }
82
104
  /**
83
105
  * This method retrieves all the ads for the specified campaign.
84
106
  *
@@ -192,6 +214,81 @@ export default class Marketing extends Restful {
192
214
  adId = encodeURIComponent(adId);
193
215
  return this.post(`/ad_campaign/${campaignId}/ad/${adId}/update_bid`, body);
194
216
  }
217
+ /**
218
+ *
219
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
220
+ * a seller's campaign IDs by calling getCampaigns.
221
+ * @param adGroupStatus A comma-separated list of ad group statuses.
222
+ * @param limit The number of results, from the current result set, to be returned in a single page.
223
+ * @param offset The number of results that will be skipped in the result set.
224
+ */
225
+ getAdGroups(campaignId, { adGroupStatus, limit, offset } = {}) {
226
+ campaignId = encodeURIComponent(campaignId);
227
+ return this.get(`/ad_campaign/${campaignId}/ad_group`, {
228
+ params: {
229
+ ad_group_status: adGroupStatus,
230
+ limit,
231
+ offset
232
+ }
233
+ });
234
+ }
235
+ /**
236
+ *
237
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
238
+ * a seller's campaign IDs by calling getCampaigns.
239
+ * @param body This type defines the fields for the <b>createAdGroup</b> request.
240
+ */
241
+ createAdGroup(campaignId, body) {
242
+ campaignId = encodeURIComponent(campaignId);
243
+ return this.post(`/ad_campaign/${campaignId}/ad_group`, body);
244
+ }
245
+ /**
246
+ *
247
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
248
+ * a seller's campaign IDs by calling getCampaigns.
249
+ * @param adGroupId The ID of the ad group that shall be retrieved.
250
+ */
251
+ getAdGroup(campaignId, adGroupId) {
252
+ adGroupId = encodeURIComponent(adGroupId);
253
+ campaignId = encodeURIComponent(campaignId);
254
+ return this.get(`/ad_campaign/${campaignId}/ad_group/${adGroupId}`);
255
+ }
256
+ /**
257
+ *
258
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
259
+ * a seller's campaign IDs by calling getCampaigns.
260
+ * @param adGroupId The ID of the ad group that shall be retrieved.
261
+ * @param body This type defines the fields for the <b>UpdateAdGroup</b> request.
262
+ */
263
+ updateAdGroup(campaignId, adGroupId, body) {
264
+ adGroupId = encodeURIComponent(adGroupId);
265
+ campaignId = encodeURIComponent(campaignId);
266
+ return this.put(`/ad_campaign/${campaignId}/ad_group/${adGroupId}`, body);
267
+ }
268
+ /**
269
+ *
270
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
271
+ * a seller's campaign IDs by calling getCampaigns.
272
+ * @param adGroupId The ID of the ad group that shall be retrieved.
273
+ * @param body The data requested to retrieve the suggested bids.
274
+ */
275
+ suggestBids(campaignId, adGroupId, body) {
276
+ adGroupId = encodeURIComponent(adGroupId);
277
+ campaignId = encodeURIComponent(campaignId);
278
+ return this.post(`/ad_campaign/${campaignId}/ad_group/${adGroupId}/suggest_bids`, body);
279
+ }
280
+ /**
281
+ *
282
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
283
+ * a seller's campaign IDs by calling getCampaigns.
284
+ * @param adGroupId The ID of the ad group that shall be retrieved.
285
+ * @param body The required data to retrieve suggested keywords.
286
+ */
287
+ suggestKeywords(campaignId, adGroupId, body) {
288
+ adGroupId = encodeURIComponent(adGroupId);
289
+ campaignId = encodeURIComponent(campaignId);
290
+ return this.post(`/ad_campaign/${campaignId}/ad_group/${adGroupId}/suggest_keywords`, body);
291
+ }
195
292
  /**
196
293
  * This method clones (makes a copy of) the specified campaign.
197
294
  *
@@ -322,6 +419,41 @@ export default class Marketing extends Restful {
322
419
  campaignId = encodeURIComponent(campaignId);
323
420
  return this.post(`/ad_campaign/${campaignId}/resume`);
324
421
  }
422
+ /**
423
+ *
424
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that is generated when a campaign is created.
425
+ * @param categoryIds Specifies the category ID that is used to limit the results.
426
+ * @param limit Specifies the maximum number of campaigns to return on a page in the paginated response.
427
+ * @param offset Specifies the number of campaigns to skip in the result set before returning the first report in the paginated response.
428
+ */
429
+ suggestItems(campaignId, { categoryIds, limit, offset } = {}) {
430
+ campaignId = encodeURIComponent(campaignId);
431
+ return this.get(`/ad_campaign/${campaignId}/suggest_items`, {
432
+ params: {
433
+ category_ids: categoryIds,
434
+ limit,
435
+ offset
436
+ }
437
+ });
438
+ }
439
+ /**
440
+ *
441
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that is generated when a campaign is created.
442
+ * @param body This type defines the request fields for the ad rate strategy that shall be updated.
443
+ */
444
+ updateAdRateStrategy(campaignId, body) {
445
+ campaignId = encodeURIComponent(campaignId);
446
+ return this.post(`/ad_campaign/${campaignId}/update_ad_rate_strategy`, body);
447
+ }
448
+ /**
449
+ *
450
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that is generated when a campaign is created.
451
+ * @param body This type defines the request fields for the budget details that shall be updated.
452
+ */
453
+ updateCampaignBudget(campaignId, body) {
454
+ campaignId = encodeURIComponent(campaignId);
455
+ return this.post(`/ad_campaign/${campaignId}/update_campaign_budget`, body);
456
+ }
325
457
  /**
326
458
  * This method replaces the name and the start and end dates of a campaign.
327
459
  *
@@ -333,6 +465,134 @@ export default class Marketing extends Restful {
333
465
  campaignId = encodeURIComponent(campaignId);
334
466
  return this.post(`/ad_campaign/${campaignId}/update_campaign_identification`, body);
335
467
  }
468
+ /**
469
+ *
470
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
471
+ * a seller's campaign IDs by calling getCampaigns.
472
+ * @param body A type that defines the fields for the bulk request to create keywords.
473
+ */
474
+ bulkCreateKeyword(campaignId, body) {
475
+ campaignId = encodeURIComponent(campaignId);
476
+ return this.post(`/ad_campaign/${campaignId}/bulk_create_keyword`, body);
477
+ }
478
+ /**
479
+ *
480
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
481
+ * a seller's campaign IDs by calling getCampaigns.
482
+ * @param body A type that defines the fields for the bulk request to update keywords.
483
+ */
484
+ bulkUpdateKeyword(campaignId, body) {
485
+ campaignId = encodeURIComponent(campaignId);
486
+ return this.post(`/ad_campaign/${campaignId}/bulk_update_keyword`, body);
487
+ }
488
+ /**
489
+ *
490
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
491
+ * a seller's campaign IDs by calling getCampaigns.
492
+ * @param adGroupIds A comma-separated list of ad group IDs.
493
+ * @param keywordStatus A comma-separated list of keyword statuses.
494
+ * @param limit Specifies the maximum number of results to return on a page in the paginated response.
495
+ * @param offset Specifies the number of results to skip in the result set before returning the first report in the paginated response.
496
+ */
497
+ getKeywords(campaignId, { adGroupIds, keywordStatus, limit, offset } = {}) {
498
+ campaignId = encodeURIComponent(campaignId);
499
+ return this.get(`/ad_campaign/${campaignId}/keyword`, {
500
+ params: {
501
+ ad_group_ids: adGroupIds,
502
+ keyword_status: keywordStatus,
503
+ limit,
504
+ offset
505
+ }
506
+ });
507
+ }
508
+ /**
509
+ *
510
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
511
+ * a seller's campaign IDs by calling getCampaigns.
512
+ * @param body A type that defines the fields for the request to create a keyword.
513
+ */
514
+ createKeyword(campaignId, body) {
515
+ campaignId = encodeURIComponent(campaignId);
516
+ return this.post(`/ad_campaign/${campaignId}/keyword`, body);
517
+ }
518
+ /**
519
+ *
520
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
521
+ * a seller's campaign IDs by calling getCampaigns.
522
+ * @param keywordId This path parameter is used to identify the keyword to retrieve.
523
+ */
524
+ getKeyword(campaignId, keywordId) {
525
+ campaignId = encodeURIComponent(campaignId);
526
+ keywordId = encodeURIComponent(keywordId);
527
+ return this.get(`/ad_campaign/${campaignId}/keyword/${keywordId}`);
528
+ }
529
+ /**
530
+ *
531
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
532
+ * a seller's campaign IDs by calling getCampaigns.
533
+ * @param keywordId This path parameter is used to identify the keyword to retrieve.
534
+ * @param body A type that defines the fields for the request to update a keyword.
535
+ */
536
+ updateKeyword(campaignId, keywordId, body) {
537
+ campaignId = encodeURIComponent(campaignId);
538
+ keywordId = encodeURIComponent(keywordId);
539
+ return this.put(`/ad_campaign/${campaignId}/keyword/${keywordId}`, body);
540
+ }
541
+ /**
542
+ *
543
+ * @param body A type that defines the fields for the bulk request to create negative keywords.
544
+ */
545
+ bulkCreateNegativeKeyword(body) {
546
+ return this.post(`/bulk_create_negative_keyword`, body);
547
+ }
548
+ /**
549
+ *
550
+ * @param body A type that defines the fields for the bulk request to create negative keywords.
551
+ */
552
+ bulkUpdateNegativeKeyword(body) {
553
+ return this.post(`/bulk_update_negative_keyword`, body);
554
+ }
555
+ /**
556
+ *
557
+ * @param adGroupIds A comma-separated list of ad group IDs.
558
+ * @param campaignIds A unique eBay-assigned ID for an ad campaign that is generated when a campaign is created.
559
+ * @param limit The number of results, from the current result set, to be returned in a single page.
560
+ * @param negativeKeywordStatus A comma-separated list of negative keyword statuses.
561
+ * @param offset The number of results that will be skipped in the result set.
562
+ */
563
+ getNegativeKeywords({ adGroupIds, campaignIds, limit, negativeKeywordStatus, offset } = {}) {
564
+ return this.get(`/negative_keyword`, {
565
+ params: {
566
+ ad_group_ids: adGroupIds,
567
+ campaign_ids: campaignIds, limit,
568
+ negative_keyword_status: negativeKeywordStatus, offset
569
+ }
570
+ });
571
+ }
572
+ /**
573
+ *
574
+ * @param body A type that defines the fields for the request to create a negative keyword.
575
+ */
576
+ createNegativeKeyword(body) {
577
+ return this.post(`/negative_keyword`, body);
578
+ }
579
+ /**
580
+ *
581
+ * @param negativeKeywordId The unique identifier for the negative keyword.
582
+ */
583
+ getNegativeKeyword(negativeKeywordId) {
584
+ negativeKeywordId = encodeURIComponent(negativeKeywordId);
585
+ return this.get(`/negative_keyword/${negativeKeywordId}`);
586
+ }
587
+ /**
588
+ *
589
+ * @param negativeKeywordId The unique identifier for the negative keyword.
590
+ * @param body A type that defines the fields for the request to update a negative keyword.
591
+ */
592
+ updateNegativeKeyword(negativeKeywordId, body) {
593
+ negativeKeywordId = encodeURIComponent(negativeKeywordId);
594
+ return this.put(`/negative_keyword/${negativeKeywordId}`, body);
595
+ }
336
596
  /**
337
597
  * This call downloads the report as specified by the report_id path parameter.
338
598
  *