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

# Split

When more than one polished diamond is created from a single rough diamond, each piece (or split) to be polished needs to be registered as a child diamond from the parent diamond.

As a prerequisite, the parent diamond must have a `verification_status` set to `Verified`. Tracr will reject any modification operation on a diamond if Tracr did not previously verify the diamond.

Tracr supports many iterations of split where a rough parent diamond may have multiple generations of children.

> **An important note regarding split**
>
> Once a diamond is marked as `split`, it is considered as `destroyed` in Tracr inventory, and won’t be visible anymore in the portal or API. Therefore, any subsequent operations like 'polish' on this diamond will be rejected by Tracr.

## Step 1 – Set the parent diamond’s lifecycle to split

The parent diamond must be marked as `split` before you can create child rough diamonds.

Call `POST /wemz3zvg7cvr5uugivhib1z0/split`

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

```json
{
    "participant_timestamp": "2024-05-31T11:57:06.304594"
}
```

{% endtab %}

{% tab title="Response" %}

```json
{
    "assurance_level": "assured",
    "box_id": "demo_box",
    "current_stage": "rough",
    "diamond_id": "wemz3zvg7cvr5uugivhib1z0",
    "entity_specific_tags": {},
    "id": "b0733d6f-a3b1-4532-be2b-d352bad46fd6",
    "is_current": true,
    "lifecycle_state": "split",
    "participant_id": "demo_1",
    "participant_timestamp": "2024-05-31T11:57:06.304594+00:00",
    "polished": {},
    "possession_state": "destroyed",
    "producer_uuid": "952e8987-9e49-437b-824c-5c9a77ce7eee",
    "provenance": {
        "provenance_name": "",
        "provenance_type": "Entity",
        "is_locked": false,
        "is_country_code_available": false
    },
    "rough": {
        "carats": 2.16,
        "images": [
            {
                "filename": "demo_1_rough.jpeg",
                "description": "Rough Image",
                "hash": "cf02abefba1b4837b35f45b7f578251046b3bb100d129ff5adc77342d7e0f8a9",
                "image_type": "default"
            }
        ]
    },
    "schema_version": "1.1.0",
    "sight_no": 2,
    "sight_year": 2024,
    "system_timestamp": "2024-05-31T11:58:04.763000+00:00",
    "verification_description": "verified record",
    "verification_status": "Verified",
    "version_id": "jwzorn6beors6zusvw2drklg",
    "verification_status_modified_at": "2024-05-31T11:41:26.068930+00:00"
}
```

{% endtab %}
{% endtabs %}

Once the diamond is split, the `lifecycle_state` is `split` and the `possession_state` is `destroyed`.

## Step 2 – Create a child rough diamond

A child diamond is always considered as a rough diamond when created in Tracr. It's declared by passing the `diamond_id` of the parent rough diamond in the call.

**A child diamond inherits all the traceability data from its parent.**

When declaring a child diamond against a parent diamond, Tracr retrieves all the children already registered then uses a control to check that the sum of carat weights of the children doesn't exceed the carat weight of the parent. If the control fails, the registration of the child diamond is rejected.

Each child receives a new Tracr `diamond_id`.

Call `POST /diamonds/wemz3zvg7cvr5uugivhib1z0/rough/create`

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

```json
{
    "participant_id": "demo_1_split_1",
    "participant_timestamp": "2024-05-31T11:59:52.456810+00:00",
    "rough": {
        "carats": "1.52"
    }
}
```

{% endtab %}

{% tab title="Response" %}

```json
{
    "assurance_level": "assured",
    "box_id": "demo_box",
    "current_stage": "rough",
    "diamond_id": "a2uj544df5t5awu5v792wyj6",
    "diamond_parent_id": "wemz3zvg7cvr5uugivhib1z0",
    "entity_specific_tags": {},
    "id": "14fe49ae-df4b-49f6-93c3-9a712016977e",
    "is_current": true,
    "lifecycle_state": "rough",
    "parent_id": "b0733d6f-a3b1-4532-be2b-d352bad46fd6",
    "participant_id": "demo_1_split_1",
    "participant_parent_id": "demo_1",
    "participant_timestamp": "2024-05-31T11:59:52.456810+00:00",
    "polished": {},
    "possession_state": "held",
    "producer_uuid": "952e8987-9e49-437b-824c-5c9a77ce7eee",
    "provenance": {
        "provenance_name": "",
        "provenance_type": "Entity",
        "is_locked": true,
        "is_country_code_available": false
    },
    "rough": {
        "carats": 1.52
    },
    "schema_version": "1.1.0",
    "sight_no": 2,
    "sight_year": 2024,
    "system_timestamp": "2024-05-31T12:00:34.343000+00:00",
    "verification_description": "verified record",
    "verification_status": "Verified",
    "version_id": "m39wcutwn0vtvf1dy1s7ai9p",
    "verification_status_modified_at": "2024-05-31T12:00:34.365391+00:00"
}
```

{% endtab %}
{% endtabs %}

The child diamond is linked to its parent.

The field `diamond_parent_id` contains the Tracr ID `diamond_id` from the parent.

The field `participant_parent_id` contains the ERP `participant_id` from the parent.

Once the child diamond is created, you can attach additional assets like images, videos, and scans.

For example,

Call `POST /diamonds/a2uj544df5t5awu5v792wyj6/file/images`

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

| Key         | Value              |
| ----------- | ------------------ |
| description | Split Image        |
| image\_type | default            |
| file        | split\_demo\_1.jpg |

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

--8317046c4dac35881b333a4c43b41d64
Content-Disposition: form-data; name="image_type"
default

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

{% endtab %}

{% tab title="Reponse" %}

```json
{
  "hash": "219fe6f8cdc6f32091b310f6c6f5864f4fef97443cb8954a1d64bc9f26731986"
}
```

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