Create Genealogies Relationship
This example request illustrates how to create a couple relationship. The couple relationship for FamilySearch Family Tree requires person1
to be male and person2
to be female.
JSON
Request
POST /platform/genealogies/trees/2:3:12345/relationships
Content-Type: application/x-fs-v1+json
Authorization: Bearer YOUR_ACCESS_TOKEN_HERE
{
"relationships" : [ {
"type" : "http://gedcomx.org/Couple",
"person1" : {
"resource" : "https://api.familysearch.org/platform/genealogies/persons/2:2:FJP-M4RK",
"resourceId" : "2:2:FJP-M4RK"
},
"person2" : {
"resource" : "https://api.familysearch.org/platform/genealogies/persons/2:2:JRW-NMSD",
"resourceId" : "2:2:JRW-NMSD"
},
"facts" : [ {
"attribution" : {
"contributor" : {
"resource" : "https://api.familysearch.org/platform/users/agents/JNYR-KJP"
}
},
"type" : "http://gedcomx.org/Marriage",
"date" : {
"original" : "June 1800",
"formal" : "+1800-06"
},
"place" : {
"original" : "Provo, Utah, Utah, United States"
}
} ]
} ]
}
Response
HTTP/1.1 204 No Content Content-type: text/html X-processing-time: 3 Vary: Accept,Accept-Language,Accept-Encoding,Expect Content-length: 0 Date: Sun, 03 Apr 1836 10:00:00 GMT-5
XML
Request
POST /platform/genealogies/trees/2:3:12345/relationships
Content-Type: application/x-fs-v1+xml
Authorization: Bearer YOUR_ACCESS_TOKEN_HERE
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fs:familysearch xmlns:fs="http://familysearch.org/v1/" xmlns="http://gedcomx.org/v1/" xmlns:atom="http://www.w3.org/2005/Atom">
<relationship type="http://gedcomx.org/Couple">
<person1 resource="https://api.familysearch.org/platform/genealogies/persons/2:2:FJP-M4RK" resourceId="2:2:FJP-M4RK"/>
<person2 resource="https://api.familysearch.org/platform/genealogies/persons/2:2:JRW-NMSD" resourceId="2:2:JRW-NMSD"/>
<fact type="http://gedcomx.org/Marriage">
<attribution>
<contributor resource="https://api.familysearch.org/platform/users/agents/JNYR-KJP"/>
</attribution>
<date>
<original>June 1800</original>
<formal>+1800-06</formal>
</date>
<place>
<original>Provo, Utah, Utah, United States</original>
</place>
</fact>
</relationship>
</fs:familysearch>
Response
HTTP/1.1 204 No Content Content-type: text/html X-processing-time: 3 Vary: Accept,Accept-Language,Accept-Encoding,Expect Content-length: 0 Date: Sun, 03 Apr 1836 10:00:00 GMT-5
Sending...
Feedback was sent.
Can't send feedback. Retry in 5 seconds.