> For the complete documentation index, see [llms.txt](https://docs.tracr.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tracr.com/api-reference/grading-integration-service-gis-api/references/api-v2.md).

# API V2

## Get Diamond

> Look up a single diamond in Tracr and return its data if it exists.

```json
{"openapi":"3.1.0","info":{"title":"Grading Integration Service API","version":"development"},"paths":{"/v2/diamonds/{diamond_id}":{"get":{"description":"Look up a single diamond in Tracr and return its data if it exists.","operationId":"get_diamond_v2_diamonds__diamond_id__get","parameters":[{"in":"path","name":"diamond_id","required":true,"schema":{"pattern":"^[a-z\\d]{20,98}$","title":"Diamond Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tracr__gis__api__v2__models__SimplifiedDiamond"}}},"description":"Successful Response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":"Returned when a Diamond is not found in the Tracr network."},"406":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GisIneligibleResponse"},{"$ref":"#/components/schemas/GISError"}],"title":"Response 406 Get Diamond V2 Diamonds  Diamond Id  Get"}}},"description":"Returned when there are issues with the referenced diamond."},"410":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GisIneligibleResponse"},{"$ref":"#/components/schemas/GISError"}],"title":"Response 410 Get Diamond V2 Diamonds  Diamond Id  Get"}}},"description":"Returned when a requested resource has been deleted or expired."},"412":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GisIneligibleResponse"},{"$ref":"#/components/schemas/GISError"}],"title":"Response 412 Get Diamond V2 Diamonds  Diamond Id  Get"}}},"description":"Returned when a Diamond is ineligible for GIS."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":"Returned when an internal error occurred within GIS."}},"summary":"Get Diamond","tags":["API v2","Diamond Verification","Verify 1"]}}},"components":{"schemas":{"tracr__gis__api__v2__models__SimplifiedDiamond":{"description":"A simplified set of data about a Tracr-registered diamond.","properties":{"assets":{"default":[],"items":{"anyOf":[{"$ref":"#/components/schemas/DiamondAssetV2ImageResponse"},{"$ref":"#/components/schemas/DiamondAssetV2VideoResponse"},{"$ref":"#/components/schemas/DiamondAssetV2ScanResponse"},{"$ref":"#/components/schemas/DiamondAssetV2ScanReportResponse"},{"$ref":"#/components/schemas/DiamondAssetV2PlanResponse"},{"$ref":"#/components/schemas/DiamondAssetV2PlanReportResponse"},{"$ref":"#/components/schemas/DiamondAssetV2InscriptionNumberResponse"},{"$ref":"#/components/schemas/DiamondAssetV2ThreeDPlanResponse"},{"$ref":"#/components/schemas/DiamondAssetV2SupplementaryResponse"}]},"title":"Assets","type":"array"},"carats":{"description":"The weight of the diamond in carats","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,3}0*$","title":"Carats","type":"string"},"clarity":{"anyOf":[{"$ref":"#/components/schemas/Clarity"},{"type":"null"}],"description":"Clarity of the diamond"},"colour":{"anyOf":[{"$ref":"#/components/schemas/Colour"},{"type":"null"}],"description":"Colour of the diamond"},"diamond_id":{"pattern":"^[a-z\\d]{20,98}$","title":"Diamond Id","type":"string"},"display_colour":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Formatted Fancy colour (Intensity + Overtone + Colour) or colour from the standard scale","title":"Display Colour"},"fancy_colour":{"anyOf":[{"$ref":"#/components/schemas/FancyColour"},{"type":"null"}],"description":"The fancy colour of the diamond."},"provenance":{"$ref":"#/components/schemas/ProvenanceRecord","description":"The provenance of the diamond."},"rough_check":{"description":"Indicates whether the rough diamond has been verified by Tracr Rough Check","title":"Rough Check","type":"boolean"},"shape":{"$ref":"#/components/schemas/Shape","description":"Shape of polished diamond."}},"required":["diamond_id","shape","carats","provenance","rough_check"],"title":"SimplifiedDiamond","type":"object"},"DiamondAssetV2ImageResponse":{"properties":{"asset_type":{"title":"Asset Type"},"content_hash":{"description":"The SHA-512 hash of the image's content.","title":"Content Hash"},"created_at":{"description":"The time at which this diamond asset was first uploaded. This field is not transferred. When the recipient of a transfer receives this asset, this field will be set to the time at which the transfer of the diamond completes.","title":"Created At"},"diamond_id":{"description":"The Tracr ID for the diamond to which this asset belongs.","pattern":"^[a-z\\d]{20,98}$","title":"Diamond Id","type":"string"},"diamond_stage":{"description":"Whether this asset is associated with the diamond when it was rough, or after it was polished."},"extension":{"description":"The image's file extension."},"filename":{"description":"The filename of the image.","title":"Filename"},"gallery":{"description":"The gallery in which this asset will appear on the diamond details page in the Tracr Portal. On the Diamond Experience diamonds in the rough gallery will appear onthe Provenance page, diamonds in the split and polished galleries willappear on the Craftsmanship page. If no gallery is specified, the asset will not be displayed, but it will still be transferred with the diamond. "},"gallery_priority":{"description":"Determines the position of the asset in the specified gallery relative to the other assets in the gallery. Assets with a higher gallery priority will appear before assets with a lower gallery priority. Assets with an equal gallery priority will appear subject to the lexicographical order of their id.","title":"Gallery Priority"},"id":{"description":"Uniquely identifies the asset.","pattern":"^[a-z\\d]{20,98}$","title":"Id","type":"string"},"image_type":{"description":"Image type of image."},"is_hero":{"description":"Whether this asset will appear as the diamond's hero asset. Hero assets appear at the top of the diamond details within the Tracr portal and on the Your Diamond page of the Diamond Experience. Hero assets can also appear in the gallery if one is specified. The position of a hero asset within the gallery is subject to subject to the configured gallery priority.","title":"Is Hero"},"label":{"description":"Text that will appear as an overlay on the bottom right of the asset when it is displayed in a gallery.","title":"Label"},"updated_at":{"description":"The time at which this diamond asset was last updated. This field is not transferred. When the recipient of a transfer receives this asset, this field will be set to the time at which the transfer of the diamond completes.","title":"Updated At"}},"required":["diamond_id","id","created_at","updated_at","filename","extension","content_hash"],"title":"DiamondAssetV2ImageResponse","type":"object"},"DiamondAssetV2VideoResponse":{"properties":{"asset_type":{"title":"Asset Type"},"content_hash":{"description":"The SHA-512 hash of the video's content.","title":"Content Hash"},"created_at":{"description":"The time at which this diamond asset was first uploaded. This field is not transferred. When the recipient of a transfer receives this asset, this field will be set to the time at which the transfer of the diamond completes.","title":"Created At"},"diamond_id":{"description":"The Tracr ID for the diamond to which this asset belongs.","pattern":"^[a-z\\d]{20,98}$","title":"Diamond Id","type":"string"},"diamond_stage":{"description":"Whether this asset is associated with the diamond when it was rough, or after it was polished."},"extension":{"description":"The video's file extension."},"filename":{"description":"The filename of the video.","title":"Filename"},"gallery":{"description":"The gallery in which this asset will appear on the diamond details page in the Tracr Portal. On the Diamond Experience diamonds in the rough gallery will appear onthe Provenance page, diamonds in the split and polished galleries willappear on the Craftsmanship page. If no gallery is specified, the asset will not be displayed, but it will still be transferred with the diamond. "},"gallery_priority":{"description":"Determines the position of the asset in the specified gallery relative to the other assets in the gallery. Assets with a higher gallery priority will appear before assets with a lower gallery priority. Assets with an equal gallery priority will appear subject to the lexicographical order of their id.","title":"Gallery Priority"},"id":{"description":"Uniquely identifies the asset.","pattern":"^[a-z\\d]{20,98}$","title":"Id","type":"string"},"is_hero":{"description":"Whether this asset will appear as the diamond's hero asset. Hero assets appear at the top of the diamond details within the Tracr portal and on the Your Diamond page of the Diamond Experience. Hero assets can also appear in the gallery if one is specified. The position of a hero asset within the gallery is subject to subject to the configured gallery priority.","title":"Is Hero"},"label":{"description":"Text that will appear as an overlay on the bottom right of the asset when it is displayed in a gallery.","title":"Label"},"updated_at":{"description":"The time at which this diamond asset was last updated. This field is not transferred. When the recipient of a transfer receives this asset, this field will be set to the time at which the transfer of the diamond completes.","title":"Updated At"}},"required":["diamond_id","id","created_at","updated_at","filename","extension","content_hash"],"title":"DiamondAssetV2VideoResponse","type":"object"},"DiamondAssetV2ScanResponse":{"properties":{"asset_type":{"title":"Asset Type"},"content_hash":{"description":"The SHA-512 hash of the scan's content.","title":"Content Hash"},"created_at":{"description":"The time at which this diamond asset was first uploaded. This field is not transferred. When the recipient of a transfer receives this asset, this field will be set to the time at which the transfer of the diamond completes.","title":"Created At"},"diamond_id":{"description":"The Tracr ID for the diamond to which this asset belongs.","pattern":"^[a-z\\d]{20,98}$","title":"Diamond Id","type":"string"},"diamond_stage":{"description":"Whether this asset is associated with the diamond when it was rough, or after it was polished."},"extension":{"description":"The scan's file extension."},"filename":{"description":"The filename of the scan.","title":"Filename"},"gallery":{"description":"The gallery in which this asset will appear on the diamond details page in the Tracr Portal. On the Diamond Experience diamonds in the rough gallery will appear onthe Provenance page, diamonds in the split and polished galleries willappear on the Craftsmanship page. If no gallery is specified, the asset will not be displayed, but it will still be transferred with the diamond. "},"gallery_priority":{"description":"Determines the position of the asset in the specified gallery relative to the other assets in the gallery. Assets with a higher gallery priority will appear before assets with a lower gallery priority. Assets with an equal gallery priority will appear subject to the lexicographical order of their id.","title":"Gallery Priority"},"id":{"description":"Uniquely identifies the asset.","pattern":"^[a-z\\d]{20,98}$","title":"Id","type":"string"},"is_hero":{"description":"Whether this asset will appear as the diamond's hero asset. Hero assets appear at the top of the diamond details within the Tracr portal and on the Your Diamond page of the Diamond Experience. Hero assets can also appear in the gallery if one is specified. The position of a hero asset within the gallery is subject to subject to the configured gallery priority.","title":"Is Hero"},"label":{"description":"Text that will appear as an overlay on the bottom right of the asset when it is displayed in a gallery.","title":"Label"},"scan_device_manufacturer":{"description":"The manufacturer of the scanner used to produce this scan.","title":"Scan Device Manufacturer"},"scan_device_model":{"description":"The model of the scanner used to produce this scan.","title":"Scan Device Model"},"updated_at":{"description":"The time at which this diamond asset was last updated. This field is not transferred. When the recipient of a transfer receives this asset, this field will be set to the time at which the transfer of the diamond completes.","title":"Updated At"}},"required":["diamond_id","id","created_at","updated_at","filename","extension","content_hash"],"title":"DiamondAssetV2ScanResponse","type":"object"},"DiamondAssetV2ScanReportResponse":{"properties":{"asset_type":{"title":"Asset Type"},"content_hash":{"description":"The SHA-512 hash of the scan report's content.","title":"Content Hash"},"created_at":{"description":"The time at which this diamond asset was first uploaded. This field is not transferred. When the recipient of a transfer receives this asset, this field will be set to the time at which the transfer of the diamond completes.","title":"Created At"},"diamond_id":{"description":"The Tracr ID for the diamond to which this asset belongs.","pattern":"^[a-z\\d]{20,98}$","title":"Diamond Id","type":"string"},"diamond_stage":{"description":"Whether this asset is associated with the diamond when it was rough, or after it was polished."},"extension":{"description":"The scan report's file extension.","title":"Extension"},"filename":{"description":"The filename of the scan report.","title":"Filename"},"gallery":{"description":"The gallery in which this asset will appear on the diamond details page in the Tracr Portal. On the Diamond Experience diamonds in the rough gallery will appear onthe Provenance page, diamonds in the split and polished galleries willappear on the Craftsmanship page. If no gallery is specified, the asset will not be displayed, but it will still be transferred with the diamond. "},"gallery_priority":{"description":"Determines the position of the asset in the specified gallery relative to the other assets in the gallery. Assets with a higher gallery priority will appear before assets with a lower gallery priority. Assets with an equal gallery priority will appear subject to the lexicographical order of their id.","title":"Gallery Priority"},"id":{"description":"Uniquely identifies the asset.","pattern":"^[a-z\\d]{20,98}$","title":"Id","type":"string"},"is_hero":{"description":"Whether this asset will appear as the diamond's hero asset. Hero assets appear at the top of the diamond details within the Tracr portal and on the Your Diamond page of the Diamond Experience. Hero assets can also appear in the gallery if one is specified. The position of a hero asset within the gallery is subject to subject to the configured gallery priority.","title":"Is Hero"},"label":{"description":"Text that will appear as an overlay on the bottom right of the asset when it is displayed in a gallery.","title":"Label"},"scan_device_manufacturer":{"description":"The manufacturer of the scanner used to produce this scan report.","title":"Scan Device Manufacturer"},"scan_device_model":{"description":"The model of the scanner used to produce this scan report.","title":"Scan Device Model"},"scan_software_name":{"description":"The name of the software running on the scanner used to produce this scan report.","title":"Scan Software Name"},"scan_software_version":{"description":"The version of the software running on the scanner used to produce this scan report.","title":"Scan Software Version"},"updated_at":{"description":"The time at which this diamond asset was last updated. This field is not transferred. When the recipient of a transfer receives this asset, this field will be set to the time at which the transfer of the diamond completes.","title":"Updated At"}},"required":["diamond_id","id","created_at","updated_at","filename","extension","content_hash"],"title":"DiamondAssetV2ScanReportResponse","type":"object"},"DiamondAssetV2PlanResponse":{"properties":{"asset_type":{"title":"Asset Type"},"content_hash":{"description":"The SHA-512 hash of the plan's content.","title":"Content Hash"},"created_at":{"description":"The time at which this diamond asset was first uploaded. This field is not transferred. When the recipient of a transfer receives this asset, this field will be set to the time at which the transfer of the diamond completes.","title":"Created At"},"diamond_id":{"description":"The Tracr ID for the diamond to which this asset belongs.","pattern":"^[a-z\\d]{20,98}$","title":"Diamond Id","type":"string"},"diamond_stage":{"description":"Whether this asset is associated with the diamond when it was rough, or after it was polished."},"extension":{"description":"The plan's file extension."},"filename":{"description":"The filename of the plan.","title":"Filename"},"gallery":{"description":"The gallery in which this asset will appear on the diamond details page in the Tracr Portal. On the Diamond Experience diamonds in the rough gallery will appear onthe Provenance page, diamonds in the split and polished galleries willappear on the Craftsmanship page. If no gallery is specified, the asset will not be displayed, but it will still be transferred with the diamond. "},"gallery_priority":{"description":"Determines the position of the asset in the specified gallery relative to the other assets in the gallery. Assets with a higher gallery priority will appear before assets with a lower gallery priority. Assets with an equal gallery priority will appear subject to the lexicographical order of their id.","title":"Gallery Priority"},"id":{"description":"Uniquely identifies the asset.","pattern":"^[a-z\\d]{20,98}$","title":"Id","type":"string"},"is_hero":{"description":"Whether this asset will appear as the diamond's hero asset. Hero assets appear at the top of the diamond details within the Tracr portal and on the Your Diamond page of the Diamond Experience. Hero assets can also appear in the gallery if one is specified. The position of a hero asset within the gallery is subject to subject to the configured gallery priority.","title":"Is Hero"},"label":{"description":"Text that will appear as an overlay on the bottom right of the asset when it is displayed in a gallery.","title":"Label"},"plan_software_manufacturer":{"description":"The manufacturer of the software used to produce this plan.","title":"Plan Software Manufacturer"},"plan_software_name":{"description":"The name of the software used or produce this plan.","title":"Plan Software Name"},"plan_software_version":{"description":"The version of the software used to produce this plan.","title":"Plan Software Version"},"updated_at":{"description":"The time at which this diamond asset was last updated. This field is not transferred. When the recipient of a transfer receives this asset, this field will be set to the time at which the transfer of the diamond completes.","title":"Updated At"}},"required":["diamond_id","id","created_at","updated_at","filename","extension","content_hash"],"title":"DiamondAssetV2PlanResponse","type":"object"},"DiamondAssetV2PlanReportResponse":{"properties":{"asset_type":{"title":"Asset Type"},"content_hash":{"description":"The SHA-512 hash of the plan report's content.","title":"Content Hash"},"created_at":{"description":"The time at which this diamond asset was first uploaded. This field is not transferred. When the recipient of a transfer receives this asset, this field will be set to the time at which the transfer of the diamond completes.","title":"Created At"},"diamond_id":{"description":"The Tracr ID for the diamond to which this asset belongs.","pattern":"^[a-z\\d]{20,98}$","title":"Diamond Id","type":"string"},"diamond_stage":{"description":"Whether this asset is associated with the diamond when it was rough, or after it was polished."},"extension":{"description":"The plan report's file extension.","title":"Extension"},"filename":{"description":"The filename of the plan report.","title":"Filename"},"gallery":{"description":"The gallery in which this asset will appear on the diamond details page in the Tracr Portal. On the Diamond Experience diamonds in the rough gallery will appear onthe Provenance page, diamonds in the split and polished galleries willappear on the Craftsmanship page. If no gallery is specified, the asset will not be displayed, but it will still be transferred with the diamond. "},"gallery_priority":{"description":"Determines the position of the asset in the specified gallery relative to the other assets in the gallery. Assets with a higher gallery priority will appear before assets with a lower gallery priority. Assets with an equal gallery priority will appear subject to the lexicographical order of their id.","title":"Gallery Priority"},"id":{"description":"Uniquely identifies the asset.","pattern":"^[a-z\\d]{20,98}$","title":"Id","type":"string"},"is_hero":{"description":"Whether this asset will appear as the diamond's hero asset. Hero assets appear at the top of the diamond details within the Tracr portal and on the Your Diamond page of the Diamond Experience. Hero assets can also appear in the gallery if one is specified. The position of a hero asset within the gallery is subject to subject to the configured gallery priority.","title":"Is Hero"},"label":{"description":"Text that will appear as an overlay on the bottom right of the asset when it is displayed in a gallery.","title":"Label"},"plan_software_manufacturer":{"description":"The manufacturer of the software used to produce this plan report.","title":"Plan Software Manufacturer"},"plan_software_name":{"description":"The name of the software used or produce this plan report.","title":"Plan Software Name"},"plan_software_version":{"description":"The version of the software used to produce this plan report.","title":"Plan Software Version"},"scan_device_manufacturer":{"description":"The manufacturer of the scanner used to produce this plan report.","title":"Scan Device Manufacturer"},"scan_device_model":{"description":"The model of the scanner used to produce this plan report.","title":"Scan Device Model"},"updated_at":{"description":"The time at which this diamond asset was last updated. This field is not transferred. When the recipient of a transfer receives this asset, this field will be set to the time at which the transfer of the diamond completes.","title":"Updated At"}},"required":["diamond_id","id","created_at","updated_at","filename","extension","content_hash"],"title":"DiamondAssetV2PlanReportResponse","type":"object"},"DiamondAssetV2InscriptionNumberResponse":{"properties":{"asset_type":{"title":"Asset Type"},"content_hash":{"description":"The SHA-512 hash of the inscription number file's content.","title":"Content Hash"},"created_at":{"description":"The time at which this diamond asset was first uploaded. This field is not transferred. When the recipient of a transfer receives this asset, this field will be set to the time at which the transfer of the diamond completes.","title":"Created At"},"diamond_id":{"description":"The Tracr ID for the diamond to which this asset belongs.","pattern":"^[a-z\\d]{20,98}$","title":"Diamond Id","type":"string"},"diamond_stage":{"description":"Whether this asset is associated with the diamond when it was rough, or after it was polished."},"extension":{"description":"The inscription number file's file extension.","title":"Extension"},"filename":{"description":"The filename of the inscription number file.","title":"Filename"},"gallery":{"description":"The gallery in which this asset will appear on the diamond details page in the Tracr Portal. On the Diamond Experience diamonds in the rough gallery will appear onthe Provenance page, diamonds in the split and polished galleries willappear on the Craftsmanship page. If no gallery is specified, the asset will not be displayed, but it will still be transferred with the diamond. "},"gallery_priority":{"description":"Determines the position of the asset in the specified gallery relative to the other assets in the gallery. Assets with a higher gallery priority will appear before assets with a lower gallery priority. Assets with an equal gallery priority will appear subject to the lexicographical order of their id.","title":"Gallery Priority"},"graded_date":{"description":"The date on which the diamond was inscribed.","title":"Graded Date"},"grader_inscription_no":{"description":"The inscription number.","title":"Grader Inscription No"},"grading_lab":{"description":"The grading that inscribed the diamond.","title":"Grading Lab"},"id":{"description":"Uniquely identifies the asset.","pattern":"^[a-z\\d]{20,98}$","title":"Id","type":"string"},"is_hero":{"description":"Whether this asset will appear as the diamond's hero asset. Hero assets appear at the top of the diamond details within the Tracr portal and on the Your Diamond page of the Diamond Experience. Hero assets can also appear in the gallery if one is specified. The position of a hero asset within the gallery is subject to subject to the configured gallery priority.","title":"Is Hero"},"label":{"description":"Text that will appear as an overlay on the bottom right of the asset when it is displayed in a gallery.","title":"Label"},"updated_at":{"description":"The time at which this diamond asset was last updated. This field is not transferred. When the recipient of a transfer receives this asset, this field will be set to the time at which the transfer of the diamond completes.","title":"Updated At"}},"required":["diamond_id","id","created_at","updated_at","filename","extension","grading_lab","graded_date","grader_inscription_no","content_hash"],"title":"DiamondAssetV2InscriptionNumberResponse","type":"object"},"DiamondAssetV2ThreeDPlanResponse":{"properties":{"asset_type":{"title":"Asset Type"},"created_at":{"description":"The time at which this diamond asset was first uploaded. This field is not transferred. When the recipient of a transfer receives this asset, this field will be set to the time at which the transfer of the diamond completes.","title":"Created At"},"diamond_id":{"description":"The Tracr ID for the diamond to which this asset belongs.","pattern":"^[a-z\\d]{20,98}$","title":"Diamond Id","type":"string"},"diamond_stage":{"description":"Whether this asset is associated with the diamond when it was rough, or after it was polished."},"gallery":{"description":"The gallery in which this asset will appear on the diamond details page in the Tracr Portal. On the Diamond Experience diamonds in the rough gallery will appear onthe Provenance page, diamonds in the split and polished galleries willappear on the Craftsmanship page. If no gallery is specified, the asset will not be displayed, but it will still be transferred with the diamond. "},"gallery_priority":{"description":"Determines the position of the asset in the specified gallery relative to the other assets in the gallery. Assets with a higher gallery priority will appear before assets with a lower gallery priority. Assets with an equal gallery priority will appear subject to the lexicographical order of their id.","title":"Gallery Priority"},"id":{"description":"Uniquely identifies the asset.","pattern":"^[a-z\\d]{20,98}$","title":"Id","type":"string"},"is_hero":{"description":"Whether this asset will appear as the diamond's hero asset. Hero assets appear at the top of the diamond details within the Tracr portal and on the Your Diamond page of the Diamond Experience. Hero assets can also appear in the gallery if one is specified. The position of a hero asset within the gallery is subject to subject to the configured gallery priority.","title":"Is Hero"},"label":{"description":"Text that will appear as an overlay on the bottom right of the asset when it is displayed in a gallery.","title":"Label"},"polished_three_d_plan_content_hash":{"description":"The SHA-512 hash of the polished 3D plan's content.","title":"Polished Three D Plan Content Hash"},"polished_three_d_plan_extension":{"description":"The polished 3D plan's file extension.","title":"Polished Three D Plan Extension"},"polished_three_d_plan_filename":{"description":"The polished 3D plan's filename.","title":"Polished Three D Plan Filename"},"rough_three_d_plan_content_hash":{"description":"The SHA-512 hash of the rough 3D plan's content.","title":"Rough Three D Plan Content Hash"},"rough_three_d_plan_extension":{"description":"The rough 3D plan's file extension.","title":"Rough Three D Plan Extension"},"rough_three_d_plan_filename":{"description":"The rough 3D plan's filename.","title":"Rough Three D Plan Filename"},"updated_at":{"description":"The time at which this diamond asset was last updated. This field is not transferred. When the recipient of a transfer receives this asset, this field will be set to the time at which the transfer of the diamond completes.","title":"Updated At"}},"required":["diamond_id","id","created_at","updated_at","rough_three_d_plan_filename","rough_three_d_plan_extension","polished_three_d_plan_filename","polished_three_d_plan_extension","rough_three_d_plan_content_hash","polished_three_d_plan_content_hash"],"title":"DiamondAssetV2ThreeDPlanResponse","type":"object"},"DiamondAssetV2SupplementaryResponse":{"properties":{"asset_type":{"title":"Asset Type"},"content_hash":{"description":"The SHA-512 hash of the supplementary file's content.","title":"Content Hash"},"created_at":{"description":"The time at which this diamond asset was first uploaded. This field is not transferred. When the recipient of a transfer receives this asset, this field will be set to the time at which the transfer of the diamond completes.","title":"Created At"},"diamond_id":{"description":"The Tracr ID for the diamond to which this asset belongs.","pattern":"^[a-z\\d]{20,98}$","title":"Diamond Id","type":"string"},"diamond_stage":{"description":"Whether this asset is associated with the diamond when it was rough, or after it was polished."},"extension":{"description":"The supplementary file's file extension.","title":"Extension"},"filename":{"description":"The filename of the supplementary file.","title":"Filename"},"gallery":{"description":"The gallery in which this asset will appear on the diamond details page in the Tracr Portal. On the Diamond Experience diamonds in the rough gallery will appear onthe Provenance page, diamonds in the split and polished galleries willappear on the Craftsmanship page. If no gallery is specified, the asset will not be displayed, but it will still be transferred with the diamond. "},"gallery_priority":{"description":"Determines the position of the asset in the specified gallery relative to the other assets in the gallery. Assets with a higher gallery priority will appear before assets with a lower gallery priority. Assets with an equal gallery priority will appear subject to the lexicographical order of their id.","title":"Gallery Priority"},"id":{"description":"Uniquely identifies the asset.","pattern":"^[a-z\\d]{20,98}$","title":"Id","type":"string"},"is_hero":{"description":"Whether this asset will appear as the diamond's hero asset. Hero assets appear at the top of the diamond details within the Tracr portal and on the Your Diamond page of the Diamond Experience. Hero assets can also appear in the gallery if one is specified. The position of a hero asset within the gallery is subject to subject to the configured gallery priority.","title":"Is Hero"},"label":{"description":"Text that will appear as an overlay on the bottom right of the asset when it is displayed in a gallery.","title":"Label"},"updated_at":{"description":"The time at which this diamond asset was last updated. This field is not transferred. When the recipient of a transfer receives this asset, this field will be set to the time at which the transfer of the diamond completes.","title":"Updated At"}},"required":["diamond_id","id","created_at","updated_at","filename","extension","content_hash"],"title":"DiamondAssetV2SupplementaryResponse","type":"object"},"Clarity":{"enum":["FL","IF","LC","VVS1","VVS2","VS1","VS2","SI1","SI2","SI3","I1","I2","I3","P1","P2","P3"],"title":"Clarity","type":"string"},"Colour":{"enum":["D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],"title":"Colour","type":"string"},"FancyColour":{"enum":["BK","B","BN","CH","CM","CG","GY","G","O","P","PL","R","V","Y","W","X"],"title":"FancyColour","type":"string"},"ProvenanceRecord":{"additionalProperties":true,"description":"The provenance of a diamond, represented as an object.","properties":{"country_code":{"anyOf":[{"pattern":"^[A-Z]{2}$","type":"string"},{"type":"null"}],"title":"Country Code"},"is_country_code_available":{"default":false,"description":"Defines whether a country code will be available in the provenance data when the provenance is unlocked. This is available if the provenance is locked or unlocked.","title":"Is Country Code Available","type":"boolean"},"is_locked":{"default":false,"description":"Defines whether the diamond's provenance is visible or locked.","title":"Is Locked","type":"boolean"},"mine_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mine Name"},"provenance_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provenance Name"},"provenance_type":{"anyOf":[{"$ref":"#/components/schemas/ProvenanceType"},{"type":"null"}]}},"title":"ProvenanceRecord","type":"object"},"ProvenanceType":{"enum":["Country","Entity"],"title":"ProvenanceType","type":"string"},"Shape":{"description":"An enum of the possible values for the shape of a diamond.","enum":["Asscher","Baguette","Briolette","Bullets","Calf","Cushion","Cushion Modified Brilliant","Emerald","European Cut","Flanders","Half Moon","Heart","Hexagonal","Kite","Lozenge","Marquise","Octagonal","Old Miner","Oval","Pear","Pentagonal","Princess","Radiant","Rectangle","Rose","Round","Shield","Square","Square Emerald","Square Radiant","Star","Tapered Baguette","Tapered Bullet","Trapezoid","Triangle","Trilliant","Other"],"title":"Shape","type":"string"},"GISError":{"description":"Returned when an error occurred whilst processing a GIS request.","properties":{"detail":{"description":"A description of the error which occurred.","title":"Detail","type":"string"}},"required":["detail"],"title":"GISError","type":"object"},"GisIneligibleResponse":{"properties":{"detail":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Detail"},"reason":{"$ref":"#/components/schemas/DiamondGisIneligibilityReason"}},"required":["reason"],"title":"GisIneligibleResponse","type":"object"},"DiamondGisIneligibilityReason":{"description":"Represents a reason why a diamond is ineligible for grading through GIS.","enum":["diamond_has_been_deleted","diamond_is_not_polished","diamond_has_no_scan_report","scan_report_not_supported","scan_report_parse_error","validation_failed"],"title":"DiamondGisIneligibilityReason","type":"string"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}}}
```

## Upload Diamond Grading Certificate

> Add a grading certificate to a diamond in Tracr.\
> \
> Accepts a multipart/form-data request.

```json
{"openapi":"3.1.0","info":{"title":"Grading Integration Service API","version":"development"},"paths":{"/v2/diamonds/{diamond_id}/certificate":{"post":{"description":"Add a grading certificate to a diamond in Tracr.\n\nAccepts a multipart/form-data request.","operationId":"upload_diamond_grading_certificate_v2_diamonds__diamond_id__certificate_post","parameters":[{"in":"path","name":"diamond_id","required":true,"schema":{"pattern":"^[a-z\\d]{20,98}$","title":"Diamond Id","type":"string"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/tracr__gis__api__v2__peers__GradingCertificateParameters"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradedMeasurementUploadResponse"}}},"description":"Successful Response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":"Returned when a Diamond is not found in the Tracr network."},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":"Returned when `certificate_file` is not an application/pdf file."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":"Returned when a given grading cert. has already been uploaded for a given diamond."},"410":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GisIneligibleResponse"},{"$ref":"#/components/schemas/GISError"}],"title":"Response 410 Upload Diamond Grading Certificate V2 Diamonds  Diamond Id  Certificate Post"}}},"description":"Returned when a requested resource has been deleted or expired."},"412":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GisIneligibleResponse"},{"$ref":"#/components/schemas/GISError"}],"title":"Response 412 Upload Diamond Grading Certificate V2 Diamonds  Diamond Id  Certificate Post"}}},"description":"Returned when a Diamond is ineligible for GIS."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":"Returned when an internal error occurred within GIS."}},"summary":"Upload Diamond Grading Certificate","tags":["API v2","Diamond Update"]}}},"components":{"schemas":{"tracr__gis__api__v2__peers__GradingCertificateParameters":{"properties":{"carats":{"anyOf":[{"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"},{"type":"null"}],"description":"The diamonds carat weight expressed as a decimal.","title":"Carats"},"certificate_file":{"description":"The certificate file. Must be an application/pdf file, otherwise the upload will be rejected.","format":"binary","title":"Certificate File","type":"string"},"clarity":{"anyOf":[{"$ref":"#/components/schemas/Clarity"},{"type":"null"}],"description":"The clarity of the diamond.\n\nPermitted values:\n\nFL, IF, LC, VVS1, VVS2, VS1, VS2, SI1, SI2, SI3, I1, I2, I3, P1, P2 or P3"},"colour":{"anyOf":[{"$ref":"#/components/schemas/Colour"},{"type":"null"}],"description":"The colour of the diamond.\n\nPermitted values:\n\nD, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y or Z"},"crown_angle":{"anyOf":[{"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"},{"type":"null"}],"description":"The diamonds crown angle expressed as a decimal.","title":"Crown Angle"},"crown_height":{"anyOf":[{"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"},{"type":"null"}],"description":"The diamonds crown height expressed as a decimal.","title":"Crown Height"},"culet_condition":{"anyOf":[{"$ref":"#/components/schemas/CuletCondition"},{"type":"null"}],"description":"The culet condition of the diamond.\n\nPermitted values:\n\nP, A or C"},"culet_size":{"anyOf":[{"$ref":"#/components/schemas/CuletSize"},{"type":"null"}],"description":"The culet size of the diamond.\n\nPermitted values:\n\nEL, VL, L, SL, M, S, VS or N"},"cut_grade":{"anyOf":[{"$ref":"#/components/schemas/CutGrade"},{"type":"null"}],"description":"The cut grade of the diamond.\n\nPermitted values:\n\nI, EX, VG, G, F, P or NA"},"depth":{"anyOf":[{"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"},{"type":"null"}],"description":"The diamonds depth expressed as a decimal.","title":"Depth"},"depth_percent":{"anyOf":[{"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"},{"type":"null"}],"description":"The diamonds depth percent expressed as a decimal.","title":"Depth Percent"},"diameter_maximum":{"anyOf":[{"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"},{"type":"null"}],"description":"The diamonds maximum diameter expressed as a decimal.","title":"Diameter Maximum"},"diameter_minimum":{"anyOf":[{"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"},{"type":"null"}],"description":"The diamonds minimum diameter expressed as a decimal.","title":"Diameter Minimum"},"fancy_colour":{"anyOf":[{"$ref":"#/components/schemas/FancyColour"},{"type":"null"}],"description":"The fancy colour of the diamond.\n\nPermitted values:\n\nBK, B, BN, CH, CM, CG, GY, G, O, P, PL, R, V, Y, W or X"},"fancy_colour_intensity":{"anyOf":[{"$ref":"#/components/schemas/FancyColourIntensity"},{"type":"null"}],"description":"The fancy colour intensity of the diamond.\n\nPermitted values:\n\nF, VL, L, FL, FC, FCD, I, FV or D"},"fancy_colour_overtone":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The fancy colour overtone of the diamond.","title":"Fancy Colour Overtone"},"fluorescence_colour":{"anyOf":[{"$ref":"#/components/schemas/FluorescenceColour"},{"type":"null"}],"description":"The fluorescence colour of the diamond.\n\nPermitted values:\n\nB, W, Y, O, R, G or N"},"fluorescence_intensity":{"anyOf":[{"$ref":"#/components/schemas/FluorescenceIntensity"},{"type":"null"}],"description":"The fluorescence intensity of the diamond.\n\nPermitted values:\n\nVS, S, M, F, SL, VSL or N"},"girdle_condition":{"anyOf":[{"$ref":"#/components/schemas/GirdleCondition"},{"type":"null"}],"description":"The girdle condition of the diamond.\n\nPermitted values:\n\nP, F or B"},"girdle_thickness_from":{"anyOf":[{"$ref":"#/components/schemas/GirdleThickness"},{"type":"null"}],"description":"The minimum girdle thickness of the diamond.\n\nPermitted values:\n\nExtremely Thick, Very Thick, Thick, Slightly Thick, Medium, Thin, Slightly Thin, Very Thin or Extremely Thin"},"girdle_thickness_to":{"anyOf":[{"$ref":"#/components/schemas/GirdleThickness"},{"type":"null"}],"description":"The maximum girdle thickness of the diamond.\n\nPermitted values:\n\nExtremely Thick, Very Thick, Thick, Slightly Thick, Medium, Thin, Slightly Thin, Very Thin or Extremely Thin"},"graded_date":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"The graded date of the diamond as an ISO 8601 string","title":"Graded Date"},"grader_certificate_no":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The grader certificate number","title":"Grader Certificate No"},"grader_clarity_characteristics":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The grader clarity characteristics.","title":"Grader Clarity Characteristics"},"grader_colour":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free form representation of the diamonds colour.","title":"Grader Colour"},"grader_inscription_no":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The grader inscription number","title":"Grader Inscription No"},"grader_report_comments":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The grader report comments.","title":"Grader Report Comments"},"grader_report_no":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The grader report number","title":"Grader Report No"},"grader_report_type":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Grader report type.","title":"Grader Report Type"},"grader_shape":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free form representation of the diamonds shape. This field will be populated on the Diamond Experience Grading page once the information is provided.","title":"Grader Shape"},"grading_certificate_description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Description of the grading certificate.","title":"Grading Certificate Description"},"grading_lab":{"anyOf":[{"$ref":"#/components/schemas/GradingLab"},{"type":"null"}],"description":"The grading lab responsible for grading the diamond.\n\nPermitted values:\n\nAGS, CGL, DCLA, GCAL, GHI, GIA, GSI, HRD, IGI, IIDGR, IOD, NGTC, Other, PGS, RDC, RDR, SGL, VGR or SSEF"},"length":{"anyOf":[{"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"},{"type":"null"}],"description":"The diamonds length expressed as a decimal.","title":"Length"},"measurement_text":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The measurement text.","title":"Measurement Text"},"pavillion_angle":{"anyOf":[{"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"},{"type":"null"}],"description":"The diamonds pavillion angle expressed as a decimal.","title":"Pavillion Angle"},"pavillion_percent":{"anyOf":[{"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"},{"type":"null"}],"description":"The diamonds pavillion percent expressed as a decimal.","title":"Pavillion Percent"},"polish_quality":{"anyOf":[{"$ref":"#/components/schemas/Symmetry"},{"type":"null"}],"description":"The diamonds polish quality.\n\nPermitted values:\n\nI, EX, VG-EX, VG, G-VG, G, F-G, F or P"},"shape":{"anyOf":[{"$ref":"#/components/schemas/Shape"},{"type":"null"}],"description":"The diamonds shape.\n\nPermitted values:\n\nAsscher, Baguette, Briolette, Bullets, Calf, Cushion, Cushion Modified Brilliant, Emerald, European Cut, Flanders, Half Moon, Heart, Hexagonal, Kite, Lozenge, Marquise, Octagonal, Old Miner, Oval, Pear, Pentagonal, Princess, Radiant, Rectangle, Rose, Round, Shield, Square, Square Emerald, Square Radiant, Star, Tapered Baguette, Tapered Bullet, Trapezoid, Triangle, Trilliant or Other"},"symmetry":{"anyOf":[{"$ref":"#/components/schemas/Symmetry"},{"type":"null"}],"description":"The diamonds symmetry.\n\nPermitted values:\n\nI, EX, VG-EX, VG, G-VG, G, F-G, F or P"},"table_percent":{"anyOf":[{"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"},{"type":"null"}],"description":"The diamonds table percent expressed as a decimal.","title":"Table Percent"},"validation_level":{"anyOf":[{"$ref":"#/components/schemas/ValidationLevel"},{"type":"null"}],"description":"The diamonds validation level.\n\nPermitted values:\n\nvalidation or verification"},"width":{"anyOf":[{"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"},{"type":"null"}],"description":"The diamonds width expressed as a decimal.","title":"Width"}},"required":["certificate_file"],"title":"GradingCertificateParameters","type":"object"},"Clarity":{"enum":["FL","IF","LC","VVS1","VVS2","VS1","VS2","SI1","SI2","SI3","I1","I2","I3","P1","P2","P3"],"title":"Clarity","type":"string"},"Colour":{"enum":["D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],"title":"Colour","type":"string"},"CuletCondition":{"enum":["P","A","C"],"title":"CuletCondition","type":"string"},"CuletSize":{"enum":["EL","VL","L","SL","M","S","VS","N"],"title":"CuletSize","type":"string"},"CutGrade":{"enum":["I","EX","VG","G","F","P","NA"],"title":"CutGrade","type":"string"},"FancyColour":{"enum":["BK","B","BN","CH","CM","CG","GY","G","O","P","PL","R","V","Y","W","X"],"title":"FancyColour","type":"string"},"FancyColourIntensity":{"enum":["F","VL","L","FL","FC","FCD","I","FV","D"],"title":"FancyColourIntensity","type":"string"},"FluorescenceColour":{"enum":["B","W","Y","O","R","G","N"],"title":"FluorescenceColour","type":"string"},"FluorescenceIntensity":{"enum":["VS","S","M","F","SL","VSL","N"],"title":"FluorescenceIntensity","type":"string"},"GirdleCondition":{"enum":["P","F","B"],"title":"GirdleCondition","type":"string"},"GirdleThickness":{"enum":["Extremely Thick","Very Thick","Thick","Slightly Thick","Medium","Thin","Slightly Thin","Very Thin","Extremely Thin"],"title":"GirdleThickness","type":"string"},"GradingLab":{"description":"An Enum of grading lab values to be used when interacting with PCS-API.","enum":["AGS","CGL","DCLA","GCAL","GHI","GIA","GSI","HRD","IGI","IIDGR","IOD","NGTC","Other","PGS","RDC","RDR","SGL","VGR","SSEF"],"title":"GradingLab","type":"string"},"Symmetry":{"enum":["I","EX","VG-EX","VG","G-VG","G","F-G","F","P"],"title":"Symmetry","type":"string"},"Shape":{"description":"An enum of the possible values for the shape of a diamond.","enum":["Asscher","Baguette","Briolette","Bullets","Calf","Cushion","Cushion Modified Brilliant","Emerald","European Cut","Flanders","Half Moon","Heart","Hexagonal","Kite","Lozenge","Marquise","Octagonal","Old Miner","Oval","Pear","Pentagonal","Princess","Radiant","Rectangle","Rose","Round","Shield","Square","Square Emerald","Square Radiant","Star","Tapered Baguette","Tapered Bullet","Trapezoid","Triangle","Trilliant","Other"],"title":"Shape","type":"string"},"ValidationLevel":{"enum":["validation","verification"],"title":"ValidationLevel","type":"string"},"GradedMeasurementUploadResponse":{"description":"Sent when a graded measurement has been added to a certificate.","properties":{"graded_measurement_id":{"description":"The ID of the graded measurement.","title":"Graded Measurement Id","type":"string"},"hash":{"description":"The hash of the uploaded file.","title":"Hash","type":"string"}},"required":["hash","graded_measurement_id"],"title":"GradedMeasurementUploadResponse","type":"object"},"GISError":{"description":"Returned when an error occurred whilst processing a GIS request.","properties":{"detail":{"description":"A description of the error which occurred.","title":"Detail","type":"string"}},"required":["detail"],"title":"GISError","type":"object"},"GisIneligibleResponse":{"properties":{"detail":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Detail"},"reason":{"$ref":"#/components/schemas/DiamondGisIneligibilityReason"}},"required":["reason"],"title":"GisIneligibleResponse","type":"object"},"DiamondGisIneligibilityReason":{"description":"Represents a reason why a diamond is ineligible for grading through GIS.","enum":["diamond_has_been_deleted","diamond_is_not_polished","diamond_has_no_scan_report","scan_report_not_supported","scan_report_parse_error","validation_failed"],"title":"DiamondGisIneligibilityReason","type":"string"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}}}
```

## Upload Grading Certificate File

> Add a file to a grading certificate in Tracr.\
> \
> Accepts a multipart/form-data request containing the following:\
> \
> \- \*\*file\*\*: The file to upload.\
> \- \*\*file\_type\*\*: \[Optional] The type of file being uploaded.

```json
{"openapi":"3.1.0","info":{"title":"Grading Integration Service API","version":"development"},"paths":{"/v2/diamonds/{diamond_id}/grading-certificates/{certificate_id}/files":{"post":{"description":"Add a file to a grading certificate in Tracr.\n\nAccepts a multipart/form-data request containing the following:\n\n- **file**: The file to upload.\n- **file_type**: [Optional] The type of file being uploaded.","operationId":"upload_grading_certificate_file_v2_diamonds__diamond_id__grading_certificates__certificate_id__files_post","parameters":[{"in":"path","name":"certificate_id","required":true,"schema":{"title":"Certificate Id","type":"string"}},{"in":"path","name":"diamond_id","required":true,"schema":{"pattern":"^[a-z\\d]{20,98}$","title":"Diamond Id","type":"string"}}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradedMeasurementUploadResponse"}}},"description":"Successful Response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":"Returned when a Diamond is not found in the Tracr network."},"406":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GisIneligibleResponse"},{"$ref":"#/components/schemas/GISError"}],"title":"Response 406 Upload Grading Certificate File V2 Diamonds  Diamond Id  Grading Certificates  Certificate Id  Files Post"}}},"description":"Returned when there are issues with the referenced diamond."},"410":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GisIneligibleResponse"},{"$ref":"#/components/schemas/GISError"}],"title":"Response 410 Upload Grading Certificate File V2 Diamonds  Diamond Id  Grading Certificates  Certificate Id  Files Post"}}},"description":"Returned when a requested resource has been deleted or expired."},"412":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GisIneligibleResponse"},{"$ref":"#/components/schemas/GISError"}],"title":"Response 412 Upload Grading Certificate File V2 Diamonds  Diamond Id  Grading Certificates  Certificate Id  Files Post"}}},"description":"Returned when a Diamond is ineligible for GIS."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":"Returned when an internal error occurred within GIS."}},"summary":"Upload Grading Certificate File","tags":["API v2","Diamond Update"]}}},"components":{"schemas":{"GradedMeasurementUploadResponse":{"description":"Sent when a graded measurement has been added to a certificate.","properties":{"graded_measurement_id":{"description":"The ID of the graded measurement.","title":"Graded Measurement Id","type":"string"},"hash":{"description":"The hash of the uploaded file.","title":"Hash","type":"string"}},"required":["hash","graded_measurement_id"],"title":"GradedMeasurementUploadResponse","type":"object"},"GISError":{"description":"Returned when an error occurred whilst processing a GIS request.","properties":{"detail":{"description":"A description of the error which occurred.","title":"Detail","type":"string"}},"required":["detail"],"title":"GISError","type":"object"},"GisIneligibleResponse":{"properties":{"detail":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Detail"},"reason":{"$ref":"#/components/schemas/DiamondGisIneligibilityReason"}},"required":["reason"],"title":"GisIneligibleResponse","type":"object"},"DiamondGisIneligibilityReason":{"description":"Represents a reason why a diamond is ineligible for grading through GIS.","enum":["diamond_has_been_deleted","diamond_is_not_polished","diamond_has_no_scan_report","scan_report_not_supported","scan_report_parse_error","validation_failed"],"title":"DiamondGisIneligibilityReason","type":"string"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}}}
```

## Add Diamond Inscription Number

> Add an inscription number to a diamond in Tracr.

```json
{"openapi":"3.1.0","info":{"title":"Grading Integration Service API","version":"development"},"paths":{"/v2/diamonds/{diamond_id}/inscription-number":{"post":{"description":"Add an inscription number to a diamond in Tracr.","operationId":"add_diamond_inscription_number_v2_diamonds__diamond_id__inscription_number_post","parameters":[{"in":"path","name":"diamond_id","required":true,"schema":{"pattern":"^[a-z\\d]{20,98}$","title":"Diamond Id","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/tracr__gis__api__models__peers__AddInscriptionNumberRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUploadResponse"}}},"description":"Successful Response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":"Returned when a Diamond is not found in the Tracr network."},"406":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GisIneligibleResponse"},{"$ref":"#/components/schemas/GISError"}],"title":"Response 406 Add Diamond Inscription Number V2 Diamonds  Diamond Id  Inscription Number Post"}}},"description":"Returned when there are issues with the referenced diamond."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":"Returned when a given inscription number has already been uploaded for a given diamond."},"410":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GisIneligibleResponse"},{"$ref":"#/components/schemas/GISError"}],"title":"Response 410 Add Diamond Inscription Number V2 Diamonds  Diamond Id  Inscription Number Post"}}},"description":"Returned when a requested resource has been deleted or expired."},"412":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GisIneligibleResponse"},{"$ref":"#/components/schemas/GISError"}],"title":"Response 412 Add Diamond Inscription Number V2 Diamonds  Diamond Id  Inscription Number Post"}}},"description":"Returned when a Diamond is ineligible for GIS."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":"Returned when an internal error occurred within GIS."}},"summary":"Add Diamond Inscription Number","tags":["API v2","Diamond Update"]}}},"components":{"schemas":{"tracr__gis__api__models__peers__AddInscriptionNumberRequest":{"additionalProperties":false,"description":"The data required to add an inscription number to a diamond.","properties":{"inscription_date":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Inscription Date"},"inscription_number":{"description":"The inscription number to add to the diamond. Must have a non-zero length.","minLength":1,"title":"Inscription Number","type":"string"}},"required":["inscription_number"],"title":"AddInscriptionNumberRequest","type":"object"},"FileUploadResponse":{"description":"Sent when an inscription number or certificate has been added to a diamond.","properties":{"hash":{"description":"The hash of the uploaded inscription number data.","title":"Hash","type":"string"}},"required":["hash"],"title":"FileUploadResponse","type":"object"},"GISError":{"description":"Returned when an error occurred whilst processing a GIS request.","properties":{"detail":{"description":"A description of the error which occurred.","title":"Detail","type":"string"}},"required":["detail"],"title":"GISError","type":"object"},"GisIneligibleResponse":{"properties":{"detail":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Detail"},"reason":{"$ref":"#/components/schemas/DiamondGisIneligibilityReason"}},"required":["reason"],"title":"GisIneligibleResponse","type":"object"},"DiamondGisIneligibilityReason":{"description":"Represents a reason why a diamond is ineligible for grading through GIS.","enum":["diamond_has_been_deleted","diamond_is_not_polished","diamond_has_no_scan_report","scan_report_not_supported","scan_report_parse_error","validation_failed"],"title":"DiamondGisIneligibilityReason","type":"string"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}}}
```

## Qr Code For Diamond

> Generate and return a QR linking to this diamond in the Diamond Experience.

```json
{"openapi":"3.1.0","info":{"title":"Grading Integration Service API","version":"development"},"paths":{"/v2/diamonds/{diamond_id}/qr":{"get":{"description":"Generate and return a QR linking to this diamond in the Diamond Experience.","operationId":"qr_code_for_diamond_v2_diamonds__diamond_id__qr_get","parameters":[{"in":"path","name":"diamond_id","required":true,"schema":{"pattern":"^[a-z\\d]{20,98}$","title":"Diamond Id","type":"string"}}],"responses":{"200":{"content":{"image/png":{}},"description":"Return a QR linking to this diamond in the Diamond Experience."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":"Returned when a Diamond is not found in the Tracr network."},"406":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":"Returned when the diamond is not polished, or is missing data required by GIS."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":"Returned when an internal error occurred within GIS."}},"summary":"Qr Code For Diamond","tags":["API v2"]}}},"components":{"schemas":{"GISError":{"description":"Returned when an error occurred whilst processing a GIS request.","properties":{"detail":{"description":"A description of the error which occurred.","title":"Detail","type":"string"}},"required":["detail"],"title":"GISError","type":"object"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}}}
```

## Validate Diamond With Scan File

> \<!-- theme: warning -->\
> \#### This endpoint is deprecated. Please use the \`/v2/diamonds/{diamond\_id}/validate-json\` endpoint instead.\
> \
> \
> Validate that diamond data in a GIA DAT scan file matches that stored in Tracr.\
> \
> &#x20;   The success or failure of this operation can be determined by GETing\
> &#x20;   /v2/diamonds/{diamond\_id}/validate/{request\_id}.\
> \
> &#x20;   \*\*Notice:\*\* This endpoint currently only supports validating \_round\_ diamonds.

```json
{"openapi":"3.1.0","info":{"title":"Grading Integration Service API","version":"development"},"paths":{"/v2/diamonds/{diamond_id}/validate":{"post":{"deprecated":true,"description":"<!-- theme: warning -->\n#### This endpoint is deprecated. Please use the `/v2/diamonds/{diamond_id}/validate-json` endpoint instead.\n\n\nValidate that diamond data in a GIA DAT scan file matches that stored in Tracr.\n\n    The success or failure of this operation can be determined by GETing\n    /v2/diamonds/{diamond_id}/validate/{request_id}.\n\n    **Notice:** This endpoint currently only supports validating _round_ diamonds.","operationId":"validate_diamond_with_scan_file_v2_diamonds__diamond_id__validate_post","parameters":[{"in":"path","name":"diamond_id","required":true,"schema":{"pattern":"^[a-z\\d]{20,98}$","title":"Diamond Id","type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_validate_diamond_with_scan_file_v2_diamonds__diamond_id__validate_post"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanReportValidationRequestResponse"}}},"description":"Returned when a validation request is accepted for processing."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":"Returned when a Diamond is not found in the Tracr network."},"406":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GisIneligibleResponse"},{"$ref":"#/components/schemas/GISError"}],"title":"Response 406 Validate Diamond With Scan File V2 Diamonds  Diamond Id  Validate Post"}}},"description":"Returned when there are issues with the referenced diamond."},"410":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GisIneligibleResponse"},{"$ref":"#/components/schemas/GISError"}],"title":"Response 410 Validate Diamond With Scan File V2 Diamonds  Diamond Id  Validate Post"}}},"description":"Returned when a requested resource has been deleted or expired."},"412":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GisIneligibleResponse"},{"$ref":"#/components/schemas/GISError"}],"title":"Response 412 Validate Diamond With Scan File V2 Diamonds  Diamond Id  Validate Post"}}},"description":"Returned when a Diamond is ineligible for GIS."},"422":{"description":"Returned when the scan file cannot be parsed or is for an unsupported diamond shape."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":"Returned when an internal error occurred within GIS."}},"summary":"Validate Diamond With Scan File","tags":["API v2","Diamond Validation","Verify 2","Deprecated"]}}},"components":{"schemas":{"Body_validate_diamond_with_scan_file_v2_diamonds__diamond_id__validate_post":{"properties":{"scan_report_file":{"format":"binary","title":"Scan Report File","type":"string"}},"required":["scan_report_file"],"title":"Body_validate_diamond_with_scan_file_v2_diamonds__diamond_id__validate_post","type":"object"},"ScanReportValidationRequestResponse":{"description":"A response to a scan-report-based request for the validation of a diamond.","properties":{"diamond_id":{"description":"The ID of the diamond for which validation has been requested.","pattern":"^[a-z\\d]{20,98}$","title":"Diamond Id","type":"string"},"request_id":{"description":"The unique ID for this validation request.","pattern":"^[a-z\\d]{20,98}$","title":"Request Id","type":"string"},"status_url":{"description":"The URL from which to fetch the status of this validation request via an HTTP GET","title":"Status Url","type":"string"},"verification_status":{"default":"Pending","description":"The current status of the verification request","title":"Verification Status","type":"string"}},"required":["diamond_id","request_id","status_url"],"title":"ScanReportValidationRequestResponse","type":"object"},"GISError":{"description":"Returned when an error occurred whilst processing a GIS request.","properties":{"detail":{"description":"A description of the error which occurred.","title":"Detail","type":"string"}},"required":["detail"],"title":"GISError","type":"object"},"GisIneligibleResponse":{"properties":{"detail":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Detail"},"reason":{"$ref":"#/components/schemas/DiamondGisIneligibilityReason"}},"required":["reason"],"title":"GisIneligibleResponse","type":"object"},"DiamondGisIneligibilityReason":{"description":"Represents a reason why a diamond is ineligible for grading through GIS.","enum":["diamond_has_been_deleted","diamond_is_not_polished","diamond_has_no_scan_report","scan_report_not_supported","scan_report_parse_error","validation_failed"],"title":"DiamondGisIneligibilityReason","type":"string"}}}}
```

## Validate Diamond With Parameters

> Validate that a set of diamond data matches that stored in Tracr.\
> \
> All diamonds, regardless of shape, require the following fields:\
> \
> \- carat\_weight\
> \- girdle\_average\
> \- table\_size\_average\
> \- total\_depth\
> \
> The success or failure of this operation can be determined by GETing\
> /v2/diamonds/{diamond\_id}/validate/{request\_id}.

```json
{"openapi":"3.1.0","info":{"title":"Grading Integration Service API","version":"development"},"paths":{"/v2/diamonds/{diamond_id}/validate-json":{"post":{"description":"Validate that a set of diamond data matches that stored in Tracr.\n\nAll diamonds, regardless of shape, require the following fields:\n\n- carat_weight\n- girdle_average\n- table_size_average\n- total_depth\n\nThe success or failure of this operation can be determined by GETing\n/v2/diamonds/{diamond_id}/validate/{request_id}.","operationId":"validate_diamond_with_parameters_v2_diamonds__diamond_id__validate_json_post","parameters":[{"in":"path","name":"diamond_id","required":true,"schema":{"pattern":"^[a-z\\d]{20,98}$","title":"Diamond Id","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiamondValidationRequest"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScanReportValidationRequestResponse"}}},"description":"Returned when a validation request is accepted for processing."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":"Returned when a Diamond is not found in the Tracr network."},"406":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GisIneligibleResponse"},{"$ref":"#/components/schemas/GISError"}],"title":"Response 406 Validate Diamond With Parameters V2 Diamonds  Diamond Id  Validate Json Post"}}},"description":"Returned when there are issues with the referenced diamond."},"410":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GisIneligibleResponse"},{"$ref":"#/components/schemas/GISError"}],"title":"Response 410 Validate Diamond With Parameters V2 Diamonds  Diamond Id  Validate Json Post"}}},"description":"Returned when a requested resource has been deleted or expired."},"412":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GisIneligibleResponse"},{"$ref":"#/components/schemas/GISError"}],"title":"Response 412 Validate Diamond With Parameters V2 Diamonds  Diamond Id  Validate Json Post"}}},"description":"Returned when a Diamond is ineligible for GIS."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":"Returned when the provided JSON is not valid."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":"Returned when an internal error occurred within GIS."}},"summary":"Validate Diamond With Parameters","tags":["API v2","Diamond Validation"]}}},"components":{"schemas":{"DiamondValidationRequest":{"discriminator":{"mapping":{"Asscher":"#/components/schemas/FancyDiamondValidationRequest","Baguette":"#/components/schemas/FancyDiamondValidationRequest","Briolette":"#/components/schemas/FancyDiamondValidationRequest","Bullets":"#/components/schemas/FancyDiamondValidationRequest","Calf":"#/components/schemas/FancyDiamondValidationRequest","Cushion":"#/components/schemas/RegularDiamondValidationRequest","Cushion Modified Brilliant":"#/components/schemas/FancyDiamondValidationRequest","Cut-Cornered Rectangle":"#/components/schemas/FancyDiamondValidationRequest","Cut-Cornered Square":"#/components/schemas/FancyDiamondValidationRequest","Emerald":"#/components/schemas/RegularDiamondValidationRequest","European Cut":"#/components/schemas/FancyDiamondValidationRequest","Flanders":"#/components/schemas/FancyDiamondValidationRequest","Half Moon":"#/components/schemas/FancyDiamondValidationRequest","Heart":"#/components/schemas/RegularDiamondValidationRequest","Hexagon":"#/components/schemas/FancyDiamondValidationRequest","Hexagonal":"#/components/schemas/FancyDiamondValidationRequest","Kite":"#/components/schemas/FancyDiamondValidationRequest","Lozenge":"#/components/schemas/FancyDiamondValidationRequest","Marquise":"#/components/schemas/RegularDiamondValidationRequest","Misc":"#/components/schemas/FancyDiamondValidationRequest","Nine-Sided":"#/components/schemas/FancyDiamondValidationRequest","Octagon":"#/components/schemas/FancyDiamondValidationRequest","Octagonal":"#/components/schemas/FancyDiamondValidationRequest","Old Miner":"#/components/schemas/FancyDiamondValidationRequest","Other":"#/components/schemas/FancyDiamondValidationRequest","Oval":"#/components/schemas/RegularDiamondValidationRequest","Pear":"#/components/schemas/RegularDiamondValidationRequest","Pentagonal":"#/components/schemas/FancyDiamondValidationRequest","Polyhedron":"#/components/schemas/FancyDiamondValidationRequest","Princess":"#/components/schemas/RegularDiamondValidationRequest","Radiant":"#/components/schemas/RegularDiamondValidationRequest","Rectangle":"#/components/schemas/FancyDiamondValidationRequest","Rhomboid":"#/components/schemas/FancyDiamondValidationRequest","Rose":"#/components/schemas/FancyDiamondValidationRequest","Round":"#/components/schemas/RegularDiamondValidationRequest","Round Modified":"#/components/schemas/RegularDiamondValidationRequest","Seven-Sided":"#/components/schemas/FancyDiamondValidationRequest","Shield":"#/components/schemas/FancyDiamondValidationRequest","Square":"#/components/schemas/FancyDiamondValidationRequest","Square Emerald":"#/components/schemas/FancyDiamondValidationRequest","Square Radiant":"#/components/schemas/FancyDiamondValidationRequest","Square StepCut":"#/components/schemas/FancyDiamondValidationRequest","Star":"#/components/schemas/FancyDiamondValidationRequest","StepCut":"#/components/schemas/RegularDiamondValidationRequest","Tapered Baguette":"#/components/schemas/FancyDiamondValidationRequest","Tapered Bullet":"#/components/schemas/FancyDiamondValidationRequest","Trapezoid":"#/components/schemas/FancyDiamondValidationRequest","Triangle":"#/components/schemas/FancyDiamondValidationRequest","Trilliant":"#/components/schemas/FancyDiamondValidationRequest"},"propertyName":"shape_group"},"oneOf":[{"$ref":"#/components/schemas/RegularDiamondValidationRequest"},{"$ref":"#/components/schemas/FancyDiamondValidationRequest"}],"title":"DiamondValidationRequest"},"RegularDiamondValidationRequest":{"description":"The parameters of a regular stone required to validate it using GIS.","properties":{"crown_angle_avg_deg":{"anyOf":[{"minimum":0,"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"},{"type":"null"}],"description":"Average angle of each crown facet to the centre axis in degrees.","title":"Average Crown Angle"},"estimated_weight_crt":{"anyOf":[{"minimum":0,"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"}],"description":"The estimated weight in carats based on the volume and diamond density. This measurement is computed by the software producing the report","title":"Estimated Weight"},"girdle_avg_mm":{"anyOf":[{"minimum":0,"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"}],"description":"Girdle hill average in millimeters.","title":"Girdle Hill Average"},"pavilion_angle_avg_deg":{"anyOf":[{"minimum":0,"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"},{"type":"null"}],"description":"Average angle of each pavilion facet to the centre axis in degrees","title":"Average Pavilion Angle"},"shape_group":{"description":"Shape group of the diamond. **Note**: the server matches shape names case-insensitively.","enum":["Cushion","Emerald","Heart","Marquise","Oval","Pear","Princess","Radiant","Round","Round Modified","StepCut"],"title":"Shape Group","type":"string"},"table_avg_mm":{"anyOf":[{"minimum":0,"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"}],"description":"Average table size in millimeters.","title":"Table Average"},"total_depth_mm":{"anyOf":[{"minimum":0,"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"}],"description":"Total depth in millimeters.","title":"Total Depth"}},"required":["estimated_weight_crt","girdle_avg_mm","table_avg_mm","total_depth_mm","shape_group"],"title":"RegularDiamondValidationRequest","type":"object"},"FancyDiamondValidationRequest":{"description":"The parameters of a fancy stone required to validate it using GIS.","properties":{"crown_angle_avg_deg":{"anyOf":[{"minimum":0,"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"},{"type":"null"}],"description":"Average angle of each crown facet to the centre axis in degrees.","title":"Average Crown Angle"},"estimated_weight_crt":{"anyOf":[{"minimum":0,"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"}],"description":"The estimated weight in carats based on the volume and diamond density. This measurement is computed by the software producing the report","title":"Estimated Weight"},"girdle_avg_mm":{"anyOf":[{"minimum":0,"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"}],"description":"Girdle hill average in millimeters.","title":"Girdle Hill Average"},"pavilion_angle_avg_deg":{"anyOf":[{"minimum":0,"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"},{"type":"null"}],"description":"Average angle of each pavilion facet to the centre axis in degrees","title":"Average Pavilion Angle"},"shape_group":{"description":"Shape group of the diamond. **Note**: the server matches shape names case-insensitively.","enum":["Asscher","Baguette","Briolette","Bullets","Calf","Cushion Modified Brilliant","Cut-Cornered Rectangle","Cut-Cornered Square","European Cut","Flanders","Half Moon","Hexagon","Hexagonal","Kite","Lozenge","Misc","Nine-Sided","Octagon","Octagonal","Old Miner","Pentagonal","Polyhedron","Rectangle","Rhomboid","Rose","Seven-Sided","Shield","Square","Square Emerald","Square Radiant","Square StepCut","Star","Tapered Baguette","Tapered Bullet","Trapezoid","Triangle","Trilliant","Other"],"title":"Shape Group","type":"string"},"table_avg_mm":{"anyOf":[{"minimum":0,"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"}],"description":"Average table size in millimeters.","title":"Table Average"},"total_depth_mm":{"anyOf":[{"minimum":0,"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"}],"description":"Total depth in millimeters.","title":"Total Depth"}},"required":["estimated_weight_crt","girdle_avg_mm","table_avg_mm","total_depth_mm","shape_group"],"title":"FancyDiamondValidationRequest","type":"object"},"ScanReportValidationRequestResponse":{"description":"A response to a scan-report-based request for the validation of a diamond.","properties":{"diamond_id":{"description":"The ID of the diamond for which validation has been requested.","pattern":"^[a-z\\d]{20,98}$","title":"Diamond Id","type":"string"},"request_id":{"description":"The unique ID for this validation request.","pattern":"^[a-z\\d]{20,98}$","title":"Request Id","type":"string"},"status_url":{"description":"The URL from which to fetch the status of this validation request via an HTTP GET","title":"Status Url","type":"string"},"verification_status":{"default":"Pending","description":"The current status of the verification request","title":"Verification Status","type":"string"}},"required":["diamond_id","request_id","status_url"],"title":"ScanReportValidationRequestResponse","type":"object"},"GISError":{"description":"Returned when an error occurred whilst processing a GIS request.","properties":{"detail":{"description":"A description of the error which occurred.","title":"Detail","type":"string"}},"required":["detail"],"title":"GISError","type":"object"},"GisIneligibleResponse":{"properties":{"detail":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Detail"},"reason":{"$ref":"#/components/schemas/DiamondGisIneligibilityReason"}},"required":["reason"],"title":"GisIneligibleResponse","type":"object"},"DiamondGisIneligibilityReason":{"description":"Represents a reason why a diamond is ineligible for grading through GIS.","enum":["diamond_has_been_deleted","diamond_is_not_polished","diamond_has_no_scan_report","scan_report_not_supported","scan_report_parse_error","validation_failed"],"title":"DiamondGisIneligibilityReason","type":"string"}}}}
```

## Get Historic Validation Requests For Diamond

> Return all answered or errored validation requests for a diamond.

```json
{"openapi":"3.1.0","info":{"title":"Grading Integration Service API","version":"development"},"paths":{"/v2/diamonds/{diamond_id}/validate/historic":{"get":{"description":"Return all answered or errored validation requests for a diamond.","operationId":"get_historic_validation_requests_for_diamond_v2_diamonds__diamond_id__validate_historic_get","parameters":[{"in":"path","name":"diamond_id","required":true,"schema":{"pattern":"^[a-z\\d]{20,98}$","title":"Diamond Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/HistoricalValidationFeedback"},"title":"Response Get Historic Validation Requests For Diamond V2 Diamonds  Diamond Id  Validate Historic Get","type":"array"}}},"description":"Successful Response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":"Returned when no validation request has been made for a given diamond."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":"Returned when an internal error occurred within GIS."}},"summary":"Get Historic Validation Requests For Diamond","tags":["API v2","Diamond Validation"]}}},"components":{"schemas":{"HistoricalValidationFeedback":{"description":"A ValidationFeedback object used for reporting historic data.","properties":{"diamond_id":{"description":"The ID of the diamond for which validation was requested.","pattern":"^[a-z\\d]{20,98}$","title":"Diamond Id","type":"string"},"expired":{"description":"True if DiamondID did not respond to the request in a timely fashion.","title":"Expired","type":"boolean"},"request_id":{"description":"The unique ID of the validation request.","pattern":"^[a-z\\d]{20,98}$","title":"Request Id","type":"string"},"requested_at":{"description":"The UTC datetime at which the validation request was created.","format":"date-time","title":"Requested At","type":"string"},"verification_description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A message from DiamondID describing the validation status.","title":"Verification Description"},"verification_error":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/ValidationError"},"type":"object"},{"type":"null"}],"description":"Errors from validation.","title":"Verification Error"},"verification_status":{"$ref":"#/components/schemas/ValidationAnswer","default":"Pending","description":"The validation status returned by DiamondID."}},"required":["diamond_id","request_id","requested_at","expired"],"title":"HistoricalValidationFeedback","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"},"ValidationAnswer":{"description":"Represents an answer from Diamond ID or GIS to validation request.\n\n- Pending: the validation request is pending (yet to processed by Diamond\n  ID or GIS)\n- Verified: The request has been successfully processed, and the diamond\n  verified.\n- Invalid: A business logic error occurred, such as GIS attempting to verify\n  a diamond a second time when it was successfully verified before\n- Error: A validation error has occurred, such as missing diamond_parent_id,\n  missing features etc.\n- Unverifiable: A verification error occurred (such as the values were\n  outside tolerance) and appropriate feedback was returned.","enum":["Error","Invalid","Pending","Unverifiable","Verified"],"title":"ValidationAnswer","type":"string"},"GISError":{"description":"Returned when an error occurred whilst processing a GIS request.","properties":{"detail":{"description":"A description of the error which occurred.","title":"Detail","type":"string"}},"required":["detail"],"title":"GISError","type":"object"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"}}}}
```

## Get Validation Request Status

> Return the status of a validation request.

```json
{"openapi":"3.1.0","info":{"title":"Grading Integration Service API","version":"development"},"paths":{"/v2/diamonds/{diamond_id}/validate/{request_id}":{"get":{"description":"Return the status of a validation request.","operationId":"get_validation_request_status_v2_diamonds__diamond_id__validate__request_id__get","parameters":[{"in":"path","name":"request_id","required":true,"schema":{"pattern":"^[a-z\\d]{20,98}$","title":"Request Id","type":"string"}},{"in":"path","name":"diamond_id","required":true,"schema":{"pattern":"^[a-z\\d]{20,98}$","title":"Diamond Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchingInfoValidationFeedback"}}},"description":"Successful Response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":["Returned when either the diamond, or the specific validation request is not found."]},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":"Returned when an internal error occurred within GIS."}},"summary":"Get Validation Request Status","tags":["API v2","Diamond Validation"]}}},"components":{"schemas":{"MatchingInfoValidationFeedback":{"description":"The full feedback on a V2 validation operation, as returned by GIS.","properties":{"diamond_id":{"description":"The ID of the diamond for which validation was requested.","pattern":"^[a-z\\d]{20,98}$","title":"Diamond Id","type":"string"},"parameters":{"anyOf":[{"$ref":"#/components/schemas/ValidationParameters"},{"type":"null"}]},"request_id":{"description":"The unique ID of the validation request.","pattern":"^[a-z\\d]{20,98}$","title":"Request Id","type":"string"},"requested_at":{"description":"The UTC datetime at which the validation request was created.","format":"date-time","title":"Requested At","type":"string"},"verification_description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A message detailing the validation status if there were issues.","title":"Verification Description"},"verification_error":{"anyOf":[{"additionalProperties":{"anyOf":[{"items":{"$ref":"#/components/schemas/InvalidXPathScanReportError"},"type":"array"},{"type":"string"}]},"type":"object"},{"type":"null"}],"description":"Errors from validation, as a map of <field_name>: [<validation error>].","title":"Verification Error"},"verification_status":{"$ref":"#/components/schemas/ValidationAnswer","description":"The validation status for this request."}},"required":["diamond_id","request_id","requested_at","verification_status","verification_description"],"title":"MatchingInfoValidationFeedback","type":"object"},"ValidationParameters":{"properties":{"crown_angle_avg_deg":{"$ref":"#/components/schemas/MeasurementParameterMatch"},"estimated_weight_crt":{"$ref":"#/components/schemas/MeasurementParameterMatch"},"girdle_avg_mm":{"$ref":"#/components/schemas/MeasurementParameterMatch"},"pavilion_angle_avg_deg":{"$ref":"#/components/schemas/MeasurementParameterMatch"},"shape":{"$ref":"#/components/schemas/ShapeParameterMatch"},"table_avg_mm":{"$ref":"#/components/schemas/MeasurementParameterMatch"},"total_depth_mm":{"$ref":"#/components/schemas/MeasurementParameterMatch"}},"required":["crown_angle_avg_deg","estimated_weight_crt","girdle_avg_mm","pavilion_angle_avg_deg","shape","table_avg_mm","total_depth_mm"],"title":"ValidationParameters","type":"object"},"MeasurementParameterMatch":{"properties":{"difference":{"title":"Difference"},"lab_value":{"title":"Lab Value"},"tolerance":{"title":"Tolerance"},"tracr_value":{"title":"Tracr Value"},"validation_result":{}},"required":["validation_result","tolerance"],"title":"MeasurementParameterMatch","type":"object"},"ShapeParameterMatch":{"properties":{"lab_value":{},"tracr_value":{},"validation_result":{}},"required":["validation_result","tracr_value","lab_value"],"title":"ShapeParameterMatch","type":"object"},"InvalidXPathScanReportError":{"properties":{"error_type":{"$ref":"#/components/schemas/XPathErrorType","description":"The type of error."},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The value that caused the error.","title":"Value"},"xpath":{"description":"The XPath expression used to find the value.","title":"Xpath","type":"string"}},"required":["xpath","error_type","value"],"title":"InvalidXPathScanReportError","type":"object"},"XPathErrorType":{"enum":["value_missing","value_not_a_decimal","multiple_values_found"],"title":"XPathErrorType","type":"string"},"ValidationAnswer":{"description":"Represents an answer from Diamond ID or GIS to validation request.\n\n- Pending: the validation request is pending (yet to processed by Diamond\n  ID or GIS)\n- Verified: The request has been successfully processed, and the diamond\n  verified.\n- Invalid: A business logic error occurred, such as GIS attempting to verify\n  a diamond a second time when it was successfully verified before\n- Error: A validation error has occurred, such as missing diamond_parent_id,\n  missing features etc.\n- Unverifiable: A verification error occurred (such as the values were\n  outside tolerance) and appropriate feedback was returned.","enum":["Error","Invalid","Pending","Unverifiable","Verified"],"title":"ValidationAnswer","type":"string"},"GISError":{"description":"Returned when an error occurred whilst processing a GIS request.","properties":{"detail":{"description":"A description of the error which occurred.","title":"Detail","type":"string"}},"required":["detail"],"title":"GISError","type":"object"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}}}
```

## Verify Diamond

> Verify a diamond against provided parameters.

```json
{"openapi":"3.1.0","info":{"title":"Grading Integration Service API","version":"development"},"paths":{"/v2/diamonds/{diamond_id}/verify":{"post":{"description":"Verify a diamond against provided parameters.","operationId":"verify_diamond_v2_diamonds__diamond_id__verify_post","parameters":[{"in":"path","name":"diamond_id","required":true,"schema":{"pattern":"^[a-z\\d]{20,98}$","title":"Diamond Id","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyDiamondParameters"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyDiamondResponse"}}},"description":"Successful Response"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":"Returned when a Diamond is not found in the Tracr network."},"406":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GisIneligibleResponse"},{"$ref":"#/components/schemas/GISError"}],"title":"Response 406 Verify Diamond V2 Diamonds  Diamond Id  Verify Post"}}},"description":"Returned when there are issues with the referenced diamond."},"410":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GisIneligibleResponse"},{"$ref":"#/components/schemas/GISError"}],"title":"Response 410 Verify Diamond V2 Diamonds  Diamond Id  Verify Post"}}},"description":"Returned when a requested resource has been deleted or expired."},"412":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GisIneligibleResponse"},{"$ref":"#/components/schemas/GISError"}],"title":"Response 412 Verify Diamond V2 Diamonds  Diamond Id  Verify Post"}}},"description":"Returned when a Diamond is ineligible for GIS."},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GISError"}}},"description":"Returned when an internal error occurred within GIS."}},"summary":"Verify Diamond","tags":["API v2","Diamond Verification","Verify"]}}},"components":{"schemas":{"VerifyDiamondParameters":{"description":"Params for a diamond verify request.","properties":{"carat_weight":{"anyOf":[{"minimum":0,"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"}],"title":"Carat Weight"},"shape_group":{"$ref":"#/components/schemas/ShapeGroup"}},"required":["carat_weight","shape_group"],"title":"VerifyDiamondParameters","type":"object"},"ShapeGroup":{"description":"An enum of the possible values for the shape_group of a diamond.\n\nThis enum is intended to cover different shape groups used by grading labs\nfor verification and validation. For context, grading labs have different\nshape definitions that may or may not correspond directly to members of the\nShape enum.\n\nNote that this enum MUST contain all of the same members as the Shape enum\nfrom tracr_core.types.enums, but will contain extras to account for variance\nacross labs.","enum":["Asscher","Baguette","Briolette","Bullets","Calf","Cushion","Cushion Modified Brilliant","Cut-Cornered Rectangle","Cut-Cornered Square","Emerald","European Cut","Flanders","Half Moon","Heart","Hexagon","Hexagonal","Kite","Lozenge","Marquise","Misc","Nine-Sided","Octagon","Octagonal","Old Miner","Oval","Pear","Pentagonal","Polyhedron","Princess","Radiant","Rectangle","Rhomboid","Rose","Round","Round Modified","Seven-Sided","Shield","Square","Square Emerald","Square Radiant","Square StepCut","Star","StepCut","Tapered Baguette","Tapered Bullet","Trapezoid","Triangle","Trilliant","Other"],"title":"ShapeGroup","type":"string"},"VerifyDiamondResponse":{"description":"HTTP response for a diamond verify request.","properties":{"data":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/ParameterMatch"},"type":"object"},{"type":"null"}],"title":"Data"},"is_locked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Locked"},"status":{"$ref":"#/components/schemas/VerificationStatus"}},"required":["status"],"title":"VerifyDiamondResponse","type":"object"},"ParameterMatch":{"description":"Represents a potential match against a diamond attribute.","properties":{"given_value":{"anyOf":[{"type":"string"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"}],"title":"Given Value"},"known_value":{"anyOf":[{"type":"string"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"}],"title":"Known Value"},"matched":{"title":"Matched","type":"boolean"},"tolerance":{"anyOf":[{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"},{"type":"null"}],"title":"Tolerance"}},"required":["matched","known_value","given_value"],"title":"ParameterMatch","type":"object"},"VerificationStatus":{"description":"Potential values for a diamond verification.","enum":["success","failure"],"title":"VerificationStatus","type":"string"},"GISError":{"description":"Returned when an error occurred whilst processing a GIS request.","properties":{"detail":{"description":"A description of the error which occurred.","title":"Detail","type":"string"}},"required":["detail"],"title":"GISError","type":"object"},"GisIneligibleResponse":{"properties":{"detail":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Detail"},"reason":{"$ref":"#/components/schemas/DiamondGisIneligibilityReason"}},"required":["reason"],"title":"GisIneligibleResponse","type":"object"},"DiamondGisIneligibilityReason":{"description":"Represents a reason why a diamond is ineligible for grading through GIS.","enum":["diamond_has_been_deleted","diamond_is_not_polished","diamond_has_no_scan_report","scan_report_not_supported","scan_report_parse_error","validation_failed"],"title":"DiamondGisIneligibilityReason","type":"string"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tracr.com/api-reference/grading-integration-service-gis-api/references/api-v2.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
