> 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/qr-code.md).

# QR Code

We have provided a new QR endpoint `/v2/diamonds/{diamond_id}/qr` ([reference](/api-reference/grading-integration-service-gis-api/references/api-v2.md#get-v2-diamonds-diamond_id-qr)) which allows the grading lab to link the grading report and/or website to [Tracr Diamond Experience](https://search.tracr.com/).

The QR code is unique to each diamond.

{% hint style="info" %}
Please note:

* Diamonds need to be **unlocked** by the participant prior to the grading lab retrieving the QR Code for a Tracr diamond.
  {% endhint %}

{% hint style="info" %}
Required Data:

* Tracr ID
  {% endhint %}

Example request

{% code title="Request" %}

```http
GET /v2/diamonds/ssbjk6aawzje50b3o77r8tx6u/qr
```

{% endcode %}

The endpoint returns the content of the PNG file. The binary stream can be dumped into a file.

<figure><img src="/files/CmVQQVpeGDBlDPncEkRL" alt=""><figcaption></figcaption></figure>

{% tabs %}
{% tab title="PNG (200)" %}
Returned a QR linking to this diamond in the Diamond Experience. The response body is the binary PNG content; save to a file (e.g., qr.png) and open it.
{% endtab %}

{% tab title="JSON (422)" %}
Returned when the request doesn't match the endpoint data requirements.

```json
{
    "detail": [
        {
            "loc": [
                "path",
                "diamond_id"
            ],
            "msg": "string does not match regex \"^[a-z\\d]{20,98}$\"",
            "type": "value_error.str.regex",
            "ctx": {
                "pattern": "^[a-z\\d]{20,98}$"
            }
        }
    ]
}
```

{% endtab %}
{% endtabs %}


---

# 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/qr-code.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.
