Example of using the REST API to merge entries
Merge
The following table lists details about using the Merge operation to merge an existing entry into a form.
URL qualifier | /mergeEntry/{formName} formName - The form for which an entry is to be created. | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Method | POST | ||||||||||||||||||||
Headers |
| ||||||||||||||||||||
Request body | An entry object in JSON format, merge options, and qualification. | ||||||||||||||||||||
Returns | No body content, but returns HTTP status code 201 with the Location header set to the URL of the new instance resource. | ||||||||||||||||||||
Merge Type | A value that indicates the action to take if the operation includes an Entry ID field and Entry ID that already exists in the target form. This parameter is ignored if you do not specify the Entry ID field or the ID specified does not conflict with existing entry IDs.
|
The following example shows how to merge an entry without an attachment field.
// normal entry values section
"values" : {
...
},
// merge options
"mergeOptions" : {
"ignorePatterns" : false,
"ignoreRequired" : false,
"workflowEnabled" : false,
"associationsEnabled" : false,
"mergeType" : "DUP_ERROR",
"multimatchOption" : 0
},
// a String representation of the qualification
"qualification" : "'8'LIKE \"%match criteria%\"
}
Merge with attachments
The following table lists details about using the Merge endpoint to merge an existing entry with attachments.
URL qualifier | /mergeEntry/{formName} formName - The form for which an entry is to be created. | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Method | POST | ||||||||||||||||||||
Headers |
| ||||||||||||||||||||
Request body | An entry object in JSON format, merge options and qualification | ||||||||||||||||||||
Returns | No body content, but returns HTTP status code 201 with the Location header set to the URL of the new instance resource. | ||||||||||||||||||||
All possible error codes | If the request is not successful, the following error code is returned: 500 - Internal Server Error For more information, see Error-handling-for-the-REST-API. |
The following example shows how to merge an entry with an attachment field.
// normal entry values section
"values" : {
...
AttachmentFieldName : "attachedFileName",
...
},
// merge options
"mergeOptions" : {
"ignorePatterns" : false,
"ignoreRequired" : false,
"workflowEnabled" : false,
"associationsEnabled" : false,
"mergeType" : "DUP_ERROR",
"multimatchOption" : 0
},
// a String representation of the qualification
"qualification" : "'8'LIKE \"%match criteria%\"
}