Page tree
Skip to end of metadata
Go to start of metadata

Which APIs exist right now? Is there a difference between European and North American market?

Right now, the API consists of a data and an image API as described in API explained. We serve the European market (aka eu platform) with *.spreadshirt.net and the North American market (aka na platform) with *.spreadshirt.com domain.

So use for the European market

  • api.spreadshirt.net and
  • image.spreadshirtmedia.net

and for the North American market

  • api.spreadshirt.com and
  • image.spreadshirtmedia.com.

Do I need an API key to work on the API?

Yes. 

How can I get an API key?

You can register for an API key with your Spreadshirt user:

Does my API key work on eu, na or both platforms?

Your API key works by default on the one platform only you registered for.

How do I earn money, selling articles and custom created products via my custom client application using the API?

Using Spreadshirt, you have three options to earn money selling articles and custom created products via your custom client application:

  • Create article with commission

You can create an article with a commission and allow customers to order it via your client. In this case it does not matter whether you use shop or marketplace checkout.

  • Create design with commission and allow customers to create products with it

You can create a design with a commision and allow customers to create and buy products with it. In this case, it also does not matter whether you use shop or marketplace checkout.

  • Create product and order via your shop

You can create products via your application and use your shop's checkout. I guess you will get about 20% commission for each sold product automatically. You need to use the shop checkout in this case.

How can I upload designs to Spreadshirt from my custom application?

Spreadshirt API v1 provides resources that allow you to create new designs on our data API and upload pixel designs using our image API. The design upload tutorial explains how it works.

How can I create new products at Spreadshirt out of my custom application?

Spreadshirt API v1 provides resources that allow to create new products (customer products) on our data API. The product creation tutorial explains how it works.

I have created a product, a basket and a basket item for that product in my custom application. Which URL do I need to call to forward my customer from my application to the Spreadshirt marketplace or shop checkout?

For more details on how to work with the basket API read the article about the basket model. To retrieve the checkout URL for either the marketplace or the shop checkout, you need in general to call a URL similar to the following one: https://api.spreadshirt.net/api/v1/shops/205909/baskets/123/checkout. This is also described in detail in on the basket resources page.

For some reason the Spreadshirt API won't process my basket/product/design XML data and returns a HTTP status code 400. What's wrong?

HTTP status code 400 means in HTTP protocol "bad request". In case that happens to you, make sure your XML data meets the following rules:

  • Default namespace is always http://api.spreadshirt.net no matter whether you work on api.spreadshirt.net or api.spreadshirt.com
  • In case you send links in your payload in xlink:href attributes, you need to define the xlink namespace with the URI http://www.w3.org/1999/xlink.

Example:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<design xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://api.spreadshirt.net">
<name>Super cool design</name>
<description>A super cool design</description>
</design>

 

 

  • No labels