GET api/getWorth

Updated on 2012-08-15

Retrieves the worth of each item in the list.

Resource URL

http://www.worthmonkey.com/api/getWorth?v=2&key={API_KEY}&items={items}

Parameters

v required : integer

The version of the API (Current version is 2)

key required : string

Your API key issued by WorthMonkey

multiplier optional : float
A float that will be applied to all pricing returned
For example
  • "0.8" will multiply all prices by 80% of their original price: $500 *.8 = $400
  • "2" will multiply all prices by 200% of their original price: $500 * 2 = $1000
images optional : boolean

A boolean that when set to true will return a best match image URL

items required : string
A clean, comma separated list of items. Each item should be cleaned of all non-alphanumeric characters to ensure best match with the search engine. UPCs are not used.
For example
  • To search for a Canon T1i body, simply add the terms "Canon T1i body" to the item list

Response

The response may consist of the following fields:
result required : boolean

Whether the request was successful

data optional : array of objects
For each item passed to the API, a corresponding result is given as an object. If the search was successful, the object will contain a valid worth object. If it was unsuccessful, the object will contain an error attribute of "2" and error_txt constant of "NOT FOUND"
Each object may contain the following attributes
search_term required : string

The cleaned product name

worth required : object
An key/value store containing the item worth based on condition as the key. If condition data is not available, this field is set to the constant "NOT AVAILABLE"
Valid condition keys
  • broken
  • good
  • likenew
  • refurbished
  • new
image_url required : string

A best match image URL of the product

error required : integer

The error code associated to a failed lookup

error_txt required : string

The error text associated to a failed lookup

error_code optional : integer

The error code associated to a failed call

error_txt optional : string

The error text associated to a failed lookup

Example Requests

Example #1
To obtain the worth of a Canon T1i, an Ipod Nano 16GB, and a iPad 2 Wifi

GET: (Click here to see live response)

http://worthmonkey.com/api/getWorth?
v=2
&key={API_KEY}
&images=1
&items=Canon%20T1i,iPod%20Nano%2016GB,iPad%202%20Wifi

Example #2
In this example, a lookup on the 3rd product failed.

GET: (Click here to see live response)

http://worthmonkey.com/api/getWorth?
v=2
&key={API_KEY}
&items=Canon%20T1i,iPod%20Nano%2016GB,Random%20product

Example #3
To obtain the worth of a Canon T1i, an Ipod Nano 16GB, and a iPad 2 Wifi

GET: (Click here to see live response)

http://worthmonkey.com/api/getWorth?
v=2
&key=INVALID
&items=Canon%20T1i,iPod%20Nano%2016GB,Random%20product