Individual Relationship Add

Description

Adds a relationship between two individuals (i.e. father, mother, spouse, child or sibling).

URI

REST URI [GET]:
/v11.02/Individual.svc/AddIndiAsRelation?SessionId={sessionId}&indiOgfn={indiOgfn}&relatedIndiOgfn={relatedIndiOgfn}&relationshipType={relationshipType}&famOgfn={famOgfn}

Example

Request GET
http://wsdev.onegreatfamily.com/v11.02/Individual.svc/AddIndiAsRelation?SessionId=gl4q23cwofpshi55sg1dvc3o&IndiOgfn=225520075&RelatedIndiOgfn=225520077&RelationshipType=SIBLING_RELATIONSHIP
Success Response Payload
<Result xmlns="http://schemas.datacontract.org/2004/07/OGF.WS.Data">
	<Code>0</Code>
	<Message>Success</Message>
</Result>
Failed Response Payload
<Result xmlns="http://schemas.datacontract.org/2004/07/OGF.WS.Data">
	<Code>27001</Code>
	<Message>Your developer Id does not have permissions to make this call</Message>
</Result>
Fault Response Payload
<RestFault xmlns="http://schemas.datacontract.org/2004/07/OGF.WS.Data">
	<ErrorCode>551</ErrorCode>
	<FaultMessage>An unhandled exception has occurred</FaultMessage>
</RestFault>

Query String Parameters

Name Description Required

IndiOgfn

Individual OGFN

Type: UInt64

Default: None

Constraints:

Yes

RelatedIndOgfn

Related Individual OGFN

Type: UInt64

Default: None

Constraints:

Yes

FamilyOgfn

Family OGFN for the relationship. NOTE: When creating a new relationship, this is not required.

Type: UInt64

Default: None

Constraints: Must be a valid family ID.

No

RelationshipType

The relationship type to add

Type: RelationshipType

Default: None

Constraints: Must be a valid RelationshipType.

Yes

SessionId

The current session Id

Type: string

Default: None

Yes

Response Elements

Name Description

Result

This operation returns a Result Entity

Type: Result

Result.Value

Result.Value will be nothing

Type: Nothing

HTTP Status Code

The Web Server returns a status code which indicates if the operation was successful. Anything other than 200 should be regarded as a failure.

HTTP Status Code of 417

The Web Server threw an exception and contains a RestFault entity. Retrieve the RestFault from the Webexception response property.