Create Couple Relationship

This example request illustrates how to create a couple relationship. The couple relationship for FamilySearch Family Tree requires person 1 to be male and person 2 to be female. ##

JSON

Request

POST /platform/tree/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/tree/persons/FJP-M4RK",
      "resourceId" : "FJP-M4RK"
    },
    "person2" : {
      "resource" : "https://api.familysearch.org/platform/tree/persons/JRW-NMSD",
      "resourceId" : "JRW-NMSD"
    },
    "facts" : [ {
      "attribution" : {
        "contributor" : {
          "resource" : "https://api.familysearch.org/platform/users/agents/JNYR-KJP"
        },
        "changeMessage" : "...change message..."
      },
      "type" : "http://gedcomx.org/Marriage",
      "date" : {
        "original" : "June 1800",
        "formal" : "+1800-06"
      },
      "place" : {
        "original" : "Provo, Utah, Utah, United States"
      }
    } ]
  } ]
}

Response

HTTP/1.1 201 Created
Content-type: text/html
X-entity-id: 12345
X-processing-time: 3
Vary: Accept,Accept-Language,Accept-Encoding,Expect
Link: <https://api.familysearch.org/platform/tree/couple-relationships/12345/source-references?flag=fsh>; rel="source-references"
Link: <https://api.familysearch.org/platform/tree/couple-relationships/12345/notes?flag=fsh>; rel="notes"
Date: Sun, 03 Apr 1836 10:00:00 GMT-5
Location: https://api.familysearch.org/platform/tree/couple-relationships/12345
Transfer-encoding: chunked

XML

Request

POST /platform/tree/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/tree/persons/FJP-M4RK" resourceId="FJP-M4RK"/>
        <person2 resource="https://api.familysearch.org/platform/tree/persons/JRW-NMSD" resourceId="JRW-NMSD"/>
        <fact type="http://gedcomx.org/Marriage">
            <attribution>
                <contributor resource="https://api.familysearch.org/platform/users/agents/JNYR-KJP"/>
                <changeMessage>...change message...</changeMessage>
            </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 201 Created
Content-type: text/html
X-entity-id: 12345
X-processing-time: 3
Vary: Accept,Accept-Language,Accept-Encoding,Expect
Link: <https://api.familysearch.org/platform/tree/couple-relationships/12345/source-references?flag=fsh>; rel="source-references"
Link: <https://api.familysearch.org/platform/tree/couple-relationships/12345/notes?flag=fsh>; rel="notes"
Date: Sun, 03 Apr 1836 10:00:00 GMT-5
Location: https://api.familysearch.org/platform/tree/couple-relationships/12345
Transfer-encoding: chunked