[Python] Calling VerifyAddFixedPriceItem python Ebay sdk

Discussão em 'Python' iniciado por Stack, Janeiro 23, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to call the VerifyAddItem endpoint with the following XML:

    <?xml version='1.0' encoding='utf-8'?>
    <VerifyAddFixedPriceItemRequest xmlns="urn:eb*y:apis:eBLBaseComponents"><RequesterCredentials><eBayAuthToken>v^1.1#i^1#r^1#I^3#p^3#f^0#t^Ul4xMF84Ojg0NUNBQzJCAAAAAABBBBBBBBBBBCCCCCFAKE=</eBayAuthToken>
    </RequesterCredentials>
    <Item>
    <ConditionID>1500</ConditionID>
    <Country>US</Country>
    <Currency>USD</Currency>
    <Description>Genuine leather jacket in excellent condition</Description><DispatchTimeMax>3</DispatchTimeMax>
    <ItemSpecifics>
    <NameValueList><Name>Brand</Name><Value>Custom</Value></NameValueList>
    <NameValueList><Name>Size (Men's)</Name><Value>L</Value></NameValueList>
    <NameValueList><Name>Color</Name><Value>Yellow</Value></NameValueList>
    <NameValueList><Name>Style</Name><Value>Basic Coat</Value></NameValueList><NameValueList><Name>Type</Name><Value>Leather Jacket</Value></NameValueList><NameValueList><Name>Material</Name><Value>Leather</Value></NameValueList><NameValueList><Name>Pattern</Name><Value>Solid</Value></NameValueList>
    <NameValueList><Name>Department</Name><Value>Men</Value></NameValueList></ItemSpecifics>
    <ListingDuration>Days_7</ListingDuration>
    <ListingType>FixedPriceItem</ListingType>
    <Location>San Jose, CA</Location>
    <PictureDetails>
    <PictureURL>http://www.mensworld.com.bd/wp-content/uploads/2023/09/FSF-1166.jpg</PictureURL>
    </PictureDetails>
    <PostalCode>95125</PostalCode>
    <PrimaryCategory><CategoryID>57988</CategoryID></PrimaryCategory>
    <Quantity>1</Quantity>
    <ReturnPolicy><RefundOption>MoneyBack</RefundOption><ReturnsAcceptedOption>ReturnsAccepted</ReturnsAcceptedOption><ReturnsWithinOption>Days_30</ReturnsWithinOption><ShippingCostPaidByOption>Buyer</ShippingCostPaidByOption></ReturnPolicy><ShippingDetails><ShippingServiceOptions><ShippingService>USPSPriority</ShippingService><ShippingServiceCost><currencyID>USD</currencyID>
    <value>0.00</value>
    </ShippingServiceCost><ShippingServicePriority>1</ShippingServicePriority></ShippingServiceOptions><ShippingType>Flat</ShippingType></ShippingDetails><Site>US</Site><StartPrice><currencyID>USD</currencyID><value>99.00</value></StartPrice><Title>Yellow Leather Jacket</Title>
    </Item>
    </VerifyAddFixedPriceItemRequest>



    I get the following error:

    VerifyAddItem: Class: RequestError, Severity: Error, Code: 20170, Schema XML request error. Schema XML request error: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize..


    When I change the PictureURL (remove the https://) ) to:

    <PictureURL>www.mensworld.com.bd/wp-content/uploads/2023/09/FSF-1166.jpg</PictureURL>


    I get the following error:

    VerifyAddFixedPriceItem: Class: RequestError, Severity: Error, Code: 37, Input data is invalid. Input data for tag <Item.PictureDetails.PictureURL> is invalid or missing. Please check API documentation.


    Anyway to figure out how to correct the XML ?

    Continue reading...

Compartilhe esta Página