Friday, 25 March 2022

Api ebaysdk trading error 2191930 while uploading an item

I've been having trouble with eBay's API for days when it comes to trading. I would like to upload a sample item (extracted from the timotheus trading module) to the Sandbox but my little program reports the following error:

ebaysdk.exception.ConnectionError: 'AddItem: Class: RequestError, Severity: Error, Code: 21919303, The item specific Book Title\xa0is missing. The item specific Book Title\xa0is missing.\xa0Add Book Title to this listing, enter a valid value, and then try again., Class: RequestError, Severity: Error, Code: 21919303, The item specific Author\xa0is missing. The item specific Author\xa0is missing.\xa0Add Author to this listing, enter a valid value, and then try again., Class: RequestError, Severity: Error, Code: 21919303, The item specific Language\xa0is missing. The item specific Language\xa0is missing.\xa0Add Language to this listing, enter a valid value, and then try again.'

The code executed is the following:

from ebaysdk.trading import Connection

if __name__ == '__main__':
    api = Connection(config_file="ebay.yaml", domain="api.sandbox.ebay.com", debug=True)
    request = {
        "Item": {
            "Title": "Harry Potter and the Philosopher's Stone",
            "Description": "This is the first book in the Harry Potter series. In excellent condition!",
            "PrimaryCategory": {"CategoryID": "377"},
            "StartPrice": "10.0",
            "BuyItNowPrice": "15.0",
            "CategoryMappingAllowed": "true",
            "Country": "US",
            "ConditionID": "3000",
            "Currency": "USD",
            "DispatchTimeMax": "3",
            "ListingDuration": "Days_7",
            "ListingType": "Chinese",
            "PaymentMethods": "PayPal",
            "PayPalEmailAddress": "tkeefdddder@gmail.com",
            "PictureDetails": {"PictureURL": "http://i1.sandbox.ebayimg.com/03/i/00/30/07/20_1.JPG?set_id=8800005007"},
            "PostalCode": "95125",
            "Quantity": "1",
            "ReturnPolicy": {
                "ReturnsAcceptedOption": "ReturnsAccepted",
                "RefundOption": "MoneyBack",
                "ReturnsWithinOption": "Days_30",
                "Description": "If you are not satisfied, return the book for refund.",
                "ShippingCostPaidByOption": "Buyer"
            },
            "SellerProfiles": {
                "SellerPaymentProfile": {
                    "PaymentProfileName": "PayPal:Immediate pay",
                },
                "SellerReturnProfile": {
                    "ReturnProfileName": "30 Day Return Policy",
                },
                "SellerShippingProfile": {
                    "ShippingProfileName": "USPS First Class, Priority, Priority Express Flat Rate Envelope",
                }
            },
            "ShippingDetails": {
                "ShippingType": "Calculated",
                "ShippingServiceOptions": {
                    "ShippingServicePriority": "1",
                    "ShippingService": "USPSMedia"
                },
                "CalculatedShippingRate": {
                    "OriginatingPostalCode": "95125",
                    "PackagingHandlingCosts": "0.0",
                    "ShippingPackage": "PackageThickEnvelope",
                    "WeightMajor": "1",
                    "WeightMinor": "0"
                }
            },
            "Site": "US"
        }
    }

    api.execute("AddItem", request)

I tried to heuristically add the features reported by the error but with little success.

My goal is to create in the future an application that allows the automatic loading of items on eBay, since I have many second-hand items to sell with almost identical characteristics. I hope to succeed despite the bad/poor eBay api python sdk documentation.

Thanks in advance.



from Api ebaysdk trading error 2191930 while uploading an item

No comments:

Post a Comment