Diamonds AI Search
curl --request POST \
--url https://api-staging.unbridaled.ai/api/v3/diamonds/get_diamonds_by_merchant_templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"shape": "oval",
"types": [
"mined",
"lab grown"
],
"count_per_grade": 1,
"ratio_min": 1.35,
"ratio_max": 1.55,
"merchant_template_filters": {
"group": "ai_solitaire"
},
"weight": "1.25"
}
'import requests
url = "https://api-staging.unbridaled.ai/api/v3/diamonds/get_diamonds_by_merchant_templates"
payload = {
"shape": "oval",
"types": ["mined", "lab grown"],
"count_per_grade": 1,
"ratio_min": 1.35,
"ratio_max": 1.55,
"merchant_template_filters": { "group": "ai_solitaire" },
"weight": "1.25"
}
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({
shape: 'oval',
types: ['mined', 'lab grown'],
count_per_grade: 1,
ratio_min: 1.35,
ratio_max: 1.55,
merchant_template_filters: {group: 'ai_solitaire'},
weight: '1.25'
})
};
fetch('https://api-staging.unbridaled.ai/api/v3/diamonds/get_diamonds_by_merchant_templates', 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/v3/diamonds/get_diamonds_by_merchant_templates",
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([
'shape' => 'oval',
'types' => [
'mined',
'lab grown'
],
'count_per_grade' => 1,
'ratio_min' => 1.35,
'ratio_max' => 1.55,
'merchant_template_filters' => [
'group' => 'ai_solitaire'
],
'weight' => '1.25'
]),
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/v3/diamonds/get_diamonds_by_merchant_templates"
payload := strings.NewReader("{\n \"shape\": \"oval\",\n \"types\": [\n \"mined\",\n \"lab grown\"\n ],\n \"count_per_grade\": 1,\n \"ratio_min\": 1.35,\n \"ratio_max\": 1.55,\n \"merchant_template_filters\": {\n \"group\": \"ai_solitaire\"\n },\n \"weight\": \"1.25\"\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/v3/diamonds/get_diamonds_by_merchant_templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"shape\": \"oval\",\n \"types\": [\n \"mined\",\n \"lab grown\"\n ],\n \"count_per_grade\": 1,\n \"ratio_min\": 1.35,\n \"ratio_max\": 1.55,\n \"merchant_template_filters\": {\n \"group\": \"ai_solitaire\"\n },\n \"weight\": \"1.25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.unbridaled.ai/api/v3/diamonds/get_diamonds_by_merchant_templates")
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 \"shape\": \"oval\",\n \"types\": [\n \"mined\",\n \"lab grown\"\n ],\n \"count_per_grade\": 1,\n \"ratio_min\": 1.35,\n \"ratio_max\": 1.55,\n \"merchant_template_filters\": {\n \"group\": \"ai_solitaire\"\n },\n \"weight\": \"1.25\"\n}"
response = http.request(request)
puts response.read_body[
{
"base_currency_code": "USD",
"base_retail_price": 490,
"base_wholesale_price": 430,
"can_hold": true,
"cert_num": "524226131",
"cert_url": "https://api.igi.org/viewpdf.php?r=524226131",
"clarity": "VS1",
"clarity_max": null,
"color": "F",
"color_max": null,
"country_code": "USA",
"created_on": "2023-12-04 15:34:45.897194",
"crown_angle": 37.5,
"culet_size": "N",
"currency_code": "USD",
"cut_code": "brilliant_cut",
"cut_grade": null,
"cut_grade_description": null,
"days_to_return": 0,
"delivery_days_max": 2,
"delivery_days_min": 1,
"depth": 3.84,
"depth_percentage": 62.1,
"enabled": true,
"exchange_rate": 1,
"eye_clean": "yes",
"fancy_color_intensity": null,
"fluorescence": "None",
"girdle_max": "MD",
"girdle_min": "TN",
"grow_method": "cvd",
"hold_merchant_uuid": null,
"id": 909651,
"image_bottom_url": null,
"image_top_url": "",
"is_fancy": false,
"is_manual": false,
"is_pair": false,
"is_sustainable": false,
"lab": "IGI",
"length": 8.68,
"media_requested": false,
"memo": true,
"memo_days_to_return": 5,
"merchant_template_group": "ai_solitaire",
"merchant_template_label": "IDEAL",
"merchant_template_position": 1,
"merchant_template_uuid": "2d978b0f-8541-4825-8e34-353fea78bb84",
"off_rap_percentage": null,
"on_hold": false,
"original_imported_ext_url": "https://hd360video.com/video/Get?q=BMLGD-93456",
"overtone": null,
"parcel": false,
"pavilion_angle": 40.3,
"pavilion_depth": 43.5,
"pcs": 1,
"polish_grade": "EX",
"product_type": "diamond",
"quality": null,
"quantity": 1,
"ratio": 1.4,
"ratio_group": "rectangular",
"retail_price": 490,
"returnable": null,
"shade": null,
"shape": "oval",
"shape_icon_url": "https://unbridaled-dev.s3.amazonaws.com/das/static/images/shape_icons/shape-oval.svg",
"shape_icon_url_png": "https://unbridaled-dev.s3.amazonaws.com/das/static/images/shape_icons/shape-oval.png",
"shape_image_url": "https://unbridaled-dev.s3.amazonaws.com/das/static/images/shape_images/brilliant-oval.png",
"sku": "UB62945EDB2B",
"stone_type": null,
"sustainability_details": null,
"symmetry_grade": "EX",
"table_percentage": 60,
"type": "lab grown",
"updated_on": "2024-02-18 10:55:52.577049",
"ux_url": "https://unbridaled-dev.s3.amazonaws.com/das/v360/ub/v1/player/video/player.html?d=UB62945EDB2B",
"v360_info": null,
"v360_json_base_url": "https://unbridaled-dev.s3.amazonaws.com/das/uploads/v360/imaged/UB62945EDB2B",
"video_url": "",
"weight": 1.29,
"wholesale_price": 430,
"width": 6.18
}
]Diamonds
Diamonds AI Search
Perform AI search using predefined merchant diamond templates. Each merchant template has a group to allow results from different templates from being returned at once. For example, you can create a group called ai_solitaire with Standard, Premium and Ideal templates if you plan to display the result together.
A group in the merchant template can roughly map to a collection of products in Shopify or other e-commerce platforms. This allows you to reuse different predefined templates easily for a group of products. Refer to List Merchant Templates API to learn about Merchant diamonds templates or check our tutorial to learn more about our AI merchant template concept here: AI Curated Results.
POST
/
api
/
v3
/
diamonds
/
get_diamonds_by_merchant_templates
Diamonds AI Search
curl --request POST \
--url https://api-staging.unbridaled.ai/api/v3/diamonds/get_diamonds_by_merchant_templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"shape": "oval",
"types": [
"mined",
"lab grown"
],
"count_per_grade": 1,
"ratio_min": 1.35,
"ratio_max": 1.55,
"merchant_template_filters": {
"group": "ai_solitaire"
},
"weight": "1.25"
}
'import requests
url = "https://api-staging.unbridaled.ai/api/v3/diamonds/get_diamonds_by_merchant_templates"
payload = {
"shape": "oval",
"types": ["mined", "lab grown"],
"count_per_grade": 1,
"ratio_min": 1.35,
"ratio_max": 1.55,
"merchant_template_filters": { "group": "ai_solitaire" },
"weight": "1.25"
}
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({
shape: 'oval',
types: ['mined', 'lab grown'],
count_per_grade: 1,
ratio_min: 1.35,
ratio_max: 1.55,
merchant_template_filters: {group: 'ai_solitaire'},
weight: '1.25'
})
};
fetch('https://api-staging.unbridaled.ai/api/v3/diamonds/get_diamonds_by_merchant_templates', 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/v3/diamonds/get_diamonds_by_merchant_templates",
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([
'shape' => 'oval',
'types' => [
'mined',
'lab grown'
],
'count_per_grade' => 1,
'ratio_min' => 1.35,
'ratio_max' => 1.55,
'merchant_template_filters' => [
'group' => 'ai_solitaire'
],
'weight' => '1.25'
]),
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/v3/diamonds/get_diamonds_by_merchant_templates"
payload := strings.NewReader("{\n \"shape\": \"oval\",\n \"types\": [\n \"mined\",\n \"lab grown\"\n ],\n \"count_per_grade\": 1,\n \"ratio_min\": 1.35,\n \"ratio_max\": 1.55,\n \"merchant_template_filters\": {\n \"group\": \"ai_solitaire\"\n },\n \"weight\": \"1.25\"\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/v3/diamonds/get_diamonds_by_merchant_templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"shape\": \"oval\",\n \"types\": [\n \"mined\",\n \"lab grown\"\n ],\n \"count_per_grade\": 1,\n \"ratio_min\": 1.35,\n \"ratio_max\": 1.55,\n \"merchant_template_filters\": {\n \"group\": \"ai_solitaire\"\n },\n \"weight\": \"1.25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.unbridaled.ai/api/v3/diamonds/get_diamonds_by_merchant_templates")
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 \"shape\": \"oval\",\n \"types\": [\n \"mined\",\n \"lab grown\"\n ],\n \"count_per_grade\": 1,\n \"ratio_min\": 1.35,\n \"ratio_max\": 1.55,\n \"merchant_template_filters\": {\n \"group\": \"ai_solitaire\"\n },\n \"weight\": \"1.25\"\n}"
response = http.request(request)
puts response.read_body[
{
"base_currency_code": "USD",
"base_retail_price": 490,
"base_wholesale_price": 430,
"can_hold": true,
"cert_num": "524226131",
"cert_url": "https://api.igi.org/viewpdf.php?r=524226131",
"clarity": "VS1",
"clarity_max": null,
"color": "F",
"color_max": null,
"country_code": "USA",
"created_on": "2023-12-04 15:34:45.897194",
"crown_angle": 37.5,
"culet_size": "N",
"currency_code": "USD",
"cut_code": "brilliant_cut",
"cut_grade": null,
"cut_grade_description": null,
"days_to_return": 0,
"delivery_days_max": 2,
"delivery_days_min": 1,
"depth": 3.84,
"depth_percentage": 62.1,
"enabled": true,
"exchange_rate": 1,
"eye_clean": "yes",
"fancy_color_intensity": null,
"fluorescence": "None",
"girdle_max": "MD",
"girdle_min": "TN",
"grow_method": "cvd",
"hold_merchant_uuid": null,
"id": 909651,
"image_bottom_url": null,
"image_top_url": "",
"is_fancy": false,
"is_manual": false,
"is_pair": false,
"is_sustainable": false,
"lab": "IGI",
"length": 8.68,
"media_requested": false,
"memo": true,
"memo_days_to_return": 5,
"merchant_template_group": "ai_solitaire",
"merchant_template_label": "IDEAL",
"merchant_template_position": 1,
"merchant_template_uuid": "2d978b0f-8541-4825-8e34-353fea78bb84",
"off_rap_percentage": null,
"on_hold": false,
"original_imported_ext_url": "https://hd360video.com/video/Get?q=BMLGD-93456",
"overtone": null,
"parcel": false,
"pavilion_angle": 40.3,
"pavilion_depth": 43.5,
"pcs": 1,
"polish_grade": "EX",
"product_type": "diamond",
"quality": null,
"quantity": 1,
"ratio": 1.4,
"ratio_group": "rectangular",
"retail_price": 490,
"returnable": null,
"shade": null,
"shape": "oval",
"shape_icon_url": "https://unbridaled-dev.s3.amazonaws.com/das/static/images/shape_icons/shape-oval.svg",
"shape_icon_url_png": "https://unbridaled-dev.s3.amazonaws.com/das/static/images/shape_icons/shape-oval.png",
"shape_image_url": "https://unbridaled-dev.s3.amazonaws.com/das/static/images/shape_images/brilliant-oval.png",
"sku": "UB62945EDB2B",
"stone_type": null,
"sustainability_details": null,
"symmetry_grade": "EX",
"table_percentage": 60,
"type": "lab grown",
"updated_on": "2024-02-18 10:55:52.577049",
"ux_url": "https://unbridaled-dev.s3.amazonaws.com/das/v360/ub/v1/player/video/player.html?d=UB62945EDB2B",
"v360_info": null,
"v360_json_base_url": "https://unbridaled-dev.s3.amazonaws.com/das/uploads/v360/imaged/UB62945EDB2B",
"video_url": "",
"weight": 1.29,
"wholesale_price": 430,
"width": 6.18
}
]Authorizations
Body
application/json
Response
200 - application/json
OK