Jump to: navigation, search

createProfile

Purpose

Creates a Customer Profile and returns the ID created by UCS. 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. Standard multi-valued extensions are available.

URL

  • POST /profiles

Request

HTTP Headers

Key ValueType Value Description Mandatory Unique Default
X-Genesys-TenantId Integer Integer value of tenant id false true
X-Genesys-Segment String Segment value (not to be provided by customer) false true

Body

Key ValueType Value Description Mandatory Unique Default
customer_id String The unique ID of the given customer. Limited to 16 characters. true true
attribute Token Customer attributes, where (attribute n) is the attribute name. See the configuration options for further details. Attributes are not part of a separated array, see the example below. The date/time formats are ISO 8601: "yyyy-MM-ddTHH:mm:ss.SSSZ". Note: Do not use Unauthorized Strings as attribute values true true
extension StringList Extensions, where (extension n) corresponds to the unique name of the profile extension resource.
  • For single-valued extensions, the extension's value is a single extension object (see Extension).
  • For multi-valued extensions, the extension's value is an array of zero or more Extensions.
false true

Sample

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_availability":"2009-12-18T18:30:00.000Z",
       "end_availability":"2009-12-18T21:40:00.000Z"
    },
    {
       "PhoneType":2,
       "prefix":"+33",
       "PhoneNumber":"6543210",
       "description":"business calls only, no sales",
       "start_availability":"2009-12-18T09:30:00.000Z",
       "end_availability":"2009-12-18T17:45:00.000Z"
    },
    {
       "PhoneType":5,
       "prefix":"+33",
       "PhoneNumber":"951357456",
       "description":""
    }
   ]
 }

Responses

Success

ReturnCode ReturnString Description
201 Created The request has been fulfilled and resulted in a new resource being created

Error

FaultCode FaultString Description
400 Bad Request General error which can be one of the following reasons:
  • Missing required parameter.
  • Parameter value of unexpected type.
  • Invalid object syntax.
  • Missing required attribute
401 Not Authorized Credentials are missing or incorrect, or the given user is not allowed to execute a given service (such as an administrative service method that changes the profile schema).
403 Forbidden The operation is forbidden and the reason is specified in the error message. This error is returned in the following cases:
  • Attempt to add customer profiles prior to the definition of a profile schema.
404 Not Found The specified URI is invalid, or the requested resource (such as a customer, service, state, task, extension, or identification key) does not exist.
405 Method Not Allowed Returned when an unsupported operation is requested. For instance, if a resource supports only PUT and GET operations, a POST request on this resource returns this error.
415 Unsupported Media Type In the header of your request, Content-Type is not set to a valid value. Most operations of Context Services support only "application/json".

Sample

201 Created
 Content-Location	http://ucsserver.mycompany.com:8080/path/profiles/00038b5SCVPU0007
  {"customer_id":"0004Va58A92T0017"}

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on May 18, 2018, at 07:05.