What Field Values Are Copied to Winning Records When Merging Multiple Records From REST API

Issue

When using the Merge Lead(s) REST API end-point and merging multiple leads, which field values would be copied to the winning record?

In the below example, the winning lead record has a blank value for Job Title. When merging all 4 leads, which field value will get copied to the winning record from the list of losing records? 
This is a article attached imageThis is a article attached image

Solution

The field values that will be injected to the winning lead record are directly impacted by the order of leadID's in the Lead array parameter of the call, where the FIRST leadID listed in the parameter array will be the winning value IF the field on the winning Lead record is blank. 

URL Example
{{baseUrl}}/rest/v1/leads/4231/merge.json?leadIds=2232,1323,1455

RESULT 
Based on the above excel chart, LeadID 4231 (Winner) would have their Job Title field updated = 'electrician'.

URL Example #2
{{baseUrl}}/rest/v1/leads/4231/merge.json?leadIds=1323,1455,2232

RESULT
Based on the above excel chart, LeadID 4231 (Winner) would have their Job Title field updated = blank/empty.
 


Root Cause

This is the expected behavior when merging multiple leads via the REST API Merge Leads end-point.