Skip to main content
POST
/
api
/
v2
/
diamonds
/
merchant_search
Merchant Search Diamonds
curl --request POST \
  --url https://api-staging.unbridaled.ai/api/v2/diamonds/merchant_search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filters": {
    "weight_min": 0,
    "weight_max": 2,
    "type": [
      "mined",
      "lab grown"
    ]
  },
  "limit": 10,
  "offset": 0,
  "sort_col": "retail_price",
  "sort_order": "asc"
}
'
import requests

url = "https://api-staging.unbridaled.ai/api/v2/diamonds/merchant_search"

payload = {
"filters": {
"weight_min": 0,
"weight_max": 2,
"type": ["mined", "lab grown"]
},
"limit": 10,
"offset": 0,
"sort_col": "retail_price",
"sort_order": "asc"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filters: {weight_min: 0, weight_max: 2, type: ['mined', 'lab grown']},
limit: 10,
offset: 0,
sort_col: 'retail_price',
sort_order: 'asc'
})
};

fetch('https://api-staging.unbridaled.ai/api/v2/diamonds/merchant_search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api-staging.unbridaled.ai/api/v2/diamonds/merchant_search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filters' => [
'weight_min' => 0,
'weight_max' => 2,
'type' => [
'mined',
'lab grown'
]
],
'limit' => 10,
'offset' => 0,
'sort_col' => 'retail_price',
'sort_order' => 'asc'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api-staging.unbridaled.ai/api/v2/diamonds/merchant_search"

payload := strings.NewReader("{\n \"filters\": {\n \"weight_min\": 0,\n \"weight_max\": 2,\n \"type\": [\n \"mined\",\n \"lab grown\"\n ]\n },\n \"limit\": 10,\n \"offset\": 0,\n \"sort_col\": \"retail_price\",\n \"sort_order\": \"asc\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api-staging.unbridaled.ai/api/v2/diamonds/merchant_search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filters\": {\n \"weight_min\": 0,\n \"weight_max\": 2,\n \"type\": [\n \"mined\",\n \"lab grown\"\n ]\n },\n \"limit\": 10,\n \"offset\": 0,\n \"sort_col\": \"retail_price\",\n \"sort_order\": \"asc\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api-staging.unbridaled.ai/api/v2/diamonds/merchant_search")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filters\": {\n \"weight_min\": 0,\n \"weight_max\": 2,\n \"type\": [\n \"mined\",\n \"lab grown\"\n ]\n },\n \"limit\": 10,\n \"offset\": 0,\n \"sort_col\": \"retail_price\",\n \"sort_order\": \"asc\"\n}"

response = http.request(request)
puts response.read_body
{
  "filters": {
    "cut_code": [
      "brilliant_cut",
      "modified_cut"
    ],
    "is_fancy": false,
    "type": [
      "mined",
      "lab grown"
    ]
  },
  "gems": [
    {
      "base_currency_code": "USD",
      "base_retail_price": 150,
      "base_wholesale_price": 100,
      "can_hold": true,
      "cert_num": "61791373",
      "cert_url": "",
      "clarity": "SI2",
      "clarity_max": null,
      "color": "G",
      "color_max": null,
      "country_code": "IND",
      "created_on": "2024-05-15 19:59:50.545918",
      "crown_angle": 35.5,
      "culet_size": null,
      "currency_code": "USD",
      "cut_code": "brilliant_cut",
      "cut_grade": null,
      "cut_grade_description": null,
      "days_to_return": 45,
      "delivery_days_max": 7,
      "delivery_days_min": 5,
      "depth": 1.8,
      "depth_percentage": 62.5,
      "enabled": true,
      "exchange_rate": 1,
      "eye_clean": "no",
      "fancy_color_intensity": null,
      "fluorescence": "None",
      "girdle_max": null,
      "girdle_min": null,
      "grow_method": null,
      "id": 990157,
      "image_bottom_url": null,
      "image_top_url": "",
      "is_fancy": false,
      "is_manual": false,
      "is_sustainable": false,
      "lab": "GIA",
      "length": 2.89,
      "media_requested": false,
      "memo": false,
      "memo_days_to_return": 0,
      "merchant_template_group": null,
      "merchant_template_label": null,
      "merchant_template_position": null,
      "merchant_template_uuid": null,
      "off_rap_percentage": 54.17823003391919,
      "on_hold": false,
      "original_imported_ext_url": "",
      "overtone": null,
      "parcel": false,
      "pavilion_angle": 41.6,
      "pavilion_depth": 44,
      "polish_grade": "EX",
      "product_type": "diamond",
      "quality": null,
      "quantity": 1,
      "ratio": 1,
      "ratio_group": null,
      "retail_price": 150,
      "returnable": false,
      "shape": "round",
      "shape_icon_url": "https://unbridaled-dev.s3.amazonaws.com/das/static/images/shape_icons/shape-round.svg",
      "shape_icon_url_png": "https://unbridaled-dev.s3.amazonaws.com/das/static/images/shape_icons/shape-round.png",
      "shape_image_url": "https://unbridaled-dev.s3.amazonaws.com/das/static/images/shape_images/brilliant-round.png",
      "sku": "UB1DD700DCF7",
      "stone_type": null,
      "sustainability_details": null,
      "symmetry_grade": "VG",
      "table_percentage": 60,
      "type": "mined",
      "updated_on": "2024-05-15 19:59:50.545918",
      "ux_url": "",
      "v360_info": null,
      "v360_json_base_url": "",
      "video_url": "",
      "weight": 0.094,
      "wholesale_price": 100,
      "width": 2.88
    }
  ],
  "metadata": {
    "limit": 50,
    "offset": 0,
    "total_count": 123934
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
filters
object
limit
integer
offset
integer
sort_col
string
sort_order
string

Response

200 - application/json

OK

filters
object
gems
object[]
metadata
object