{"openapi":"3.1.0","info":{"title":"Unclasp Diamond API","version":"2026-12-03","summary":"Search certified loose diamonds and create a checkout for a buyer.","description":"Search Unclasp's live inventory of certified loose lab-grown and natural diamonds and create a Shopify checkout for a buyer. No API key needed. Prices are retail CAD dollars.\n\nThe same operations are available over MCP at `/mcp` (with an interactive MCP Apps UI) and over the Universal Commerce Protocol at `/ucp/mcp` (profile: `/.well-known/ucp`).\n\n**Versioning.** The API is dated (`API-Version: 2026-12-03`). Additive changes ship without notice; breaking changes get a new dated version, a changelog entry and at least 90 days' notice. See https://unclasp.ca/developers#changelog.\n\n**Reliability.** Every response carries `X-Request-Id`. Retry 429/500/503/504 after `Retry-After`. `POST /api/v1/checkout` honours `Idempotency-Key`. Service health: `GET /api/v1/health`.","contact":{"name":"Unclasp","url":"https://unclasp.ca/contact"},"termsOfService":"https://unclasp.ca/terms","x-changelog":"https://unclasp.ca/developers#changelog"},"servers":[{"url":"https://unclasp.ca","description":"Production"}],"externalDocs":{"description":"Agent guide","url":"https://unclasp.ca/developers"},"security":[],"tags":[{"name":"Catalog","description":"Live diamond inventory"},{"name":"Checkout","description":"Buyer handoff to Shopify checkout"},{"name":"Operations","description":"Health and status"}],"paths":{"/api/v1/diamonds":{"get":{"tags":["Catalog"],"operationId":"searchDiamonds","summary":"Search diamonds","description":"Live inventory search. Defaults: lab-grown, with photo and 360° video, sorted by price. Page with `offset` = `nextOffset` while `hasMore`. Rate limit: 120 requests/60s per IP.","parameters":[{"name":"shapes","in":"query","required":false,"description":"Comma-separated. Diamond shapes, e.g. [\"round\",\"oval\"]. Known: round, oval, emerald, pear, princess, cushion, radiant, marquise, heart, square_emerald, asscher, baguette, tapered_baguette, trilliant, triangle, trapezoid, half_moon, shield, kite, lozenge, hexagonal, octagonal, pentagonal, rose, flanders, old_miner, european, briolette, square, square_radiant, other","schema":{"type":"string"},"explode":false},{"name":"origin","in":"query","required":false,"description":"Lab-grown or natural (mined) diamonds. Default lab.","schema":{"default":"lab","description":"Lab-grown or natural (mined) diamonds. Default lab.","type":"string","enum":["lab","natural"]}},{"name":"caratMin","in":"query","required":false,"description":"","schema":{"type":"number","minimum":0,"maximum":30}},{"name":"caratMax","in":"query","required":false,"description":"","schema":{"type":"number","minimum":0,"maximum":30}},{"name":"colors","in":"query","required":false,"description":"Comma-separated. Colour grades, D (best) to N","schema":{"type":"string"},"explode":false},{"name":"clarities","in":"query","required":false,"description":"Comma-separated. Clarity grades, FL (best) to I3","schema":{"type":"string"},"explode":false},{"name":"cuts","in":"query","required":false,"description":"Comma-separated. Cut grades: EX excellent, VG very good, GD good, FR fair, PR poor","schema":{"type":"string"},"explode":false},{"name":"labs","in":"query","required":false,"description":"Comma-separated. Grading labs, e.g. [\"GIA\",\"IGI\"]","schema":{"type":"string"},"explode":false},{"name":"priceMinCad","in":"query","required":false,"description":"Minimum price, CAD dollars","schema":{"description":"Minimum price, CAD dollars","type":"number","minimum":0}},{"name":"priceMaxCad","in":"query","required":false,"description":"Maximum price, CAD dollars","schema":{"description":"Maximum price, CAD dollars","type":"number","minimum":0}},{"name":"certNumber","in":"query","required":false,"description":"Find a stone by its grading-certificate number","schema":{"description":"Find a stone by its grading-certificate number","type":"string"}},{"name":"sort","in":"query","required":false,"description":"","schema":{"default":"price_asc","type":"string","enum":["price_asc","price_desc","carat_asc","carat_desc","newest"]}},{"name":"requireMedia","in":"query","required":false,"description":"Only stones with a photo and 360° video (what the website shows). Default true.","schema":{"default":true,"description":"Only stones with a photo and 360° video (what the website shows). Default true.","type":"boolean"}},{"name":"limit","in":"query","required":false,"description":"","schema":{"default":10,"type":"integer","minimum":1,"maximum":50}},{"name":"offset","in":"query","required":false,"description":"","schema":{"default":0,"type":"integer","minimum":0,"maximum":5000}}],"responses":{"200":{"description":"Matching diamonds","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"},"example":{"offset":0,"limit":10,"count":1,"hasMore":false,"nextOffset":null,"currency":"CAD","items":[{"id":"ed4b2b1d-24f3-47f7-afde-08a6d3f2357f","url":"https://unclasp.ca/diamonds/ed4b2b1d-24f3-47f7-afde-08a6d3f2357f","title":"OVAL 1.57ct E VS1","origin":"lab","shape":"OVAL","carats":1.57,"color":"E","clarity":"VS1","cut":null,"polish":"EX","symmetry":"EX","fluorescence":"NON","lab":"IGI","certNumber":"LG612345678","certificatePdf":null,"measurementsMm":{"length":9.21,"width":6.38,"depth":3.95},"tablePct":61,"depthPct":61.9,"price":{"amount":1899.99,"currency":"CAD"},"availability":"AVAILABLE","returnable":true,"image":"https://nivoda-images.nivodaapi.net/example.jpg","video":"https://loupe360.com/diamond/example/video/500/500"}]}}}},"400":{"description":"Invalid parameters (see error.issues)","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — wait Retry-After seconds","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error — safe to retry after Retry-After","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"Inventory lookup timed out — retry","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/diamonds/{id}":{"get":{"tags":["Catalog"],"operationId":"getDiamond","summary":"Get one diamond (live availability and price)","parameters":[{"name":"id","in":"path","required":true,"description":"Diamond id from search results","schema":{"type":"string"}}],"responses":{"200":{"description":"The diamond","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiamondResult"},"example":{"diamond":{"id":"ed4b2b1d-24f3-47f7-afde-08a6d3f2357f","url":"https://unclasp.ca/diamonds/ed4b2b1d-24f3-47f7-afde-08a6d3f2357f","title":"OVAL 1.57ct E VS1","origin":"lab","shape":"OVAL","carats":1.57,"color":"E","clarity":"VS1","cut":null,"polish":"EX","symmetry":"EX","fluorescence":"NON","lab":"IGI","certNumber":"LG612345678","certificatePdf":null,"measurementsMm":{"length":9.21,"width":6.38,"depth":3.95},"tablePct":61,"depthPct":61.9,"price":{"amount":1899.99,"currency":"CAD"},"availability":"AVAILABLE","returnable":true,"image":"https://nivoda-images.nivodaapi.net/example.jpg","video":"https://loupe360.com/diamond/example/video/500/500"}}}}},"404":{"description":"Not found or no longer available","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — wait Retry-After seconds","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error — safe to retry after Retry-After","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"Inventory lookup timed out — retry","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/checkout":{"post":{"tags":["Checkout"],"operationId":"createCheckout","summary":"Create a Shopify checkout for loose diamonds","description":"Returns a `checkoutUrl` for the buyer to pay on Unclasp's Shopify checkout (shipping and taxes are calculated there). Prices are set by the server from live inventory. Takes ~20s. Send an `Idempotency-Key` so a retry returns the same checkout. Rate limit: 5 per 10 min per IP.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Unique key (e.g. a UUID). Successful results are replayed for 24h.","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"diamondIds":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","minLength":8,"maxLength":80,"description":"Unclasp diamond id (UUID, as returned by search)"},"description":"Ids of the loose diamonds to buy (1–5)"}},"required":["diamondIds"]},"example":{"diamondIds":["ed4b2b1d-24f3-47f7-afde-08a6d3f2357f"]}}}},"responses":{"201":{"description":"Checkout created","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResult"}}}},"400":{"description":"Invalid request","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"None of the diamonds are available","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Checkout could not be created","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — wait Retry-After seconds","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error — safe to retry after Retry-After","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"Inventory lookup timed out — retry","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ask":{"get":{"tags":["Catalog"],"operationId":"ask","summary":"Ask a natural-language question (NLWeb-style)","description":"Shopping requests (\"1.5 carat oval E VS1 under $3000\") run a live inventory search; questions about shipping, returns, payment or certificates are answered from site policy. Returns `answer`, `sources` and schema.org `results`.","parameters":[{"name":"query","in":"query","required":true,"description":"The question, 1–500 characters","schema":{"type":"string","minLength":1,"maxLength":500}}],"responses":{"200":{"description":"Answer with sources","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","required":["query","answer","sources","results"],"properties":{"query":{"type":"string"},"answer":{"type":"string"},"sources":{"type":"array","items":{"type":"string","format":"uri"}},"results":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"name":{"type":"string"},"site":{"type":"string"},"score":{"type":"number"},"description":{"type":"string"},"schema_object":{"type":"object","description":"schema.org Product"}}}}}}}}},"400":{"description":"Missing or invalid query","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited — wait Retry-After seconds","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Unexpected error — safe to retry after Retry-After","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"Inventory lookup timed out — retry","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/health":{"get":{"tags":["Operations"],"operationId":"getHealth","summary":"Service health","description":"Status of the API and its dependencies (inventory, cache, checkout).","responses":{"200":{"description":"Healthy or degraded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}},"503":{"description":"A dependency is down","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}}}}},"components":{"headers":{"X-Request-Id":{"description":"Echoes your X-Request-Id (or a generated id). Quote it when contacting support.","schema":{"type":"string"}},"API-Version":{"description":"Dated API version that served the request.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying (429, 503, 504).","schema":{"type":"integer"}}},"schemas":{"Diamond":{"type":"object","properties":{"id":{"type":"string","description":"Use with get_diamond / create_checkout"},"url":{"type":"string","description":"Product page"},"title":{"type":"string"},"origin":{"type":"string","enum":["lab","natural"]},"shape":{"type":"string"},"carats":{"type":"number"},"color":{"type":"string"},"clarity":{"type":"string"},"cut":{"type":["string","null"]},"polish":{"type":["string","null"]},"symmetry":{"type":["string","null"]},"fluorescence":{"type":["string","null"]},"lab":{"type":"string","description":"Grading lab (GIA, IGI, …); NONE when ungraded"},"certNumber":{"type":"string"},"certificatePdf":{"type":["string","null"]},"measurementsMm":{"type":"object","properties":{"length":{"type":"number"},"width":{"type":"number"},"depth":{"type":"number"}},"required":["length","width","depth"],"additionalProperties":false},"tablePct":{"type":["number","null"]},"depthPct":{"type":["number","null"]},"price":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string","const":"CAD"}},"required":["amount","currency"],"additionalProperties":false,"description":"Retail price, CAD dollars"},"availability":{"type":"string","description":"AVAILABLE, RESERVED or SOLD"},"returnable":{"type":["boolean","null"]},"image":{"type":["string","null"]},"video":{"description":"360° video viewer URL","type":["string","null"]}},"required":["id","url","title","origin","shape","carats","color","clarity","cut","polish","symmetry","fluorescence","lab","certNumber","certificatePdf","measurementsMm","tablePct","depthPct","price","availability","returnable","image","video"],"additionalProperties":false},"SearchResult":{"type":"object","properties":{"offset":{"type":"number"},"limit":{"type":"number"},"count":{"type":"number"},"hasMore":{"type":"boolean"},"nextOffset":{"type":["number","null"]},"currency":{"type":"string","const":"CAD"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Use with get_diamond / create_checkout"},"url":{"type":"string","description":"Product page"},"title":{"type":"string"},"origin":{"type":"string","enum":["lab","natural"]},"shape":{"type":"string"},"carats":{"type":"number"},"color":{"type":"string"},"clarity":{"type":"string"},"cut":{"type":["string","null"]},"polish":{"type":["string","null"]},"symmetry":{"type":["string","null"]},"fluorescence":{"type":["string","null"]},"lab":{"type":"string","description":"Grading lab (GIA, IGI, …); NONE when ungraded"},"certNumber":{"type":"string"},"certificatePdf":{"type":["string","null"]},"measurementsMm":{"type":"object","properties":{"length":{"type":"number"},"width":{"type":"number"},"depth":{"type":"number"}},"required":["length","width","depth"],"additionalProperties":false},"tablePct":{"type":["number","null"]},"depthPct":{"type":["number","null"]},"price":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string","const":"CAD"}},"required":["amount","currency"],"additionalProperties":false,"description":"Retail price, CAD dollars"},"availability":{"type":"string","description":"AVAILABLE, RESERVED or SOLD"},"returnable":{"type":["boolean","null"]},"image":{"type":["string","null"]},"video":{"description":"360° video viewer URL","type":["string","null"]}},"required":["id","url","title","origin","shape","carats","color","clarity","cut","polish","symmetry","fluorescence","lab","certNumber","certificatePdf","measurementsMm","tablePct","depthPct","price","availability","returnable","image","video"],"additionalProperties":false}}},"required":["offset","limit","count","hasMore","nextOffset","currency","items"],"additionalProperties":false},"DiamondResult":{"type":"object","properties":{"diamond":{"type":"object","properties":{"id":{"type":"string","description":"Use with get_diamond / create_checkout"},"url":{"type":"string","description":"Product page"},"title":{"type":"string"},"origin":{"type":"string","enum":["lab","natural"]},"shape":{"type":"string"},"carats":{"type":"number"},"color":{"type":"string"},"clarity":{"type":"string"},"cut":{"type":["string","null"]},"polish":{"type":["string","null"]},"symmetry":{"type":["string","null"]},"fluorescence":{"type":["string","null"]},"lab":{"type":"string","description":"Grading lab (GIA, IGI, …); NONE when ungraded"},"certNumber":{"type":"string"},"certificatePdf":{"type":["string","null"]},"measurementsMm":{"type":"object","properties":{"length":{"type":"number"},"width":{"type":"number"},"depth":{"type":"number"}},"required":["length","width","depth"],"additionalProperties":false},"tablePct":{"type":["number","null"]},"depthPct":{"type":["number","null"]},"price":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string","const":"CAD"}},"required":["amount","currency"],"additionalProperties":false,"description":"Retail price, CAD dollars"},"availability":{"type":"string","description":"AVAILABLE, RESERVED or SOLD"},"returnable":{"type":["boolean","null"]},"image":{"type":["string","null"]},"video":{"description":"360° video viewer URL","type":["string","null"]}},"required":["id","url","title","origin","shape","carats","color","clarity","cut","polish","symmetry","fluorescence","lab","certNumber","certificatePdf","measurementsMm","tablePct","depthPct","price","availability","returnable","image","video"],"additionalProperties":false}},"required":["diamond"],"additionalProperties":false},"CheckoutResult":{"type":"object","properties":{"checkoutUrl":{"type":"string","description":"Give this to the buyer to pay"},"lines":{"type":"array","items":{"type":"object","properties":{"diamondId":{"type":"string"},"title":{"type":"string"},"price":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string","const":"CAD"}},"required":["amount","currency"],"additionalProperties":false},"url":{"type":"string"}},"required":["diamondId","title","price","url"],"additionalProperties":false}},"subtotal":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string","const":"CAD"}},"required":["amount","currency"],"additionalProperties":false},"failedItems":{"type":"array","items":{"type":"object","properties":{"diamondId":{"type":"string"},"title":{"type":"string"},"error":{"type":"string"}},"required":["diamondId","title","error"],"additionalProperties":false}},"note":{"type":"string"},"nativeCheckout":{"description":"Optional in-agent payment: continue this cart on Shopify's UCP Checkout MCP (Shop Pay, Google Pay, card). Requires a Shopify-registered agent platform; otherwise use checkoutUrl.","type":"object","properties":{"protocol":{"type":"string","const":"ucp"},"version":{"type":"string"},"profile":{"type":"string","description":"Shopify's UCP business profile (lists payment handlers)"},"endpoint":{"type":"string","description":"Shopify Checkout MCP endpoint"},"cartId":{"type":"string","description":"Pass as checkout.cart_id to Shopify's create_checkout"},"lineItems":{"type":"array","items":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"quantity":{"type":"number","const":1}},"required":["item","quantity"],"additionalProperties":false}},"currency":{"type":"string","const":"CAD"},"instructions":{"type":"string"},"docs":{"type":"string"}},"required":["protocol","version","profile","endpoint","cartId","lineItems","currency","instructions","docs"],"additionalProperties":false}},"required":["checkoutUrl","lines","subtotal","note"],"additionalProperties":false},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_request","invalid_json","not_found","unavailable","checkout_failed","rate_limited","upstream_timeout","internal_error"]},"message":{"type":"string"},"requestId":{"type":"string"},"issues":{"type":"array","items":{"type":"object"},"description":"Validation details"},"failedItems":{"type":"array","items":{"type":"object"}}}}}},"Health":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded","down"]},"apiVersion":{"type":"string"},"time":{"type":"string","format":"date-time"},"checks":{"type":"object","additionalProperties":true}}}}}}