User Read

Description

The user read operation retrieves the user entity for the currently logged in user associated with the sessionId.

URI

REST URI [GET]:
/v11.02/User.svc/Read?SessionId={sessionId}

Example

Request GET
http://wsdev.onegreatfamily.com/v11.02/User.svc/Read?SessionId=qwo1ybhpm5yenbuy1bn3btet
Success Response Payload
<Result xmlns="http://schemas.datacontract.org/2004/07/OGF.WS.Data">
	<Code>0</Code>
	<Message>Success</Message>
	<Value i:type="User">
		<UserOgfn>123456</UserOgfn> 
		<IndiOgfn>2222222</IndiOgfn> 
		<FirstName>Joe</FirstName>
		<LastName>Cardmember</LastName>
		<EmailAddress>joe@myemail.com</EmailAddress>
		<PhoneNumber>123-456-7890</PhoneNumber>
		<UserName>username</UserName>
		<Password>password</Password>
		<Address>
			<address1>1234 Market St.</address1>
			<address2></address2>
			<City>San Fransisco</City>
			<StateProvince>CA</StateProvince>
			<Country>USA</Country>
			<PostalCode>12345</PostalCode>
		</Address>
		<CreditCard>
			<NameOnCard>Joe Cardmember</NameOnCard>
			<CardNumber></CardNumber>
			<CardExpiration></CardExpiration>
			<CVV2></CVV2>
			<BillingAddress>
				<address1>1234 Market St.</address1>
				<address2></address2>
				<City>San Fransisco</City>
				<StateProvince>CA</StateProvince>
				<Country>USA</Country>
				<PostalCode>12345</PostalCode>
			</BillingAddress>
		</CreditCard>
		<ProductId>PRODUCT_ID</ProductId>
		<GroupOgfns xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
			<a:unsignedLong>5</a:unsignedLong>
			<a:unsignedLong>6</a:unsignedLong>
		</GroupOgfns>
	</Value>
</Result>
Failed Response Payload
<Result xmlns="http://schemas.datacontract.org/2004/07/OGF.WS.Data">
	<Code>27006</Code>
	<Message>The sessionId is not associated with a logged in user</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 session id for the currently logged in user

Type: String

Default: None

Constraints: Must be a valid session id.

Yes

Response Elements

Name Description

Result

This operation returns a Result Entity

Type: Result

Result.Value

Result.Value will be a User entity on success

Type: User entity

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.