Welcome‎ > ‎Version 3‎ > ‎Publisher Api‎ > ‎Methods‎ > ‎3 - Profile Store‎ > ‎

Update Profile

Will update a profile in the system.  It is not necessary to supply all the profile data item key value pairs.  This update works by looking for an existing item with that key and will update its value.  If that key does not exist, a new data item will be created. No items are removed from the profile store unless the ShouldDelete flag has been activated.

Method: PUT /api/v3/publisher/profilestore/update

Authentication: oauth
 
Put
Required Form Name Data Type Explanation
No
FirstName
string
The first name of the consumer.
No
LastName
string
The last name of the consumer.
Yes
UserKey string The unique id for the user.  This will be displayed for refer friends urls, so using the email address is discouraged.
No
Username string To change the username on the profile, supply this data.  Must be unique across the system.  If this value is not supplied, the username will not change.
No
preferredIsoCurrencyCode
string
The consumer's preferred iso currency code such as USD or EUR.
No
ProfileData[0...n] ProfileDataItem
A collection of profile data items.


ProfileDataItem
Required Form Name Data Type Explanation
Yes
Key string The key for the data item.  Limited to 50 characters.
No
Value
string The value for this data item.  Can be null.  Limited to 50,000 characters.
No
IsUnique bool Setting this value to true will enforce a unique constraint across all profile data items. 

This should be used when storing the 3rd party authentication token and/or id.  As this field can be queries against.
 NoShouldDelete
 boolIf the key should be deleted from the profile store.
Returns
base response fields


Sample Request:

PUT    http://api.groupcommerce.com/api/v3/publisher/profilestore/update

Form: UserKey=UserKey2&Username=username2&ProfileData%5b0%5d.Key=Name&ProfileData%5b0%5d.Value=Sylvester&ProfileData%5b0%5d.IsUnique=False&ProfileData%5b0%5d.ShouldDelete=False&ProfileData%5b1%5d.Key=City&ProfileData%5b1%5d.Value=NY&ProfileData%5b1%5d.IsUnique=False&ProfileData%5b1%5d.ShouldDelete=False

Authorization: OAuth oauth_signature="kcCfvTBGtH2PTNQmCD4YLL1%2bzlU%3d", oauth_nonce="3433372", oauth_timestamp="1321059468", oauth_consumer_key="eeb6b959-b854-4ad1-b563-e801c83cf81d", oauth_signature_method="HMAC-SHA1", oauth_version="1.0"


Sample JSON Response:

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


Sample XML Response:

<updateProfileResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <errors/>
    <lastPublished>2011-11-02T23:52:05.072545Z</lastPublished>
    <success>true</success>
    <version>3</version>
    <duplicateUserKey i:nil="true"/>
</updateProfileResponse>
Comments