亚马逊广告API v2 createCampaigns失败

时间:2019-06-10 04:03:08

标签: c# amazon-advertising-api

使用Amazon广告API CreateCampaigns时出错:{“代码”:“ 422”,“详细信息”:“服务器理解了您的请求,但无法处理一个或多个参数。”,“ requestId”:“ KJPAT6WACV2V4GVXV0A0 “}

List<Model.CreatePortfoliosRequestModel> createPortfoliosRequestModels = new List<Model.CreatePortfoliosRequestModel>();
for (int i = 0; i < 10; i++)
{
    Model.CreatePortfoliosRequestModel createPortfoliosRequestModel = new Model.CreatePortfoliosRequestModel();
    createPortfoliosRequestModel.Name = $"My Portfolio One15{i}1s1asdsfd";
    createPortfoliosRequestModel.State = Enum.StateEnum.Enabled;
    createPortfoliosRequestModel.Budget = new Model.BudgetModel() { Amount = 102 + i, StartDate = DateTime.Now.AddDays(10 + i), EndDate = DateTime.Now.AddDays(100 + i), Policy = "dateRange" };
    createPortfoliosRequestModels.Add(createPortfoliosRequestModel);
}
var createPortfoliosResponseModels = portfolioService.CreatePortfoliosAsync(createPortfoliosRequestModels).Result;
  

{“代码”:“ 422”,“详细信息”:“服务器理解了您的请求,但   无法处理一个或多个   参数。“,” requestId“:” KJPAT6WACV2V4GVXV0A0“}

0 个答案:

没有答案