/// <summary> /// Retrieve suggested keyword data for the specified adGroupId /// </summary> /// <param name="adGroupId">The ID of the requested ad group</param> /// <param name="maxNumSuggestions">Maximum number of returned suggested keywords. Default is 100, /// maximum is 1000</param> /// <param name="adStateFilter">Ad state filter (values are comma separated), to filter out the Ads to get /// suggested keywords for their ASINs.Valid values are enabled, paused, /// and archived. Default values are enabled and paused</param> /// <returns></returns> public AdGroupSuggestedKeywordsResponse GetAdGroupSuggestedKeywords( string adGroupId, string maxNumSuggestions = null, string adStateFilter = null) { var query = new List <string>(); if (!string.IsNullOrWhiteSpace(maxNumSuggestions)) { query.Add($"maxNumSuggestions={maxNumSuggestions}"); } if (!string.IsNullOrWhiteSpace(adStateFilter)) { query.Add($"adStateFilter={adStateFilter}"); } var url = $"{APIEndpoint.GetUrl(Marketplace)}/{ApiVersion}/adGroups/{adGroupId}/suggested/keywords?{string.Join("&", query)}"; return(this.HttpRequest <AdGroupSuggestedKeywordsResponse>(url)); }
/// <summary> /// Retrieve bid recommendation data for the specified keyword ID. /// </summary> /// <param name="keywordId">The ID of the requested keyword</param> /// <returns></returns> public KeywordBidRecommendationsResponse GetKeywordBidRecommendations(string keywordId) { var url = $"{APIEndpoint.GetUrl(this.Marketplace)}/{this.ApiVersion}/keywords/{keywordId}/bidRecommendations"; return(this.HttpRequest <KeywordBidRecommendationsResponse>(url)); }
/// <summary> /// Retrieve bid recommendation data for the specified ad group Id. /// </summary> /// <param name="adGroupId">The ID of the requested ad group</param> /// <returns></returns> public AdGroupBidRecommendationsResponse GetAdGroupBidRecommendations(string adGroupId) { var url = $"{APIEndpoint.GetUrl(this.Marketplace)}/{this.ApiVersion}/adGroups/{adGroupId}/bidRecommendations"; return(this.HttpRequest <AdGroupBidRecommendationsResponse>(url)); }
/// <summary> /// Request a snapshot report for all entities of a single type /// </summary> /// <param name="recordType">The type of entity for which the snapshot should be generated. This /// must be one of: campaigns , adGroups , keywords , negativeKeywords , campaignNegativeKeywords , /// or productAds</param> /// <param name="parameter"></param> /// <returns></returns> public SnapshotResponse RequestSnapshot(string recordType, RequestSnaphotParameter parameter) { var url = $"{APIEndpoint.GetUrl(this.Marketplace)}/{this.ApiVersion}/{recordType}/snapshot"; return(this.HttpRequest <SnapshotResponse>(url, JsonConvert.SerializeObject(parameter), "POST")); }
/// <summary> /// Provides suggested keywords for specified ASIN. Suggested keywords are ordered by most effective to least effective. /// </summary> /// <param name="asinValue">ASIN</param> /// <param name="maxNumSuggestions">Maximum number of returned suggested keywords. Default is 100, maximum is 1000</param> /// <returns></returns> public BulkGetAsinSuggestedKeywordsResponse GetAsinSuggestedKeywords(string asinValue, int maxNumSuggestions = 100) { var url = $"{APIEndpoint.GetUrl(Marketplace)}/{ApiVersion}/asins/{asinValue}/suggested/keywords?maxNumSuggestions={maxNumSuggestions}"; return(this.HttpRequest <BulkGetAsinSuggestedKeywordsResponse>(url)); }
/// <summary> /// Sets the product ad status to archived. /// </summary> /// <param name="adId">The ID of the product ad to be archived.</param> /// <returns></returns> public AdResponse ArchiveProductAd(string adId) { var url = $"{APIEndpoint.GetUrl(this.Marketplace)}/{this.ApiVersion}/productAds/{adId}"; return(this.HttpRequest <AdResponse>(url, method: "DELETE")); }
/// <summary> /// Creates one or more campaign negative keywords. /// Successfully created keywords will be assigned unique keywordIds /// </summary> /// <param name="keywords">A list of up to 1000 campaign negative keywords to be created. /// Required fields for keyword creation are: campaignId , keywordText , /// matchType , and state</param> /// <returns></returns> public List <CampaignNegativeKeywordResponse> CreateCampaignNegativeKeywords(List <CampaignNegativeKeywordInfo> keywords) { var url = $"{APIEndpoint.GetUrl(this.Marketplace)}/{this.ApiVersion}/campaignNegativeKeywords"; return(this.HttpRequest <List <CampaignNegativeKeywordResponse> >(url, JsonConvert.SerializeObject(keywords), "POST")); }
/// <summary> /// Sets the campaign status to archived. /// </summary> /// <param name="campaignId"></param> public CampaignResponse ArchiveCampaign(string campaignId) { var url = $"{APIEndpoint.GetUrl(this.Marketplace)}/{this.ApiVersion}/campaigns/{campaignId}"; return(this.HttpRequest <CampaignResponse>(url, method: "DELETE")); }
/// <summary> /// Sets the ad group status to archived. /// </summary> /// <param name="adGroupId">The ID of the ad group to be archived.</param> /// <returns></returns> public AdGroupResponse ArchiveAdGroup(string adGroupId) { var url = $"{APIEndpoint.GetUrl(this.Marketplace)}/{this.ApiVersion}/ adGroups/{adGroupId}"; return(this.HttpRequest <AdGroupResponse>(url, method: "DELETE")); }
/// <summary> /// Creates one or more ad groups. Successfully created ad groups will be assigned unique adGroupIds. /// </summary> /// <param name="adGroups">A list of up to 100 ad groups to be created. Required fields for ad group creation /// are: campaignId , name , state , and defaultBid</param> /// <returns></returns> public List <AdGroupResponse> CreateAdGroups(List <AdGroupInfo> adGroups) { var url = $"{APIEndpoint.GetUrl(this.Marketplace)}/{this.ApiVersion}/adGroups"; return(this.HttpRequest <List <AdGroupResponse> >(url, JsonConvert.SerializeObject(adGroups), "POST")); }
/// <summary> /// Retrieves an ad group and its extended fields by ID. /// </summary> /// <param name="adGroupId"></param> /// <returns></returns> public AdGroupExInfo GetAdGroupEx(string adGroupId) { var url = $"{APIEndpoint.GetUrl(this.Marketplace)}/{this.ApiVersion}/adGroups/extended/{adGroupId}"; return(this.HttpRequest <AdGroupExInfo>(url)); }
/// <summary> /// Retrieves a negative keyword by ID. /// </summary> /// <param name="keywordId">The ID of the requested keyword</param> /// <returns></returns> public NegativeKeywordInfo GetNegativeKeyword(string keywordId) { var url = $"{APIEndpoint.GetUrl(this.Marketplace)}/{this.ApiVersion}/negativeKeywords/{keywordId}"; return(this.HttpRequest <NegativeKeywordInfo>(url)); }
/// <summary> /// Retrieve a previously requested report /// </summary> /// <param name="reportId">The ID of the requested report</param> /// <returns></returns> public RequestReportResponse GetReport(string reportId) { var url = $"{APIEndpoint.GetUrl(this.Marketplace)}/{this.ApiVersion}/reports/{reportId}"; return(this.HttpRequest <RequestReportResponse>(url)); }
public ProfileInfo GetProfile(string profileId) { var url = $"{APIEndpoint.GetUrl(this.Marketplace)}/{this.ApiVersion}/profiles/{profileId}"; return(this.HttpRequest <ProfileInfo>(url)); }
public IEnumerable <ProfileInfo> GetProfiles() { var url = $"{APIEndpoint.GetUrl(this.Marketplace)}/{this.ApiVersion}/profiles"; return(this.HttpRequest <IEnumerable <ProfileInfo> >(url)); }
/// <summary> /// Retrieve keyword bid recommendation data for one or more keywords. /// </summary> /// <param name="datas"></param> /// <returns></returns> public List <BidRecommendationsResponse> GetKeywordBidRecommendations(List <KeywordBidRecommendationsData> datas) { var url = $"{APIEndpoint.GetUrl(this.Marketplace)}/{this.ApiVersion}/keywords/bidRecommendations"; return(this.HttpRequest <List <BidRecommendationsResponse> >(url, JsonConvert.SerializeObject(datas), "POST")); }
/// <summary> /// Retrieves a campaign and its extended fields by ID. /// </summary> /// <param name="campaignId"></param> /// <returns></returns> public CampaignExInfo GetCampaignEx(string campaignId) { var url = $"{APIEndpoint.GetUrl(this.Marketplace)}/{this.ApiVersion}/campaigns/extended/{campaignId}"; return(this.HttpRequest <CampaignExInfo>(url)); }
/// <summary> /// Retrieves a keyword and its extended fields by ID /// </summary> /// <param name="keywordId">The ID of the requested keyword</param> /// <returns></returns> public KeywordExInfo GetBiddableKeywordEx(string keywordId) { var url = $"{APIEndpoint.GetUrl(this.Marketplace)}/{this.ApiVersion}/keywords/extended/{keywordId}"; return(this.HttpRequest <KeywordExInfo>(url)); }
/// <summary> /// Retrieves a campaign negative keyword and its extended fields by ID. /// </summary> /// <param name="keywordId">The ID of the requested keyword</param> /// <returns></returns> public CampaignNegativeKeywordExInfo GetCampaignNegativeKeywordEx(string keywordId) { var url = $"{APIEndpoint.GetUrl(this.Marketplace)}/{this.ApiVersion}/campaignNegativeKeywords/extended/{keywordId}"; return(this.HttpRequest <CampaignNegativeKeywordExInfo>(url)); }
/// <summary> /// Sets the keyword status to archived. /// </summary> /// <param name="keywordId">The ID of the keyword to be archived.</param> /// <returns></returns> public KeywordResponse ArchiveBiddableKeyword(string keywordId) { var url = $"{APIEndpoint.GetUrl(this.Marketplace)}/{this.ApiVersion}/keywords/{keywordId}"; return(this.HttpRequest <KeywordResponse>(url, method: "DELETE")); }
/// <summary> /// Sets the campaign negative keyword status to deleted. /// </summary> /// <remarks> /// While ad group level keywords (both biddable and negative) support paused and archived status, campaign negative /// keywords only support enabled or deleted status.Deleted status indicates permanent removal of the campaign negative /// keyword.Retrieving a deleted entity by ID will result in a 404 error. /// </remarks> /// <param name="keywordId">The ID of the keyword to be deleted</param> /// <returns></returns> public CampaignNegativeKeywordResponse RemoveCampaignNegativeKeyword(string keywordId) { var url = $"{APIEndpoint.GetUrl(this.Marketplace)}/{this.ApiVersion}/campaignNegativeKeywords/{keywordId}"; return(this.HttpRequest <CampaignNegativeKeywordResponse>(url, method: "DELETE")); }
/// <summary> /// Retrieves a product ad and its extended fields by ID. /// </summary> /// <param name="adId">The ID the reuqested product ad</param> /// <returns></returns> public ProductAdExInfo GetProductAdEx(string adId) { var url = $"{APIEndpoint.GetUrl(this.Marketplace)}/{this.ApiVersion}/productAds/extended/{adId}"; return(this.HttpRequest <ProductAdExInfo>(url)); }