Skip to content

Commit 27c46fd

Browse files
committed
docs(V2): document optional fields for unit split endpoint
The v2/unit/split example used incorrect v1 field names (unitOwner, countryJurisdictionOfOwner) and was missing supported optional fields. Add field reference tables and fix the example to use the correct v2 field names: unitCurrentOwner, unitStatusReason, unitStatusDate.
1 parent 5be9063 commit 27c46fd

1 file changed

Lines changed: 25 additions & 4 deletions

File tree

docs/cadt_rpc_api_v2.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3594,6 +3594,25 @@ Response
35943594

35953595
#### Split unit into multiple units
35963596

3597+
Splits an existing unit into multiple units. Each new unit inherits all fields from the original unit, then overrides only the fields you provide in each record. The first record keeps the original unit's `cadTrustUnitId`; subsequent records receive new UUIDs.
3598+
3599+
**Required fields per record:**
3600+
3601+
| Field | Type | Description |
3602+
|---|---|---|
3603+
| `unitCount` | number | Number of units in this split. The sum of all `unitCount` values must equal the original unit's `unitCount`. |
3604+
3605+
**Optional fields per record** (override the original unit's values):
3606+
3607+
| Field | Type | Description |
3608+
|---|---|---|
3609+
| `unitBlockStart` | string | Start block for this split. If both `unitBlockStart` and `unitBlockEnd` are provided, `unitSerialId` is automatically derived. |
3610+
| `unitBlockEnd` | string | End block for this split. |
3611+
| `unitCurrentOwner` | string | New owner for this split. |
3612+
| `unitStatus` | string | Status for this split (e.g., "Issued", "Held", "Retired"). |
3613+
| `unitStatusReason` | string | Reason for the status. |
3614+
| `unitStatusDate` | string | Date of the status change (YYYY-MM-DD). |
3615+
35973616
Request
35983617
```shell
35993618
curl --location -g --request POST 'localhost:31310/v2/unit/split' \
@@ -3605,16 +3624,17 @@ curl --location -g --request POST 'localhost:31310/v2/unit/split' \
36053624
"unitCount": 10,
36063625
"unitBlockStart": "A001",
36073626
"unitBlockEnd": "A010",
3608-
"unitOwner": "New Owner 1",
3627+
"unitCurrentOwner": "New Owner 1",
36093628
"unitStatus": "Issued",
3610-
"countryJurisdictionOfOwner": "Bhutan"
3629+
"unitStatusReason": "Split for partial transfer",
3630+
"unitStatusDate": "2026-04-07"
36113631
},
36123632
{
36133633
"unitCount": 5,
36143634
"unitBlockStart": "B001",
36153635
"unitBlockEnd": "B005",
3616-
"unitStatus": "Held",
3617-
"countryJurisdictionOfOwner": "Canada"
3636+
"unitCurrentOwner": "New Owner 2",
3637+
"unitStatus": "Held"
36183638
}
36193639
]
36203640
}'
@@ -3624,6 +3644,7 @@ Response
36243644
```json
36253645
{
36263646
"message": "Unit split successful",
3647+
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
36273648
"success": true
36283649
}
36293650
```

0 commit comments

Comments
 (0)