Create Customer Profile
POST /profiles | |
Available since: 8.0.100.00
|
Description
Creates a Customer Profile and returns the ID created by UCS. In 8.0.1, profiles are built on top of legacy UCS Contact Attributes. They are multi-valued and support the primary attributes. If an attribute has several values, the first value in the JSON array is the primary attribute and additional values are non-primary attributes. In 8.0.2, standard multi-valued extensions are available.
Operation
ID | CV.WS.PROF.3 | ||
---|---|---|---|
Method | POST | ||
URL | /profiles | ||
Parameter | Type | Mandatory | Description |
Body: Customer Profile<ref>See Customer Profile for more information about the Customer Profile.</ref> | |||
customer_id | string | yes | The unique ID of the given customer. Limited to 16 characters. |
<attribute n> |
|
yes | Customer attributes, where <attribute n>is the attribute name<ref>See the configuration options for further details.</ref>. Attributes are not part of a separated array, see the example below.
The date/time formats are ISO 8601<ref>Wikipedia ISO 8601</ref>: |
<extension n> | Extension or Extension[] | no | Extensions, where <extension n> corresponds to the unique name of the profile extension resource.
|
<references />
Response
The Context Management Service API answers every request with an HTTP code. 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.
HTTP code | 201 |
---|---|
HTTP message | Created |
Header | Location: /profiles/${customer_id}
where:
|
Body | {"customer_id": ${customer_id}}
where:
|
Example
Operation The following operation would create the customer profile for "Bruce Banner," as well as three associated telephone records that are grouped in the "Phone" extension. The e-mail address bruce.banner@marvelous.com is the primary e-mail attribute, while the other e-mail address is non-primary.
POST /profiles/ { "FirstName": "Bruce", "LastName": "Banner", "DOB": "1962-05-10", "EmailAddress": [ "bruce.banner@marvelous.com", "b.banner@hulk.dom" ], "Phone": [ { "PhoneType":0, "prefix":"+33", "PhoneNumber":"3145926535", "description":"family phone", "start_availabilty":"2009-12-18T18:30:00.000Z", "end_availabilty":"2009-12-18T21:40:00.000Z" }, { "PhoneType":2, "prefix":"+33", "PhoneNumber":"6543210", "description":"businness calls only, no sales", "start_availabilty":"2009-12-18T09:30:00.000Z", "end_availabilty":"2009-12-18T17:45:00.000Z" }, { "PhoneType":5, "prefix":"+33", "PhoneNumber":"951357456", "description":"" } ] }
Result
Content-Location http://ucsserver.mycompany.com:8080/path/profiles/00038b5SCVPU0007 {"customer_id":"0004Va58A92T0017"}