Individual Create or Update

Description

This operation updates or creates an individual record. If the individual OGFN is 0, the individual will be created. Otherwise if it has a lock it will be updated. To acquire a lock so you can make updates, call the Lock operation first. Note: This will release a lock if the record is being updated, there is no need to call unlock if you make this call. Also user is required to use at least one non-required parameter - Name, Gender, Birthdate ect..

URI

REST URI [GET]:
Individual.svc/CreateUpdate?SessionId={sessionId}&IndiOgfn={ogfn}&Name={name}&Gender={gender}&BirthDate={birthDate}&BirthPlace={birthPlace}&ChristeningDate={christeningDate}&ChristeningPlace={christeningPlace}&DeathDate={deathDate}&DeathPlace={deathPlace}&BurialDate={burialDate}&BurialPlace={burialPlace}&Email={Email}&lockId={lockId}

Content-Type: Application/xml

Example

Request GET

http://wsdev.onegreatfamily.com/v11.02/Individual.svc/CreateUpdate?SessionId=gl4q23cwofpshi55sg1dvc3o&IndiOgfn=123456&Name=John/Smith&Gender=Male&BirthDate=Jan 1 1900&BirthPlace=Phoenix,Arizona,USA&&ChristeningDate=Feb 1 1900&ChristeningPlace=Phoenix,ArizonaUSA&DeathDate=Feb 6 1960&DeathPlace=Phoenix,ArizonaUSA&BurialDate=Feb 13 1960&BurialPlace=Phoenix,ArizonaUSA&Email=johns@gone.com&lockId=12666600

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>29000</Code>
	<Message>Cannot create the record, it already exists.</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 - NOTE: requires at least one non-required parameter

Name Description Required

SessionId

The current session Id

Type: string

Default: None

Yes

IndiOgfn

OneGreatFamily ID for the individual

Type: UInt64

Constraints: Only required for an update

No

Name

The individuals name

Type: String

Constraints: Only correctly formatted names can be used

No

Gender

The individuals gender

Type: String

Default: "unknown"

Constraints: Must be "Male" or "Female"

No

BirthDate

The individuals birth date

Type: String

Constraints: None

No

BirthPlace

The individuals birth place

Type: String

Constraints: None

No

ChristeningDate

The individuals Christening date

Type: String

Constraints: None

No

ChristeningPlace

The individuals Christening place

Type: String

Constraints: None

No

DeathDate

The individuals Death date

Type: String

Constraints: None

No

DeathPlace

The individuals Death place

Type: String

Constraints: None

No

BurialDate

The individuals Burial date

Type: String

Constraints: None

No

BurialPlace

The individuals Burial place

Type: String

Constraints: None

No

lockId

A value representing the record's lockId.

Type: long

Constraints: None

No

LinkId

Link id of the Individual in system such as Facebook Id

Type: String

Constraints: None

No

LinkType

A sytem type for the LinkId. 

Type: String

Constraints: current possible values: FACEBOOK_KIN2

No

Response Elements

Name Description

Result

This operation returns a Result Entity

Type: Result

Result.Value

Result.Value will be a UInt64 on success

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.