Inventory user manual
Polished
The inventory for polished diamonds can be found under Inventory → Polished in the side bar, or under this link.
Diamonds
Diamonds are displayed in the main table of the inventory page. The table can be sorted by clicking on the column titles. Columns can be toggled and untoggled with the Toggle columns functionality. Filters can be applied through the filter panel on the left. Filter fields are customizable through the API.
Custom Fields
Custom fields are extra properties that can be attached to items. They are non unique, optional and have simple types like string and number. Custom fields are available to filter through and are available to fill through the DiamondTracker front-end when adding/editing an existing item.
Managing the custom fields can be done through the API as shown in the example below.
# GET request
curl -X GET "https://api.dm.diamondmatch.org/v2/external/polishedCustomFields" \
-H "x-api-key: YOUR_KEY"
# [
# {
# "name": "Carats",
# "type": "number",
# },
# {
# "name": "Color",
# "type": "string"
# }
# ]
# POST request
curl -X POST "https://api.dm.diamondmatch.org/v2/external/polishedCustomFields" \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Clarity",
"type": "string"
}'
# HTTP 201
# DELETE request
curl -X DELETE "https://api.dm.diamondmatch.org/v2/external/polishedCustomFields?name=Clarity" \
-H "x-api-key: YOUR_KEY"
# HTTP 204
import requests
# GET request
response = requests.get(
"https://api.dm.diamondmatch.org/v2/external/polishedCustomFields",
headers={"x-api-key": "YOUR_KEY"}
)
print(response.json())
# [
# {
# "name": "Carats",
# "type": "number",
# },
# {
# "name": "Color",
# "type": "string"
# }
# ]
# POST request
response = requests.post(
"https://api.dm.diamondmatch.org/v2/external/polishedCustomFields",
headers={"x-api-key": "YOUR_KEY"},
json={
"name": "Clarity",
"type": "string"
}
)
print(response.status_code) # 201
# DELETE request
response = requests.delete(
"https://api.dm.diamondmatch.org/v2/external/polishedCustomFields?name=Clarity",
headers={"x-api-key": "YOUR_KEY"}
)
print(response.status_code) # 204
// GET request
const getResponse = await fetch(
"https://api.dm.diamondmatch.org/v2/external/polishedCustomFields",
{
headers: { "x-api-key": "YOUR_KEY" }
}
);
const fieldsData = await getResponse.json();
console.log(fieldsData);
// [
// {
// "name": "Carats",
// "type": "number",
// },
// {
// "name": "Color",
// "type": "string"
// }
// ]
// POST request
const postResponse = await fetch(
"https://api.dm.diamondmatch.org/v2/external/polishedCustomFields",
{
method: "POST",
headers: {
"x-api-key": "YOUR_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
name: "Clarity",
type: "string"
})
}
);
console.log(postResponse.status); // 201
// DELETE request
const deleteResponse = await fetch(
"https://api.dm.diamondmatch.org/v2/external/polishedCustomFields?name=Clarity",
{
method: "DELETE",
headers: { "x-api-key": "YOUR_KEY" }
}
);
console.log(deleteResponse.status); // 204
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
client := &http.Client{}
// GET request
req, _ := http.NewRequest("GET",
"https://api.dm.diamondmatch.org/v2/external/polishedCustomFields",
nil)
req.Header.Set("x-api-key", "YOUR_KEY")
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
// [
// {
// "name": "Carats",
// "type": "number",
// },
// {
// "name": "Color",
// "type": "string"
// }
// ]
// POST request
fieldData := map[string]interface{}{
"name": "Clarity",
"type": "string",
}
jsonData, _ := json.Marshal(fieldData)
req, _ = http.NewRequest("POST",
"https://api.dm.diamondmatch.org/v2/external/polishedCustomFields",
bytes.NewBuffer(jsonData))
req.Header.Set("x-api-key", "YOUR_KEY")
req.Header.Set("Content-Type", "application/json")
resp, _ = client.Do(req)
defer resp.Body.Close()
fmt.Println(resp.StatusCode) // 201
// DELETE request
req, _ = http.NewRequest("DELETE",
"https://api.dm.diamondmatch.org/v2/external/polishedCustomFields?name=Clarity",
nil)
req.Header.Set("x-api-key", "YOUR_KEY")
resp, _ = client.Do(req)
defer resp.Body.Close()
fmt.Println(resp.StatusCode) // 204
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class ApiExample {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
// GET request
HttpRequest getRequest = HttpRequest.newBuilder()
.uri(URI.create("https://api.dm.diamondmatch.org/v2/external/polishedCustomFields"))
.header("x-api-key", "YOUR_KEY")
.GET()
.build();
HttpResponse<String> getResponse = client.send(getRequest,
HttpResponse.BodyHandlers.ofString());
System.out.println(getResponse.body());
// [
// {
// "name": "Carats",
// "type": "number",
// },
// {
// "name": "Color",
// "type": "string"
// }
// ]
// POST request
String jsonBody = """
{
"name": "Clarity",
"type": "string"
}
""";
HttpRequest postRequest = HttpRequest.newBuilder()
.uri(URI.create("https://api.dm.diamondmatch.org/v2/external/polishedCustomFields"))
.header("x-api-key", "YOUR_KEY")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(jsonBody))
.build();
HttpResponse<String> postResponse = client.send(postRequest,
HttpResponse.BodyHandlers.ofString());
System.out.println(postResponse.statusCode()); // 201
// DELETE request
HttpRequest deleteRequest = HttpRequest.newBuilder()
.uri(URI.create("https://api.dm.diamondmatch.org/v2/external/polishedCustomFields?name=Clarity"))
.header("x-api-key", "YOUR_KEY")
.DELETE()
.build();
HttpResponse<String> deleteResponse = client.send(deleteRequest,
HttpResponse.BodyHandlers.ofString());
System.out.println(deleteResponse.statusCode()); // 204
}
}
<?php
// GET request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.dm.diamondmatch.org/v2/external/polishedCustomFields");
curl_setopt($ch, CURLOPT_HTTPHEADER, array("x-api-key: YOUR_KEY"));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
// [
// {
// "name": "Carats",
// "type": "number",
// },
// {
// "name": "Color",
// "type": "string"
// }
// ]
// POST request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.dm.diamondmatch.org/v2/external/polishedCustomFields");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"x-api-key: YOUR_KEY",
"Content-Type: application/json"
));
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array(
"name" => "Clarity",
"type" => "string"
)));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode; // 201
// DELETE request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.dm.diamondmatch.org/v2/external/polishedCustomFields?name=Clarity");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_HTTPHEADER, array("x-api-key: YOUR_KEY"));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode; // 204
?>
require 'net/http'
require 'json'
# GET request
uri = URI("https://api.dm.diamondmatch.org/v2/external/polishedCustomFields")
request = Net::HTTP::Get.new(uri)
request["x-api-key"] = "YOUR_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.body
# [
# {
# "name": "Carats",
# "type": "number",
# },
# {
# "name": "Color",
# "type": "string"
# }
# ]
# POST request
uri = URI("https://api.dm.diamondmatch.org/v2/external/polishedCustomFields")
request = Net::HTTP::Post.new(uri)
request["x-api-key"] = "YOUR_KEY"
request["Content-Type"] = "application/json"
request.body = {
name: "Clarity",
type: "string"
}.to_json
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.code # 201
# DELETE request
uri = URI("https://api.dm.diamondmatch.org/v2/external/polishedCustomFields?name=Clarity")
request = Net::HTTP::Delete.new(uri)
request["x-api-key"] = "YOUR_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.code # 204
#include <iostream>
#include <curl/curl.h>
#include <string>
size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* userp) {
userp->append((char*)contents, size * nmemb);
return size * nmemb;
}
int main() {
CURL* curl;
CURLcode res;
std::string readBuffer;
curl_global_init(CURL_GLOBAL_DEFAULT);
// GET request
curl = curl_easy_init();
if(curl) {
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "x-api-key: YOUR_KEY");
curl_easy_setopt(curl, CURLOPT_URL,
"https://api.dm.diamondmatch.org/v2/external/polishedCustomFields");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer);
res = curl_easy_perform(curl);
std::cout << readBuffer << std::endl;
// [
// {
// "name": "Carats",
// "type": "number",
// },
// {
// "name": "Color",
// "type": "string"
// }
// ]
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
// POST request
curl = curl_easy_init();
if(curl) {
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "x-api-key: YOUR_KEY");
headers = curl_slist_append(headers, "Content-Type: application/json");
std::string jsonData = R"({
"name": "Clarity",
"type": "string"
})";
curl_easy_setopt(curl, CURLOPT_URL,
"https://api.dm.diamondmatch.org/v2/external/polishedCustomFields");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, jsonData.c_str());
res = curl_easy_perform(curl);
long response_code;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code);
std::cout << response_code << std::endl; // 201
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
// DELETE request
curl = curl_easy_init();
if(curl) {
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "x-api-key: YOUR_KEY");
curl_easy_setopt(curl, CURLOPT_URL,
"https://api.dm.diamondmatch.org/v2/external/polishedCustomFields?name=Clarity");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE");
res = curl_easy_perform(curl);
long response_code;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code);
std::cout << response_code << std::endl; // 204
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
curl_global_cleanup();
return 0;
}
Adding diamonds
Diamonds can be added through the Add item button, through fingerprinting and through scanning a new RFID tag. If a fingerprint failed, the diamond is still added to the inventory with a Not Fingerprinted status.
Importing diamonds
Multiple diamonds can be imported from an Excel file with the Upload inventory functionality. The inventory can be exported to an Excel file by clicking the Export to Excel button.
Warning
You can download the skeleton of the excel through the DiamondTracker web front-end. Make sure, the imported diamonds follow this skeleton.
Editing diamonds
Diamonds can be edited via the More options (...) button in the last column. Click Edit association to confirm your changes.
Deleting diamonds
Diamonds can be moved to the trash bin via the More options (...) button in the last column and by selecting one or multiple diamonds and clicking the Move to trash button.
The trash bin can be viewed via the Access trash bin button. To restore or remove diamonds from the trash bin, select the diamonds and click the Restore items or Remove items button.
API
Managing polished diamonds can also be done through the API as shown in the examples below.
# GET request
curl -X GET "https://api.dm.diamondmatch.org/v2/external/polished?filters%5BSKU%5D=SKU_1" \
-H "x-api-key: YOUR_KEY"
# [
# {
# "RFID": 4140902673,
# "SKU": "SKU_1",
# "fingerprint": true,
# "association": {
# "Carats": 1.15,
# "Color": "D",
# "Clarity": "VVS1",
# "Cut - Proportions": "Excellent",
# "Cut - Polish": "Very good",
# "Cut - Symmetry": "Very good",
# "Shape": "Round"
# },
# "created": "2025-12-08T16:45:06.429Z",
# "updated": "2025-12-08T16:45:06.429Z"
# }
# ]
# POST request
curl -X POST "https://api.dm.diamondmatch.org/v2/external/polished" \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"SKU": "SKU_2",
"association": {
"Carats": 2.0,
"Color": "D",
"Clarity": "VVS1",
"Shape": "Round",
"Origin": "Botswana"
}
}'
# HTTP 201
# You can create new fields through this and they will automatically be added to the existing custom fields
# PUT request
curl -X PUT "https://api.dm.diamondmatch.org/v2/external/polished" \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"SKU": "SKU_2",
"association": {
"Carats": 1.0
}
}'
# HTTP 204
# DELETE request
curl -X DELETE "https://api.dm.diamondmatch.org/v2/external/polished?SKU=SKU_2" \
-H "x-api-key: YOUR_KEY"
# HTTP 204
import requests
# GET request
response = requests.get(
"https://api.dm.diamondmatch.org/v2/external/polished?filters%5BSKU%5D=SKU_1",
headers={"x-api-key": "YOUR_KEY"}
)
print(response.json())
# [
# {
# "RFID": 4140902673,
# "SKU": "SKU_1",
# "fingerprint": true,
# "association": {
# "Carats": 1.15,
# "Color": "D",
# "Clarity": "VVS1",
# "Cut - Proportions": "Excellent",
# "Cut - Polish": "Very good",
# "Cut - Symmetry": "Very good",
# "Shape": "Round"
# },
# "created": "2025-12-08T16:45:06.429Z",
# "updated": "2025-12-08T16:45:06.429Z"
# }
# ]
# POST request
response = requests.post(
"https://api.dm.diamondmatch.org/v2/external/polished",
headers={"x-api-key": "YOUR_KEY"},
json={
"SKU": "SKU_2",
"association": {
"Carats": 2.0,
"Color": "D",
"Clarity": "VVS1",
"Shape": "Round",
"Origin": "Botswana" # You can create new fields through this and they will automatically be added to the existing custom fields
}
}
)
print(response.status_code) # 201
# PUT request
response = requests.put(
"https://api.dm.diamondmatch.org/v2/external/polished",
headers={"x-api-key": "YOUR_KEY"},
json={
"SKU": "SKU_2",
"association": {
"Carats": 1.0
}
}
)
print(response.status_code) # 204
# DELETE request
response = requests.delete(
"https://api.dm.diamondmatch.org/v2/external/polished?SKU=SKU_2",
headers={"x-api-key": "YOUR_KEY"}
)
print(response.status_code) # 204
// GET request
const getResponse = await fetch(
"https://api.dm.diamondmatch.org/v2/external/polished?filters%5BSKU%5D=SKU_1",
{
headers: { "x-api-key": "YOUR_KEY" }
}
);
const polishedData = await getResponse.json();
console.log(polishedData);
// [
// {
// "RFID": 4140902673,
// "SKU": "SKU_1",
// "fingerprint": true,
// "association": {
// "Carats": 1.15,
// "Color": "D",
// "Clarity": "VVS1",
// "Cut - Proportions": "Excellent",
// "Cut - Polish": "Very good",
// "Cut - Symmetry": "Very good",
// "Shape": "Round"
// },
// "created": "2025-12-08T16:45:06.429Z",
// "updated": "2025-12-08T16:45:06.429Z"
// }
// ]
// POST request
const postResponse = await fetch(
"https://api.dm.diamondmatch.org/v2/external/polished",
{
method: "POST",
headers: {
"x-api-key": "YOUR_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
SKU: "SKU_2",
association: {
Carats: 2.0,
Color: "D",
Clarity: "VVS1",
Shape: "Round",
Origin: "Botswana" // You can create new fields through this and they will automatically be added to the existing custom fields
}
})
}
);
console.log(postResponse.status); // 201
// PUT request
const putResponse = await fetch(
"https://api.dm.diamondmatch.org/v2/external/polished",
{
method: "PUT",
headers: {
"x-api-key": "YOUR_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
SKU: "SKU_2",
association: {
Carats: 1.0
}
})
}
);
console.log(putResponse.status); // 204
// DELETE request
const deleteResponse = await fetch(
"https://api.dm.diamondmatch.org/v2/external/polished?SKU=SKU_2",
{
method: "DELETE",
headers: { "x-api-key": "YOUR_KEY" }
}
);
console.log(deleteResponse.status); // 204
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
client := &http.Client{}
// GET request
req, _ := http.NewRequest("GET",
"https://api.dm.diamondmatch.org/v2/external/polished?filters%5BSKU%5D=SKU_1",
nil)
req.Header.Set("x-api-key", "YOUR_KEY")
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
// [
// {
// "RFID": 4140902673,
// "SKU": "SKU_1",
// "fingerprint": true,
// "association": {
// "Carats": 1.15,
// "Color": "D",
// "Clarity": "VVS1",
// "Cut - Proportions": "Excellent",
// "Cut - Polish": "Very good",
// "Cut - Symmetry": "Very good",
// "Shape": "Round"
// },
// "created": "2025-12-08T16:45:06.429Z",
// "updated": "2025-12-08T16:45:06.429Z"
// }
// ]
// POST request
postData := map[string]interface{}{
"SKU": "SKU_2",
"association": map[string]interface{}{
"Carats": 2.0,
"Color": "D",
"Clarity": "VVS1",
"Shape": "Round",
"Origin": "Botswana", // You can create new fields through this and they will automatically be added to the existing custom fields
},
}
jsonData, _ := json.Marshal(postData)
req, _ = http.NewRequest("POST",
"https://api.dm.diamondmatch.org/v2/external/polished",
bytes.NewBuffer(jsonData))
req.Header.Set("x-api-key", "YOUR_KEY")
req.Header.Set("Content-Type", "application/json")
resp, _ = client.Do(req)
defer resp.Body.Close()
fmt.Println(resp.StatusCode) // 201
// PUT request
putData := map[string]interface{}{
"SKU": "SKU_2",
"association": map[string]interface{}{
"Carats": 1.0,
},
}
jsonData, _ = json.Marshal(putData)
req, _ = http.NewRequest("PUT",
"https://api.dm.diamondmatch.org/v2/external/polished",
bytes.NewBuffer(jsonData))
req.Header.Set("x-api-key", "YOUR_KEY")
req.Header.Set("Content-Type", "application/json")
resp, _ = client.Do(req)
defer resp.Body.Close()
fmt.Println(resp.StatusCode) // 204
// DELETE request
req, _ = http.NewRequest("DELETE",
"https://api.dm.diamondmatch.org/v2/external/polished?SKU=SKU_2",
nil)
req.Header.Set("x-api-key", "YOUR_KEY")
resp, _ = client.Do(req)
defer resp.Body.Close()
fmt.Println(resp.StatusCode) // 204
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class ApiExample {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
// GET request
HttpRequest getRequest = HttpRequest.newBuilder()
.uri(URI.create("https://api.dm.diamondmatch.org/v2/external/polished?filters%5BSKU%5D=SKU_1"))
.header("x-api-key", "YOUR_KEY")
.GET()
.build();
HttpResponse<String> getResponse = client.send(getRequest,
HttpResponse.BodyHandlers.ofString());
System.out.println(getResponse.body());
// [
// {
// "RFID": 4140902673,
// "SKU": "SKU_1",
// "fingerprint": true,
// "association": {
// "Carats": 1.15,
// "Color": "D",
// "Clarity": "VVS1",
// "Cut - Proportions": "Excellent",
// "Cut - Polish": "Very good",
// "Cut - Symmetry": "Very good",
// "Shape": "Round"
// },
// "created": "2025-12-08T16:45:06.429Z",
// "updated": "2025-12-08T16:45:06.429Z"
// }
// ]
// POST request
String postBody = """
{
"SKU": "SKU_2",
"association": {
"Carats": 2.0,
"Color": "D",
"Clarity": "VVS1",
"Shape": "Round",
"Origin": "Botswana"
}
}
""";
// You can create new fields through this and they will automatically be added to the existing custom fields
HttpRequest postRequest = HttpRequest.newBuilder()
.uri(URI.create("https://api.dm.diamondmatch.org/v2/external/polished"))
.header("x-api-key", "YOUR_KEY")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(postBody))
.build();
HttpResponse<String> postResponse = client.send(postRequest,
HttpResponse.BodyHandlers.ofString());
System.out.println(postResponse.statusCode()); // 201
// PUT request
String putBody = """
{
"SKU": "SKU_2",
"association": {
"Carats": 1.0
}
}
""";
HttpRequest putRequest = HttpRequest.newBuilder()
.uri(URI.create("https://api.dm.diamondmatch.org/v2/external/polished"))
.header("x-api-key", "YOUR_KEY")
.header("Content-Type", "application/json")
.PUT(HttpRequest.BodyPublishers.ofString(putBody))
.build();
HttpResponse<String> putResponse = client.send(putRequest,
HttpResponse.BodyHandlers.ofString());
System.out.println(putResponse.statusCode()); // 204
// DELETE request
HttpRequest deleteRequest = HttpRequest.newBuilder()
.uri(URI.create("https://api.dm.diamondmatch.org/v2/external/polished?SKU=SKU_2"))
.header("x-api-key", "YOUR_KEY")
.DELETE()
.build();
HttpResponse<String> deleteResponse = client.send(deleteRequest,
HttpResponse.BodyHandlers.ofString());
System.out.println(deleteResponse.statusCode()); // 204
}
}
<?php
// GET request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.dm.diamondmatch.org/v2/external/polished/?filters%5BSKU%5D=SKU_1");
curl_setopt($ch, CURLOPT_HTTPHEADER, array("x-api-key: YOUR_KEY"));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
// [
// {
// "RFID": 4140902673,
// "SKU": "SKU_1",
// "fingerprint": true,
// "association": {
// "Carats": 1.15,
// "Color": "D",
// "Clarity": "VVS1",
// "Cut - Proportions": "Excellent",
// "Cut - Polish": "Very good",
// "Cut - Symmetry": "Very good",
// "Shape": "Round"
// },
// "created": "2025-12-08T16:45:06.429Z",
// "updated": "2025-12-08T16:45:06.429Z"
// }
// ]
// POST request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.dm.diamondmatch.org/v2/external/polished");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"x-api-key: YOUR_KEY",
"Content-Type: application/json"
));
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array(
"SKU" => "SKU_2",
"association" => array(
"Carats" => 2.0,
"Color" => "D",
"Clarity" => "VVS1",
"Shape" => "Round",
"Origin" => "Botswana" // You can create new fields through this and they will automatically be added to the existing custom fields
)
)));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode; // 201
// PUT request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.dm.diamondmatch.org/v2/external/polished");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"x-api-key: YOUR_KEY",
"Content-Type: application/json"
));
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array(
"SKU" => "SKU_2",
"association" => array(
"Carats" => 1.0
)
)));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode; // 204
// DELETE request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.dm.diamondmatch.org/v2/external/polished?SKU=SKU_2");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_HTTPHEADER, array("x-api-key: YOUR_KEY"));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode; // 204
?>
require 'net/http'
require 'json'
# GET request
uri = URI("https://api.dm.diamondmatch.org/v2/external/polished?filters%5BSKU%5D=SKU_1")
request = Net::HTTP::Get.new(uri)
request["x-api-key"] = "YOUR_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.body
# [
# {
# "RFID": 4140902673,
# "SKU": "SKU_1",
# "fingerprint": true,
# "association": {
# "Carats": 1.15,
# "Color": "D",
# "Clarity": "VVS1",
# "Cut - Proportions": "Excellent",
# "Cut - Polish": "Very good",
# "Cut - Symmetry": "Very good",
# "Shape": "Round"
# },
# "created": "2025-12-08T16:45:06.429Z",
# "updated": "2025-12-08T16:45:06.429Z"
# }
# ]
# POST request
uri = URI("https://api.dm.diamondmatch.org/v2/external/polished")
request = Net::HTTP::Post.new(uri)
request["x-api-key"] = "YOUR_KEY"
request["Content-Type"] = "application/json"
request.body = {
SKU: "SKU_2",
association: {
Carats: 2.0,
Color: "D",
Clarity: "VVS1",
Shape: "Round",
Origin: "Botswana" # You can create new fields through this and they will automatically be added to the existing custom fields
}
}.to_json
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.code # 201
# PUT request
uri = URI("https://api.dm.diamondmatch.org/v2/external/polished")
request = Net::HTTP::Put.new(uri)
request["x-api-key"] = "YOUR_KEY"
request["Content-Type"] = "application/json"
request.body = {
SKU: "SKU_2",
association: {
Carats: 1.0
}
}.to_json
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.code # 204
# DELETE request
uri = URI("https://api.dm.diamondmatch.org/v2/external/polished?SKU=SKU_2")
request = Net::HTTP::Delete.new(uri)
request["x-api-key"] = "YOUR_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.code # 204
#include <iostream>
#include <curl/curl.h>
#include <string>
size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* userp) {
userp->append((char*)contents, size * nmemb);
return size * nmemb;
}
int main() {
CURL* curl;
CURLcode res;
std::string readBuffer;
curl_global_init(CURL_GLOBAL_DEFAULT);
// GET request
curl = curl_easy_init();
if(curl) {
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "x-api-key: YOUR_KEY");
curl_easy_setopt(curl, CURLOPT_URL,
"https://api.dm.diamondmatch.org/v2/external/polished?filters%5BSKU%5D=SKU_1");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer);
res = curl_easy_perform(curl);
std::cout << readBuffer << std::endl;
// [
// {
// "RFID": 4140902673,
// "SKU": "SKU_1",
// "fingerprint": true,
// "association": {
// "Carats": 1.15,
// "Color": "D",
// "Clarity": "VVS1",
// "Cut - Proportions": "Excellent",
// "Cut - Polish": "Very good",
// "Cut - Symmetry": "Very good",
// "Shape": "Round"
// },
// "created": "2025-12-08T16:45:06.429Z",
// "updated": "2025-12-08T16:45:06.429Z"
// }
// ]
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
// POST request
curl = curl_easy_init();
if(curl) {
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "x-api-key: YOUR_KEY");
headers = curl_slist_append(headers, "Content-Type: application/json");
std::string jsonData = R"({
"SKU": "SKU_2",
"association": {
"Carats": 2.0,
"Color": "D",
"Clarity": "VVS1",
"Shape": "Round",
"Origin": "Botswana"
}
})";
// You can create new fields through this and they will automatically be added to the existing custom fields
curl_easy_setopt(curl, CURLOPT_URL,
"https://api.dm.diamondmatch.org/v2/external/polished");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, jsonData.c_str());
res = curl_easy_perform(curl);
long response_code;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code);
std::cout << response_code << std::endl; // 201
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
// PUT request
curl = curl_easy_init();
if(curl) {
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "x-api-key: YOUR_KEY");
headers = curl_slist_append(headers, "Content-Type: application/json");
std::string jsonData = R"({
"SKU": "SKU_2",
"association": {
"Carats": 1.0
}
})";
curl_easy_setopt(curl, CURLOPT_URL,
"https://api.dm.diamondmatch.org/v2/external/polished");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, jsonData.c_str());
res = curl_easy_perform(curl);
long response_code;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code);
std::cout << response_code << std::endl; // 204
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
// DELETE request
curl = curl_easy_init();
if(curl) {
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "x-api-key: YOUR_KEY");
curl_easy_setopt(curl, CURLOPT_URL,
"https://api.dm.diamondmatch.org/v2/external/polished?SKU=SKU_2");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE");
res = curl_easy_perform(curl);
long response_code;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code);
std::cout << response_code << std::endl; // 204
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
curl_global_cleanup();
return 0;
}
Info
Some functionality is limited to only be done through the front-end such as permanently deleting items.
Folders
Folders are collections of diamonds. Folders can be created via the New folder field. To add diamonds to a folder, select the diamonds and drag them on top of the folder. Folders can also be managed through the API
# GET request
curl -X GET "https://api.dm.diamondmatch.org/v2/external/folders/polished?filters%5Bname%5D=folder_1" \
-H "x-api-key: YOUR_KEY"
# [
# {
# "name": "folder_1",
# "activeSelection": false,
# "created": "2025-12-08T15:37:11.733Z",
# "updated": "2025-12-08T15:48:33.916Z",
# "size": 16
# }
# ]
# POST request
curl -X POST "https://api.dm.diamondmatch.org/v2/external/folders/polished" \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "folder_2",
"skus": [
"SKU_1",
"SKU_2"
]
}'
# HTTP 201
# PUT request
# removes SKU_2 from the folder
curl -X PUT "https://api.dm.diamondmatch.org/v2/external/folders/polished?name=folder_1" \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"skus": [
"SKU_1"
]
}'
# HTTP 204
# DELETE request
curl -X DELETE "https://api.dm.diamondmatch.org/v2/external/folders/polished?name=folder_1" \
-H "x-api-key: YOUR_KEY"
# HTTP 204
import requests
# GET request
response = requests.get(
"https://api.dm.diamondmatch.org/v2/external/folders/polished?filters%5Bname%5D=folder_1",
headers={"x-api-key": "YOUR_KEY"}
)
print(response.json())
# [
# {
# "name": "folder_1",
# "activeSelection": false,
# "created": "2025-12-08T15:37:11.733Z",
# "updated": "2025-12-08T15:48:33.916Z",
# "size": 16
# }
# ]
# POST request
response = requests.post(
"https://api.dm.diamondmatch.org/v2/external/folders/polished",
headers={"x-api-key": "YOUR_KEY"},
json={
"name": "folder_2",
"skus": [
"SKU_1",
"SKU_2"
]
}
)
print(response.status_code) # 201
# PUT request
response = requests.put(
"https://api.dm.diamondmatch.org/v2/external/folders/polished?name=folder_1",
headers={"x-api-key": "YOUR_KEY"},
json={
"skus": [
"SKU_1"
] # removes SKU_2 from the folder
}
)
print(response.status_code) # 204
# DELETE request
response = requests.delete(
"https://api.dm.diamondmatch.org/v2/external/folders/polished?name=folder_1",
headers={"x-api-key": "YOUR_KEY"}
)
print(response.status_code) # 204
// GET request
const getResponse = await fetch(
"https://api.dm.diamondmatch.org/v2/external/folders/polished?filters%5Bname%5D=folder_1",
{
headers: { "x-api-key": "YOUR_KEY" }
}
);
const folderData = await getResponse.json();
console.log(folderData);
// [
// {
// "name": "folder_1",
// "activeSelection": false,
// "created": "2025-12-08T15:37:11.733Z",
// "updated": "2025-12-08T15:48:33.916Z",
// "size": 16
// }
// ]
// POST request
const postResponse = await fetch(
"https://api.dm.diamondmatch.org/v2/external/folders/polished",
{
method: "POST",
headers: {
"x-api-key": "YOUR_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
name: "folder_2",
skus: [
"SKU_1",
"SKU_2"
]
})
}
);
console.log(postResponse.status); // 201
// PUT request
// removes SKU_2 from the folder
const putResponse = await fetch(
"https://api.dm.diamondmatch.org/v2/external/folders/polished?name=folder_1",
{
method: "PUT",
headers: {
"x-api-key": "YOUR_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
skus: [
"SKU_1"
]
})
}
);
console.log(putResponse.status); // 204
// DELETE request
const deleteResponse = await fetch(
"https://api.dm.diamondmatch.org/v2/external/folders/polished?name=folder_1",
{
method: "DELETE",
headers: { "x-api-key": "YOUR_KEY" }
}
);
console.log(deleteResponse.status); // 204
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
client := &http.Client{}
// GET request
req, _ := http.NewRequest("GET",
"https://api.dm.diamondmatch.org/v2/external/folders/polished?filters%5Bname%5D=folder_1",
nil)
req.Header.Set("x-api-key", "YOUR_KEY")
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
// [
// {
// "name": "folder_1",
// "activeSelection": false,
// "created": "2025-12-08T15:37:11.733Z",
// "updated": "2025-12-08T15:48:33.916Z",
// "size": 16
// }
// ]
// POST request
postData := map[string]interface{}{
"name": "folder_2",
"skus": []string{"SKU_1", "SKU_2"},
}
jsonData, _ := json.Marshal(postData)
req, _ = http.NewRequest("POST",
"https://api.dm.diamondmatch.org/v2/external/folders/polished",
bytes.NewBuffer(jsonData))
req.Header.Set("x-api-key", "YOUR_KEY")
req.Header.Set("Content-Type", "application/json")
resp, _ = client.Do(req)
defer resp.Body.Close()
fmt.Println(resp.StatusCode) // 201
// PUT request
// removes SKU_2 from the folder
putData := map[string]interface{}{
"skus": []string{"SKU_1"},
}
jsonData, _ = json.Marshal(putData)
req, _ = http.NewRequest("PUT",
"https://api.dm.diamondmatch.org/v2/external/folders/polished?name=folder_1",
bytes.NewBuffer(jsonData))
req.Header.Set("x-api-key", "YOUR_KEY")
req.Header.Set("Content-Type", "application/json")
resp, _ = client.Do(req)
defer resp.Body.Close()
fmt.Println(resp.StatusCode) // 204
// DELETE request
req, _ = http.NewRequest("DELETE",
"https://api.dm.diamondmatch.org/v2/external/folders/polished?name=folder_1",
nil)
req.Header.Set("x-api-key", "YOUR_KEY")
resp, _ = client.Do(req)
defer resp.Body.Close()
fmt.Println(resp.StatusCode) // 204
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class ApiExample {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
// GET request
HttpRequest getRequest = HttpRequest.newBuilder()
.uri(URI.create("https://api.dm.diamondmatch.org/v2/external/folders/polished?filters%5Bname%5D=folder_1"))
.header("x-api-key", "YOUR_KEY")
.GET()
.build();
HttpResponse<String> getResponse = client.send(getRequest,
HttpResponse.BodyHandlers.ofString());
System.out.println(getResponse.body());
// [
// {
// "name": "folder_1",
// "activeSelection": false,
// "created": "2025-12-08T15:37:11.733Z",
// "updated": "2025-12-08T15:48:33.916Z",
// "size": 16
// }
// ]
// POST request
String postBody = """
{
"name": "folder_2",
"skus": [
"SKU_1",
"SKU_2"
]
}
""";
HttpRequest postRequest = HttpRequest.newBuilder()
.uri(URI.create("https://api.dm.diamondmatch.org/v2/external/folders/polished"))
.header("x-api-key", "YOUR_KEY")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(postBody))
.build();
HttpResponse<String> postResponse = client.send(postRequest,
HttpResponse.BodyHandlers.ofString());
System.out.println(postResponse.statusCode()); // 201
// PUT request
// removes SKU_2 from the folder
String putBody = """
{
"skus": [
"SKU_1"
]
}
""";
HttpRequest putRequest = HttpRequest.newBuilder()
.uri(URI.create("https://api.dm.diamondmatch.org/v2/external/folders/polished?name=folder_1"))
.header("x-api-key", "YOUR_KEY")
.header("Content-Type", "application/json")
.PUT(HttpRequest.BodyPublishers.ofString(putBody))
.build();
HttpResponse<String> putResponse = client.send(putRequest,
HttpResponse.BodyHandlers.ofString());
System.out.println(putResponse.statusCode()); // 204
// DELETE request
HttpRequest deleteRequest = HttpRequest.newBuilder()
.uri(URI.create("https://api.dm.diamondmatch.org/v2/external/folders/polished?name=folder_1"))
.header("x-api-key", "YOUR_KEY")
.DELETE()
.build();
HttpResponse<String> deleteResponse = client.send(deleteRequest,
HttpResponse.BodyHandlers.ofString());
System.out.println(deleteResponse.statusCode()); // 204
}
}
<?php
// GET request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.dm.diamondmatch.org/v2/external/folders/polished?filters%5Bname%5D=folder_1");
curl_setopt($ch, CURLOPT_HTTPHEADER, array("x-api-key: YOUR_KEY"));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
// [
// {
// "name": "folder_1",
// "activeSelection": false,
// "created": "2025-12-08T15:37:11.733Z",
// "updated": "2025-12-08T15:48:33.916Z",
// "size": 16
// }
// ]
// POST request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.dm.diamondmatch.org/v2/external/folders/polished");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"x-api-key: YOUR_KEY",
"Content-Type: application/json"
));
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array(
"name" => "folder_2",
"skus" => array("SKU_1", "SKU_2")
)));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode; // 201
// PUT request
// removes SKU_2 from the folder
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.dm.diamondmatch.org/v2/external/folders/polished?name=folder_1");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"x-api-key: YOUR_KEY",
"Content-Type: application/json"
));
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array(
"skus" => array("SKU_1")
)));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode; // 204
// DELETE request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.dm.diamondmatch.org/v2/external/folders/polished?name=folder_1");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_HTTPHEADER, array("x-api-key: YOUR_KEY"));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $httpCode; // 204
?>
require 'net/http'
require 'json'
# GET request
uri = URI("https://api.dm.diamondmatch.org/v2/external/folders/polished?filters%5Bname%5D=folder_1")
request = Net::HTTP::Get.new(uri)
request["x-api-key"] = "YOUR_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.body
# [
# {
# "name": "folder_1",
# "activeSelection": false,
# "created": "2025-12-08T15:37:11.733Z",
# "updated": "2025-12-08T15:48:33.916Z",
# "size": 16
# }
# ]
# POST request
uri = URI("https://api.dm.diamondmatch.org/v2/external/folders/polished")
request = Net::HTTP::Post.new(uri)
request["x-api-key"] = "YOUR_KEY"
request["Content-Type"] = "application/json"
request.body = {
name: "folder_2",
skus: ["SKU_1", "SKU_2"]
}.to_json
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.code # 201
# PUT request
# removes SKU_2 from the folder
uri = URI("https://api.dm.diamondmatch.org/v2/external/folders/polished?name=folder_1")
request = Net::HTTP::Put.new(uri)
request["x-api-key"] = "YOUR_KEY"
request["Content-Type"] = "application/json"
request.body = {
skus: ["SKU_1"]
}.to_json
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.code # 204
# DELETE request
uri = URI("https://api.dm.diamondmatch.org/v2/external/folders/polished?name=folder_1")
request = Net::HTTP::Delete.new(uri)
request["x-api-key"] = "YOUR_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.code # 204
#include <iostream>
#include <curl/curl.h>
#include <string>
size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* userp) {
userp->append((char*)contents, size * nmemb);
return size * nmemb;
}
int main() {
CURL* curl;
CURLcode res;
std::string readBuffer;
curl_global_init(CURL_GLOBAL_DEFAULT);
// GET request
curl = curl_easy_init();
if(curl) {
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "x-api-key: YOUR_KEY");
curl_easy_setopt(curl, CURLOPT_URL,
"https://api.dm.diamondmatch.org/v2/external/folders/polished?filters%5Bname%5D=folder_1");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer);
res = curl_easy_perform(curl);
std::cout << readBuffer << std::endl;
// [
// {
// "name": "folder_1",
// "activeSelection": false,
// "created": "2025-12-08T15:37:11.733Z",
// "updated": "2025-12-08T15:48:33.916Z",
// "size": 16
// }
// ]
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
// POST request
curl = curl_easy_init();
if(curl) {
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "x-api-key: YOUR_KEY");
headers = curl_slist_append(headers, "Content-Type: application/json");
std::string jsonData = R"({
"name": "folder_2",
"skus": [
"SKU_1",
"SKU_2"
]
})";
curl_easy_setopt(curl, CURLOPT_URL,
"https://api.dm.diamondmatch.org/v2/external/folders/polished");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, jsonData.c_str());
res = curl_easy_perform(curl);
long response_code;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code);
std::cout << response_code << std::endl; // 201
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
// PUT request
// removes SKU_2 from the folder
curl = curl_easy_init();
if(curl) {
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "x-api-key: YOUR_KEY");
headers = curl_slist_append(headers, "Content-Type: application/json");
std::string jsonData = R"({
"skus": [
"SKU_1"
]
})";
curl_easy_setopt(curl, CURLOPT_URL,
"https://api.dm.diamondmatch.org/v2/external/folders/polished?name=folder_1");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, jsonData.c_str());
res = curl_easy_perform(curl);
long response_code;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code);
std::cout << response_code << std::endl; // 204
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
// DELETE request
curl = curl_easy_init();
if(curl) {
struct curl_slist* headers = NULL;
headers = curl_slist_append(headers, "x-api-key: YOUR_KEY");
curl_easy_setopt(curl, CURLOPT_URL,
"https://api.dm.diamondmatch.org/v2/external/folders/polished?name=folder_1");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE");
res = curl_easy_perform(curl);
long response_code;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code);
std::cout << response_code << std::endl; // 204
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
curl_global_cleanup();
return 0;
}
Rough
The inventory for rough diamonds can be found under Inventory → Rough in the side bar, or under this link.
Diamonds
Diamonds are displayed in the main table of the inventory page when SKUs is selected in the Sort items by field (default). The table can be sorted by clicking on the column titles. Columns can be toggled and untoggled with the Toggle columns functionality. Filters can be applied through the filter panel on the left.
Adding diamonds
Diamonds can only be added through fingerprinting.
Deleting diamonds
Diamonds can be moved to the trash bin by selecting one or multiple diamonds and clicking the Move to trash button.
The trash bin can be viewed via the Access trash bin button. To restore or remove diamonds from the trash bin, select the diamonds and click the Restore items or Remove items button.
API
Managing rough diamonds can be done through the API the same was as polished diamonds.
Folders
Folders are collections of diamonds and by default shown in the collapsable panel on the right. When selecting Folders in the Sort items by field, the main table switches to showing the collection of folders. As for diamonds, columns can be toggled and untoggled with the Toggle columns functionality and filters can be applied through the filter panel on the left.
Folders can be created via the New folder field. To add diamonds to a folder, select the diamonds and drag them on top of the folder.
Info
When authenticating against a folder, the diamond is matched against all diamonds within that folder.