Search code examples
pythonxmlyahooyahoo-api

Yahoo! Merchant Checkout API Problems


I'm attempting to integrate with Yahoo!'s Checkout API for an existing Merchant account in a Django-based web app. I've already successfully been able to integrate their Catalog API, but for some reason I simply cannot get the Checkout API to work. I've crafted an XML request based on the example in their documentation, but it always simply returns a 10009 Auth Required error. I've confirmed that my partner account does, indeed have the correct authorization, and I just can't figure out why I would be getting this error. I don't believe that it's a malformed request, as I get the exact same result when I copy and paste their example request (changing the API token and such, obviously).

This is what my request looks like (with the store ID and token sanitized):

<ystorews:ystorewsRequest xmlns:ystorews="urn:yahoo:sbs:ystorews">
  <Version>1.0</Version>
  <StoreID>{storeid}</StoreID>
  <SecurityHeader>
        <PartnerStoreContractToken>{token}</PartnerStoreContractToken>
  </SecurityHeader>
  <Verb>create</Verb>
  <ResourceList>
    <CheckoutBasket>
      <ShoppingCart>
        <Item>
          <ID>foo</ID>
          <Quantity>5</Quantity>
        </Item>
      </ShoppingCart>
    </CheckoutBasket>
  </ResourceList>
</ystorews:ystorewsRequest>

And this is the response that I get back:

<?xml version="1.0" encoding="utf-8"?>
<ystorewsResponse>
<ErrorMessages>
<Error>
<Code> 10009 </Code>
<Message> Auth Required </Message>
</Error>
</ErrorMessages>
</ystorewsResponse>

And this is what my Partner API Access looks like: Yahoo! Partner API Access


Solution

  • Turns out that there were internal problems at Yahoo! that were preventing this from working. After I contacted their small business support team they were able to fix the problem and my code suddenly started working.

    In case anyone else encounters similar problems, I found that the best way to get ahold of them was through their Twitter account: @YSmallBizCare.