ebay-api 7.1.3 → 8.0.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 +59 -53
- package/dist/api/apiFactory.d.ts +27 -0
- package/dist/api/apiFactory.js +94 -0
- package/dist/api/base.d.ts +10 -0
- package/dist/api/base.js +10 -0
- package/dist/api/index.d.ts +11 -0
- package/dist/api/index.js +11 -0
- package/dist/api/restful/buy/browse/index.d.ts +84 -0
- package/dist/api/restful/buy/browse/index.js +135 -0
- package/dist/api/restful/buy/deal/index.d.ts +55 -0
- package/dist/api/restful/buy/deal/index.js +73 -0
- package/dist/api/restful/buy/feed/index.d.ts +43 -0
- package/dist/api/restful/buy/feed/index.js +78 -0
- package/dist/api/restful/buy/index.d.ts +17 -0
- package/dist/api/restful/buy/index.js +8 -0
- package/dist/api/restful/buy/marketing/index.d.ts +27 -0
- package/dist/api/restful/buy/marketing/index.js +44 -0
- package/dist/api/restful/buy/marketplaceInsights/index.d.ts +28 -0
- package/dist/api/restful/buy/marketplaceInsights/index.js +44 -0
- package/dist/api/restful/buy/offer/index.d.ts +23 -0
- package/dist/api/restful/buy/offer/index.js +30 -0
- package/dist/api/restful/buy/order/index.d.ts +264 -0
- package/dist/api/restful/buy/order/index.js +362 -0
- package/dist/api/restful/commerce/catalog/index.d.ts +73 -0
- package/dist/api/restful/commerce/catalog/index.js +101 -0
- package/dist/api/restful/commerce/charity/index.d.ts +34 -0
- package/dist/api/restful/commerce/charity/index.js +49 -0
- package/dist/api/restful/commerce/identity/index.d.ts +14 -0
- package/dist/api/restful/commerce/identity/index.js +20 -0
- package/dist/api/restful/commerce/index.d.ts +15 -0
- package/dist/api/restful/commerce/index.js +7 -0
- package/dist/api/restful/commerce/notification/index.d.ts +117 -0
- package/dist/api/restful/commerce/notification/index.js +180 -0
- package/dist/api/restful/commerce/taxonomy/index.d.ts +78 -0
- package/dist/api/restful/commerce/taxonomy/index.js +128 -0
- package/dist/api/restful/commerce/translation/index.d.ts +15 -0
- package/dist/api/restful/commerce/translation/index.js +18 -0
- package/dist/api/restful/developer/analytics/index.d.ts +22 -0
- package/dist/api/restful/developer/analytics/index.js +38 -0
- package/dist/api/restful/developer/index.d.ts +7 -0
- package/dist/api/restful/developer/index.js +3 -0
- package/dist/api/restful/developer/keyManagement/index.d.ts +26 -0
- package/dist/api/restful/developer/keyManagement/index.js +34 -0
- package/dist/api/restful/index.d.ts +62 -0
- package/dist/api/restful/index.js +164 -0
- package/dist/api/restful/postOrder/cancellation/index.d.ts +57 -0
- package/dist/api/restful/postOrder/cancellation/index.js +88 -0
- package/dist/api/restful/postOrder/case/index.d.ts +63 -0
- package/dist/api/restful/postOrder/case/index.js +88 -0
- package/dist/api/restful/postOrder/index.d.ts +11 -0
- package/dist/api/restful/postOrder/index.js +5 -0
- package/dist/api/restful/postOrder/inquiry/index.d.ts +82 -0
- package/dist/api/restful/postOrder/inquiry/index.js +124 -0
- package/dist/api/restful/postOrder/return/index.d.ts +231 -0
- package/dist/api/restful/postOrder/return/index.js +354 -0
- package/dist/api/restful/sell/account/index.d.ts +217 -0
- package/dist/api/restful/sell/account/index.js +330 -0
- package/dist/api/restful/sell/analytics/index.d.ts +41 -0
- package/dist/api/restful/sell/analytics/index.js +54 -0
- package/dist/api/restful/sell/compliance/index.d.ts +37 -0
- package/dist/api/restful/sell/compliance/index.js +50 -0
- package/dist/api/restful/sell/feed/index.d.ts +151 -0
- package/dist/api/restful/sell/feed/index.js +248 -0
- package/dist/api/restful/sell/finances/index.d.ts +78 -0
- package/dist/api/restful/sell/finances/index.js +102 -0
- package/dist/api/restful/sell/fulfillment/index.d.ts +137 -0
- package/dist/api/restful/sell/fulfillment/index.js +192 -0
- package/dist/api/restful/sell/index.d.ts +29 -0
- package/dist/api/restful/sell/index.js +14 -0
- package/dist/api/restful/sell/inventory/index.d.ts +248 -0
- package/dist/api/restful/sell/inventory/index.js +339 -0
- package/dist/api/restful/sell/listing/index.d.ts +14 -0
- package/dist/api/restful/sell/listing/index.js +18 -0
- package/dist/api/restful/sell/logistics/index.d.ts +44 -0
- package/dist/api/restful/sell/logistics/index.js +59 -0
- package/dist/api/restful/sell/marketing/index.d.ts +443 -0
- package/dist/api/restful/sell/marketing/index.js +602 -0
- package/dist/api/restful/sell/metadata/index.d.ts +77 -0
- package/dist/api/restful/sell/metadata/index.js +124 -0
- package/dist/api/restful/sell/negotiation/index.d.ts +24 -0
- package/dist/api/restful/sell/negotiation/index.js +32 -0
- package/dist/api/restful/sell/recommendation/index.d.ts +26 -0
- package/dist/api/restful/sell/recommendation/index.js +32 -0
- package/dist/api/traditional/XMLRequest.d.ts +107 -0
- package/dist/api/traditional/XMLRequest.js +173 -0
- package/dist/api/traditional/clientAlerts/index.d.ts +9 -0
- package/dist/api/traditional/clientAlerts/index.js +11 -0
- package/dist/api/traditional/clientAlerts/types.d.ts +31 -0
- package/dist/api/traditional/clientAlerts/types.js +32 -0
- package/dist/api/traditional/fields.d.ts +1948 -0
- package/dist/api/traditional/fields.js +1946 -0
- package/dist/api/traditional/finding/index.d.ts +12 -0
- package/dist/api/traditional/finding/index.js +13 -0
- package/dist/api/traditional/index.d.ts +17 -0
- package/dist/api/traditional/index.js +181 -0
- package/dist/api/traditional/merchandising/index.d.ts +7 -0
- package/dist/api/traditional/merchandising/index.js +8 -0
- package/dist/api/traditional/shopping/index.d.ts +11 -0
- package/dist/api/traditional/shopping/index.js +13 -0
- package/dist/api/traditional/trading/index.d.ts +142 -0
- package/dist/api/traditional/trading/index.js +143 -0
- package/dist/auth/authNAuth.d.ts +49 -0
- package/dist/auth/authNAuth.js +116 -0
- package/dist/auth/index.d.ts +17 -0
- package/dist/auth/index.js +25 -0
- package/dist/auth/oAuth2.d.ts +95 -0
- package/dist/auth/oAuth2.js +259 -0
- package/dist/eBayApi.d.ts +58 -0
- package/dist/eBayApi.js +93 -0
- package/dist/ebay-api.min.mjs +1 -0
- package/dist/enums/apiEnums.d.ts +49 -0
- package/dist/enums/apiEnums.js +51 -0
- package/dist/enums/index.d.ts +2 -0
- package/dist/enums/index.js +2 -0
- package/dist/enums/restfulEnums.d.ts +970 -0
- package/dist/enums/restfulEnums.js +1013 -0
- package/dist/errors/index.d.ts +66 -0
- package/dist/errors/index.js +184 -0
- package/dist/nanoevents.d.ts +6 -0
- package/dist/nanoevents.js +20 -0
- package/dist/request.d.ts +26 -0
- package/dist/request.js +43 -0
- package/dist/types/apiTypes.d.ts +33 -0
- package/dist/types/apiTypes.js +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +3 -0
- package/dist/types/restfulTypes.d.ts +1082 -0
- package/dist/types/restfulTypes.js +1 -0
- package/dist/types/traditonalTypes.d.ts +34 -0
- package/dist/types/traditonalTypes.js +1 -0
- package/lib/api/apiFactory.d.ts +8 -8
- package/lib/api/apiFactory.js +41 -42
- package/lib/api/base.d.ts +3 -6
- package/lib/api/base.js +3 -15
- package/lib/api/index.d.ts +4 -4
- package/lib/api/index.js +4 -5
- package/lib/api/restful/buy/browse/index.d.ts +2 -2
- package/lib/api/restful/buy/browse/index.js +2 -3
- package/lib/api/restful/buy/deal/index.d.ts +1 -1
- package/lib/api/restful/buy/deal/index.js +2 -3
- package/lib/api/restful/buy/feed/index.d.ts +2 -2
- package/lib/api/restful/buy/feed/index.js +2 -3
- package/lib/api/restful/buy/index.d.ts +8 -8
- package/lib/api/restful/buy/index.js +14 -15
- package/lib/api/restful/buy/marketing/index.d.ts +2 -2
- package/lib/api/restful/buy/marketing/index.js +2 -3
- package/lib/api/restful/buy/marketplaceInsights/index.d.ts +2 -2
- package/lib/api/restful/buy/marketplaceInsights/index.js +2 -3
- package/lib/api/restful/buy/offer/index.d.ts +2 -2
- package/lib/api/restful/buy/offer/index.js +2 -3
- package/lib/api/restful/buy/order/index.d.ts +3 -3
- package/lib/api/restful/buy/order/index.js +3 -4
- package/lib/api/restful/commerce/catalog/index.d.ts +2 -2
- package/lib/api/restful/commerce/catalog/index.js +2 -3
- package/lib/api/restful/commerce/charity/index.d.ts +1 -1
- package/lib/api/restful/commerce/charity/index.js +2 -3
- package/lib/api/restful/commerce/identity/index.d.ts +1 -1
- package/lib/api/restful/commerce/identity/index.js +2 -3
- package/lib/api/restful/commerce/index.d.ts +7 -7
- package/lib/api/restful/commerce/index.js +12 -13
- package/lib/api/restful/commerce/notification/index.d.ts +2 -2
- package/lib/api/restful/commerce/notification/index.js +2 -3
- package/lib/api/restful/commerce/taxonomy/index.d.ts +1 -1
- package/lib/api/restful/commerce/taxonomy/index.js +2 -3
- package/lib/api/restful/commerce/translation/index.d.ts +2 -2
- package/lib/api/restful/commerce/translation/index.js +2 -3
- package/lib/api/restful/developer/analytics/index.d.ts +1 -1
- package/lib/api/restful/developer/analytics/index.js +2 -3
- package/lib/api/restful/developer/index.d.ts +3 -3
- package/lib/api/restful/developer/index.js +4 -5
- package/lib/api/restful/developer/keyManagement/index.d.ts +1 -1
- package/lib/api/restful/developer/keyManagement/index.js +2 -3
- package/lib/api/restful/index.d.ts +6 -6
- package/lib/api/restful/index.js +5 -6
- package/lib/api/restful/postOrder/cancellation/index.d.ts +2 -2
- package/lib/api/restful/postOrder/cancellation/index.js +2 -3
- package/lib/api/restful/postOrder/case/index.d.ts +2 -2
- package/lib/api/restful/postOrder/case/index.js +2 -3
- package/lib/api/restful/postOrder/index.d.ts +5 -5
- package/lib/api/restful/postOrder/index.js +8 -9
- package/lib/api/restful/postOrder/inquiry/index.d.ts +2 -2
- package/lib/api/restful/postOrder/inquiry/index.js +2 -3
- package/lib/api/restful/postOrder/return/index.d.ts +3 -3
- package/lib/api/restful/postOrder/return/index.js +2 -3
- package/lib/api/restful/sell/account/index.d.ts +3 -3
- package/lib/api/restful/sell/account/index.js +2 -3
- package/lib/api/restful/sell/analytics/index.d.ts +2 -2
- package/lib/api/restful/sell/analytics/index.js +2 -3
- package/lib/api/restful/sell/compliance/index.d.ts +2 -2
- package/lib/api/restful/sell/compliance/index.js +2 -3
- package/lib/api/restful/sell/feed/index.d.ts +2 -2
- package/lib/api/restful/sell/feed/index.js +4 -5
- package/lib/api/restful/sell/finances/index.d.ts +1 -1
- package/lib/api/restful/sell/finances/index.js +2 -3
- package/lib/api/restful/sell/fulfillment/index.d.ts +2 -2
- package/lib/api/restful/sell/fulfillment/index.js +4 -5
- package/lib/api/restful/sell/index.d.ts +14 -14
- package/lib/api/restful/sell/index.js +26 -27
- package/lib/api/restful/sell/inventory/index.d.ts +2 -2
- package/lib/api/restful/sell/inventory/index.js +2 -3
- package/lib/api/restful/sell/listing/index.d.ts +1 -1
- package/lib/api/restful/sell/listing/index.js +2 -3
- package/lib/api/restful/sell/logistics/index.d.ts +1 -1
- package/lib/api/restful/sell/logistics/index.js +2 -3
- package/lib/api/restful/sell/marketing/index.d.ts +2 -2
- package/lib/api/restful/sell/marketing/index.js +2 -3
- package/lib/api/restful/sell/metadata/index.d.ts +1 -1
- package/lib/api/restful/sell/metadata/index.js +2 -3
- package/lib/api/restful/sell/negotiation/index.d.ts +1 -1
- package/lib/api/restful/sell/negotiation/index.js +2 -3
- package/lib/api/restful/sell/recommendation/index.d.ts +2 -2
- package/lib/api/restful/sell/recommendation/index.js +2 -3
- package/lib/api/traditional/XMLRequest.d.ts +15 -11
- package/lib/api/traditional/XMLRequest.js +17 -33
- package/lib/api/traditional/clientAlerts/index.d.ts +1 -1
- package/lib/api/traditional/clientAlerts/index.js +2 -3
- package/lib/api/traditional/clientAlerts/types.js +0 -1
- package/lib/api/traditional/fields.d.ts +1 -1
- package/lib/api/traditional/fields.js +0 -1
- package/lib/api/traditional/finding/index.js +0 -1
- package/lib/api/traditional/index.d.ts +2 -2
- package/lib/api/traditional/index.js +26 -21
- package/lib/api/traditional/merchandising/index.js +0 -1
- package/lib/api/traditional/shopping/index.js +0 -1
- package/lib/api/traditional/trading/index.js +0 -1
- package/lib/auth/authNAuth.d.ts +4 -4
- package/lib/auth/authNAuth.js +12 -13
- package/lib/auth/index.d.ts +5 -5
- package/lib/auth/index.js +6 -7
- package/lib/auth/oAuth2.d.ts +11 -6
- package/lib/auth/oAuth2.js +11 -7
- package/lib/eBayApi.d.ts +58 -0
- package/lib/eBayApi.js +130 -0
- package/lib/ebay-api.min.js +1 -2
- package/lib/enums/apiEnums.js +0 -1
- package/lib/enums/index.d.ts +2 -2
- package/lib/enums/index.js +7 -4
- package/lib/enums/restfulEnums.js +0 -1
- package/lib/errors/index.js +0 -1
- package/lib/index.d.ts +1 -55
- package/lib/index.js +2 -92
- package/lib/nanoevents.d.ts +6 -0
- package/lib/nanoevents.js +24 -0
- package/lib/package.json +3 -0
- package/lib/request.d.ts +6 -6
- package/lib/request.js +2 -3
- package/lib/types/apiTypes.d.ts +10 -10
- package/lib/types/apiTypes.js +0 -1
- package/lib/types/index.d.ts +3 -3
- package/lib/types/index.js +8 -5
- package/lib/types/restfulTypes.d.ts +191 -191
- package/lib/types/restfulTypes.js +0 -1
- package/lib/types/traditonalTypes.d.ts +15 -15
- package/lib/types/traditonalTypes.js +0 -1
- package/package.json +98 -33
- package/lib/api/apiFactory.js.map +0 -1
- package/lib/api/base.js.map +0 -1
- package/lib/api/index.js.map +0 -1
- package/lib/api/restful/buy/browse/index.js.map +0 -1
- package/lib/api/restful/buy/deal/index.js.map +0 -1
- package/lib/api/restful/buy/feed/index.js.map +0 -1
- package/lib/api/restful/buy/index.js.map +0 -1
- package/lib/api/restful/buy/marketing/index.js.map +0 -1
- package/lib/api/restful/buy/marketplaceInsights/index.js.map +0 -1
- package/lib/api/restful/buy/offer/index.js.map +0 -1
- package/lib/api/restful/buy/order/index.js.map +0 -1
- package/lib/api/restful/commerce/catalog/index.js.map +0 -1
- package/lib/api/restful/commerce/charity/index.js.map +0 -1
- package/lib/api/restful/commerce/identity/index.js.map +0 -1
- package/lib/api/restful/commerce/index.js.map +0 -1
- package/lib/api/restful/commerce/notification/index.js.map +0 -1
- package/lib/api/restful/commerce/taxonomy/index.js.map +0 -1
- package/lib/api/restful/commerce/translation/index.js.map +0 -1
- package/lib/api/restful/developer/analytics/index.js.map +0 -1
- package/lib/api/restful/developer/index.js.map +0 -1
- package/lib/api/restful/developer/keyManagement/index.js.map +0 -1
- package/lib/api/restful/index.js.map +0 -1
- package/lib/api/restful/postOrder/cancellation/index.js.map +0 -1
- package/lib/api/restful/postOrder/case/index.js.map +0 -1
- package/lib/api/restful/postOrder/index.js.map +0 -1
- package/lib/api/restful/postOrder/inquiry/index.js.map +0 -1
- package/lib/api/restful/postOrder/return/index.js.map +0 -1
- package/lib/api/restful/sell/account/index.js.map +0 -1
- package/lib/api/restful/sell/analytics/index.js.map +0 -1
- package/lib/api/restful/sell/compliance/index.js.map +0 -1
- package/lib/api/restful/sell/feed/index.js.map +0 -1
- package/lib/api/restful/sell/finances/index.js.map +0 -1
- package/lib/api/restful/sell/fulfillment/index.js.map +0 -1
- package/lib/api/restful/sell/index.js.map +0 -1
- package/lib/api/restful/sell/inventory/index.js.map +0 -1
- package/lib/api/restful/sell/listing/index.js.map +0 -1
- package/lib/api/restful/sell/logistics/index.js.map +0 -1
- package/lib/api/restful/sell/marketing/index.js.map +0 -1
- package/lib/api/restful/sell/metadata/index.js.map +0 -1
- package/lib/api/restful/sell/negotiation/index.js.map +0 -1
- package/lib/api/restful/sell/recommendation/index.js.map +0 -1
- package/lib/api/traditional/XMLRequest.js.map +0 -1
- package/lib/api/traditional/clientAlerts/index.js.map +0 -1
- package/lib/api/traditional/clientAlerts/types.js.map +0 -1
- package/lib/api/traditional/fields.js.map +0 -1
- package/lib/api/traditional/finding/index.js.map +0 -1
- package/lib/api/traditional/index.js.map +0 -1
- package/lib/api/traditional/merchandising/index.js.map +0 -1
- package/lib/api/traditional/shopping/index.js.map +0 -1
- package/lib/api/traditional/trading/index.js.map +0 -1
- package/lib/auth/authNAuth.js.map +0 -1
- package/lib/auth/index.js.map +0 -1
- package/lib/auth/oAuth2.js.map +0 -1
- package/lib/ebay-api.min.js.map +0 -1
- package/lib/enums/apiEnums.js.map +0 -1
- package/lib/enums/index.js.map +0 -1
- package/lib/enums/restfulEnums.js.map +0 -1
- package/lib/errors/index.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/request.js.map +0 -1
- package/lib/types/apiTypes.js.map +0 -1
- package/lib/types/index.js.map +0 -1
- package/lib/types/restfulTypes.js.map +0 -1
- package/lib/types/traditonalTypes.js.map +0 -1
|
@@ -0,0 +1,602 @@
|
|
|
1
|
+
import Restful from '../../index.js';
|
|
2
|
+
/**
|
|
3
|
+
* <p>The <i>Marketing API </i> offers two platforms that sellers can use to promote and advertise their products:
|
|
4
|
+
* </p> <ul><li><b>Promoted Listings</b> is an eBay ad service that lets sellers set up <i>ad campaigns </i>
|
|
5
|
+
* for the products they want to promote. eBay displays the ads in search results and in other
|
|
6
|
+
* marketing modules as <b>SPONSORED</b> listings.
|
|
7
|
+
*/
|
|
8
|
+
export default class Marketing extends Restful {
|
|
9
|
+
get basePath() {
|
|
10
|
+
return '/sell/marketing/v1';
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* This method creates an ad for each inventory reference ID specified in the request and associates the newly
|
|
14
|
+
* created ads with the specified campaign.
|
|
15
|
+
*
|
|
16
|
+
* @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created.
|
|
17
|
+
* @param body This type defines the fields for the bulkCreateAdsByInventoryReference request.
|
|
18
|
+
*/
|
|
19
|
+
bulkCreateAdsByInventoryReference(campaignId, body) {
|
|
20
|
+
campaignId = encodeURIComponent(campaignId);
|
|
21
|
+
return this.post(`/ad_campaign/${campaignId}/bulk_create_ads_by_inventory_reference`, body);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* This method creates an ad for each listing ID specified in the request and associates the newly created ads with
|
|
25
|
+
* the specified campaign.
|
|
26
|
+
*
|
|
27
|
+
* @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
|
|
28
|
+
* a seller's campaign IDs by calling getCampaigns.
|
|
29
|
+
* @param body The container for the bulk request to create ads for eBay listing IDs. eBay listing IDs are
|
|
30
|
+
* generated when the listing is created on eBay.
|
|
31
|
+
*/
|
|
32
|
+
bulkCreateAdsByListingId(campaignId, body) {
|
|
33
|
+
campaignId = encodeURIComponent(campaignId);
|
|
34
|
+
return this.post(`/ad_campaign/${campaignId}/bulk_create_ads_by_listing_id`, body);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* This method deletes a set of ads, as specified by a list of inventory reference IDs, from the specified
|
|
38
|
+
* campaign.
|
|
39
|
+
*
|
|
40
|
+
* @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
|
|
41
|
+
* a seller's campaign IDs by calling getCampaigns.
|
|
42
|
+
* @param body This type defines the fields for a bulkDeleteAdsByInventoryReference request.
|
|
43
|
+
*/
|
|
44
|
+
bulkDeleteAdsByInventoryReference(campaignId, body) {
|
|
45
|
+
campaignId = encodeURIComponent(campaignId);
|
|
46
|
+
return this.post(`/ad_campaign/${campaignId}/bulk_delete_ads_by_inventory_reference`, body);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* This method deletes a set of ads, as specified by a list of listing IDs, from the specified campaign.
|
|
50
|
+
*
|
|
51
|
+
* @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
|
|
52
|
+
* a seller's campaign IDs by calling getCampaigns.
|
|
53
|
+
* @param body This type defines the fields for the bulkDeleteAdsByListingId request.
|
|
54
|
+
*/
|
|
55
|
+
bulkDeleteAdsByListingId(campaignId, body) {
|
|
56
|
+
campaignId = encodeURIComponent(campaignId);
|
|
57
|
+
return this.post(`/ad_campaign/${campaignId}/bulk_delete_ads_by_listing_id`, body);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* This method replaces an ad bid based on a list of inventory references IDs associated with the specified
|
|
61
|
+
* campaign.
|
|
62
|
+
*
|
|
63
|
+
* @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created.
|
|
64
|
+
* @param body This type defines the fields for the BulkCreateAdsByInventoryReference request.
|
|
65
|
+
*/
|
|
66
|
+
bulkUpdateAdsBidByInventoryReference(campaignId, body) {
|
|
67
|
+
campaignId = encodeURIComponent(campaignId);
|
|
68
|
+
return this.post(`/ad_campaign/${campaignId}/bulk_update_ads_bid_by_inventory_reference`, body);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* This method replaces an ad bid based on a supplied list of listing IDs that are associated with the specified
|
|
72
|
+
* campaign.
|
|
73
|
+
*
|
|
74
|
+
* @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
|
|
75
|
+
* a seller's campaign IDs by calling getCampaigns.
|
|
76
|
+
* @param body Container for the bulk request to update ads.
|
|
77
|
+
*/
|
|
78
|
+
bulkUpdateAdsBidByListingId(campaignId, body) {
|
|
79
|
+
campaignId = encodeURIComponent(campaignId);
|
|
80
|
+
return this.post(`/ad_campaign/${campaignId}/bulk_update_ads_bid_by_listing_id`, body);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* This method retrieves all the ads for the specified campaign.
|
|
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 limit Specifies the maximum number of ads to return on a page in the paginated response. Default: 10
|
|
88
|
+
* Maximum: 500
|
|
89
|
+
* @param listingIds A comma separated list of eBay listing IDs. The response includes only active ads (ads
|
|
90
|
+
* associated with a RUNNING campaign).
|
|
91
|
+
* @param offset Specifies the number of ads to skip in the result set before returning the first ad in the
|
|
92
|
+
* paginated response.
|
|
93
|
+
*/
|
|
94
|
+
getAds(campaignId, { limit, listingIds, offset } = {}) {
|
|
95
|
+
campaignId = encodeURIComponent(campaignId);
|
|
96
|
+
return this.get(`/ad_campaign/${campaignId}/ad`, {
|
|
97
|
+
params: {
|
|
98
|
+
limit,
|
|
99
|
+
listing_ids: listingIds,
|
|
100
|
+
offset
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* This method creates an ad for the specified listing ID, sets the bid percentage for that specific item, and
|
|
106
|
+
* associates the ad with the specified campaign.
|
|
107
|
+
*
|
|
108
|
+
* @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
|
|
109
|
+
* a seller's campaign IDs by calling getCampaigns.
|
|
110
|
+
* @param body This type defines the fields for the createAd request.
|
|
111
|
+
*/
|
|
112
|
+
createAdByListingId(campaignId, body) {
|
|
113
|
+
campaignId = encodeURIComponent(campaignId);
|
|
114
|
+
return this.post(`/ad_campaign/${campaignId}/ad`, body);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* This method creates an ad for the specified inventory reference ID, sets the bid percentage for that specific
|
|
118
|
+
* item, and associates the ad with the specified campaign.
|
|
119
|
+
*
|
|
120
|
+
* @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
|
|
121
|
+
* a seller's campaign IDs by calling getCampaigns.
|
|
122
|
+
* @param body This type defines the fields for the createAdsByInventoryReference request.
|
|
123
|
+
*/
|
|
124
|
+
createAdsByInventoryReference(campaignId, body) {
|
|
125
|
+
campaignId = encodeURIComponent(campaignId);
|
|
126
|
+
return this.post(`/ad_campaign/${campaignId}/create_ads_by_inventory_reference`, body);
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* This method retrieves the specified ad from the specified campaign.
|
|
130
|
+
*
|
|
131
|
+
* @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
|
|
132
|
+
* a seller's campaign IDs by calling getCampaigns.
|
|
133
|
+
* @param adId Identifier of an ad. This ID was generated when the ad was created.
|
|
134
|
+
*/
|
|
135
|
+
getAd(campaignId, adId) {
|
|
136
|
+
campaignId = encodeURIComponent(campaignId);
|
|
137
|
+
adId = encodeURIComponent(adId);
|
|
138
|
+
return this.get(`/ad_campaign/${campaignId}/ad/${adId}`);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* This method retrieves the specified ad from the specified campaign.
|
|
142
|
+
*
|
|
143
|
+
* @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created.
|
|
144
|
+
* @param adId Identifier of an ad. This ID was generated when the ad was created.
|
|
145
|
+
*/
|
|
146
|
+
deleteAd(campaignId, adId) {
|
|
147
|
+
campaignId = encodeURIComponent(campaignId);
|
|
148
|
+
adId = encodeURIComponent(adId);
|
|
149
|
+
return this.delete(`/ad_campaign/${campaignId}/ad/${adId}`);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* This method deletes ads using a list of seller inventory reference IDs that are associated with the specified
|
|
153
|
+
* campaign ID.
|
|
154
|
+
*
|
|
155
|
+
* @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
|
|
156
|
+
* a seller's campaign IDs by calling getCampaigns.
|
|
157
|
+
*/
|
|
158
|
+
deleteAdsByInventoryReference(campaignId) {
|
|
159
|
+
campaignId = encodeURIComponent(campaignId);
|
|
160
|
+
return this.post(`/ad_campaign/${campaignId}/delete_ads_by_inventory_reference`);
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* This method retrieves ads from the specified campaign using the seller's inventory reference ID and inventory
|
|
164
|
+
* reference type.
|
|
165
|
+
*
|
|
166
|
+
* @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
|
|
167
|
+
* a seller's campaign IDs by calling getCampaigns.
|
|
168
|
+
* @param inventoryReferenceId The inventory reference ID associated with the ad you want returned.
|
|
169
|
+
* @param inventoryReferenceType The type of the inventory reference ID. Set this value to either INVENTORY_ITEM (a
|
|
170
|
+
* single listing) or INVENTORY_ITEM_GROUP (a multi-variation listing).
|
|
171
|
+
*/
|
|
172
|
+
getAdsByInventoryReference(campaignId, inventoryReferenceId, inventoryReferenceType) {
|
|
173
|
+
campaignId = encodeURIComponent(campaignId);
|
|
174
|
+
return this.get(`/ad_campaign/${campaignId}/get_ads_by_inventory_reference`, {
|
|
175
|
+
params: {
|
|
176
|
+
inventory_reference_id: inventoryReferenceId,
|
|
177
|
+
inventory_reference_type: inventoryReferenceType
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* This method updates the bid for the specified ad in the specified campaign. In the request, supply the
|
|
183
|
+
* campaign_id and ad_id as a URI parameters.
|
|
184
|
+
*
|
|
185
|
+
* @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
|
|
186
|
+
* a seller's campaign IDs by calling getCampaigns.
|
|
187
|
+
* @param adId A unique eBay-assigned ID for an ad that's generated when an ad is created.
|
|
188
|
+
* @param body This type defines the fields for the updateBid request.
|
|
189
|
+
*/
|
|
190
|
+
updateBid(campaignId, adId, body) {
|
|
191
|
+
campaignId = encodeURIComponent(campaignId);
|
|
192
|
+
adId = encodeURIComponent(adId);
|
|
193
|
+
return this.post(`/ad_campaign/${campaignId}/ad/${adId}/update_bid`, body);
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* This method clones (makes a copy of) the specified campaign.
|
|
197
|
+
*
|
|
198
|
+
* @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
|
|
199
|
+
* a seller's campaign IDs by calling getCampaigns.
|
|
200
|
+
* @param body This type defines the fields for a clone campaign request.
|
|
201
|
+
*/
|
|
202
|
+
cloneCampaign(campaignId, body) {
|
|
203
|
+
campaignId = encodeURIComponent(campaignId);
|
|
204
|
+
return this.post(`/ad_campaign/${campaignId}/clone`, body);
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* This method retrieves the details for all the campaigns of a seller, including the campaign's the selection
|
|
208
|
+
* rules.
|
|
209
|
+
*
|
|
210
|
+
* @param campaignName Specifies the campaign name. The results are filtered to include only the campaign by the
|
|
211
|
+
* specified name.
|
|
212
|
+
* @param campaignStatus Specifies the campaign status. The results are filtered to include only campaigns that are
|
|
213
|
+
* in the specified states.
|
|
214
|
+
* @param endDateRange Specifies the range of a campaign's end date. The results are filtered to include only
|
|
215
|
+
* campaigns with an end date that is within specified range.
|
|
216
|
+
* @param limit Specifies the maximum number of campaigns to return on a page in the paginated response. Default:
|
|
217
|
+
* 10 Maximum: 500
|
|
218
|
+
* @param offset Specifies the number of campaigns to skip in the result set before returning the first report in
|
|
219
|
+
* the paginated response.
|
|
220
|
+
* @param startDateRange Specifies the range of a campaign's start date in which to filter the results.
|
|
221
|
+
*/
|
|
222
|
+
getCampaigns({ campaignName, campaignStatus, endDateRange, limit, offset, startDateRange } = {}) {
|
|
223
|
+
return this.get(`/ad_campaign`, {
|
|
224
|
+
params: {
|
|
225
|
+
campaign_name: campaignName,
|
|
226
|
+
campaign_status: campaignStatus,
|
|
227
|
+
end_date_range: endDateRange,
|
|
228
|
+
limit,
|
|
229
|
+
offset,
|
|
230
|
+
start_date_range: startDateRange
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* This method retrieves the details of a single campaign, as specified with the campaign_id query parameter.
|
|
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
|
+
*/
|
|
240
|
+
getCampaign(campaignId) {
|
|
241
|
+
campaignId = encodeURIComponent(campaignId);
|
|
242
|
+
return this.get(`/ad_campaign/${campaignId}`);
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* This method creates a Promoted Listings ad campaign.
|
|
246
|
+
*
|
|
247
|
+
* @param body his type defines the fields for the create campaign request.
|
|
248
|
+
*/
|
|
249
|
+
createCampaign(body) {
|
|
250
|
+
return this.post(`/ad_campaign`, body);
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* This method deletes the campaign specified by the campaign_id query parameter.
|
|
254
|
+
*
|
|
255
|
+
* @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
|
|
256
|
+
* a seller's campaign IDs by calling getCampaigns.
|
|
257
|
+
*/
|
|
258
|
+
deleteCampaign(campaignId) {
|
|
259
|
+
campaignId = encodeURIComponent(campaignId);
|
|
260
|
+
return this.delete(`/ad_campaign/${campaignId}`);
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* This method ends an active (RUNNINGM) or paused campaign. Specify the campaign you want to end by supplying its
|
|
264
|
+
* campaign ID in a query parameter.
|
|
265
|
+
*
|
|
266
|
+
* @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
|
|
267
|
+
* a seller's campaign IDs by calling getCampaigns.
|
|
268
|
+
*/
|
|
269
|
+
endCampaign(campaignId) {
|
|
270
|
+
campaignId = encodeURIComponent(campaignId);
|
|
271
|
+
return this.post(`/ad_campaign/${campaignId}/end`);
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* This method retrieves the campaign containing the listing that is specified using either an eBay listing ID or
|
|
275
|
+
* an inventory reference ID and inventory reference type.
|
|
276
|
+
*
|
|
277
|
+
* @param inventoryReferenceId The seller's inventory reference ID of the listing to be used to find the campaign
|
|
278
|
+
* in which it is associated.
|
|
279
|
+
* @param inventoryReferenceType The type of the seller's inventory reference ID, which is a listing or group of
|
|
280
|
+
* items.
|
|
281
|
+
* @param listingId Identifier of the eBay listing associated with the ad.
|
|
282
|
+
*/
|
|
283
|
+
findCampaignByAdReference({ inventoryReferenceId, inventoryReferenceType, listingId } = {}) {
|
|
284
|
+
return this.get(`/ad_campaign/find_campaign_by_ad_reference`, {
|
|
285
|
+
params: {
|
|
286
|
+
inventory_reference_id: inventoryReferenceId,
|
|
287
|
+
inventory_reference_type: inventoryReferenceType,
|
|
288
|
+
listing_id: listingId
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* This method retrieves the details of a single campaign, as specified with the campaign_name query parameter.
|
|
294
|
+
*
|
|
295
|
+
* @param campaignName Name of the campaign.
|
|
296
|
+
*/
|
|
297
|
+
getCampaignByName(campaignName) {
|
|
298
|
+
return this.get(`/ad_campaign/get_campaign_by_name`, {
|
|
299
|
+
params: {
|
|
300
|
+
campaign_name: campaignName
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* This method pauses an active (RUNNING) campaign. You can restarted by calling resumeCampaign, as long as the
|
|
306
|
+
* campaign's end date is in the future..
|
|
307
|
+
*
|
|
308
|
+
* @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
|
|
309
|
+
* a seller's campaign IDs by calling getCampaigns.
|
|
310
|
+
*/
|
|
311
|
+
pauseCampaign(campaignId) {
|
|
312
|
+
campaignId = encodeURIComponent(campaignId);
|
|
313
|
+
return this.post(`/ad_campaign/${campaignId}/pause`);
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* This method resumes a paused campaign, as long as it's end date is in the future.
|
|
317
|
+
*
|
|
318
|
+
* @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
|
|
319
|
+
* a seller's campaign IDs by calling getCampaigns.
|
|
320
|
+
*/
|
|
321
|
+
resumeCampaign(campaignId) {
|
|
322
|
+
campaignId = encodeURIComponent(campaignId);
|
|
323
|
+
return this.post(`/ad_campaign/${campaignId}/resume`);
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* This method replaces the name and the start and end dates of a campaign.
|
|
327
|
+
*
|
|
328
|
+
* @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
|
|
329
|
+
* a seller's campaign IDs by calling getCampaigns.
|
|
330
|
+
* @param body This type defines the fields to updated the campaign name and start and end dates.
|
|
331
|
+
*/
|
|
332
|
+
updateCampaignIdentification(campaignId, body) {
|
|
333
|
+
campaignId = encodeURIComponent(campaignId);
|
|
334
|
+
return this.post(`/ad_campaign/${campaignId}/update_campaign_identification`, body);
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* This call downloads the report as specified by the report_id path parameter.
|
|
338
|
+
*
|
|
339
|
+
* @param reportId The unique ID of the Promoted Listings report you want to get. This ID is generated by eBay when
|
|
340
|
+
* you run a report task with a call to createReportTask.
|
|
341
|
+
*/
|
|
342
|
+
getReport(reportId) {
|
|
343
|
+
reportId = encodeURIComponent(reportId);
|
|
344
|
+
return this.get(`/ad_report/${reportId}`);
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* This call retrieves information that details the fields used in each of the Promoted Listings reports.
|
|
348
|
+
*/
|
|
349
|
+
getReportMetadata() {
|
|
350
|
+
return this.get(`/ad_report_metadata`);
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* This call retrieves metadata that details the fields used by the Promoted Listings report type that's specified
|
|
354
|
+
* by the report_type path parameter.
|
|
355
|
+
*
|
|
356
|
+
* @param reportType The name of the report type whose metadata you want to get.
|
|
357
|
+
*/
|
|
358
|
+
getReportMetadataForReportType(reportType) {
|
|
359
|
+
reportType = encodeURIComponent(reportType);
|
|
360
|
+
return this.get(`/ad_report_metadata/${reportType}`);
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* This method returns information on all the existing report tasks related to a seller.
|
|
364
|
+
*
|
|
365
|
+
* @param limit Specifies the maximum number of report tasks to return on a page in the paginated response.
|
|
366
|
+
* Default: 10 Maximum: 500
|
|
367
|
+
* @param offset Specifies the number of report tasks to skip in the result set before returning the first report
|
|
368
|
+
* in the paginated response.
|
|
369
|
+
* @param reportTaskStatuses This parameter filters the returned report tasks by their status. Supply a
|
|
370
|
+
* comma-separated list of the report statuses you want returned.
|
|
371
|
+
*/
|
|
372
|
+
getReportTasks({ limit, offset, reportTaskStatuses } = {}) {
|
|
373
|
+
return this.get(`/ad_report_task`, {
|
|
374
|
+
params: {
|
|
375
|
+
limit,
|
|
376
|
+
offset,
|
|
377
|
+
report_task_statuses: reportTaskStatuses
|
|
378
|
+
}
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* This call returns the details of a specific Promoted Listings report task, as specified by the report_task_id
|
|
383
|
+
* path parameter. T
|
|
384
|
+
*
|
|
385
|
+
* @param reportTaskId A unique eBay-assigned ID for the report task that's generated when the report task is
|
|
386
|
+
* created by a call to createReportTask.
|
|
387
|
+
*/
|
|
388
|
+
getReportTask(reportTaskId) {
|
|
389
|
+
reportTaskId = encodeURIComponent(reportTaskId);
|
|
390
|
+
return this.get(`/ad_report_task/${reportTaskId}`);
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* This method creates a report task, which generates a Promoted Listings report based on the values specified in
|
|
394
|
+
* the call.
|
|
395
|
+
*
|
|
396
|
+
* @param body The container for the fields that define the report task.
|
|
397
|
+
*/
|
|
398
|
+
createReportTask(body) {
|
|
399
|
+
return this.post(`/ad_report_task`, body);
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* This call deletes the report task specified by the report_task_id path parameter.
|
|
403
|
+
*
|
|
404
|
+
* @param reportTaskId A unique eBay-assigned ID for the report task that's generated when the report task is
|
|
405
|
+
* created by a call to createReportTask.
|
|
406
|
+
*/
|
|
407
|
+
deleteReportTask(reportTaskId) {
|
|
408
|
+
reportTaskId = encodeURIComponent(reportTaskId);
|
|
409
|
+
return this.delete(`/ad_report_task/${reportTaskId}`);
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* This method creates an item price markdown promotion (know simply as a "markdown promotion") where a
|
|
413
|
+
* discount amount is applied directly to the items included the promotion.
|
|
414
|
+
*
|
|
415
|
+
* @param body This type defines the fields that describe an item price markdown promotion.
|
|
416
|
+
*/
|
|
417
|
+
createItemPriceMarkdownPromotion(body) {
|
|
418
|
+
return this.post(`/item_price_markdown`, body);
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* This method updates the specified item price markdown promotion with the new configuration that you supply in
|
|
422
|
+
* the payload of the request.
|
|
423
|
+
*
|
|
424
|
+
* @param promotionId The ID of the promotion you want to update.
|
|
425
|
+
* @param body This type defines the fields that describe an item price markdown promotion.
|
|
426
|
+
*/
|
|
427
|
+
updateItemPriceMarkdownPromotion(promotionId, body) {
|
|
428
|
+
promotionId = encodeURIComponent(promotionId);
|
|
429
|
+
return this.put(`/item_price_markdown/${promotionId}`, body);
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* This method deletes the item price markdown promotion specified by the promotion_id path parameter.
|
|
433
|
+
*
|
|
434
|
+
* @param promotionId The ID of the promotion you want to delete.
|
|
435
|
+
*/
|
|
436
|
+
deleteItemPriceMarkdownPromotion(promotionId) {
|
|
437
|
+
promotionId = encodeURIComponent(promotionId);
|
|
438
|
+
return this.delete(`/item_price_markdown/${promotionId}`);
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* This method returns the complete details of the item price markdown promotion that's indicated by the
|
|
442
|
+
* promotion_id path parameter.
|
|
443
|
+
*
|
|
444
|
+
* @param promotionId The ID of the promotion you want to retrieve.
|
|
445
|
+
*/
|
|
446
|
+
getItemPriceMarkdownPromotion(promotionId) {
|
|
447
|
+
promotionId = encodeURIComponent(promotionId);
|
|
448
|
+
return this.get(`/item_price_markdown/${promotionId}`);
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* This method creates an item promotion (known casually as a "threshold promotion") where the buyer
|
|
452
|
+
* receives a discount when they meet the buying criteria that's set for the promotion.
|
|
453
|
+
*
|
|
454
|
+
* @param body This type defines the fields that describe an item promotion.
|
|
455
|
+
*/
|
|
456
|
+
createItemPromotion(body) {
|
|
457
|
+
return this.post(`/item_promotion`, body);
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* This method updates the specified threshold promotion with the new configuration that you supply in the request.
|
|
461
|
+
*
|
|
462
|
+
* @param promotionId The ID of the promotion you want to retrieve. The promotion ID is a unique eBay-assigned
|
|
463
|
+
* value that's generated when the promotion is created.
|
|
464
|
+
* @param body type defines the fields that describe an item promotion.
|
|
465
|
+
*/
|
|
466
|
+
updateItemPromotion(promotionId, body) {
|
|
467
|
+
promotionId = encodeURIComponent(promotionId);
|
|
468
|
+
return this.put(`/item_promotion/${promotionId}`, body);
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* This method deletes the threshold promotion specified by the promotion_id path parameter.
|
|
472
|
+
*
|
|
473
|
+
* @param promotionId The ID of the promotion you want to retrieve. The promotion ID is a unique eBay-assigned
|
|
474
|
+
* value that's generated when the promotion is created.
|
|
475
|
+
*/
|
|
476
|
+
deleteItemPromotion(promotionId) {
|
|
477
|
+
promotionId = encodeURIComponent(promotionId);
|
|
478
|
+
return this.delete(`/item_promotion/${promotionId}`);
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* This method returns the complete details of the threshold promotion specified by the promotion_id path
|
|
482
|
+
* parameter.
|
|
483
|
+
*
|
|
484
|
+
* @param promotionId The ID of the promotion you want to retrieve. The promotion ID is a unique eBay-assigned
|
|
485
|
+
* value that's generated when the promotion is created.
|
|
486
|
+
*/
|
|
487
|
+
getItemPromotion(promotionId) {
|
|
488
|
+
promotionId = encodeURIComponent(promotionId);
|
|
489
|
+
return this.get(`/item_promotion/${promotionId}`);
|
|
490
|
+
}
|
|
491
|
+
/**
|
|
492
|
+
* This method returns the set of listings associated with the promotion_id specified in the path parameter.
|
|
493
|
+
*
|
|
494
|
+
* @param promotionId The ID of the promotion whose associated listings you want to retrieve.
|
|
495
|
+
* @param limit Specifies the maximum number of promotions returned on a page from the result set. Default: 200
|
|
496
|
+
* Maximum: 200
|
|
497
|
+
* @param offset Specifies the number of promotions to skip in the result set before returning the first promotion
|
|
498
|
+
* in the paginated response.
|
|
499
|
+
* @param q Reserved for future use.
|
|
500
|
+
* @param sort Specifies the order in which to sort the associated listings in the response.
|
|
501
|
+
* @param status This query parameter applies only to markdown promotions.
|
|
502
|
+
*/
|
|
503
|
+
getListingSet(promotionId, { limit, offset, q, sort, status } = {}) {
|
|
504
|
+
promotionId = encodeURIComponent(promotionId);
|
|
505
|
+
return this.get(`/promotion/${promotionId}/get_listing_set`, {
|
|
506
|
+
params: {
|
|
507
|
+
limit,
|
|
508
|
+
offset,
|
|
509
|
+
q,
|
|
510
|
+
sort,
|
|
511
|
+
status
|
|
512
|
+
}
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* This method returns a list of a seller's undeleted promotions.
|
|
517
|
+
*
|
|
518
|
+
* @param marketplaceId The eBay marketplace ID of the site where the promotion is hosted.
|
|
519
|
+
* @param limit Specifies the maximum number of promotions returned on a page from the result set. Default: 200
|
|
520
|
+
* Maximum: 200
|
|
521
|
+
* @param offset Specifies the number of promotions to skip in the result set before returning the first promotion
|
|
522
|
+
* in the paginated response.
|
|
523
|
+
* @param promotionStatus Specifies the promotion state by which you want to filter the results.
|
|
524
|
+
* @param promotionType Filters the returned promotions based on the their campaign promotion type.
|
|
525
|
+
* @param q A string consisting of one or more keywords.
|
|
526
|
+
* @param sort Specifies the order for how to sort the response.
|
|
527
|
+
*/
|
|
528
|
+
getPromotions(marketplaceId, { limit, offset, promotionStatus, promotionType, q, sort } = {}) {
|
|
529
|
+
return this.get(`/promotion`, {
|
|
530
|
+
params: {
|
|
531
|
+
marketplace_id: marketplaceId,
|
|
532
|
+
limit,
|
|
533
|
+
offset,
|
|
534
|
+
promotion_status: promotionStatus,
|
|
535
|
+
promotion_type: promotionType,
|
|
536
|
+
q,
|
|
537
|
+
sort
|
|
538
|
+
}
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
/**
|
|
542
|
+
* This method pauses a currently-active (RUNNING) threshold promotion and changes the state of the promotion from
|
|
543
|
+
* RUNNING to PAUSED.
|
|
544
|
+
*
|
|
545
|
+
* @param promotionId Identifier of the promotion you want to pause.
|
|
546
|
+
*/
|
|
547
|
+
pausePromotion(promotionId) {
|
|
548
|
+
const id = encodeURIComponent(promotionId);
|
|
549
|
+
return this.post(`/promotion/${id}/pause`);
|
|
550
|
+
}
|
|
551
|
+
/**
|
|
552
|
+
* This method restarts a threshold promotion that was previously paused and changes the state of the promotion
|
|
553
|
+
* from PAUSED to RUNNING.
|
|
554
|
+
*
|
|
555
|
+
* @param promotionId Identifier of the promotion you want to make active. The ID is a unique eBay-assigned value
|
|
556
|
+
* that's generated when the promotion is created.
|
|
557
|
+
*/
|
|
558
|
+
resumePromotion(promotionId) {
|
|
559
|
+
const id = encodeURIComponent(promotionId);
|
|
560
|
+
return this.post(`/promotion/${id}/resume`);
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* This method generates a report that lists the seller's running, paused, and ended promotions for the specified
|
|
564
|
+
* eBay marketplace.
|
|
565
|
+
*
|
|
566
|
+
* @param marketplaceId The eBay marketplace ID of the siteId for which you want the promotions report.
|
|
567
|
+
* @param limit Specifies the maximum number of promotions returned on a page from the result set. Default: 200
|
|
568
|
+
* Maximum: 200
|
|
569
|
+
* @param offset Specifies the number of promotions to skip in the result set before returning the first promotion
|
|
570
|
+
* in the paginated response.
|
|
571
|
+
* @param promotionStatus Limits the results to the promotions that are in the state specified by this query
|
|
572
|
+
* parameter.
|
|
573
|
+
* @param promotionType Filters the returned promotions in the report based on the their campaign promotion type.
|
|
574
|
+
* @param q A string consisting of one or more keywords. eBay filters the response by returning only the promotions
|
|
575
|
+
* that contain the supplied keywords in the promotion title.
|
|
576
|
+
*/
|
|
577
|
+
getPromotionReports(marketplaceId, { limit, offset, promotionStatus, promotionType, q } = {}) {
|
|
578
|
+
return this.get(`/promotion_report`, {
|
|
579
|
+
params: {
|
|
580
|
+
marketplace_id: marketplaceId,
|
|
581
|
+
limit,
|
|
582
|
+
offset,
|
|
583
|
+
promotion_status: promotionStatus,
|
|
584
|
+
promotion_type: promotionType,
|
|
585
|
+
q
|
|
586
|
+
}
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* This method generates a report that summarizes the seller's promotions for the specified eBay marketplace.
|
|
591
|
+
*
|
|
592
|
+
* @param marketplaceId The eBay marketplace ID of the siteId you for which you want a promotion summary report.
|
|
593
|
+
*/
|
|
594
|
+
getPromotionSummaryReport(marketplaceId) {
|
|
595
|
+
return this.get(`/promotion_summary_report`, {
|
|
596
|
+
params: {
|
|
597
|
+
marketplace_id: marketplaceId
|
|
598
|
+
}
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
Marketing.id = 'Marketing';
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import Restful from '../../index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The Metadata API has operations that retrieve configuration details pertaining to the different eBay marketplaces.
|
|
4
|
+
*/
|
|
5
|
+
export default class Metadata extends Restful {
|
|
6
|
+
static id: string;
|
|
7
|
+
get basePath(): string;
|
|
8
|
+
/**
|
|
9
|
+
* This method retrieves all the sales tax jurisdictions for the country that you specify in the countryCode path
|
|
10
|
+
* parameter.
|
|
11
|
+
*
|
|
12
|
+
* @param countryCode This path parameter specifies the two-letter ISO 3166-1 Alpha-2 country code for the country
|
|
13
|
+
* whose jurisdictions you want to retrieve.
|
|
14
|
+
*/
|
|
15
|
+
getSalesTaxJurisdictions(countryCode: string): Promise<any>;
|
|
16
|
+
/**
|
|
17
|
+
* This method returns the eBay policies that define how to list automotive-parts-compatibility items in the
|
|
18
|
+
* categories of a specific marketplace.
|
|
19
|
+
*
|
|
20
|
+
* @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
|
|
21
|
+
* retrieved.
|
|
22
|
+
* @param filter This query parameter limits the response by returning eBay policy information for only the leaf
|
|
23
|
+
* categories specified by this parameter.
|
|
24
|
+
*/
|
|
25
|
+
getAutomotivePartsCompatibilityPolicies(marketplaceId: string, filter?: string): Promise<any>;
|
|
26
|
+
/**
|
|
27
|
+
* This method returns the eBay policies that define how to specify item conditions in the categories of a specific
|
|
28
|
+
* marketplace.
|
|
29
|
+
*
|
|
30
|
+
* @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
|
|
31
|
+
* retrieved.
|
|
32
|
+
* @param filter This query parameter limits the response by returning eBay policy information for only the leaf
|
|
33
|
+
* categories specified by this parameter.
|
|
34
|
+
*/
|
|
35
|
+
getItemConditionPolicies(marketplaceId: string, filter?: string): Promise<any>;
|
|
36
|
+
/**
|
|
37
|
+
* This method returns the eBay policies that define the allowed listing structures for the categories of a
|
|
38
|
+
* specific marketplace.
|
|
39
|
+
*
|
|
40
|
+
* @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
|
|
41
|
+
* retrieved.
|
|
42
|
+
* @param filter This query parameter limits the response by returning eBay policy information for only the leaf
|
|
43
|
+
* categories specified by this parameter.
|
|
44
|
+
*/
|
|
45
|
+
getListingStructurePolicies(marketplaceId: string, filter?: string): Promise<any>;
|
|
46
|
+
/**
|
|
47
|
+
* This method returns the eBay policies that define the supported negotiated price features (like "best
|
|
48
|
+
* offer") for the categories of a specific marketplace.
|
|
49
|
+
*
|
|
50
|
+
* @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
|
|
51
|
+
* retrieved.
|
|
52
|
+
* @param filter This query parameter limits the response by returning eBay policy information for only the leaf
|
|
53
|
+
* categories specified by this parameter.
|
|
54
|
+
*/
|
|
55
|
+
getNegotiatedPricePolicies(marketplaceId: string, filter?: string): Promise<any>;
|
|
56
|
+
/**
|
|
57
|
+
* This method retrieves a list of leaf categories for a marketplace and identifies the categories that require
|
|
58
|
+
* items to have an eBay product ID value in order to be listed in those categories.
|
|
59
|
+
*
|
|
60
|
+
* @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
|
|
61
|
+
* retrieved.
|
|
62
|
+
* @param filter This query parameter limits the response by returning eBay policy information for only the leaf
|
|
63
|
+
* categories specified by this parameter.
|
|
64
|
+
*/
|
|
65
|
+
getProductAdoptionPolicies(marketplaceId: string, filter?: string): Promise<any>;
|
|
66
|
+
/**
|
|
67
|
+
* This method returns the eBay policies that define whether or not you must include a return policy for the
|
|
68
|
+
* items you list in the categories of a specific marketplace, plus the guidelines for creating domestic and
|
|
69
|
+
* international return policies in the different eBay categories.
|
|
70
|
+
*
|
|
71
|
+
* @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
|
|
72
|
+
* retrieved.
|
|
73
|
+
* @param filter This query parameter limits the response by returning eBay policy information for only the leaf
|
|
74
|
+
* categories specified by this parameter.
|
|
75
|
+
*/
|
|
76
|
+
getReturnPolicies(marketplaceId: string, filter?: string): Promise<any>;
|
|
77
|
+
}
|