Example of using the REST API to merge entries
Merge
The following table lists the details about using the Merge operation to merge an existing entry into a form:
URL qualifier | /mergeEntry/{formName} formName is the name of the form for which an entry must be created. | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Method | POST | ||||||||||||||||||||
Headers |
| ||||||||||||||||||||
Request body | An entry object in the 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 if the ID specified does not conflict with existing entry IDs.
|
Here is an example 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 the details about using the Merge endpoint to merge an existing entry with attachments:
URL qualifier | /mergeEntry/{formName} formName is the name of the form for which an entry must be created. | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Method | POST | ||||||||||||||||||||
Headers |
| ||||||||||||||||||||
Request body | An entry object in the 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. |
Here is an example 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%\"
}