cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

UploadDocument resta API

Hello when I upload a documenti with the uploadDocument rest API I get the error "bad request".

What is the correct payload for the call:

I am using python requests:

 

            url = f"https://api.ebay.com/commerce/media/v1_beta/document/{document_id}/upload"
            headers = {
                "Authorization": f"Bearer {token}",
                "Content-Type": "multipart/form-data"
            }
            # Carica il file
            with open(file_path, "rb") as file:
                response = requests.post(url, headers=headers, data=file)

 

I tried with CURL and it works?

 

What is wrong?

Message 1 of 1
latest reply
0 REPLIES 0