Products created with API don't appear in shop

Hello,

I’m trying to use the spreadshirt API, and I followed pretty much exaclty this guide. You can find my python script here. Each request gives OK [200] or CREATED [201]. I’ve filled out api_key, etc correctly.

Some possible error sources I’m not sure about:

  • my api key isn’t configured for creating (but I haven’t found any option to configure api keys)
  • you have to set the design to visible or something
  • you need to configure the shop somehow

Some other questions:

  • Can you use already uploaded designs in products created by the api? If yes, how?
  • Where can you find the design ids of already uploaded designs?

You’ve run into two separate issues here. For once to publish a product to a shop you also need to create an article. Secondly you are a user of the partner area and the APIs for publishing products via these systems is not public (yet).

Sorry that I could not help you with that :frowning:

If your account is created before October 2016, it might work by authenticating first and sending auth-headers and user-agent like I did here: Spreadshirt API login & fetch designs working code - Pastebin.com (Python)

Btw. I’d propose you to send the designs to /user/designs instead of /shop like here: <?php$session = "XXXXX"; // replace with a valid session$apiKey = "XXXXX" - Pastebin.com (PHP). Be careful, this sample is missing the login-auth (username, password, sessionId), so you might combine login authenication of the python with the endpoints and xmls of the PHP script.

Well, if you’ve got a new account (created after October 2016, you’re working with partner.spreadshirt.xxx partnerarea), then it’s not possible yet, like @sprd-yves said. The new API-Endpoints aren’t available for us yet :frowning:.

Oh, thanks for the explanation.

I don’t know if you can edit the documentation fir the API, but if a mod reads this, maybe (s)he can add a warning above every article, that tells new users that the API won’t with the partner area. I wasted 2 full days trying to get this to work.