Family Create or Update

Description

This operation updates or creates a family record. If the family OGFN is 0, the family will be created. Otherwise if it has a lock it will be updated. To aquire a lock so you can make modifications to the family, call the Lock method.

URI

REST URI [POST]:
/v11.02/Family.svc/CreateUpdate?SessionId={sessionId}

Content-Type: Application/xml

Example

Request POST
http://wsdev.onegreatfamily.com/v11.02/Family.svc/CreateUpdate?SessionId=113434515134543151134
Request Headers
Content-Type: Application/xml
Request Payload
<Fam xmlns="http://schemas.datacontract.org/2004/07/OGF.WS.Data">
	<ChildrenOgfns xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
	</ChildrenOgfns>
	<DivorceDate>1 Jan 2000</DivorceDate>
	<DivorcePlace>New york, New york, usa</DivorcePlace>
	<GroupOgfn>0</GroupOgfn>
	<HusbandOgfn></HusbandOgfn>
	<MarriageDate>1 Jan 1960</MarriageDate>
	<MarriagePlace>New york, New york, usa</MarriagePlace>
	<Ogfn>0</Ogfn>
	<WifeOgfn>0</WifeOgfn>
	<lockId>0</lockId>
</Fam>
Success Response Payload
<Result xmlns="http://schemas.datacontract.org/2004/07/OGF.WS.Data">
	<Code>0</Code>
	<Message>Success</Message>
	<Value i:type="a:unsignedLong">1855450</Value>
</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

SessionId

The current session Id

Type: string

Default: None

Yes

POST Payload

Name Description Required

Fam

This operation takes as input a Fam entity.

Type: Fam

Default: None

Constraints: Must be a valid Fam entity.

Yes

Response Elements

Name Description

Result

This operation returns a Result Entity

Type: Result

Result.Value

Result.Value will be a UInt64 for the id of the the family created if the family was created, otherwise no value will be returned

Type: UInt64

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.