---
title: Synchronize the rules
slug: import-test-pdf/synchronize-the-rules
createdAt: 2025-10-29T11:27:00.532Z
---

{
  "id": "btz-66czwGtFD3PQ1CqQU",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "url": "https://provisioning.rs.int.{environment}.korfinancial.com/clients/{entityIdentifier}/rules/synchronizations",
    "servers": [
      {
        "url": "https://provisioning.rs.int.{environment}.korfinancial.com/clients/{entityIdentifier}/rules/synchronizations",
        "description": "RS Provisioning Integration API"
      },
      {
        "url": "https://provisioning.rs.{environment}.korfinancial.com/clients/{entityIdentifier}/rules/synchronizations",
        "description": "RS Provisioning Production API"
      }
    ],
    "name": "Synchronize the rules",
    "description": "Synchronize a number of rules from another environment. Optionally copying them over to a different rule set.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "entityIdentifier",
          "type": "string<uuid>",
          "example": "3AE803B1-5765-481D-BFAB-D176679D7D8C",
          "description": "Your KOR client identifier. Your admin can obtain this identifier from the KOR Central UI under entity client details."
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "The synchronize rules request containing one or more rules to synchronize",
          "customType": "SynchronizeRulesRequest",
          "schema": [
            {
              "name": "rules",
              "kind": "optional",
              "type": "array",
              "description": "The rule synchronization information",
              "modelRef": "#/components/schemas/RuleSyncInfo",
              "customType": "RuleSyncInfo[]",
              "schema": [
                {
                  "name": "identifier",
                  "kind": "optional",
                  "type": "string<uuid>",
                  "description": "The identifier of the rule",
                  "example": "EE740BB0-F854-4054-B5DB-0EAA6B3F6DBB"
                },
                {
                  "name": "targetKDMFieldName",
                  "kind": "optional",
                  "type": "string",
                  "description": "The target KDM field name of the rule",
                  "example": "assetClass"
                },
                {
                  "name": "note",
                  "kind": "optional",
                  "type": "string",
                  "description": "The note containing information and context about the rule",
                  "example": "Lorem ipsum"
                },
                {
                  "name": "ruleSets",
                  "kind": "optional",
                  "type": "array",
                  "description": "The rule sets that this rule is part of",
                  "modelRef": "#/components/schemas/RuleSetSyncInfo",
                  "customType": "RuleSetSyncInfo[]",
                  "schema": [
                    {
                      "name": "identifier",
                      "kind": "optional",
                      "type": "string",
                      "description": "The identifier of an exiting or to be created rule set",
                      "example": "EE740BB0-F854-4054-B5DB-0EAA6B3F6DBB"
                    },
                    {
                      "name": "name",
                      "kind": "optional",
                      "type": "string",
                      "description": "The name of the rule set",
                      "example": "My rule set"
                    },
                    {
                      "name": "type",
                      "kind": "optional",
                      "type": "string",
                      "description": "",
                      "example": ""
                    },
                    {
                      "name": "approvalStrategy",
                      "kind": "optional",
                      "type": "string",
                      "description": "\nThe approval strategy that will be executed for this rule set <br> x-extensible-enum: <small>\n  - REQUIRES_ALL_APPROVALS\n  - NO_APPROVAL_REQUIRED\n</small>\n",
                      "example": ""
                    },
                    {
                      "name": "purposes",
                      "kind": "optional",
                      "type": "array",
                      "description": "",
                      "modelRef": "#/components/schemas/RuleSetPurpose",
                      "customType": "RuleSetPurpose[]",
                      "schema": [
                        {
                          "name": "target",
                          "kind": "optional",
                          "type": "string",
                          "description": "The target for the rule set fields\n<br> x-extensible-enum: <small>\n  - KOR\n  - DTCC\n</small>\n",
                          "example": ""
                        },
                        {
                          "name": "mandates",
                          "kind": "optional",
                          "type": "array",
                          "description": "",
                          "example": "",
                          "itemType": "string",
                          "customType": "string[]",
                          "itemExample": "",
                          "itemDefault": ""
                        }
                      ]
                    }
                  ]
                },
                {
                  "name": "name",
                  "kind": "optional",
                  "type": "string",
                  "description": "The name assigned to the rule",
                  "example": "My assetClass rule"
                },
                {
                  "name": "functions",
                  "kind": "optional",
                  "type": "array",
                  "description": "The function definitions that will apply to the KDM field",
                  "modelRef": "#/components/schemas/Function",
                  "customType": "Function[]",
                  "schema": [
                    {
                      "name": "argumentReferenceIdentifier",
                      "kind": "optional",
                      "type": "string",
                      "description": "The identifier of the function that will be used to generate the argument value.\nIf null, the function will be treated as a head.\n",
                      "example": "EE740BB0-F854-4054-B5DB-0EAA6B3F6DBB"
                    },
                    {
                      "name": "category",
                      "kind": "optional",
                      "type": "string",
                      "description": "The category of the function\n<br> x-extensible-enum: <small>\n  - HUB\n  - PURPOSE\n  - REG\n  - ENTITY\n  - PRODUCT\n  - RELATIONSHIP\n  - VALUE_MAPPING\n</small>\n",
                      "example": "HUB"
                    },
                    {
                      "name": "tag",
                      "kind": "optional",
                      "type": "string",
                      "description": "The tag of the function",
                      "example": "[\"sourceField\",\"upperCase\",\"mandate\"]"
                    },
                    {
                      "name": "functionMetadata",
                      "kind": "optional",
                      "type": "string",
                      "description": "The metadata of the function. Referenced in the user field configuration metadata.",
                      "example": "{\"id\":\"5c7bf808ac0c507e\",\"value\":{\"x\":-105.2109375,\"y\":-84.43359375}}"
                    },
                    {
                      "name": "arguments",
                      "kind": "optional",
                      "type": "array",
                      "description": "A dynamic list of arguments by name and type",
                      "modelRef": "#/components/schemas/FunctionArgument",
                      "customType": "FunctionArgument[]",
                      "schema": [
                        {
                          "name": "type",
                          "kind": "optional",
                          "type": "string",
                          "description": "The type of the function argument\n<br> x-extensible-enum: <small>\n  - STRING\n  - NUMBER\n  - ARRAY\n  - MAP\n  - FUNCTION\n  - BOOLEAN\n  - KDMFIELD\n  - SOURCEFIELD\n</small>\n",
                          "example": "STRING"
                        },
                        {
                          "name": "name",
                          "kind": "optional",
                          "type": "string",
                          "description": "The name of the function argument",
                          "example": "[\"function\",\"argument0\",\"actionType\"]"
                        },
                        {
                          "name": "value",
                          "kind": "optional",
                          "type": "object",
                          "description": "Can be anything: string, number, array, object, etc., including `null`",
                          "modelRef": "#/components/schemas/AnyValue",
                          "customType": "AnyValue",
                          "schema": []
                        }
                      ]
                    }
                  ]
                },
                {
                  "name": "ruleMetadata",
                  "kind": "optional",
                  "type": "string",
                  "description": "Overview of the rule metadata",
                  "example": ""
                },
                {
                  "name": "status",
                  "kind": "optional",
                  "type": "string",
                  "description": "The status of the rule\n<br> x-extensible-enum: <small>\n  - ACTIVE\n  - INACTIVE\n  - ARCHIVED\n</small>\n",
                  "example": "ACTIVE",
                  "modelRef": "#/components/schemas/RuleStatus",
                  "customType": "RuleStatus",
                  "schema": []
                }
              ]
            },
            {
              "name": "options",
              "kind": "optional",
              "type": "object",
              "description": "",
              "modelRef": "#/components/schemas/SynchronizeRuleOptions",
              "customType": "SynchronizeRuleOptions",
              "schema": [
                {
                  "name": "setAsNewActiveVersion",
                  "kind": "optional",
                  "type": "boolean",
                  "description": "When true, replace the currently active rule in the rule set(s)",
                  "example": true
                },
                {
                  "name": "copyToRuleSet",
                  "kind": "optional",
                  "type": "string<uuid>",
                  "description": "The existing rule set to which a copy of the rules should be added",
                  "example": "EE740BB0-F854-4054-B5DB-0EAA6B3F6DBB"
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/SynchronizeRulesRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "202",
        "description": "The rules synchronization request has been accepted for processing.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "The synchronize rules response",
            "customType": "SynchronizeRulesResponse",
            "schema": [
              {
                "name": "rules",
                "kind": "optional",
                "type": "array",
                "description": "The rule synchronization result",
                "modelRef": "#/components/schemas/RuleSynchronizationResult",
                "customType": "RuleSynchronizationResult[]",
                "schema": [
                  {
                    "name": "ruleIdentifier",
                    "kind": "optional",
                    "type": "string<uuid>",
                    "description": "The identifier of the rule",
                    "example": "EE740BB0-F854-4054-B5DB-0EAA6B3F6DBB"
                  },
                  {
                    "name": "comment",
                    "kind": "optional",
                    "type": "string",
                    "description": "Information on the synchronization result",
                    "example": "Version updated from 1 to 2"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/SynchronizeRulesResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad Request",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "401",
        "description": "Unauthorized",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "Forbidden",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "Not Found",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "405",
        "description": "Method Not Allowed",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "406",
        "description": "Not Acceptable",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "415",
        "description": "Unsupported Media Type",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "500",
        "description": "Internal Server Error",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "504",
        "description": "Gateway Timeout",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "default",
        "description": "Internal Server Error",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url https://provisioning.rs.int.{environment}.korfinancial.com/clients/{entityIdentifier}/rules/synchronizations \\\n     --header 'accept: application/json'"
        },
        {
          "id": "example-1-javascript",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'PUT',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://provisioning.rs.int.{environment}.korfinancial.com/clients/{entityIdentifier}/rules/synchronizations\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://provisioning.rs.int.{environment}.korfinancial.com/clients/{entityIdentifier}/rules/synchronizations\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://provisioning.rs.int.{environment}.korfinancial.com/clients/{entityIdentifier}/rules/synchronizations\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-202",
          "language": "202",
          "code": "// The rules synchronization request has been accepted for processing.\n{\n  \"rules\": [\n    {\n      \"ruleIdentifier\": \"EE740BB0-F854-4054-B5DB-0EAA6B3F6DBB\",\n      \"comment\": \"Version updated from 1 to 2\"\n    }\n  ]\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Bad Request\n"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Unauthorized\n"
        },
        {
          "id": "response-3-403",
          "language": "403",
          "code": "// Forbidden\n"
        },
        {
          "id": "response-4-404",
          "language": "404",
          "code": "// Not Found\n"
        },
        {
          "id": "response-5-405",
          "language": "405",
          "code": "// Method Not Allowed\n"
        },
        {
          "id": "response-6-406",
          "language": "406",
          "code": "// Not Acceptable\n"
        },
        {
          "id": "response-7-415",
          "language": "415",
          "code": "// Unsupported Media Type\n"
        },
        {
          "id": "response-8-500",
          "language": "500",
          "code": "// Internal Server Error\n"
        },
        {
          "id": "response-9-504",
          "language": "504",
          "code": "// Gateway Timeout\n"
        },
        {
          "id": "response-10-default",
          "language": "default",
          "code": "// Internal Server Error\n"
        }
      ],
      "selectedLanguageId": "response-0-202"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}