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

# Grading Data Management

Tracr provides an API endpoint to

* list the grading data record
* select a grading data to be active.
* deactavate grading data

## List the grading data record

All available grading data records are returned in the response body.

Call `GET /diamonds/ac0mkpewmjmd9g2xtbqozsdr/graded-measurements` ([reference](/api-reference/tracr-api/references/diamonds.md#patch-diamonds-id-graded-measurements-graded_measurement_id-deselect))

{% tabs %}
{% tab title="Response" %}

```json

{
    "results": [
        {
            "id": "qfbd9poady0vk4evq6edeanj",
            "carats": 0.4,
            "clarity": "VS1",
            "colour": "D",
            "fluorescence_intensity": "N",
            "graded_date": "2024-08-06T12:50:03.408407+00:00",
            "grader_inscription_numbers": [
                "GIA 2358460633"
            ],
            "grader_report_number": "2358460633",
            "grading_certificate_filename": "GradingCertificate(69).pdf",
            "grading_certificate_hash": "14ee89d84af3cf49e0e9fc1783dd7e0063adb85a32ce361c6635f259999543ba",
            "grading_lab": "GIA",
            "is_active": false,
            "is_selectable": true,
            "polish_quality": "EX",
            "shape": "Heart",
            "source": "user",
            "symmetry": "EX"
        },
        {
            "id": "xwq4n42d33yv943v66nolk00",
            "carats": 1.24,
            "clarity": "VS2",
            "colour": "H",
            "cut_grade": "EX",
            "graded_date": "2024-05-31T10:54:28.033000+00:00",
            "grader_certificate_number": "null",
            "grader_clarity_characteristics": "Crystal",
            "grader_inscription_numbers": [
                "GIA 2141438180"
            ],
            "grader_report_comments": "Perfect",
            "grader_report_number": "2141438180",
            "grading_certificate_filename": "demo_polished_1.pdf",
            "grading_certificate_hash": "0ffa6a2313fff5db0048d47432a89615185873f08feeab5985451adac3a49930",
            "grading_lab": "GIA",
            "is_active": true,
            "is_selectable": true,
            "measurement_text": "5.10 - 5.12 x 3.18 mm ",
            "polish_quality": "EX",
            "shape": "Round",
            "source": "gis",
            "symmetry": "VG",
            "validation_level": "validation"
        }
    ]
}
```

{% endtab %}
{% endtabs %}

`is_active` : If it's ture, this means this grading data will be shown on all interfaces , and only the active grading data record will be transferred.

`is_selectable` : This is to indicate which grading data is available for selection

`source` :This is to indicate the source of grading data

* user : The grading data is uploaded by user
* gis : The grading data is provided by the grading lab.

## Select a grading data to be active

To select a grading data which will be shown on all interfaces, and this grading data will be tranferred to downstream if transfer is happening.

> There's only one active grading data is allowed. Once the other grading data be selected, the current active grading data record will be deactived .(`is_active` will be set to flase .)

Call `PATCH diamonds/ac0mkpewmjmd9g2xtbqozsdr/qfbd9poady0vk4evq6edeanj/select`([reference](/api-reference/tracr-api/references/diamonds.md#patch-diamonds-id-graded-measurements-graded_measurement_id-select))

{% tabs %}
{% tab title="Response" %}

```json

{
    "id": "qfbd9poady0vk4evq6edeanj",
    "carats": 0.4,
    "clarity": "VS1",
    "colour": "D",
    "fluorescence_intensity": "N",
    "graded_date": "2024-08-06T12:50:03.408407+00:00",
    "grader_inscription_numbers": [
        "GIA 2358460633"
    ],
    "grader_report_number": "2358460633",
    "grading_certificate_filename": "GradingCertificate(69).pdf",
    "grading_certificate_hash": "14ee89d84af3cf49e0e9fc1783dd7e0063adb85a32ce361c6635f259999543ba",
    "grading_lab": "GIA",
    "is_active": true,
    "is_selectable": true,
    "polish_quality": "EX",
    "shape": "Heart",
    "source": "user",
    "symmetry": "EX"
}
```

{% endtab %}
{% endtabs %}

## Deselect a grading data

To remove the grading data from any interfaces.

Call `PATCH diamonds/ac0mkpewmjmd9g2xtbqozsdr/qfbd9poady0vk4evq6edeanj/deselect`([reference](/api-reference/tracr-api/references/diamonds.md#patch-diamonds-id-graded-measurements-graded_measurement_id-deselect))

{% tabs %}
{% tab title="Response" %}

```json

{
    "id": "qfbd9poady0vk4evq6edeanj",
    "carats": 0.4,
    "clarity": "VS1",
    "colour": "D",
    "fluorescence_intensity": "N",
    "graded_date": "2024-08-06T12:50:03.408407+00:00",
    "grader_inscription_numbers": [
        "GIA 2358460633"
    ],
    "grader_report_number": "2358460633",
    "grading_certificate_filename": "GradingCertificate(69).pdf",
    "grading_certificate_hash": "14ee89d84af3cf49e0e9fc1783dd7e0063adb85a32ce361c6635f259999543ba",
    "grading_lab": "GIA",
    "is_active": false,
    "is_selectable": true,
    "polish_quality": "EX",
    "shape": "Heart",
    "source": "user",
    "symmetry": "EX"
}
```

{% 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/tracr-api/grading_data_management.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.
