Skip to content

Commit b6bd854

Browse files
add function to send feeds to multiple marketplaces
1 parent 54be037 commit b6bd854

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

Source/FikaAmazonAPI/Services/FeedService.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,17 @@ public CreateFeedDocumentResult CreateFeedDocument(ContentType contentType)
127127
/// <param name="feedType"></param>
128128
/// <returns></returns>
129129
public string SubmitFeed(string xml, FeedType feedType, FeedOptions feedOptions = null)
130+
{
131+
return SubmitFeed(xml, feedType, new List<string> { MarketPlace.ID }, feedOptions);
132+
}
133+
134+
/// <summary>
135+
/// read full step https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/feeds-api-use-case-guide/feeds-api-use-case-guide_2021-06-30.md
136+
/// </summary>
137+
/// <param name="xml"></param>
138+
/// <param name="feedType"></param>
139+
/// <returns></returns>
140+
public string SubmitFeed(string xml, FeedType feedType, List<string> marketPlaceIds, FeedOptions feedOptions = null)
130141
{
131142

132143
//FIrst Step get doc
@@ -139,7 +150,7 @@ public string SubmitFeed(string xml, FeedType feedType, FeedOptions feedOptions
139150
{
140151
FeedType = feedType.ToString(),
141152
InputFeedDocumentId = feedCreate.FeedDocumentId,
142-
MarketplaceIds = new List<string> { MarketPlace.ID },
153+
MarketplaceIds = marketPlaceIds,
143154
FeedOptions = feedOptions
144155
};
145156

@@ -148,6 +159,8 @@ public string SubmitFeed(string xml, FeedType feedType, FeedOptions feedOptions
148159

149160
return feed.FeedId;
150161
}
162+
163+
151164
private static Stream GetStreamFromUrl(string url)
152165
{
153166
byte[] imageData = null;

0 commit comments

Comments
 (0)