> 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/tracr-api/provenance.md).

# Provenance

A diamond's provenance object details where it originated from.

## Unlocking provenance

> **Please note**
>
> After the 21st of May 2025 the provenance for all locked diamond's on Tracr will be hidden. To unlock the diamond's provenance the diamond must be unlocked. See the [unlock documentation](/api-reference/tracr-api/unlock.md) for details on how to unlock a diamond.

Producers can always see the provenance for diamonds they have uploaded. Once a rough diamond is transferred to another Tracr participant its provenance becomes locked. Unlocking a diamond will permanently unlock its provenance information. Once a diamond's provenance is unlocked it will be shown in all interfaces and APIs.

Locked diamonds always have an empty `provenance_name`, but the values of the other fields will change depending on whether the diamond has single origin:

* `provenance_type` will display as `Country` if the diamond has a single origin or `Entity` if it has multi origin available.
* `country_code` will never be returned if the provenance is locked.
* `is_country_code_available` when `true` indicates that the locked diamond has single origin available after unlock. When `false` it indicates that the diamond has multi origin available after unlock.

Note: in future revisions of the API `provenance_type` and `provenance_name` will not be returned if the diamond is locked.

There are some examples of provenance values below.

## Example provenance values

### Locked single origin

```json
{
    "provenance": {
        "provenance_type": "Country",
        "provenance_name": "",
        "is_locked": true,
        "is_country_code_available": true
    }
}
```

### Locked multi origin

```json
{
    "provenance": {
        "provenance_type": "Entity",
        "provenance_name": "",
        "is_locked": true,
        "is_country_code_available": false
    }
}
```

### Unlocked single origin

```json
{
    "provenance": {
        "provenance_type": "Country",
        "provenance_name": "BW",
        "is_locked": false,
        "is_country_code_available": true,
        "country_code": "BW"
    }
}
```

### Unlocked single origin with mine name

```json
{
    "provenance": {
        "provenance_type": "Country",
        "provenance_name": "CA",
        "is_locked": false,
        "is_country_code_available": true,
        "country_code": "CA",
        "mine_name": "Gahcho Kué"
    }
}
```

### Unlocked multi origin (DTC)

```json
{
    "provenance": {
        "provenance_type": "Entity",
        "provenance_name": "DTC",
        "is_locked": false,
        "is_country_code_available": false
    }
}
```

### Unlocked multi origin (other)

```json
{
    "provenance": {
        "provenance_type": "Country",
        "provenance_name": "",
        "is_locked": false,
        "is_country_code_available": false
    }
}
```


---

# 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/tracr-api/provenance.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.
