Identify Customer
GET /profiles |
Description
Identifies a customer based on the Identification Key information submitted with the query. In addition to the identified customer ID, your application can retrieve profile and extension information based on the query fields. Query strings should be URL Encoded<ref>http://en.wikipedia.org/wiki/URL_encoding</ref>. If the "id_key" parameter is not specified, then UCS<ref name="ucs">Universal Contact Server</ref> uses the following algorithm:
- Starting with the identification key with the lowest ID, UCS determines the number of attributes in the key which are covered by the data specified in the "expr" parameter.
- If all attributes are covered, then use this key. Otherwise, record the number of sequential attributes covered, starting from the left. For example, if key 1 consists of attributes (a, b, c), and "expr" contains (a, b) then the score is 2.
- If no key is selected after iterating through all the defined keys, choose the key with the highest score from Step 2. In the event of a tie, UCS selects the key with the smallest ID.
Operation
- The identification keys exist.
file:Information.png Use the Create Identification Key operation to create Identification Keys.
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.
HTTP code | 200 |
---|---|
HTTP message | OK |
Body |
|
Example
Operation
GET /profiles/contacts.phone_number=408-888-3214&extensions=contacts,purchases&include_profile=yes &include_extensions=unique
Result: Multiple profiles
If multiple customers called from the specified phone number, then the output contains profiles for each matched customer:
200 OK [{"customer_id": "2DC255C02AF", "name": "Doe, John", "birthdate": "1976-05-10"}, {"customer_id": "DDF295802AF", "name": "Doe, Jane", "birthdate": "1978-02-25"}]
Result: One profile
If a single customer is called from the specified phone number, then the complete profile for that customer is returned.
200 OK { "customer_id": "0004Va58A92T0017 ", "name": "Doe, John", "birthdate": "1976-05-10", "EmailAddress": [ "john.doe@genesyslab.com", "jd34@hotmail.dom"], "contacts": [ {"phone": "408-555-1234", "ext": "1234"}, {"phone": "408-832-7712"} ], "preferences": { "newsletter": "y", "new_offers": "n", "email": "html" } }
Result: No result
If no customers match the specified criteria, then the output is an empty array:
[]
<references />