Skip to content

create feed document #864

Answered by esbezr
esbezr asked this question in Q&A
Dec 29, 2022 · 2 comments · 7 replies
Discussion options

You must be logged in to vote

Solution:

import os
from sp_api.api import Feeds
from sp_api.base import Marketplaces
from io import BytesIO
import sys

feed = BytesIO()
file = str.encode("myfile.txt")
feed.write(file)
feed.seek(0)

res = Feeds(marketplace = Marketplaces.US).create_feed_document(file = feed, content_type = "text/html; charset=utf-8")
FDI = res.payload['feedDocumentId']
cre = Feeds(marketplace = Marketplaces.US).create_feed('POST_FLAT_FILE_INVLOADER_DATA', FDI)

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
6 replies
@nordinho
Comment options

@esbezr
Comment options

@nordinho
Comment options

@esbezr
Comment options

@GRBurst
Comment options

Comment options

You must be logged in to vote
1 reply
@GRBurst
Comment options

Answer selected by esbezr
# for free to join this conversation on GitHub. Already have an account? # to comment
Category
Q&A
Labels
None yet
4 participants