Jump to: navigation, search

Update Customer Profile

CSAPIProxyUCS.png PUT /profiles/${customer_id}

Description

Overrides the attributes of the customer profile: prior attribute values are lost and replaced with the attribute list specified in the body of the request. This operation uses the standard convention for HTTP PUT, which requires you to update the profile with the complete profile to avoid losing information. Your application should use this operation in conjunction with the QueryCustomerProfile operation:

  1. Query the Customer Profile,
  2. Modify the Customer Profile data,
  3. Update the Customer Profile.

Extensions can be part of the profile used for the update:

  • If your application does not include any extensions in the body, no modification occurs on extensions.
  • If your application specifies extension values, extension information is overriden. Your application must specify the complete extension set to avoid losing data.

Operation

Prerequisites
ID CV.WS.PROF.2
Method PUT
URL /profiles/${customer_id}
Parameter   Type   Mandatory Description
URI Parameters
${customer_id} string yes The ID of the customer. Limited to 16 characters.
Body: The customer profile information <ref>The complete CustomerProfile representation, compliant with the defined profile schema (see QueryProfileSchema).</ref>
customer_id string yes The unique ID of the given customer.
<attribute n>
  • string
  • datetime
yes The complete set of customer attributes, where <attribute n>is the attribute name<ref>See the configuration options for further details.</ref>. The date/time formats are ISO 8601<ref>Wikipedia ISO 8601</ref>:[YYYY]-[MM]-[DD]T[HH]:[mm]:[ss].[SSS]Z.


Important.png Attributes will be overriden. This representation must contain all the profile attributes' values, including those that weren’t modified.

<extension n> Profile Extension or Profile Extension[] no Extensions, where <extension n> corresponds to the unique name of the profile extension resource.

Important.png If you specify extensions, extensions are overriden. If you wish to modify an extension value, this representation must contain all the profile extensions, including those that weren’t modified.

<references />

Response

The Context Management Service API answers with HTTP codes for every request. The following table shows the correct response for a successful request. See HTTPResponseCodesandErrors for further details on the possible codes that this operation can return.

Response
HTTP code 200
HTTP message OK

Example

The following example assumes that:

  • FirstName, LastName, DOB are existing attributes.
  • Address is an extension.

Operation

PUT http://ucsserver.mycompany.com:8080/path/profiles/00027a52JCGY000M
Content-Location /profiles/00027a52JCGY000M
Content-Type: application/json
  {
 "FirstName": "Bruce", 
 "LastName": "Banner",
 "DOB": "1962-05-10",
 "EmailAddress": [
      "bruce.banner@marvelous.com",
      "b.banner@hulk.dom"
 ],
 "Address": { "Type":1, "Address":"21 JumpStreet", "City":"Hollywood", 
              "County":"Santa Barbara", "PostCode":"555", "Country":"United States" }
}

Result
The above representation is now the profile of the customer whose id is 00027a52JCGY000M.

HTTP 200 OK
[]
This page was last edited on September 12, 2016, at 14:01.
Comments or questions about this documentation? Contact us for support!