Gets an article object from your shop
get_article ( String token, int article_id )
| Type | Parameter Name | Parameter Description |
|---|---|---|
| string | token | session token |
| int | shop_id | spreadshirt shop ID |
This table doesn't convey very well that producttype_sizes has sub elements.
The return value is a complex response_object that contains the following:
| Type | Return Value Name | Return Value Description |
|---|---|---|
| int | article_id | article ID |
| int | product_id | product ID |
| int | producttype_id | product type ID |
| int | producttype_color_id | colour ID |
| array | producttype_sizes | array of size objects representing the available sizes |
| producttype_sizes array elements | ||
| Type | producttype_sizes element name | producttype element discription |
| int | producttype_size_id | producttype size ID |
| int | weight | order weight |
| string | name | size name |
| Type | Return Value Name | Return Value Description |
| int | partner_id | partner ID |
| int | shop_id | shop ID |
| int | weight | order weight |
| decimal | currency | article currency |
| decimal | gross | article price |
| decimal | vat | article vat |
| string | name | article name |
| string | description | article description |
| string | image_url | article default image URL |
| string | base_url | base URL to article image. |
| int | view_count | Shows how many printable sides the article has (i.e. Two for back/front). Necessary to append to the base_url. |
| array | design_ids | array of design_id's representing the applied designs |
| boolean | stockout | If this is set, the article is out of stock (not available) |
| boolean | limited | Boolean value. If true, the article is limited to a specific amount. |
| int | limited_available | If limited is true, this parameter shows, how many articles are left |
The methods get_article and get_articles return a parameter called base_url, for example http://www.spreadshirt.net/image.php?type=image&product_id=2008898 You have to append serveral parameters to retrieve the desired article image.
The base_urls appear to be invalid now. but you can attach the img_size url parameter to the image_url url and get the same picure. I haven't tested adding an img_id parameter yet.
| Parameter | Possible Values |
|---|---|
| img_id | Depends on view_count. Most products have two printable sides, so use 1 for front view and 2 for back view. |
| size | small = 42×42 px medium = 130×130 big = 190×190 px huge = 280×280 px |
For example: http://www.spreadshirt.net/image.php?type=image&product_id=2008898&img_id=1&size=big
The return string is a standard format error string and implements all standard error and success messages. The following SOAP exceptions represent specific error codes for this method: