Update Customer Profile
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:
- Query the Customer Profile,
- Modify the Customer Profile data,
- 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
- The profile schema exists (see Query Profile Schema).
- Your application retrieved the Customer Profile (see Query Customer Profile).
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> |
|
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 .
|
<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. |
<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.
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 []