Jump to: navigation, search

Update Customer Profile

Important
Prerequisites: You need to enable profiles in UCS.
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 Query Customer Profile 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 Customer Profile representation, compliant with the defined profile schema (see Query Profile Schema).</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. See the configuration options for further details. The date/time formats are ISO 8601:[YYYY]-[MM]-[DD]T[HH]:[mm]:[ss].[SSS]Z.


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.

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.

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 HTTP Response Codes and Errors 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
[]

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on 27 April 2017, at 03:19.