====== API Methods ====== ===== Documented methods ===== ^Method name^Method Summary^ |[[accept_tnc]]|Accept the Spreadshirt Terms and Conditions. This is required to checkout.| |[[add_basketitem]]|Adds an article to the user's shopping basket | |[[get_article]]|Returns 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_articles]]|The 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_basket]]|Returns a list of all the articles in the shopping basket and also a breakdown of shipping costs, taxes etc. | |[[get_designs]]|Returns 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_producttypes]]|Returns a list of product types which are products before a design is applied. :!: Currently always returns information in German| |[[get_producttype_categories]]|Returns a list of categories of products available in your shop e.g. men's t-shirts, women's longsleeves, mouse mats. | |[[get_tnc]]|Get's the up-to-date Spreadshirt Terms and Conditions | |[[initialize_session]]|Generates a session token to track users' sessions. This is alway the first method you will call. | |[[redeem_coupon]]|Allows users to redeem a coupon to save money on checkout. :!: This is not implemented according to the official spec. | |[[update_basketitem]]|Updates the size, color or quantity properties of individual basket items.| |[[update_session]]|Updates 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 name^Method Summary^ |[[get_shop]]|:!: Doesn't seem to be implemented.| |[[get_shops]]|Given 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_count]]|Simply returns a count of the articles available as filtered by three optional parameters. Using no filters will count everything in the shop. | |[[get_article_list]]|Returns a list of ''article_id''s. 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.|