Changes for page Spreadshirt Public Shop API Documentation
Last modified by admin on 2023/02/14 14:43
Change comment:
add cache macro
Summary
-
Page properties (4 modified, 0 added, 0 removed)
-
Attachments (0 modified, 1 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 - Home1 +Spreadshirt Public Shop API Documentation - Parent
-
... ... @@ -1,0 +1,1 @@ 1 +API.WebHome - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki.m bs1 +XWiki.admin - Content
-
... ... @@ -1,39 +1,67 @@ 1 -The API space keeps you up to date on Spreadshirt API developments. It provides documentation, tutorials and examples for working with our Spreadshirt API. 1 +{{cache timeToLive="2592000"}} 2 += Preface = 2 2 3 -Please read [[API Explained>>API:API Explained]] first to understand what features the API will provide to you and thus what you can do with our API in the future. 4 -To get a grip on the actual business of printing designs and text on apparel and the data models you need to exchange with our API read the [[API Models Explained section>>API Models Explained]]. 5 -To learn about the basics for using our API, such as used HTTP methods, used HTTP status codes and used query/header parameters read the [[API Basics section>>API Basics]]. 6 -To understand which resources are provided by the REST interface and how you can use them read the [[API Resources section>>API Resources]]. 4 +Spreadshirt provides several ways to offer an online shop experience to your customers and earn money through commission: 7 7 8 -{{section}} 6 +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. 7 +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. 8 +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. 9 +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 - {column:width=60%}11 += Prerequisites = 11 11 12 - {recently-updated}13 +Spreadshirt runs a European and a North American platform that are independent from another. You need to: 13 13 15 +* Choose a platform 16 +* Register a Spreadshop: 17 +** Europe: [[here>>url:https://www.spreadshirt.net/start-selling-C5780||shape="rect"]] 18 +** North America: [[here>>url:https://www.spreadshirt.com/start-selling-shirts-C3598||shape="rect"]] 19 +* Visit this partner area page of the appropriate platform to retrieve your API Key: 20 +** Europe: [[here>>url:https://partner.spreadshirt.net/apiKey||shape="rect"]] 21 +** North America: [[here>>url:https://partner.spreadshirt.com/apiKey||shape="rect"]] 14 14 23 += Basics = 15 15 16 -{column} 25 +* 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. 26 +* 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"]].) 27 +* ((( 28 +(% class="auto-cursor-target" %) 29 +All requests have to be made with HTTP headers "Authorization" and "User-Agent". The authorization header must include your API key and the user agent header must include the name of your application, then its version, followed by a domain and a contact email address: 17 17 31 +|=((( 32 +Header Key 33 +)))|=((( 34 +Header Value Format 35 +)))|=((( 36 +Example Header Value 37 +))) 38 +|((( 39 +Authorization 40 +)))|((( 41 +SprdAuth apiKey="<apikey>" 42 +)))|((( 43 +SprdAuth apiKey="dd30b4db-8cd6-4fb8-86b3-e680984b9e18" 44 +))) 45 +|((( 46 +User-Agent 47 +)))|((( 48 +<YourApplication>/<YourApplicationVersion> ([[https:~~/~~/www.yourdomain.com>>url:https://www.yourdomain.com/||shape="rect"]]; [[yourname@yourdomain.com>>mailto:yourname@yourdomain.com||shape="rect"]]) 49 +)))|((( 50 +WordPress-Plugin/1.0 ([[https:~~/~~/www.deinblog.com>>url:https://www.deinblog.com/||shape="rect"]]; [[admin@deinblog.com>>mailto:admin@deinblog.com||shape="rect"]]) 51 +))) 18 18 19 -{column:width=5%} 53 +(% class="auto-cursor-target" %) 54 +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. 55 +))) 56 +* 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. 57 +* 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. 58 +* Timestamps are returned in ISO8601 format. 20 20 21 - {column}60 += Next Steps = 22 22 62 +There is a [[tutorial>>doc:API.Spreadshirt Public Shop API Documentation.API Tutorials.Build your own shop system.WebHome]] available showing the use of this API in order to **implement an own shop system**. 23 23 24 - {column:width=35%}64 += [[doc:API.Spreadshirt Public Shop API Documentation.Legal Information.WebHome]] = 25 25 26 -Navigate space 27 -{pagetreesearch} 28 - 29 - 30 -{pagetree} 31 - 32 - 33 - 34 -{column} 35 - 36 - 37 - 38 - 39 -{{/section}} 66 +(% class="auto-cursor-target" %) 67 +{{/cache}}
- 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 -1 7694761 +819217 - url
-
... ... @@ -1,1 +1,1 @@ 1 -https://developer.spreadshirt.net/wiki/spaces/API/pages/1 769476/Home1 +https://developer.spreadshirt.net/wiki/spaces/API/pages/819217/Spreadshirt Public Shop API Documentation