- Which APIs exist right now? Is there a difference between European and North American market?
- Do I need an API key to work on the API?
- How can I get an API key?
- Does my API key work on eu, na or both platforms?
- How can I browse the API efficiently? I am tired of copy and pasting URLs.
- How do I earn money, selling articles and custom created products via my custom client application using the API?
- Why does article/design search not work for my shop?
- How can I search on the Spreadshirt marketplaces?
- How can I switch the marketplace language?
- How can I check, whether my design/article is indexed on the marketplace for a specific language?
- How can I upload designs to Spreadshirt from my custom application?
- How can I create new products at Spreadshirt out of my custom application?
- 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 some reason the Spreadshirt API won't process my basket/product/design XML data and returns a HTTP status code 400. What's wrong?
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.spreadshirt.net
and for the North American market
- api.spreadshirt.com and
- image.spreadshirt.com.
Do I need an API key to work on the API?
No. You can access most of the shop resources, such as shop designs, articles and categories without any security restrictions. This makes playing around with the API and finding out whether this is what you need as simple as possible for you. However, in case you want to write real applications, such as your own shop, mass-customization applications or integration, you will need an API key!
How can I get an API key?
To get an API key and a secret contact us at developer(at)spreadshirt(dot)net. Please provide your Spreadshirt user id and tell us on which platform you want to work (eu or na).
Does my API key work on eu, na or both platforms?
Your API key works by default on the platform you told us you want to work on - that is in general either eu or na. However, in case you need it, we can configure the key, such that you can use it on both platforms.
How can I browse the API efficiently? I am tired of copy and pasting URLs.
Use the API browser to browse the API conveniently. The API browser not only allows you to conduct HTTP GET requests on API URLs but also to conduct POST, PUT and DELETE requests. It also provides a set of request templates that make your live easier.
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.
Why does article/design search not work for my shop?
Search is right now only implemented for the Spreadshirt marketplace. For each platform, i.e. eu and na, we operate one marketplace right now. You can reach the marketplaces for eu and na platform on shop ids 205909 (eu) and 93439 (na).
How can I search on the Spreadshirt marketplaces?
For each platform, i.e. eu and na, we operate one marketplace right now. You can reach the marketplaces for eu and na platform on shop ids 205909 (eu) and 93439 (na). You can search on articles and designs on each marketplace. Sample urls are:
- http://api.spreadshirt.net/api/v1/shops/205909/designs?query=herz
- http://api.spreadshirt.net/api/v1/shops/205909/articles?query=herz
How can I switch the marketplace language?
For each platform, i.e. eu and na, we operate one marketplace right now. You can reach the marketplaces for eu and na platform on shop ids 205909 (eu) and 93439 (na).
Each marketplace is also available in different languages. The marketplace eu is for example available in german, english or french. You can switch the language by providing the locale parameter in your URLs. Sample urls are:
- http://api.spreadshirt.net/api/v1/shops/205909/designs?query=heart&locale=en_GB
- http://api.spreadshirt.net/api/v1/shops/205909/articles?query=heart&locale=en_GB
How can I check, whether my design/article is indexed on the marketplace for a specific language?
For each marketplace article/design, we index the Spreadshirt article/design id. Therefore, you can check easily whether your marketplace design/article is indexed by searching for the id. Sample URL is:
http://api.spreadshirt.net/api/v1/shops/205909/designs?query=2484607&locale=de_DE
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: http://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>