Last modified by admin on 2023/02/14 14:43

<
From version < 54.1 >
edited by Shop Team
on 2019/08/01 14:57
To version < 59.1 >
edited by Shop Team
on 2023/02/13 22:55
>
Change comment: Renamed from xwiki:API.Spreadshirt Public Shop API Documentation

Summary

Details

Page properties
Content
... ... @@ -3,17 +3,25 @@
3 3  Spreadshirt provides several ways to offer an online shop experience to your customers and earn money through commission:
4 4  
5 5  1. The standalone Spreadshop ([[this>>url:https://shop.spreadshirt.com/SpreadShop||rel="nofollow" shape="rect" class="external-link"]], for example). This application is officially developed, hosted and maintained by Spreadshirt. Running a Spreadshop requires zero technical skills and is always the recommended approach.
6 -1. JavaScript integration (described [[here>>url:https://help.spreadshirt.com/hc/en-us/articles/207487815-Website-Integration-with-JavaScript||rel="nofollow" shape="rect" class="external-link"]]). If you have an existing website, you can embed a piece of JavaScript into it that manipulates your website in order to embed the Spreadshop into your site. This requires a decent understanding of HTML and CSS in order to resolve any conflicts between your site and the Spreadshop that may arise.
6 +1. JavaScript integration (described [[here>>url:https://help.spreadshop.com/hc/en-us/articles/360010529039-Website-Integration-with-JavaScript||shape="rect"]]). If you have an existing website, you can embed a piece of JavaScript into it that manipulates your website in order to embed the Spreadshop into your site. This requires a decent understanding of HTML and CSS in order to resolve any conflicts between your site and the Spreadshop that may arise.
7 7  1. CMS plugins for [[WordPress>>url:https://wordpress.org/plugins/spreadshop/#developers||rel="nofollow" shape="rect" class="external-link"]] and others (currently just [[Joomla>>url:https://extensions.joomla.org/extension/spreadshop/||rel="nofollow" shape="rect" class="external-link"]]) that embed the JavaScript snippet mentioned in (2.) for you. If you run a website based on such CMS, these plugins can make your life a bit easier. An understanding of HTML and CSS is nonetheless important.
8 8  1. An independent, custom built web application based on the **Public Shop API** described in this document. This interface is for web developers only (or people who can afford to hire one). Going for this approach is only feasible for people who have a solid understanding of server side & client side programming, HTTP, HTML and CSS.
9 9  
10 10  = Prerequisites =
11 11  
12 -Spreadshirt runs a European and a North American platform that are independent from another. First, you need to register a Spreadshop on [[eu>>url:https://www.spreadshirt.net/start-selling-C5780||shape="rect"]] or [[na>>url:https://www.spreadshirt.com/start-selling-shirts-C3598||shape="rect"]]. Then, in order to use the API, you need to register an API Key on [[eu>>url:https://www.spreadshirt.net/userarea/-C7120||shape="rect"]] or [[na>>url:https://www.spreadshirt.com/userarea/-C6840||shape="rect"]].
12 +Spreadshirt runs a European and a North American platform that are independent from another. You need to:
13 13  
14 +* Choose a platform
15 +* Register a Spreadshop:
16 +** Europe: [[here>>url:https://www.spreadshirt.net/start-selling-C5780||shape="rect"]]
17 +** North America: [[here>>url:https://www.spreadshirt.com/start-selling-shirts-C3598||shape="rect"]]
18 +* Visit this partner area page of the appropriate platform to retrieve your API Key:
19 +** Europe: [[here>>url:https://partner.spreadshirt.net/apiKey||shape="rect"]]
20 +** North America: [[here>>url:https://partner.spreadshirt.com/apiKey||shape="rect"]]
21 +
14 14  = Basics =
15 15  
16 -* The API described here is loosely based on [[REST>>url:https://en.wikipedia.org/wiki/Representational_state_transfer||shape="rect"]] principles. This means among other things that all endpoints can be accessed via HTTPS and http clients like [[curl>>url:https://curl.haxx.se/||shape="rect"]] or [[postman>>url:https://www.getpostman.com/||shape="rect"]] can be used directly to explore the API.
24 +* The API described here is loosely based on [[REST>>url:https://en.wikipedia.org/wiki/Representational_state_transfer||shape="rect"]] principles. This means among other things that all endpoints can be accessed via HTTPS and HTTP clients like [[curl>>url:https://curl.haxx.se/||shape="rect"]] or [[postman>>url:https://www.getpostman.com/||shape="rect"]] can be used directly to explore the API.
17 17  * The base url for all requests is [[https:~~/~~/api.spreadshirt.net>>url:https://api.spreadshirt.net||shape="rect"]] for eu or [[https:~~/~~/api.spreadshirt.com>>url:https://api.spreadshirt.com||shape="rect"]] for na. (This only applies to REST resources, images are retrieved from [[https:~~/~~/image.spreadshirtmedia.net>>url:https://image.spreadshirtmedia.net||shape="rect"]] or [[https:~~/~~/image.spreadshirtmedia.com>>url:https://image.spreadshirtmedia.com||shape="rect"]].)
18 18  * (((
19 19  (% class="auto-cursor-target" %)
... ... @@ -42,10 +42,10 @@
42 42  )))
43 43  
44 44  (% class="auto-cursor-target" %)
45 -Failing to provide this information may result in your requests getting blocked at any point in time because traffic of unknown source can be considered illegetimate.
53 +Failing to provide this information may result in your requests getting blocked at any point in time because traffic of unknown source can be considered illegitimate.
46 46  )))
47 47  * All requests should be performed with a ?mediaType=json query parameter to get the responses in the recommended JSON format. Leaving the parameter out may or may not result in a response in XML format which is harder to work with.
48 -* All REST ressources return HTTP status code 200 or 201 in case of successful requests. Status codes from the 4xx range indicate a mistake on your side while errors from the 5xx range indicate an error on ours.
56 +* All REST resources return HTTP status code 200 or 201 in case of successful requests. Status codes from the 4xx range indicate a mistake on your side while errors from the 5xx range indicate an error on ours.
49 49  * Timestamps are returned in ISO8601 format.
50 50  
51 51  = Next Steps =
... ... @@ -52,10 +52,6 @@
52 52  
53 53  There is a [[tutorial>>doc:Build your own shop system]] available showing the use of this API in order to **implement an own shop system**.
54 54  
55 -Another [[tutorial>>doc:Migration Tutorial]] explains how to adjust your existing implementation to the upcoming **partner area migration**.
56 -
57 -\\
58 -
59 59  = [[doc:Legal Information]] =
60 60  
61 61  (% class="auto-cursor-target" %)
api-parts.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.XWikiGuest
Size
... ... @@ -1,0 +1,1 @@
1 +17.4 KB
Content
Confluence.Code.ConfluencePageClass[0]
id
... ... @@ -1,1 +1,1 @@
1 -28278907
1 +819217
url
... ... @@ -1,1 +1,1 @@
1 -https://developer.spreadshirt.net/wiki/spaces/API/pages/28278907/Spreadshirt Public Shop API Documentation
1 +https://developer.spreadshirt.net/wiki/spaces/API/pages/819217/Spreadshirt Public Shop API Documentation