logo mazzal.net
selling diamonds made easy

Shop Window API v3.0

Introduction:
Our API for ShopWindow can give you diamond listings for your website. You can use this to create your own search engine and online diamond search on your website. Easy to understand JSON requests and responses will allow you to fully integrate your website with ours.

Before you start:
Before you start you must select which diamonds you are interested in. Set up your diamond feed here. You can choose specific criteria, such as which grading labs, shapes and other qualities to include. You can also define markups for the commission you want.

Available functions:
To search diamonds:
https://www.mazzal.net/shopwindowapi3/getdiamonds

To get full diamond details:
https://www.mazzal.net/shopwindowapi3/getdiamond

Basic request format:
{
  "header":{
    "username":"mylogin",
    "password":"mypassword"
  },
  "body":{
    "shapes":["Round"],
    "weight_from":0.6,
    "weight_to":0.9,
    "colors":["E","F"]
  }
}
Basic response format:
{
  "header": {
    "response_code": 0,
    "response_description": ""
  },
  "body": {
    "total_results_available": 1932,
    "results_included": 14,
    "diamonds": []
  }
}


Reference - input parameters
header - all web services (mandatory):
username
string
"myusername"
password
string
"mypassword"
body - web service: getdiamonds:
diamond search criteria (optional):
shapes
string array
["Round", "Pear", "Princess", "Marquise", "Oval", "Radiant", "Emerald", "Heart", "Cushion", "Asscher"]
weight_from
decimal
0.90
weight_to
decimal
1.20
colors
string array
["D", "E", "F", "G", "H", "I", "J", "K", "L", "M"]
fancy_colors
string array
["Yellow","Pink","Orange","Green", "Gray", "Brown","Blue", "Black","Red","Purple","Violet","Champagne","Cognac","Chameleon"]
fancy_color_intensities
string array
["Faint","Very Light","Light","Fancy Light", "Fancy Dark", "Fancy Intense","Fancy Vivid", "Fancy Deep"]
clarities
string array
["IF", "VVS1", "VVS2", "VS1", "VS2", "SI1", "SI2", "SI3", "I1"]
cutgrades
string array
["Excellent", "Very Good", "Good", "Fair"] or ["EX", "VG", "G", "F"]
polishes
string array
["Excellent", "Very Good", "Good", "Fair"] or ["EX", "VG", "G", "F"]
symmetries
string array
["Excellent", "Very Good", "Good", "Fair"] or ["EX", "VG", "G", "F"]
price_total_from
decimal
150
price_total_to
decimal
18000
grading_labs
string array
["GIA", "IGI", "AGS", "HRD", "EGL_USA", "NONE"]
fluorescence_intensities
string array
["Very Slight", "Faint", "Medium", "Slight", "Strong", "Very Strong","None"] or ["VSL", "F", "M", "SL", "ST", "VST"]
fluorescence_colors
string array
["Blue", "Yellow", "Green", "Red", "Orange", "White"]
depth_percent_from
decimal
66.8
depth_percent_to
decimal
72.5
table_percent_from
decimal
56.1
table_percent_to
decimal
64.1
meas_length_from
decimal
6.40
meas_length_to
decimal
6.80
meas_width_from
decimal
3.80
meas_width_to
decimal
3.96
meas_depth_from
decimal
3.11
meas_depth_to
decimal
3.20
girdles
string array
["Extr Thin", "Very Thin", "Thin", "Slightly Thin", "Medium", "Slightly Thick", "Thick", "Very Thick", "Extr Thick"]
culetsizes
string array
["Very Small", "Small", "Medium", "Large"]

result options (optional):
results_wanted
integer
50 (max is 100)
results_offset
integer
100
sorting
string array
["shape asc", "shape desc", "weight asc", "weight desc", "color asc", "color desc", "clarity asc", "clarity desc", "cutgrade asc", "cutgrade desc", "grading_lab asc", "grading_lab desc", "price_per_carat asc", "price_per_carat desc", "price_total asc", "price_total desc "]
body - web service: getdiamond (mandatory):
diamond_id
integer
Mazzal reference number for this diamond


Reference - output parameters
header - all web services:
response_code
integer
0
response_description
string
"authentication failed"
body - web service: getdiamonds:
total_results_available
integer
Amount of total diamonds matching your search criteria. E.g. 4320
results_included
integer
Amount of results included. E.g. 50
diamonds
object array
Array with diamonds returned. Object class used is the short diamond format.
Sample request - getdiamonds:
{
  "header":{
    "username":"mylogin",
    "password":"mypassword"
  },
  "body":{
    "shapes":["Round"],
    "weight_from":0.6,
    "weight_to":0.9,
    "colors":["E","F"],
    "clarities":["IF","VVS1", "VVS2"],
    "cutgrades":["Excellent","Very Good"],
    "price_total_from":100,
    "price_total_to":5000, 
	"results_wanted":25,
	"results_offset":0,
	"sorting":["price_total asc", "color asc", "clarity"]
  }
}
Sample response - getdiamonds:
{
  "header": {
    "response_code": 0,
    "response_description": ""
  },
  "body": {
    "total_results_available": 270,
    "results_included": 25,
    "diamonds": [
      {
        "id": 46969,
        "shape": "Round",
        "weight": 0.6,
        "color": "F",
        "clarity": "VVS2",
        "cut": "Very Good",
        "lab": "GIA",
        "price_total": 2541,
        "price_per_carat": 1850,
        "report": "123456789",
        "sym": "Excellent",
        "pol": "Excellent",
        "depth": 64,
        "table": 56,
        "meas": "5.30x5.27-3.38",
        "girdle": "Slightly Thick-Thick",
        "fluor": "Faint"",
        "culet_size": "large",
        "culet_condition": "pointed",
        "key_to_symbols": "feathers, crystal",
        "report_comments": "internal graining not shown",
        "crown_height": 14.2,
        "crown_angle": 36.5,
        "pavilion_depth": 54,
        "pavilion_angle": 45.2
      },
      {
        "id": 966268,
        "shape": "Round",
        "weight": 0.6,
        "color": "F",
        "clarity": "VVS1",
        "cut": "Very Good",
        "lab": "GIA",
        "price_total": 2808,
	    "price_per_carat": 1850,
        "report": "1234567892",
        "sym": "Excellent",
        "pol": "Excellent",
        "depth": 63.9,
        "table": 57,
        "meas": "",
        "girdle": "",
        "fluor": "None"",
        "culet_size": "",
        "culet_condition": "",
        "key_to_symbols": "",
        "report_comments": "",
        "crown_height": null,
        "crown_angle": null,
        "pavilion_depth": null,
        "pavilion_angle": null
      },
      {
        "id": 966240,
        "shape": "Round",
        "weight": 0.6,
        "color": "F",
        "clarity": "VVS1",
        "cut": "Very Good",
        "lab": "GIA",
        "price_total": 2808,
        "price_per_carat": 1850,
        "report": "1234567893",
        "sym": "Excellent",
        "pol": "Excellent",
        "depth": 63.3,
        "table": 56,
        "meas": "10.27x7.13-5.11",
        "girdle": "",
        "fluor": "None",
        "culet_size": "",
        "culet_condition": "",
        "key_to_symbols": "",
        "report_comments": "",
        "crown_height": null,
        "crown_angle": null,
        "pavilion_depth": null,
        "pavilion_angle": null
      }
    ]
  }
}
Sample request - getdiamond:
{
"header":{
    "username":"mylogin",
    "password":"mypassword"
},
"body": {
	"diamond_id":51693
}
}
Sample response - getdiamond:
	{
  "header": {
    "response_code": 0,
    "response_description": ""
  },
  "body": {
    "diamond": {
      "diamond_id": 971073,
      "shape": "Round",
      "weight": 0.18,
      "price_total": 110,
      "price_per_carat": 1110,
      "color": "Y-Z",
      "clarity": "VS1",
      "cutgrade": "Excellent",
      "polish": "Very Good",
      "symmetry": "Very Good",
      "grading_lab": "NONE",
      "grading_report_number": "",
      "fancy_color": "",
      "fancy_color_intensity": "",
      "fluorescence_intensity": "None",
      "fluorescence_color": "",
      "stock_number": "97303102",
      "depth_percent": 62.9,
      "table_percent": 56,
      "measurements": "3.61x3.59-2.26",
      "girdle": "Thick-Thick",
      "culet_size": "",
      "culet_condition": "",
      "key_to_symbols": "",
      "report_comments": "",
      "crown_height": 12,
      "crown_angle": 35.5,
      "pavilion_depth": 45,
      "pavilion_angle": 42.2,
      "seller": {
        "person_id": 10,
        "company": "Deyk Gems Inc",
        "name": "Jeroen van Deyk",
        "email": "eee@mazzal.net",
        "phone": "",
        "country": "",
        "state": "",
        "city": ""
      }
    }
  }
}