Interact with the Rapaport prices using JSON

Introduction
Using JSON you can retrieve the Rapaport price sheets, price changes and specific prices. Each request and response will have two sections: The 'header' and 'body'. The header section will contain meta data, such as your username and password in the requestThe response will contain a result code of the operation. All available methods have the same header parameters. The body section contains the parameters and data that are sent and retrieved. The parameters differ per request and response.

General usage information
  • Authentication - each request should have a username and password in the header section
  • All requests should go to a URL starting with HTTPS, because you pass user credentials
  • All data should be send using POST
  • Send request as Content-Type: application/x-www-form-urlencoded
  • URL-Encode the request.
  • Optional values can be omitted or left blank.
  • the response will always contain an 'error_code' field. Value 0 means the operation succeeded.


Available functions
  • Get price sheet - retrieve all Rapaport prices in one go

  • Get price - retrieve Rapaport price for a specific quality diamond

  • Get price changes- get all price changes

  • Get price sheet info- get number price changes


Available values and formats
username - string
password - string
shape - string - "round", "pear" or ""
size - decimal - e.g. 2.10
color - string - "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N".
clarity - string - "IF", "VVS1", "VVS2", "VS1", "VS2", "SI1", "SI2", "SI3", "I1", "I2", "I3"
dates will be in YYYY-MM-DD format

Get Price - sample request
{
"request": {
"header": {
"username": "awesome",
"password": "jsonrocks"

},
"body":{
"shape": "round",
"size": 2.10,
"color": "E",
"clarity": "VS2"
}
}
}


Get Price - sample response
{
"response": {
"header": {
"error_code": 0,
"error_message": ""

},
"body": {
"shape": "round",
"low_size": 2.00,
"high_size": 2.99,
"color": "E",
"clarity": "VS2",
"caratprice": 17000,
"date": "2010-12-31"
}
}
}


Get Price Sheet - sample request
{
"request": {
"header": {
"username": "awesome",
"password": "jsonrocks"

},
"body": {
"shape": "round"
}
}
}


Get Price Sheet - sample response
{
"response": {
"header": {
"error_code": 0,
"error_message": ""

},
"body": {
"price": [
{
"shape": "round",
"low_size": 0.01,
"high_size": 0.03,
"color": "D",
"clarity": "IF",
"caratprice": 860,
"date": "2010-12-31"
} ,
.
.
.
{
"shape": "round",
"low_size": 10.00,
"high_size": 10.99,
"color": "M",
"clarity": "I3",
"caratprice": 2000,
"date": "2010-12-31"
}
]
}
}
}


Get Price Changes - sample request
{
"request": {
"header": {
"username": "awesome",
"password": "jsonrocks"

},
"body": {
"shape": "pear"
}
}
}


Get Price Changes - sample response
{
"response": {
"header": {
"error_code": 0,
"error_message": ""

},
"body": {
"pricechange": [
{
"shape": "pear",
"low_size": 0.01,
"high_size": 0.03,
"color": "D",
"clarity": "IF",
"caratprice": 860,
"date": "2010-12-31",
"old_caratprice": 850,
"old_date": "2010-12-24"
} ,
.
.
.
{
"shape": "pear",
"low_size": 10.00,
"high_size": 10.99,
"color": "M",
"clarity": "I3",
"caratprice": 2000,
"date": "2010-12-31",
"old_caratprice": 2100,
"old_date": "2010-12-24"
}
]
}
}
}


Error Format
{
"response": {
"header": {
"error_code": error_code,
"error_message": "error_message"

},
"body": {
}
}
}


Get Price Sheet Info - sample request
{
"request": {
"header": {
"username": "awesome",
"password": "jsonrocks"

},
"body": {

}
}
}


Get Price Sheet Info - sample response
{
"response": {
"header": {
"error_code": 0,
"error_message": ""

},
"body": {
"last_price_publication_date": "2014-06-26",
"total_price_changes": 4,
"round_price_changes": 2,
"pear_price_changes": 2
}
}


Error Format
{
"response": {
"header": {
"error_code": error_code,
"error_message": "error_message"

},
"body": {
}
}
}


Code Sample