Help:MergeEdit

Search WikiTree's help pages:

Categories: WikiTree Help | WikiTree Apps Project | Developer Help

Language: en | de

Special:MergeEdit is a tool for developers that allows external data to be merged into a WikiTree profile.

If you have any questions feel free to join the WikiTree Apps Google Group and ask there.

Contents

How to Use MergeEdit

To use MergeEdit you make a POST request to https://www.wikitree.com/wiki/Special:MergeEdit.

You are required to send two things in your POST request:

  1. An identifier for the profile you want to edit
  2. Which fields you want to change and the new data for those fields

The identifier can be a profile’s WikiTree ID (user_name), User ID (id), or Page ID (page_id).

The changed data can be sent in either JSON (person) or GEDCOM X (data) format.

Request Body

user_name

This is the profile’s WikiTree ID. It should be in the format Name-1234.

id

This is the profile’s User ID. It is a number.

page_id

This is the profile’s Page ID. It is a number.

person

This is the data that you want to use to change the profile. It is composed of four parts:

  1. The fields you want to change and their new values (required)
  2. The data that you expect the profile to have before you change it (optional)
  3. Various options for the data (optional)
  4. A summary of changes (optional)

person

These are the fields you want to change.

The accepted fields are:

Prefix: The prefix of the person.
FirstName: The first name of the person at birth.
RealName: The current first name of the person.
MiddleName: The middle name of the person.
LastNameCurrent: The current last name of the person.
LastNameOther: Any other last names that the person has, separated by commas.
Nicknames: Any nicknames that the person has, separated by commas.
Suffix: The suffix of a person.
BirthDate: The birth date of a person.
BirthLocation: The birth location of a person.
DeathDate: The death date of a person.
DeathLocation: The death location of a person.
Gender: The gender of a person.
Bio: The text of the biography.

expected

These are the values that you expect the profile to have. If the expected value does not match what is on the profile, then the original value will remain checked and you will get an error message like: "There is an incoming change for the Current Last Name, but the original data does not match expected the value of "Nelson". Skipping that update."

The accepted fields for expected are the same as those in person.

options

There is currently only one option.

mergeBio: If this is set to 1 it will add the text in the “Bio” field to the end of the profile’s == Biography == section. If this option is not set, then the entire biography will be overwritten by the text in the “Bio” field.

summary

This is the text that goes in the "Change summary" box. The default message is "Imported data from external site."

Example

{
"person": {
"FirstName": "John",
"MiddleName": "Alexander",
"LastNameCurrent": "Doe",
"Suffix": "Jr",
"BirthDate": "25 Jun 1990",
"BirthLocation": "Montana, United States",
"Bio": "This is an addition to the biography."
},
"expected": {
"LastNameCurrent": "Doe"
},
"options": {
"mergeBio": 1
},
"summary": "I changed some data."
}

data

This is the data that you want to use to change the profile. It is composed of three parts:

  1. The fields you want to change and their new values (required)
  2. The sources you want to add to the profile (optional)
  3. A summary of changes (optional)

It takes GEDCOM X data. You can read more about GEDCOM X here.

persons

persons is an array of people. For the purposes of MergeEdit only one person should be in the array. People are composed of four parts:

  1. An identifier for the person.
  2. The names associated with the person.
  3. The gender of the person.
  4. Events associated with the person.
id

This is a reference ID. It appears on the MergeEdit page, but is not saved to the profile.

names

This is a list of names of the person. For the purposes of MergeEdit, only one is needed. Names consist of a list of nameForms, and nameForms consist of a list of name parts.

Name parts have a type and a value.

type: What type of name part it is. You can see a list of name part types here.
value: The corresponding name. Example: John.

gender

The person's Sex at Birth.

type: It can be Male, Female, or Unknown.

Read more about GEDCOM X Gender Types here.

facts

This is a list of events relating to a person. Each event consists of three parts.

type: The type of event. You can see the different event / fact types here.
date: The date of the event.
place: The place of the event.

A fact of type birth will fill in the information for Birth Date and Birth Location.

A fact of type death will fill in the information for Death Date and Death Location.

All other fact types will appear in a bulleted list in the biography in the format Fact: FACT TYPE (FACT DATE) FACT PLACE.

sourceDescriptions

These are the sources that should be added to the profile.

summary

This is the text that goes in the "Change summary" box. The default message is "Imported data from external site."

Example

{

"persons": [{
"id": "test123",
"names": [{
"nameForms": [{
"parts": [
{"type": "http://gedcomx.org/Prefix", "value": "Sir"},
{"type": "http://gedcomx.org/Given", "value": "Bob"},
{"type": "http://gedcomx.org/Surname", "value": "Smith"},
{"type": "http://gedcomx.org/Suffix", "value": "Jr"}
]
}]
}],
"gender": {
"type": "http://gedcomx.org/Male"
},
"facts": [{
"type": "http://gedcomx.org/Birth",
"date": {"original": "21 Feb 1927"},
"place": {"original": "This is the birth place."}
},
{
"type": "http://gedcomx.org/Death",
"date": {"original": "10 Mar 2018"},
"place": {"original": "This is the death place."}
},
{
"type": "http://gedcomx.org/Burial",
"date": {"original": "11 Mar 2018"},
"place": {"original": "This is the burial place."}
}],
"sources": [{
"description": "#1"
}]
}],
"sourceDescriptions": [{
"id": "1",
"citations": [{
"value": "This is a citation."
}]
}],
"summary": "This is the message that goes in the change summary box."

}

Demo App & App Examples

To see MergeEdit in action there is a demo app located here.

Apps that use MergeEdit:



This page was last modified 20:10, 8 April 2022. This page has been accessed 2,096 times.