Changes for page Spreadshirt Public Shop API Documentation
Last modified by admin on 2023/02/14 14:43
Summary
-
Page properties (3 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 - Spreadshirt Public Shop API Documentation1 +Home - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki.s hop1 +XWiki.mbs - Content
-
... ... @@ -1,69 +1,12 @@ 1 - =Preface=1 +Spreadshirt is your place to create and buy customized apparel, such as T-shirts, cups or stickers. In order to allow developers to make use of this functionality in their own applications, we now provide a new Spreadshirt API. The Spreadshirt API provides access to a set of Spreadshirt's platform functionality, such as product creation, design upload or basket creation, and allows you to start building your own shops, mass-customization applications and integrations on top of our platform. 2 2 3 - Spreadshirt providesseveralwayso offeran onlineshop experiencetoyourcustomersandearn money throughcommission:3 +To get started in using the Spreadshirt API: 4 4 5 - 1.The standalone Spreadshop ([[this>>url:https://shop.spreadshirt.com/SpreadShop||rel="nofollow" shape="rect" class="external-link"]],forexample).Thisapplicationisofficiallydeveloped,hosted and maintained by Spreadshirt. RunningaSpreadshoprequireszero technical skills andislwaysthe recommended approach.6 - 1.JavaScriptintegration(described[[here>>url:https://help.spreadshop.com/hc/en-us/articles/360010529039-Website-Integration-with-JavaScript||shape="rect"]]).If youhave an existing website, youcanembed a piece of JavaScript intoit that manipulates yourwebsitein orderto embedthe Spreadshopinto your site.Thisquiresaecent understanding of HTML and CSS in orderto resolve any conflicts between your siteand the Spreadshop that may arise.7 - 1.CMS plugins for[[WordPress>>url:https://wordpress.org/plugins/spreadshop/#developers||rel="nofollow"shape="rect" class="external-link"]]andothers(currentlyjust [[Joomla>>url:https://extensions.joomla.org/extension/spreadshop/||rel="nofollow"shape="rect"class="external-link"]])thatmbedtheJavaScriptsnippetmentionedin(2.) for you. If youruna website basedonsuch CMS, these pluginscan makeyourlifeabit easier.Anunderstandingof HTML andCSSisnonethelessimportant.8 - 1.An independent,custom builtwebapplicationbased onthe **Public ShopAPI** described inthis document. Thisinterface is forwebdevelopersonly (orpeoplewhocan affordto hireone). Goingforthisapproachis only feasiblefor people whohave a solidunderstandingofserverside& client sideprogramming, HTTP, HTML and CSS.5 +* [[Browse our API documentation>>API:API]] to become familiar with our API, i.e. REST API urls and representations and status codes. 6 +* Conduct API calls using your [[Web browser>>http://api.spreadshirt.net/api/v1/shops/205909]] or our [[API browser>>http://demoapp.spreadshirt.net/apibrowser/]]. 7 +* [[Register for an API key>>mailto:developer@spreadshirt.net]] with your Spreadshirt user id in case you need access to special features, such as product creation, design upload or basket creation. [[Register for a Spreadshirt shop>>http://www.spreadshirt.net/open-t-shirt-shop-C5781]], in case you don't have one yet. 8 +* [[Checkout the applications section>>API:Applications]] to get sample code, find out what other people did with our API and get some fresh ideas. 9 9 10 - =Prerequisites=10 +To stay up to date on API changes and development news follow the [[Spreadshirt developer blog>>http://blog.spreadshirt.net/developer/]]. 11 11 12 -Spreadshirt runs a European and a North American platform that are independent from another. You need to: 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 -* Log into the partner area using exactly one of the following links: 19 -** Europe: [[here>>url:https://partner.spreadshirt.net||shape="rect"]] 20 -** North America: [[here>>url:https://partner.spreadshirt.com||shape="rect"]] 21 -* In the same browser session, visit one of the following pages to retrieve your API Key. This will only work if you are already logged in as described above. 22 -** Europe: [[here>>url:https://www.spreadshirt.net/userarea/-C7120||shape="rect"]] 23 -** North America: [[here>>url:https://www.spreadshirt.com/userarea/-C6840||shape="rect"]] 24 - 25 -= Basics = 26 - 27 -* 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. 28 -* 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"]].) 29 -* ((( 30 -(% class="auto-cursor-target" %) 31 -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: 32 - 33 -|=((( 34 -Header Key 35 -)))|=((( 36 -Header Value Format 37 -)))|=((( 38 -Example Header Value 39 -))) 40 -|((( 41 -Authorization 42 -)))|((( 43 -SprdAuth apiKey="<apikey>" 44 -)))|((( 45 -SprdAuth apiKey="dd30b4db-8cd6-4fb8-86b3-e680984b9e18" 46 -))) 47 -|((( 48 -User-Agent 49 -)))|((( 50 -<YourApplication>/<YourApplicationVersion> ([[https:~~/~~/www.yourdomain.com>>url:https://www.yourdomain.com/||shape="rect"]]; [[yourname@yourdomain.com>>mailto:yourname@yourdomain.com||shape="rect"]]) 51 -)))|((( 52 -WordPress-Plugin/1.0 ([[https:~~/~~/www.deinblog.com>>url:https://www.deinblog.com/||shape="rect"]]; [[admin@deinblog.com>>mailto:admin@deinblog.com||shape="rect"]]) 53 -))) 54 - 55 -(% class="auto-cursor-target" %) 56 -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. 57 -))) 58 -* 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. 59 -* 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. 60 -* Timestamps are returned in ISO8601 format. 61 - 62 -= Next Steps = 63 - 64 -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**. 65 - 66 -= [[doc:Legal Information]] = 67 - 68 -(% class="auto-cursor-target" %) 69 -\\ 12 +Please note that **Spreadshirt API is alpha right now**. So offered URLs, representations and status codes might change until the official release.
- Confluence.Code.ConfluencePageClass[0]
-
- id
-
... ... @@ -1,1 +1,1 @@ 1 - 562300201 +3047455 - url
-
... ... @@ -1,1 +1,1 @@ 1 -https://developer.spreadshirt.net/wiki/spaces/API/pages/ 56230020/Spreadshirt Public Shop API Documentation1 +https://developer.spreadshirt.net/wiki/spaces/API/pages/3047455/Home