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 name is the generic API collection resource name, for example, persons.

  • id is 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

  • System-specific data is not copied during cloning. Only user-maintainable data is included in the cloned record.

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:

Table 1. Supported Entities
Resource Description

accessroles

Access roles

persons

Persons

pricingexternalinterventionrules

Pricing external intervention rules

pricingoptions

Pricing options

pricingtemplates

Pricing templates

diminishingrates

Diminishing rates

simpleadjustmentrules

Simple adjustment rules

combinationadjustmentrules

Combination adjustment rules

providerlimitcategories

Provider limit categories

  • For resource that are child-level (detail-level), cloning is supported while preserving the association with the parent resource. The cloned record remains linked to the same parent as the source record, ensuring consistency in the hierarchy.

  • During cloning, the following child entities are not copied:

    • User Roles for Access Roles

    • Relation Identifiers for Persons

    • Provider Limit Rules for Provider Limit Categories

  • The clone operation does not support modifying individual child records for the following entities:

    • Access Restriction Grants under Access Roles

    • Partial Provider Pricing Clauses under Pricing Options

    • Diminishing Rate Blocks under Diminishing Rates, including nested block amount and size lists

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 NEW1585903 as 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.