Account Update

Description

This call allows you to update existing account information in the OGF system. You can only update account information for accounts you you have created.

Version

2011-02-02

URI

REST URI [POST]:
/v11.02/Account.svc/Update?SessionId={SessionId}

Content-Type: Application/xml

Example

Request POST
http://wsdev.onegreatfamily.com/v11.02/Account.svc/Update?SessionId=gl4q23cwofpshi55sg1dvc3o
Request Headers
Content-Type: Application/xml
Request Payload
<Account xmlns="http://schemas.datacontract.org/2004/07/OGF.WS.Data">
	<AccountId>123456</AccountId> 
	<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>1234123412341234</CardNumber>
		<CardExpiration>05.2010</CardExpiration>
		<CVV2>123</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>
</Account>
Success Response Payload
<UpdateAccountResult xmlns="http://schemas.datacontract.org/2004/07/OGF.WS.Data">
	<ErrorCode>0</ErrorCode>
	<Message>Success</Message>
	<Status>SUCCESS</Status>
</UpdateAccountResult>
Failed Response Payload
<UpdateAccountResult xmlns="http://schemas.datacontract.org/2004/07/OGF.WS.Data">
	<ErrorCode>19407</ErrorCode>
	<Message>Account not found.</Message>
	<Status>ERROR</Status>
</UpdateAccountResult>
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

Account

The account aggregate to update

Type: Account

Default: None

Constraints: Constraints: Account object must contain valid email and password fields or the username and passwords fields of an existing account or the accountId

Response Elements

Name Description

UpdateAccountResult

This operation returns an UpdateAccountResult aggregate

HTTP Status Code 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 aggregate. Retrieve the RestFault from the Webexception response property.