The UserCreateUpdate
operation allows you to create or update a user record. If a UserOGFN is included
as part of the UserWS aggregate, then an attempt will be made to update an existing record. If the UserOGFN
is not included, an attempt will be made to create a new User record if the username is not already taken. If in this case the
username is already taken, then an error will be returned.
Request POST
http://wsdev.onegreatfamily.com/v11.02/User.svc/CreateUpdate?SessionId=gl4q23cwofpshi55sg1dvc3o
Request Headers
Content-Type: Application/xml
Request Payload
<UserWS xmlns="http://schemas.datacontract.org/2004/07/OGF.WS.Data">
<AccountId>0</AccountId>
<Address1>Address1</Address1>
<Address2>Address2</Address2>
<City>Springville</City>
<Country>USA</Country>
<Email>test@onegreatfamily.com</Email>
<FirstName>First Name</FirstName>
<GroupOgfns xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<a:unsignedLong>5</a:unsignedLong>
<a:unsignedLong>6</a:unsignedLong>
</GroupOgfns>
<LastName>Surname</LastName>
<Ogfn>0</Ogfn>
<Password>wsuser-1947946234</Password>
<State>Utah</State>
<SubscriptionType>NONE</SubscriptionType>
<UserType>NONE</UserType>
<Username>wsuser-1947946234</Username>
<Zip>84663</Zip>
</UserWS>
Success Response Payload
<UserWS xmlns="http://schemas.datacontract.org/2004/07/OGF.WS.Data">
<AccountId>0</AccountId>
<Address1>Address1</Address1>
<Address2>Address2</Address2>
<City>Springville</City>
<Country>USA</Country>
<Email>test@onegreatfamily.com</Email>
<FirstName>First Name</FirstName>
<GroupOgfns xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<a:unsignedLong>5</a:unsignedLong>
<a:unsignedLong>6</a:unsignedLong>
</GroupOgfns>
<LastName>Surname</LastName>
<Ogfn>1854111</Ogfn>
<Password>wsuser-1947946234</Password>
<State>Utah</State>
<SubscriptionType>NONE</SubscriptionType>
<UserType>NONE</UserType>
<Username>wsuser-1947946234</Username>
<Zip>84663</Zip>
</UserWS>
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>