API Methods

Documented methods

Method nameMethod Summary
accept_tncAccept the Spreadshirt Terms and Conditions. This is required to checkout.
add_basketitemAdds an article to the user's shopping basket
get_articleReturns details about a given article when given an article_id. Can also take a session token as a parameter but it's not required.
get_articlesThe same as get_article except it returns an array of articles. The articles can be filtered, through it's 6 extra input parameters such as producttype_id and design_id, to allow you to return a subset of your articles.
get_basketReturns a list of all the articles in the shopping basket and also a breakdown of shipping costs, taxes etc.
get_designsReturns a list of designs with links to their images. It has 4 extra parameters to help narrow the search e.g. producttype_id and search_phrase
get_producttypesReturns a list of product types which are products before a design is applied. :!: Currently always returns information in German
get_producttype_categoriesReturns a list of categories of products available in your shop e.g. men's t-shirts, women's longsleeves, mouse mats.
get_tncGet's the up-to-date Spreadshirt Terms and Conditions
initialize_sessionGenerates a session token to track users' sessions. This is alway the first method you will call.
redeem_couponAllows users to redeem a coupon to save money on checkout. :!: This is not implemented according to the official spec.
update_basketitemUpdates the size, color or quantity properties of individual basket items.
update_sessionUpdates locale (i.e. country) and language session properties. This is for localization, currency (and calculating shipping costs?)

Undocumented methods

There's a lot of placeholder text in the undocumented methods simply copied and pasted from one of the above methods. This was done for formatting purposes and needs to be removed from these and replaced with the real details.

Method nameMethod Summary
get_shop:!: Doesn't seem to be implemented.
get_shopsGiven two shop_ids this method returns the shop's url, locale, language settings and an image url to each shop's first product. Given the right input it might return more shops? Only useful if you have more than one shop.
get_articles_countSimply returns a count of the articles available as filtered by three optional parameters. Using no filters will count everything in the shop.
get_article_listReturns a list of article_ids. Only shop_id is required. There are 4 optional filter parameters. I have noticed some strange behaviour from this method which will have to be checked out.
partner_login:?: This can't be used and/or figured out until I find out what the crypt property should be set to.
add_address:?: Obviously for collecting addresses but it's unclear how it should be used.
user_login:?: This can't be used and/or figured out until I find out what the crypt property should be set to.
set_image_parameters:!: Can't get this to work.