Prepare a merge draft for exactly two records.
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://example.com/api/workspace/entity/example/record-merge/prepare"), Headers = { { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"FirstInstanceId\": \"example\", \"SecondInstanceId\": \"example\", \"Surface\": 0, \"FieldDecisions\": [ { \"FieldKey\": \"example\", \"Decision\": 0 } ], \"TableDecisions\": [ { \"FieldKey\": \"example\", \"Mode\": 0, \"SelectedSourceRowIds\": [ \"example\" ] } ] }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}const url = 'https://example.com/api/workspace/entity/example/record-merge/prepare';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"FirstInstanceId":"example","SecondInstanceId":"example","Surface":0,"FieldDecisions":[{"FieldKey":"example","Decision":0}],"TableDecisions":[{"FieldKey":"example","Mode":0,"SelectedSourceRowIds":["example"]}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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" ] } ] }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Optional access token for clients that cannot set Authorization headers. Prefer Authorization: Bearer <token> when possible.
Request Body
Section titled “Request Body”Prepare merge for exactly two records of one entity definition.
object
The survivor: the record that is kept and updated.
The source: the record that is merged into the survivor and archived.
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.
One scalar-field merge decision.
object
Optional current Table decisions, with the meaning they have in execute.
One table-field merge decision.
object
Prepare merge for exactly two records of one entity definition.
object
The survivor: the record that is kept and updated.
The source: the record that is merged into the survivor and archived.
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.
One scalar-field merge decision.
object
Optional current Table decisions, with the meaning they have in execute.
One table-field merge decision.
object
Prepare merge for exactly two records of one entity definition.
object
The survivor: the record that is kept and updated.
The source: the record that is merged into the survivor and archived.
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.
One scalar-field merge decision.
object
Optional current Table decisions, with the meaning they have in execute.
One table-field merge decision.
object
Responses
Section titled “Responses”OK
object
Prepared merge draft for two records of one entity definition.
object
Entity definition of both records.
Compact record candidate used by merge lookup and merge drafts.
object
object
object
Compact record candidate used by merge lookup and merge drafts.
object
object
object
Scalar field decisions with their state for the selected result.
One scalar-field decision row in a merge draft.
object
Field definition identifier.
Field key used in decisions.
User-facing field label.
True when Moltaro.RecordMerge.Models.RecordMergeFieldDraftModel.RequirementState is Required or Unverified; an undecided requirement is never
reported as optional.
Whether the survivor and source values are equal.
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.
Field envelope for runtime entity-instance responses.
object
Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.
Safe compact visible-text representation of a Markdown value.
object
Visible text when available.
Whether the visible text was shortened for compact presentation.
Field envelope for runtime entity-instance responses.
object
Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.
Safe compact visible-text representation of a Markdown value.
object
Visible text when available.
Whether the visible text was shortened for compact presentation.
Table field decisions.
One table-field decision row in a merge draft.
object
Field envelope for runtime entity-instance responses.
object
Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.
Safe compact visible-text representation of a Markdown value.
object
Visible text when available.
Whether the visible text was shortened for compact presentation.
Field envelope for runtime entity-instance responses.
object
Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.
Safe compact visible-text representation of a Markdown value.
object
Visible text when available.
Whether the visible text was shortened for compact presentation.
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.
Validation blocker that prevents merge execution.
object
Stable error code.
Localized, user-facing explanation.
The survivor field the blocker concerns, when it concerns one readable field.
The record merge rule (a validation rule with Scope RecordMerge) that refused the pair or result.
The checks that only execute performs; prepare never reports them as passed.
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
Related definitions with at least one readable affected record, ordered by name and id.
Readable records of one related Entity Definition that the merge changes or leaves on the source.
object
Related entity definition.
User-facing name of the related definition.
Distinct readable active records of this definition counted in any link; a record with several links counts once.
Distinct readable archived records (requires ReadArchive) counted in any link.
The referencing fields and what the merge does with each.
One referencing field of a related definition and one action of the merge on it.
object
The Reference field that points to the source: a field of the record, or a cell field of its Table.
User-facing label of that field.
The owned Table field holding Moltaro.RecordMerge.Models.RecordMergeImpactLinkModel.FieldKey as a cell; null for a field of the record.
User-facing label of that Table field; null for a field of the record.
Distinct readable active related records (root records, not Table rows).
Distinct readable archived related records.
For a Table cell, the readable Table rows whose cell points to the source; null otherwise.
object
object
object
object
object
Example
{ "Data": null, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Bad Request
object
Prepared merge draft for two records of one entity definition.
object
Entity definition of both records.
Compact record candidate used by merge lookup and merge drafts.
object
object
object
Compact record candidate used by merge lookup and merge drafts.
object
object
object
Scalar field decisions with their state for the selected result.
One scalar-field decision row in a merge draft.
object
Field definition identifier.
Field key used in decisions.
User-facing field label.
True when Moltaro.RecordMerge.Models.RecordMergeFieldDraftModel.RequirementState is Required or Unverified; an undecided requirement is never
reported as optional.
Whether the survivor and source values are equal.
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.
Field envelope for runtime entity-instance responses.
object
Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.
Safe compact visible-text representation of a Markdown value.
object
Visible text when available.
Whether the visible text was shortened for compact presentation.
Field envelope for runtime entity-instance responses.
object
Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.
Safe compact visible-text representation of a Markdown value.
object
Visible text when available.
Whether the visible text was shortened for compact presentation.
Table field decisions.
One table-field decision row in a merge draft.
object
Field envelope for runtime entity-instance responses.
object
Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.
Safe compact visible-text representation of a Markdown value.
object
Visible text when available.
Whether the visible text was shortened for compact presentation.
Field envelope for runtime entity-instance responses.
object
Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.
Safe compact visible-text representation of a Markdown value.
object
Visible text when available.
Whether the visible text was shortened for compact presentation.
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.
Validation blocker that prevents merge execution.
object
Stable error code.
Localized, user-facing explanation.
The survivor field the blocker concerns, when it concerns one readable field.
The record merge rule (a validation rule with Scope RecordMerge) that refused the pair or result.
The checks that only execute performs; prepare never reports them as passed.
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
Related definitions with at least one readable affected record, ordered by name and id.
Readable records of one related Entity Definition that the merge changes or leaves on the source.
object
Related entity definition.
User-facing name of the related definition.
Distinct readable active records of this definition counted in any link; a record with several links counts once.
Distinct readable archived records (requires ReadArchive) counted in any link.
The referencing fields and what the merge does with each.
One referencing field of a related definition and one action of the merge on it.
object
The Reference field that points to the source: a field of the record, or a cell field of its Table.
User-facing label of that field.
The owned Table field holding Moltaro.RecordMerge.Models.RecordMergeImpactLinkModel.FieldKey as a cell; null for a field of the record.
User-facing label of that Table field; null for a field of the record.
Distinct readable active related records (root records, not Table rows).
Distinct readable archived related records.
For a Table cell, the readable Table rows whose cell points to the source; null otherwise.
object
object
object
object
object
Example
{ "Data": null, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Forbidden
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Not Found
object
Prepared merge draft for two records of one entity definition.
object
Entity definition of both records.
Compact record candidate used by merge lookup and merge drafts.
object
object
object
Compact record candidate used by merge lookup and merge drafts.
object
object
object
Scalar field decisions with their state for the selected result.
One scalar-field decision row in a merge draft.
object
Field definition identifier.
Field key used in decisions.
User-facing field label.
True when Moltaro.RecordMerge.Models.RecordMergeFieldDraftModel.RequirementState is Required or Unverified; an undecided requirement is never
reported as optional.
Whether the survivor and source values are equal.
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.
Field envelope for runtime entity-instance responses.
object
Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.
Safe compact visible-text representation of a Markdown value.
object
Visible text when available.
Whether the visible text was shortened for compact presentation.
Field envelope for runtime entity-instance responses.
object
Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.
Safe compact visible-text representation of a Markdown value.
object
Visible text when available.
Whether the visible text was shortened for compact presentation.
Table field decisions.
One table-field decision row in a merge draft.
object
Field envelope for runtime entity-instance responses.
object
Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.
Safe compact visible-text representation of a Markdown value.
object
Visible text when available.
Whether the visible text was shortened for compact presentation.
Field envelope for runtime entity-instance responses.
object
Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.
Safe compact visible-text representation of a Markdown value.
object
Visible text when available.
Whether the visible text was shortened for compact presentation.
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.
Validation blocker that prevents merge execution.
object
Stable error code.
Localized, user-facing explanation.
The survivor field the blocker concerns, when it concerns one readable field.
The record merge rule (a validation rule with Scope RecordMerge) that refused the pair or result.
The checks that only execute performs; prepare never reports them as passed.
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
Related definitions with at least one readable affected record, ordered by name and id.
Readable records of one related Entity Definition that the merge changes or leaves on the source.
object
Related entity definition.
User-facing name of the related definition.
Distinct readable active records of this definition counted in any link; a record with several links counts once.
Distinct readable archived records (requires ReadArchive) counted in any link.
The referencing fields and what the merge does with each.
One referencing field of a related definition and one action of the merge on it.
object
The Reference field that points to the source: a field of the record, or a cell field of its Table.
User-facing label of that field.
The owned Table field holding Moltaro.RecordMerge.Models.RecordMergeImpactLinkModel.FieldKey as a cell; null for a field of the record.
User-facing label of that Table field; null for a field of the record.
Distinct readable active related records (root records, not Table rows).
Distinct readable archived related records.
For a Table cell, the readable Table rows whose cell points to the source; null otherwise.
object
object
object
object
object
Example
{ "Data": null, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Conflict
object
Prepared merge draft for two records of one entity definition.
object
Entity definition of both records.
Compact record candidate used by merge lookup and merge drafts.
object
object
object
Compact record candidate used by merge lookup and merge drafts.
object
object
object
Scalar field decisions with their state for the selected result.
One scalar-field decision row in a merge draft.
object
Field definition identifier.
Field key used in decisions.
User-facing field label.
True when Moltaro.RecordMerge.Models.RecordMergeFieldDraftModel.RequirementState is Required or Unverified; an undecided requirement is never
reported as optional.
Whether the survivor and source values are equal.
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.
Field envelope for runtime entity-instance responses.
object
Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.
Safe compact visible-text representation of a Markdown value.
object
Visible text when available.
Whether the visible text was shortened for compact presentation.
Field envelope for runtime entity-instance responses.
object
Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.
Safe compact visible-text representation of a Markdown value.
object
Visible text when available.
Whether the visible text was shortened for compact presentation.
Table field decisions.
One table-field decision row in a merge draft.
object
Field envelope for runtime entity-instance responses.
object
Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.
Safe compact visible-text representation of a Markdown value.
object
Visible text when available.
Whether the visible text was shortened for compact presentation.
Field envelope for runtime entity-instance responses.
object
Canonical stored value for the field when State is Moltaro.Enums.EntityInstanceFieldStateEnum.Value.
Safe compact visible-text representation of a Markdown value.
object
Visible text when available.
Whether the visible text was shortened for compact presentation.
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.
Validation blocker that prevents merge execution.
object
Stable error code.
Localized, user-facing explanation.
The survivor field the blocker concerns, when it concerns one readable field.
The record merge rule (a validation rule with Scope RecordMerge) that refused the pair or result.
The checks that only execute performs; prepare never reports them as passed.
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
Related definitions with at least one readable affected record, ordered by name and id.
Readable records of one related Entity Definition that the merge changes or leaves on the source.
object
Related entity definition.
User-facing name of the related definition.
Distinct readable active records of this definition counted in any link; a record with several links counts once.
Distinct readable archived records (requires ReadArchive) counted in any link.
The referencing fields and what the merge does with each.
One referencing field of a related definition and one action of the merge on it.
object
The Reference field that points to the source: a field of the record, or a cell field of its Table.
User-facing label of that field.
The owned Table field holding Moltaro.RecordMerge.Models.RecordMergeImpactLinkModel.FieldKey as a cell; null for a field of the record.
User-facing label of that Table field; null for a field of the record.
Distinct readable active related records (root records, not Table rows).
Distinct readable archived related records.
For a Table cell, the readable Table rows whose cell points to the source; null otherwise.
object
object
object
object
object
Example
{ "Data": null, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}