This ToldYa API method allows you to retrieve the list of items you have for sale.
Request Method | API Endpoint URL |
---|---|
GET | http://toldya.com/api/ |
Parameter | Data Type | Length | Notes |
---|---|---|---|
action | string | view_items | |
api_key | string | Your API key |
Parameter | Data Type | Length | Notes |
---|---|---|---|
item_type_id | number | 1 | Filter the results to a particular item type: 1 = return new or used products only 2 = return personal or professional services only 3 = return tickets to an event only |
title | string | max 50 | Search for items matching all or part of the value you provide. For example title=sh would return items with a title of 'Mens Large Shirt' or 'Make a Wish' |
category | string | max 50 | Return only those items whose category matches all or part of the value you provide. |
min_price | number | min value .01 | Return only items whose price is greater than or equal to the amount you specify. |
max_price | number | max value $9999.99 | Return only items whose price is less than or equal to the amount you specify. |
order_by | string | Comma-separated list of columns you want to sort by. If not specified the API will return records sorted by id
(i.e oldest items first). If you specify more than one column to sort by, the results will be grouped by the first column,
then by the second, etc. You can order_by any of the following columns: qty_available, created, length, width, height,
title, price, category, product_condition, start_time, end_time, item_type_id. You can also specify the direction of the sorting by passing ASC or DESC as in the following example which returns the highest priced item first: order_by=price%20DESC |
|
is_sold_out | boolean | Return only those items that are currently sold out (i.e. whose qty_available = 0) |
Return the only new or used products whose minimum price is $100.00:
http://toldya.com/api/?api_key=xxx&action=view_items&item_type_id=1&min_price=100
Return only sold-out items, newest first:
http://toldya.com/api/?api_key=xxx&action=view_items&is_sold_out=1&order_by=created%20DESC
The following shows example XML returned by the API for this method. In this example, 2 items are returned.
<toldyaapiresponse> <url>https://www.toldya.com/api/?api_key=xxx&action=view_items</url> <status>SUCCESS</status> <message/> <total_items>2</total_items> <items> <result> <id>1984</id> <start_string/> <end_string/> <qty_available>2</qty_available> <weight>1.00</weight> <length>8.00</length> <width>8.00</width> <height>8.00</height> <title>Classic 100% Cotton Black Fedora Hat</title> <description>Classic 100% Cotton Black Fedora Hat- Chic &amp; sheen looking, this fedora has a sleek feel to it. Ideal for him or her, made from 100% Cotton. Completely classy &amp; a wardrobe must have!</description> <price>7.23</price> <url/> <category>apparel</category> <product_condition>Used - Mint</product_condition> <condition_comment>worn only once</condition_comment> <url_image1>http://www.toldya.com/resources/images/_products/21fHWj22zLL.jpg</url_image1> <url_image2/> <url_image3/> <url_image4/> <item_type_id>1</item_type_id> <service_duration_hours/> <service_vendor_name/> <service_location/> </result> <result> <id>1985</id> <start_string/> <end_string/> <qty_available>8</qty_available> <weight>0.65</weight> <length>12.90</length> <width>10.60</width> <height>1.30</height> <title>Quiksilver Young Men's Snit Longsleeve Knit,Black,Large</title> <description>Wear the Quiksilver Snit Crew Long-Sleeve Shirt when the wind changes direction and your bare arms no longer provide you the warmth necessary to survive. It doesnt take a rocket scientist to figure out that this cotton-poly sweater shirt adds warmth to your ways. Product Features - Material: 60% Cotton, 40% polyester - Pockets: None - Recommended Use: Streetwear - Manufacturer Warranty: 30 Days</description> <price>29.00</price> <url/> <category>apparel</category> <product_condition>New</product_condition> <condition_comment/> <url_image1>http://www.toldya.com/resources/images/_products/41D12jaSbLL.jpg</url_image1> <url_image2/> <url_image3/> <url_image4/> <item_type_id>1</item_type_id> <service_duration_hours/> <service_vendor_name/> <service_location/> </result> </items> </toldyaapiresponse>
back to top |