Skip to content

Prepare a merge draft for exactly two records.

POST
/api/workspace/entity/{entityIdOrKey}/record-merge/prepare
curl --request POST \
--url https://example.com/api/workspace/entity/example/record-merge/prepare \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "FirstInstanceId": "example", "SecondInstanceId": "example", "Surface": 0, "FieldDecisions": [ { "FieldKey": "example", "Decision": 0 } ], "TableDecisions": [ { "FieldKey": "example", "Mode": 0, "SelectedSourceRowIds": [ "example" ] } ] }'
entityIdOrKey
required
string
access_token
string

Optional access token for clients that cannot set Authorization headers. Prefer Authorization: Bearer <token> when possible.

Prepare merge for exactly two records of one entity definition.

object
FirstInstanceId

The survivor: the record that is kept and updated.

string
nullable
SecondInstanceId

The source: the record that is merged into the survivor and archived.

string
nullable
Surface
integer format: int32
Allowed values: 0 1 2
FieldDecisions

Optional current field decisions, with the meaning they have in execute. Prepare decides the requirement of each field, record merge rules and field blockers for the result they select; omitted fields keep the survivor value, and a request without decisions previews the initial result.

Array<object>
nullable

One scalar-field merge decision.

object
FieldKey
string
nullable
Decision
integer format: int32
Allowed values: 0 1 2
TableDecisions

Optional current Table decisions, with the meaning they have in execute.

Array<object>
nullable

One table-field merge decision.

object
FieldKey
string
nullable
Mode
integer format: int32
Allowed values: 0 1 2
SelectedSourceRowIds
Array<string>
nullable

OK

Media typeapplication/json
object
Data
Any of:

Prepared merge draft for two records of one entity definition.

object
EntityDefinitionId
required

Entity definition of both records.

string
Surface
required
integer format: int32
Allowed values: 0 1 2
First
required

Compact record candidate used by merge lookup and merge drafts.

object
Id
required
string
Number
string
nullable
DisplayName
required
string
Subtitle
string
nullable
IsArchived
required
boolean
RowVersion
required
string format: uuid
OpenTarget
required
object
TargetCode
string
nullable
Parameters
object
key
additional properties
string
Second
required

Compact record candidate used by merge lookup and merge drafts.

object
Id
required
string
Number
string
nullable
DisplayName
required
string
Subtitle
string
nullable
IsArchived
required
boolean
RowVersion
required
string format: uuid
OpenTarget
required
object
TargetCode
string
nullable
Parameters
object
key
additional properties
string
Fields
required

Scalar field decisions with their state for the selected result.

Array<object>

One scalar-field decision row in a merge draft.

object
FieldId
required

Field definition identifier.

string
FieldKey
required

Field key used in decisions.

string
FieldDisplayName
required

User-facing field label.

string
FieldType
required
integer format: int32
Allowed values: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
IsRequired
required

True when Moltaro.RecordMerge.Models.RecordMergeFieldDraftModel.RequirementState is Required or Unverified; an undecided requirement is never reported as optional.

boolean
ValuesEqual
required

Whether the survivor and source values are equal.

boolean
CanClear
required

Whether a Clear decision is currently admissible: the caller can write the field, it is editable in the selected result, and its requirement, decided with the field empty, does not ask for a value. It is a preview, not a permission; execute decides the saved result again.

boolean
SurvivorValue
required

Field envelope for runtime entity-instance responses.

object
State
integer format: int32
Allowed values: 0 1
Value

Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.

nullable
PlainTextPreview

Safe compact visible-text representation of a Markdown value.

object
Text

Visible text when available.

string
nullable
IsTruncated

Whether the visible text was shortened for compact presentation.

boolean
State
integer format: int32
Allowed values: 0 1 2 3
SourceValue
required

Field envelope for runtime entity-instance responses.

object
State
integer format: int32
Allowed values: 0 1
Value

Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.

nullable
PlainTextPreview

Safe compact visible-text representation of a Markdown value.

object
Text

Visible text when available.

string
nullable
IsTruncated

Whether the visible text was shortened for compact presentation.

boolean
State
integer format: int32
Allowed values: 0 1 2 3
RequirementState
required
integer format: int32
Allowed values: 0 1 2
Tables
required

Table field decisions.

Array<object>

One table-field decision row in a merge draft.

object
FieldId
required
string
FieldKey
required
string
FieldDisplayName
required
string
SurvivorValue
required

Field envelope for runtime entity-instance responses.

object
State
integer format: int32
Allowed values: 0 1
Value

Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.

nullable
PlainTextPreview

Safe compact visible-text representation of a Markdown value.

object
Text

Visible text when available.

string
nullable
IsTruncated

Whether the visible text was shortened for compact presentation.

boolean
State
integer format: int32
Allowed values: 0 1 2 3
SourceValue
required

Field envelope for runtime entity-instance responses.

object
State
integer format: int32
Allowed values: 0 1
Value

Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.

nullable
PlainTextPreview

Safe compact visible-text representation of a Markdown value.

object
Text

Visible text when available.

string
nullable
IsTruncated

Whether the visible text was shortened for compact presentation.

boolean
State
integer format: int32
Allowed values: 0 1 2 3
Blockers
required

Refusals that prepare can decide without writing: access, restricted fields, related-data conflicts, required or non-editable fields of the selected result and record merge rules. An empty list does not mean that execute succeeds; see Moltaro.RecordMerge.Models.RecordMergeDraftModel.DeferredChecks.

Array<object>

Validation blocker that prevents merge execution.

object
Code
required

Stable error code.

string
Message
required

Localized, user-facing explanation.

string
FieldKey

The survivor field the blocker concerns, when it concerns one readable field.

string
nullable
RuleId

The record merge rule (a validation rule with Scope RecordMerge) that refused the pair or result.

string
nullable
DeferredChecks
required

The checks that only execute performs; prepare never reports them as passed.

Array<integer>
Allowed values: 0 1 2 3 4 5 6
Impact
required

The consequences of a merge for related records, limited to what the caller can read: every count means “records you can read”, never a total; records, fields and archive states the caller cannot read are absent and are not counted. It follows the same related-data plan that execute uses, as of prepare; execute reads and locks that plan again. An Association action that depends on a link the caller cannot read is reported as MoveOrArchiveAsDuplicate, so the answer is the same whether such a link exists or not.

object
Definitions
required

Related definitions with at least one readable affected record, ordered by name and id.

Array<object>

Readable records of one related Entity Definition that the merge changes or leaves on the source.

object
EntityDefinitionId
required

Related entity definition.

string
DisplayName
required

User-facing name of the related definition.

string
ActiveRecordCount
required

Distinct readable active records of this definition counted in any link; a record with several links counts once.

integer format: int32
ArchivedRecordCount
required

Distinct readable archived records (requires ReadArchive) counted in any link.

integer format: int32
Links
required

The referencing fields and what the merge does with each.

Array<object>

One referencing field of a related definition and one action of the merge on it.

object
FieldKey
required

The Reference field that points to the source: a field of the record, or a cell field of its Table.

string
FieldDisplayName
required

User-facing label of that field.

string
TableFieldKey

The owned Table field holding Moltaro.RecordMerge.Models.RecordMergeImpactLinkModel.FieldKey as a cell; null for a field of the record.

string
nullable
TableFieldDisplayName

User-facing label of that Table field; null for a field of the record.

string
nullable
Kind
required
integer format: int32
Allowed values: 0 1 2
Action
required
integer format: int32
Allowed values: 0 1 2 3
ActiveRecordCount
required

Distinct readable active related records (root records, not Table rows).

integer format: int32
ArchivedRecordCount
required

Distinct readable archived related records.

integer format: int32
RowCount

For a Table cell, the readable Table rows whose cell points to the source; null otherwise.

integer format: int32
nullable
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Data": null,
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}

Bad Request

Media typeapplication/json
object
Data
Any of:

Prepared merge draft for two records of one entity definition.

object
EntityDefinitionId
required

Entity definition of both records.

string
Surface
required
integer format: int32
Allowed values: 0 1 2
First
required

Compact record candidate used by merge lookup and merge drafts.

object
Id
required
string
Number
string
nullable
DisplayName
required
string
Subtitle
string
nullable
IsArchived
required
boolean
RowVersion
required
string format: uuid
OpenTarget
required
object
TargetCode
string
nullable
Parameters
object
key
additional properties
string
Second
required

Compact record candidate used by merge lookup and merge drafts.

object
Id
required
string
Number
string
nullable
DisplayName
required
string
Subtitle
string
nullable
IsArchived
required
boolean
RowVersion
required
string format: uuid
OpenTarget
required
object
TargetCode
string
nullable
Parameters
object
key
additional properties
string
Fields
required

Scalar field decisions with their state for the selected result.

Array<object>

One scalar-field decision row in a merge draft.

object
FieldId
required

Field definition identifier.

string
FieldKey
required

Field key used in decisions.

string
FieldDisplayName
required

User-facing field label.

string
FieldType
required
integer format: int32
Allowed values: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
IsRequired
required

True when Moltaro.RecordMerge.Models.RecordMergeFieldDraftModel.RequirementState is Required or Unverified; an undecided requirement is never reported as optional.

boolean
ValuesEqual
required

Whether the survivor and source values are equal.

boolean
CanClear
required

Whether a Clear decision is currently admissible: the caller can write the field, it is editable in the selected result, and its requirement, decided with the field empty, does not ask for a value. It is a preview, not a permission; execute decides the saved result again.

boolean
SurvivorValue
required

Field envelope for runtime entity-instance responses.

object
State
integer format: int32
Allowed values: 0 1
Value

Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.

nullable
PlainTextPreview

Safe compact visible-text representation of a Markdown value.

object
Text

Visible text when available.

string
nullable
IsTruncated

Whether the visible text was shortened for compact presentation.

boolean
State
integer format: int32
Allowed values: 0 1 2 3
SourceValue
required

Field envelope for runtime entity-instance responses.

object
State
integer format: int32
Allowed values: 0 1
Value

Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.

nullable
PlainTextPreview

Safe compact visible-text representation of a Markdown value.

object
Text

Visible text when available.

string
nullable
IsTruncated

Whether the visible text was shortened for compact presentation.

boolean
State
integer format: int32
Allowed values: 0 1 2 3
RequirementState
required
integer format: int32
Allowed values: 0 1 2
Tables
required

Table field decisions.

Array<object>

One table-field decision row in a merge draft.

object
FieldId
required
string
FieldKey
required
string
FieldDisplayName
required
string
SurvivorValue
required

Field envelope for runtime entity-instance responses.

object
State
integer format: int32
Allowed values: 0 1
Value

Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.

nullable
PlainTextPreview

Safe compact visible-text representation of a Markdown value.

object
Text

Visible text when available.

string
nullable
IsTruncated

Whether the visible text was shortened for compact presentation.

boolean
State
integer format: int32
Allowed values: 0 1 2 3
SourceValue
required

Field envelope for runtime entity-instance responses.

object
State
integer format: int32
Allowed values: 0 1
Value

Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.

nullable
PlainTextPreview

Safe compact visible-text representation of a Markdown value.

object
Text

Visible text when available.

string
nullable
IsTruncated

Whether the visible text was shortened for compact presentation.

boolean
State
integer format: int32
Allowed values: 0 1 2 3
Blockers
required

Refusals that prepare can decide without writing: access, restricted fields, related-data conflicts, required or non-editable fields of the selected result and record merge rules. An empty list does not mean that execute succeeds; see Moltaro.RecordMerge.Models.RecordMergeDraftModel.DeferredChecks.

Array<object>

Validation blocker that prevents merge execution.

object
Code
required

Stable error code.

string
Message
required

Localized, user-facing explanation.

string
FieldKey

The survivor field the blocker concerns, when it concerns one readable field.

string
nullable
RuleId

The record merge rule (a validation rule with Scope RecordMerge) that refused the pair or result.

string
nullable
DeferredChecks
required

The checks that only execute performs; prepare never reports them as passed.

Array<integer>
Allowed values: 0 1 2 3 4 5 6
Impact
required

The consequences of a merge for related records, limited to what the caller can read: every count means “records you can read”, never a total; records, fields and archive states the caller cannot read are absent and are not counted. It follows the same related-data plan that execute uses, as of prepare; execute reads and locks that plan again. An Association action that depends on a link the caller cannot read is reported as MoveOrArchiveAsDuplicate, so the answer is the same whether such a link exists or not.

object
Definitions
required

Related definitions with at least one readable affected record, ordered by name and id.

Array<object>

Readable records of one related Entity Definition that the merge changes or leaves on the source.

object
EntityDefinitionId
required

Related entity definition.

string
DisplayName
required

User-facing name of the related definition.

string
ActiveRecordCount
required

Distinct readable active records of this definition counted in any link; a record with several links counts once.

integer format: int32
ArchivedRecordCount
required

Distinct readable archived records (requires ReadArchive) counted in any link.

integer format: int32
Links
required

The referencing fields and what the merge does with each.

Array<object>

One referencing field of a related definition and one action of the merge on it.

object
FieldKey
required

The Reference field that points to the source: a field of the record, or a cell field of its Table.

string
FieldDisplayName
required

User-facing label of that field.

string
TableFieldKey

The owned Table field holding Moltaro.RecordMerge.Models.RecordMergeImpactLinkModel.FieldKey as a cell; null for a field of the record.

string
nullable
TableFieldDisplayName

User-facing label of that Table field; null for a field of the record.

string
nullable
Kind
required
integer format: int32
Allowed values: 0 1 2
Action
required
integer format: int32
Allowed values: 0 1 2 3
ActiveRecordCount
required

Distinct readable active related records (root records, not Table rows).

integer format: int32
ArchivedRecordCount
required

Distinct readable archived related records.

integer format: int32
RowCount

For a Table cell, the readable Table rows whose cell points to the source; null otherwise.

integer format: int32
nullable
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Data": null,
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}

Forbidden

Media typeapplication/json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
key
additional properties
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Not Found

Media typeapplication/json
object
Data
Any of:

Prepared merge draft for two records of one entity definition.

object
EntityDefinitionId
required

Entity definition of both records.

string
Surface
required
integer format: int32
Allowed values: 0 1 2
First
required

Compact record candidate used by merge lookup and merge drafts.

object
Id
required
string
Number
string
nullable
DisplayName
required
string
Subtitle
string
nullable
IsArchived
required
boolean
RowVersion
required
string format: uuid
OpenTarget
required
object
TargetCode
string
nullable
Parameters
object
key
additional properties
string
Second
required

Compact record candidate used by merge lookup and merge drafts.

object
Id
required
string
Number
string
nullable
DisplayName
required
string
Subtitle
string
nullable
IsArchived
required
boolean
RowVersion
required
string format: uuid
OpenTarget
required
object
TargetCode
string
nullable
Parameters
object
key
additional properties
string
Fields
required

Scalar field decisions with their state for the selected result.

Array<object>

One scalar-field decision row in a merge draft.

object
FieldId
required

Field definition identifier.

string
FieldKey
required

Field key used in decisions.

string
FieldDisplayName
required

User-facing field label.

string
FieldType
required
integer format: int32
Allowed values: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
IsRequired
required

True when Moltaro.RecordMerge.Models.RecordMergeFieldDraftModel.RequirementState is Required or Unverified; an undecided requirement is never reported as optional.

boolean
ValuesEqual
required

Whether the survivor and source values are equal.

boolean
CanClear
required

Whether a Clear decision is currently admissible: the caller can write the field, it is editable in the selected result, and its requirement, decided with the field empty, does not ask for a value. It is a preview, not a permission; execute decides the saved result again.

boolean
SurvivorValue
required

Field envelope for runtime entity-instance responses.

object
State
integer format: int32
Allowed values: 0 1
Value

Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.

nullable
PlainTextPreview

Safe compact visible-text representation of a Markdown value.

object
Text

Visible text when available.

string
nullable
IsTruncated

Whether the visible text was shortened for compact presentation.

boolean
State
integer format: int32
Allowed values: 0 1 2 3
SourceValue
required

Field envelope for runtime entity-instance responses.

object
State
integer format: int32
Allowed values: 0 1
Value

Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.

nullable
PlainTextPreview

Safe compact visible-text representation of a Markdown value.

object
Text

Visible text when available.

string
nullable
IsTruncated

Whether the visible text was shortened for compact presentation.

boolean
State
integer format: int32
Allowed values: 0 1 2 3
RequirementState
required
integer format: int32
Allowed values: 0 1 2
Tables
required

Table field decisions.

Array<object>

One table-field decision row in a merge draft.

object
FieldId
required
string
FieldKey
required
string
FieldDisplayName
required
string
SurvivorValue
required

Field envelope for runtime entity-instance responses.

object
State
integer format: int32
Allowed values: 0 1
Value

Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.

nullable
PlainTextPreview

Safe compact visible-text representation of a Markdown value.

object
Text

Visible text when available.

string
nullable
IsTruncated

Whether the visible text was shortened for compact presentation.

boolean
State
integer format: int32
Allowed values: 0 1 2 3
SourceValue
required

Field envelope for runtime entity-instance responses.

object
State
integer format: int32
Allowed values: 0 1
Value

Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.

nullable
PlainTextPreview

Safe compact visible-text representation of a Markdown value.

object
Text

Visible text when available.

string
nullable
IsTruncated

Whether the visible text was shortened for compact presentation.

boolean
State
integer format: int32
Allowed values: 0 1 2 3
Blockers
required

Refusals that prepare can decide without writing: access, restricted fields, related-data conflicts, required or non-editable fields of the selected result and record merge rules. An empty list does not mean that execute succeeds; see Moltaro.RecordMerge.Models.RecordMergeDraftModel.DeferredChecks.

Array<object>

Validation blocker that prevents merge execution.

object
Code
required

Stable error code.

string
Message
required

Localized, user-facing explanation.

string
FieldKey

The survivor field the blocker concerns, when it concerns one readable field.

string
nullable
RuleId

The record merge rule (a validation rule with Scope RecordMerge) that refused the pair or result.

string
nullable
DeferredChecks
required

The checks that only execute performs; prepare never reports them as passed.

Array<integer>
Allowed values: 0 1 2 3 4 5 6
Impact
required

The consequences of a merge for related records, limited to what the caller can read: every count means “records you can read”, never a total; records, fields and archive states the caller cannot read are absent and are not counted. It follows the same related-data plan that execute uses, as of prepare; execute reads and locks that plan again. An Association action that depends on a link the caller cannot read is reported as MoveOrArchiveAsDuplicate, so the answer is the same whether such a link exists or not.

object
Definitions
required

Related definitions with at least one readable affected record, ordered by name and id.

Array<object>

Readable records of one related Entity Definition that the merge changes or leaves on the source.

object
EntityDefinitionId
required

Related entity definition.

string
DisplayName
required

User-facing name of the related definition.

string
ActiveRecordCount
required

Distinct readable active records of this definition counted in any link; a record with several links counts once.

integer format: int32
ArchivedRecordCount
required

Distinct readable archived records (requires ReadArchive) counted in any link.

integer format: int32
Links
required

The referencing fields and what the merge does with each.

Array<object>

One referencing field of a related definition and one action of the merge on it.

object
FieldKey
required

The Reference field that points to the source: a field of the record, or a cell field of its Table.

string
FieldDisplayName
required

User-facing label of that field.

string
TableFieldKey

The owned Table field holding Moltaro.RecordMerge.Models.RecordMergeImpactLinkModel.FieldKey as a cell; null for a field of the record.

string
nullable
TableFieldDisplayName

User-facing label of that Table field; null for a field of the record.

string
nullable
Kind
required
integer format: int32
Allowed values: 0 1 2
Action
required
integer format: int32
Allowed values: 0 1 2 3
ActiveRecordCount
required

Distinct readable active related records (root records, not Table rows).

integer format: int32
ArchivedRecordCount
required

Distinct readable archived related records.

integer format: int32
RowCount

For a Table cell, the readable Table rows whose cell points to the source; null otherwise.

integer format: int32
nullable
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Data": null,
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}

Conflict

Media typeapplication/json
object
Data
Any of:

Prepared merge draft for two records of one entity definition.

object
EntityDefinitionId
required

Entity definition of both records.

string
Surface
required
integer format: int32
Allowed values: 0 1 2
First
required

Compact record candidate used by merge lookup and merge drafts.

object
Id
required
string
Number
string
nullable
DisplayName
required
string
Subtitle
string
nullable
IsArchived
required
boolean
RowVersion
required
string format: uuid
OpenTarget
required
object
TargetCode
string
nullable
Parameters
object
key
additional properties
string
Second
required

Compact record candidate used by merge lookup and merge drafts.

object
Id
required
string
Number
string
nullable
DisplayName
required
string
Subtitle
string
nullable
IsArchived
required
boolean
RowVersion
required
string format: uuid
OpenTarget
required
object
TargetCode
string
nullable
Parameters
object
key
additional properties
string
Fields
required

Scalar field decisions with their state for the selected result.

Array<object>

One scalar-field decision row in a merge draft.

object
FieldId
required

Field definition identifier.

string
FieldKey
required

Field key used in decisions.

string
FieldDisplayName
required

User-facing field label.

string
FieldType
required
integer format: int32
Allowed values: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
IsRequired
required

True when Moltaro.RecordMerge.Models.RecordMergeFieldDraftModel.RequirementState is Required or Unverified; an undecided requirement is never reported as optional.

boolean
ValuesEqual
required

Whether the survivor and source values are equal.

boolean
CanClear
required

Whether a Clear decision is currently admissible: the caller can write the field, it is editable in the selected result, and its requirement, decided with the field empty, does not ask for a value. It is a preview, not a permission; execute decides the saved result again.

boolean
SurvivorValue
required

Field envelope for runtime entity-instance responses.

object
State
integer format: int32
Allowed values: 0 1
Value

Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.

nullable
PlainTextPreview

Safe compact visible-text representation of a Markdown value.

object
Text

Visible text when available.

string
nullable
IsTruncated

Whether the visible text was shortened for compact presentation.

boolean
State
integer format: int32
Allowed values: 0 1 2 3
SourceValue
required

Field envelope for runtime entity-instance responses.

object
State
integer format: int32
Allowed values: 0 1
Value

Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.

nullable
PlainTextPreview

Safe compact visible-text representation of a Markdown value.

object
Text

Visible text when available.

string
nullable
IsTruncated

Whether the visible text was shortened for compact presentation.

boolean
State
integer format: int32
Allowed values: 0 1 2 3
RequirementState
required
integer format: int32
Allowed values: 0 1 2
Tables
required

Table field decisions.

Array<object>

One table-field decision row in a merge draft.

object
FieldId
required
string
FieldKey
required
string
FieldDisplayName
required
string
SurvivorValue
required

Field envelope for runtime entity-instance responses.

object
State
integer format: int32
Allowed values: 0 1
Value

Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.

nullable
PlainTextPreview

Safe compact visible-text representation of a Markdown value.

object
Text

Visible text when available.

string
nullable
IsTruncated

Whether the visible text was shortened for compact presentation.

boolean
State
integer format: int32
Allowed values: 0 1 2 3
SourceValue
required

Field envelope for runtime entity-instance responses.

object
State
integer format: int32
Allowed values: 0 1
Value

Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.

nullable
PlainTextPreview

Safe compact visible-text representation of a Markdown value.

object
Text

Visible text when available.

string
nullable
IsTruncated

Whether the visible text was shortened for compact presentation.

boolean
State
integer format: int32
Allowed values: 0 1 2 3
Blockers
required

Refusals that prepare can decide without writing: access, restricted fields, related-data conflicts, required or non-editable fields of the selected result and record merge rules. An empty list does not mean that execute succeeds; see Moltaro.RecordMerge.Models.RecordMergeDraftModel.DeferredChecks.

Array<object>

Validation blocker that prevents merge execution.

object
Code
required

Stable error code.

string
Message
required

Localized, user-facing explanation.

string
FieldKey

The survivor field the blocker concerns, when it concerns one readable field.

string
nullable
RuleId

The record merge rule (a validation rule with Scope RecordMerge) that refused the pair or result.

string
nullable
DeferredChecks
required

The checks that only execute performs; prepare never reports them as passed.

Array<integer>
Allowed values: 0 1 2 3 4 5 6
Impact
required

The consequences of a merge for related records, limited to what the caller can read: every count means “records you can read”, never a total; records, fields and archive states the caller cannot read are absent and are not counted. It follows the same related-data plan that execute uses, as of prepare; execute reads and locks that plan again. An Association action that depends on a link the caller cannot read is reported as MoveOrArchiveAsDuplicate, so the answer is the same whether such a link exists or not.

object
Definitions
required

Related definitions with at least one readable affected record, ordered by name and id.

Array<object>

Readable records of one related Entity Definition that the merge changes or leaves on the source.

object
EntityDefinitionId
required

Related entity definition.

string
DisplayName
required

User-facing name of the related definition.

string
ActiveRecordCount
required

Distinct readable active records of this definition counted in any link; a record with several links counts once.

integer format: int32
ArchivedRecordCount
required

Distinct readable archived records (requires ReadArchive) counted in any link.

integer format: int32
Links
required

The referencing fields and what the merge does with each.

Array<object>

One referencing field of a related definition and one action of the merge on it.

object
FieldKey
required

The Reference field that points to the source: a field of the record, or a cell field of its Table.

string
FieldDisplayName
required

User-facing label of that field.

string
TableFieldKey

The owned Table field holding Moltaro.RecordMerge.Models.RecordMergeImpactLinkModel.FieldKey as a cell; null for a field of the record.

string
nullable
TableFieldDisplayName

User-facing label of that Table field; null for a field of the record.

string
nullable
Kind
required
integer format: int32
Allowed values: 0 1 2
Action
required
integer format: int32
Allowed values: 0 1 2 3
ActiveRecordCount
required

Distinct readable active related records (root records, not Table rows).

integer format: int32
ArchivedRecordCount
required

Distinct readable archived related records.

integer format: int32
RowCount

For a Table cell, the readable Table rows whose cell points to the source; null otherwise.

integer format: int32
nullable
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Data": null,
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}