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

# Polish

The lifecycle state `polished` is the final state on the Tracr platform.

A polished diamond is created from a rough diamond (parent or child diamonds).

The polished diamond inherits all the traceability details from the rough diamond and will keep the same `diamond_id` as the rough diamond.

## Step 1 – Transition the diamond to polished

Call the polish endpoint by passing the Tracr `diamond_id` of the rough diamond to polish.

Call `POST /diamonds/a2uj544df5t5awu5v792wyj6/polish`

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

```json
{
    "participant_id": "demo_1_polished_1",
    "polished": {
        "carats": 1.01,
        "clarity": "SI1",
        "colour": "F",
        "cut_grade": "EX",
        "shape": "Round"
    }
}
```

{% endtab %}

{% tab title="Response" %}

```json
{
    "assurance_level": "assured",
    "box_id": "demo_box",
    "current_stage": "polished",
    "diamond_id": "a2uj544df5t5awu5v792wyj6",
    "diamond_parent_id": "wemz3zvg7cvr5uugivhib1z0",
    "entity_specific_tags": {},
    "id": "14fe49ae-df4b-49f6-93c3-9a712016977e",
    "is_current": true,
    "lifecycle_state": "polished",
    "parent_id": "b0733d6f-a3b1-4532-be2b-d352bad46fd6",
    "participant_id": "demo_1_polished_1",
    "participant_parent_id": "demo_1",
    "participant_timestamp": "2024-05-31T11:59:52.456810+00:00",
    "polished": {
        "carats": 1.01,
        "cut_grade": "EX",
        "shape": "Round",
        "colour": "F",
        "clarity": "SI1"
    },
    "possession_state": "held",
    "producer_uuid": "952e8987-9e49-437b-824c-5c9a77ce7eee",
    "provenance": {
        "provenance_name": "DTC",
        "provenance_type": "Entity",
        "is_locked": false,
        "is_country_code_available": false
    },
    "rough": {
        "carats": 1.52,
        "images": [
            {
                "filename": "demo_1_split_1.jpeg",
                "description": "Split Image",
                "hash": "219fe6f8cdc6f32091b310f6c6f5864f4fef97443cb8954a1d64bc9f26731986",
                "image_type": "default"
            }
        ]
    },
    "schema_version": "1.1.0",
    "sight_no": 2,
    "sight_year": 2024,
    "system_timestamp": "2024-05-31T12:22:44.675000+00:00",
    "verification_description": "verified record",
    "verification_status": "Verified",
    "version_id": "zx5ag50jvj0xnqvppmokpppq",
    "verification_status_modified_at": "2024-05-31T12:22:44.693059+00:00"
}
```

{% endtab %}
{% endtabs %}

If the operation is successful, the `lifecycle_state` field transitions to `polished`.

The field `participant_id` updates with the new value given in the polish operation.

When retrieving the diamond record, please note the section `rough` is still available but read only.

## Step 2 – Attach a scan report

The scan report comes from the polished scanner and provides all the measurement points of the polished diamond.

The scan report is required to make the diamond eligible to the Grading Integration Service. Please consult [this article](https://gitlab.com/tracr/pcs/platform/pcs/-/blob/gitbook/docs/gis-api/9ox122viaaq7t-gis-introduction/README.md) for more information.

Please consult the list of supported technologies [here](https://gitlab.com/tracr/pcs/platform/pcs/-/blob/gitbook/docs/user-documentation/hm71l585o5ed3-integration/README.md#prepare-a-polished-diamond-dataset)

Call `POST /diamonds/a2uj544df5t5awu5v792wyj6/files/scan/reports`

{% tabs %}
{% tab title="Form-data" %}

| Key                        | Value                        |
| -------------------------- | ---------------------------- |
| description                | Polished diamond scan report |
| file                       | demo\_polished\_scan.xml     |
| scan\_device\_manufacturer | Sarine                       |
| scan\_device\_model        | DiaMension                   |

```
Content-Type: multipart/form-data; boundary=8317046c4dac35881b333a4c43b41d64
--8317046c4dac35881b333a4c43b41d64
Content-Disposition: form-data; name="description"
Polished diamond scan report

--8317046c4dac35881b333a4c43b41d64
Content-Disposition: form-data; name="scan_device_manufacturer"
Sarine

--8317046c4dac35881b333a4c43b41d64
Content-Disposition: form-data; name="scan_device_model"
DiaMension

-8317046c4dac35881b333a4c43b41d64
Content-Disposition: form-data; name="file"; filename="demo_polished_scan.xml"
```

{% endtab %}

{% tab title="Response" %}

```json
{
    "hash": "c47c21bf48f7fe301de1efdce43a153ddd873d599195f7103bbf5053341b6c69"
}
```

{% endtab %}
{% endtabs %}

## Step 3 – Attach a grading certificate

A grading certificate is a document provided by an independent grading laboratory. It could be a pdf or any other document.

The grading certificate can be registered along with the certificate report ID and in the inscription number.

> **An important note regarding the inscription number**
>
> An inscription number is mandatory to make a polished eligible to search in the consumer search portal (<https://search.tracr.com>) as well as transferring the polished diamond to another peer in the platform.

Call `POST /diamonds/a2uj544df5t5awu5v792wyj6/files/grading_certificates`

{% tabs %}
{% tab title="Form-data" %}

| Key                     | Value                   |
| ----------------------- | ----------------------- |
| description             | GIA Grading report      |
| file                    | gia\_sample\_report.pdf |
| grading\_lab            | GIA                     |
| graded\_date            | 2024-05-31              |
| grader\_certificate\_no | 2141438167              |
| grader\_inscription\_no | GIA 2141438167          |

<pre><code><strong>Content-Type: multipart/form-data; boundary=8317046c4dac35881b333a4c43b41d64
</strong>--8317046c4dac35881b333a4c43b41d64
Content-Disposition: form-data; name="description"
GIA Grading report

--8317046c4dac35881b333a4c43b41d64
Content-Disposition: form-data; name="grading_lab"
GIA

--8317046c4dac35881b333a4c43b41d64
Content-Disposition: form-data; name="graded_date"
2023-03-31

--8317046c4dac35881b333a4c43b41d64
Content-Disposition: form-data; name="grader_certificate_no"
2141438167

--8317046c4dac35881b333a4c43b41d64
Content-Disposition: form-data; name="grader_inscription_no"
GIA 2141438167

-8317046c4dac35881b333a4c43b41d64
Content-Disposition: form-data; name="file"; filename="gia_sample_report.pdf"
</code></pre>

{% endtab %}

{% tab title="Response" %}

```json
{
    "hash": "84de6762dcebfc18dd385389fa5831ec25286fc4fee2e2c0279474d57ceb4a50",
    "graded_measurement_id": "hpuxljkbhjil53unwyyc11vh"
}
```

{% endtab %}
{% endtabs %}

## Step 4 – Attach additional files

You can attach additional files (for example, images or videos) to polished diamonds in the same fashion as rough diamonds. For example,

Call `POST /diamonds/a2uj544df5t5awu5v792wyj6/files/videos`

{% tabs %}
{% tab title="Form-data" %}

| Key         | Value               |
| ----------- | ------------------- |
| description | Polished 360 video  |
| file        | polished\_video.mp4 |

```
Content-Type: multipart/form-data; boundary=8317046c4dac35881b333a4c43b41d64
--8317046c4dac35881b333a4c43b41d64
Content-Disposition: form-data; name="description"
Polished 360 video

-8317046c4dac35881b333a4c43b41d64
Content-Disposition: form-data; name="file"; filename="polished_video.mp4"
```

{% endtab %}

{% tab title="Response" %}

```json
{
    "hash": "dc897a179788e760b29497dd8ebfeb25051dd961f949e210203a5ae4e15b3dab"
}
```

{% 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/polish.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.
