Welcome‎ > ‎Version 3‎ > ‎Publisher Api‎ > ‎Methods‎ > ‎2 - Consumer Related‎ > ‎

Update Consumer

Updates a consumer in the Group Commerce system.

Method: PUT /api/v3/publisher/consumer/{userKey}

Authentication: oauth

URL Parameters
  userKey - the consumer's userKey (a unique identifier).

Post
RequiredForm NameData TypeExplanation
No
ConsumerTypestringThe updated type of consumer record.  One of { Unknown, Visitor, Account }.
NoEmail
stringThe consumer's updated email that will be the target for transactional emails.
NoFirstNamestringThe consumer's updated first name.
NoLastNamestringThe consumer's udpated last name.
NoPreferredIsoCurrencyCodestringThe updated preferred ISO currency code (3 characters) for the consumer (e.g. USD, CAD).
NoReferredByUserKeystringThe updated userKey of the consumer who referred the newly created consumer to the website.

Returns
success - Whether or not the consumer was successfully updated in the system.


Sample Request:

PUT http://api.groupcommerce.com/api/v3/consumer/testuserkey

Form: ConsumerType=Account&Email=testing123%40groupcommerce.com&FirstName=Ray&LastName=Lewis&PreferredIsoCurrencyCode=USD&ReferredByUserKey=gsadowski%40groupcommerce.com&SendEmail=False&UserKey=testuserkey

OAuth oauth_signature="qusSoG11p3H3%2F0XTKWNIZNkP3Ro%3D", oauth_nonce="9553906", oauth_timestamp="1359504870", oauth_consumer_key="eeb6b959-b854-4ad1-b563-e801c83cf81d", oauth_signature_method="HMAC-SHA1", oauth_version="1.0"


Sample JSON Response:

{
    "errors":[],
    "lastPublished":"/Date(1359504870651)/",
    "success":true,
    "version":"3"
}


Sample XML Response:

<updateConsumerResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <errors/>
    <lastPublished>2013-01-30T00:08:47.8572313Z</lastPublished>
    <success>true</success>
    <version>3</version>
</updateConsumerResponse>
Comments