For the complete documentation index, see llms.txt. This page is also available as Markdown.

Delete

Tracr provides an API endpoint to delete diamonds. Upon deletion, a diamond is permanently removed from the inventory and cannot be restored.

The intention of this endpoint is to give participants the ability to correct data errors with diamonds they've uploaded to Tracr simply by deleting the diamond and re-uploading it with the corrected information.

It is not available to retailers and cannot be used on diamonds that have been unlocked (either manually via the portal or automatically via another action, such as transferring to another participant), or diamonds with descendants (children of that diamond, or children of those children and so on...) that have been unlocked.

Delete diamond without descendants

Call POST /bulk/diamonds/delete

{
  "diamonds": [
    {
      "diamond_id": "clmkgill50000ps17ogi4d2yu"
    }
  ]
}

If the diamond was successfully deleted this will be marked in the response:

{
  "results": [
    {
      "diamond_id": "clmkgill50000ps17ogi4d2yu",
      "participant_id":"cb482ea8-5a95-431b-88df-84fc363ebda9",
      "status": "success",
      "descendants": []
    }
  ]
}

If it could not be deleted, the reason will be given:

Delete diamond with descendants

A diamond with descendants cannot be deleted unless those descendants are deleted simultaneously (for example, a rough diamond that was split into two roughs that were subsequently polished cannot be deleted unless those polished diamonds are also deleted).

To delete the descendants in addition to the diamond, add a delete_descendants flag to the diamond in the request body:

call POST /bulk/diamonds/delete

If the delete succeeds then the diamond's descendants are returned:

If one of the descendants cannot be deleted then the diamond and all its descendants remain in the inventory, and the diamonds that could not be deleted are marked in the response:

Likewise if the request is made with delete_descendants set to false, or not set at all, deletion fails and the diamonds remain in the inventory:

call POST /bulk/diamonds/delete

Delete multiple diamonds

The endpoint can handle deletion requests for multiple diamonds (up to 1,000) simultaneously. When sending multiple diamond IDs, each diamond is treated in isolation:

call POST /bulk/diamonds/delete

Last updated