Clone API
Introduction
The Clone API enables users to create a new record by duplicating an existing record using a REST API.
This API simplifies record creation by reusing existing data instead of manual re-entry. It copies attributes, child records, relationships, and references while generating a new record with a new functional key.
This integration point accepts a POST request with a payload containing the clone details on the following URL:
http://[hostName]:[portNumber]/[api-context-root]/generic/\{resource name}/{id}/clone
where:
-
resource nameis the generic API collection resource name, for example,persons. -
idis the source record ID .
Before You Clone
Before calling the Clone API:
-
Verify in the resource metadata that the resource supports clone.
-
Identify the functional key fields for the resource.
-
Verify that the user has Create access for the resource.
-
Choose an existing source record ID.
-
Choose functional key values that identify the new record.
How Clone Works
The Clone API follows these steps:
-
An existing record is selected
-
A new functional key (single or composite) is provided
-
The clone request is submitted
The system creates a new record by duplicating the selected record along with its associated data. You can apply optional modifications during the clone operation.
Request Payload
The request payload include the fields that make up the functional key for the new record. For a composite functional key, include every required field in the key.
You can also include supported fields that must differ from the source record. When the payload includes supported child data, the API applies those changes while creating the cloned record.
Data Copied During Clone
By default, the clone operation copies the supported structure of the source record, including:
-
Record attributes
-
Child records (lists)
-
Parent relationships
-
References
|
Functional Key
A functional key is mandatory for cloning and uniquely identifies the new record. The functional key can be:
-
A single field, or
-
A combination of multiple fields (composite key)
Authorization
Clone follows the same access rules as Create. Users with Create access are allowed to clone records.
Validation and authorization errors use the standard HTTP API response message format. For more information, see Response Messages.
Supported Entities
The following table lists the resource names where clone functionality is applicable:
| Resource | Description |
|---|---|
|
Access roles |
|
Persons |
|
Pricing external intervention rules |
|
Pricing options |
|
Pricing templates |
|
Diminishing rates |
|
Simple adjustment rules |
|
Combination adjustment rules |
|
Provider limit categories |
|
Example: Clone a Person
The following example clones the person with ID 1585903 and creates a new person with the functional key NEW1585903.
POST http://[hostName]:[portNumber]/[api-context-root]/generic/persons/1585903/clone
{
"code": "NEW1585903"
}
Result:
-
A new person record is created.
-
The supported source data is copied.
-
The new record uses
NEW1585903as its functional key.
Example: Clone a Person with Changes
POST http://[hostName]:[portNumber]/[api-context-root]/generic/persons/1585903/clone
{
"code": "NEW1585903",
"name": "Alex",
"gender": "M"
}
Result:
-
The person record is cloned.
-
The selected fields are updated during cloning.
Example: Adding Child Data During Clone
POST http://[hostName]:[portNumber]/[api-context-root]/generic/persons/1585903/clone
{
"code": "NEW1585903",
"addressList": [
{
"op": "add",
"type": "S",
"startDate": "2026-01-07",
"country": { "id": "10" }
}
]
}
Result:
-
The person record is cloned.
-
A child address record is added to the cloned person.