Skip to content

.NET API

NivodaApi

Scriptable Nivoda diamond search. Uses the SAME pipeline as the pricing Breakdown panel: credentials from the user’s configured integration (Options > Integrations > Nivoda, or the 2Shapes account), the user’s saved Nivoda filter (colors, clarity, cut, availability…), and the service’s 30-minute in-memory cache. Requires Nivoda credentials to be configured — throws a clear error otherwise. Network call; read-only for the Rhino document.

from ArtisanPlugin.Scripting import NivodaApi

See also the guide, API Reference › Integrations, and the Python package, ra.nivoda.

Methods

Method
ClearCacheDrops the service’s in-memory query cache so the next Search hits the live API (results are otherwise cached for ~30 minutes).
SearchSearches certified diamonds matching shape (GemShape name, e.g.

ClearCache

void NivodaApi.ClearCache()

Drops the service’s in-memory query cache so the next Search hits the live API (results are otherwise cached for ~30 minutes).

IReadOnlyList<NivodaDiamondItem> NivodaApi.Search(
    string shape,
    double carats,
    bool labGrown = false)

Searches certified diamonds matching shape (GemShape name, e.g. “ROUND”) and carats (the service queries the range [carats-0.01, carats+0.1]). Returns the best matches (the service caps how many items each query fetches). Each item has: Price (in CENTS — divide by 100, same as DiamondCertified does), Discount, and NivodaDiamond.{ImageUrl, VideoUrl, Availability, SupplierStockId, Certificate with Lab/Shape/CertNumber/Cut/ Carats/Clarity/Color/Polish/Symmetry/measurements}.

ParameterTypeDefault
shapestringrequired
caratsdoublerequired
labGrownboolfalse

Returns IReadOnlyList<NivodaDiamondItem>.