Maintenance Notice - PDF Generation
Dynamic PDF generation for web-based content is temporarily unavailable. This maintenance affects dynamic PDF files that are generated from either the HTML-based page or manual that you are viewing. Links that normally allow this functionality have been hidden, and will reappear as soon as the feature is restored.


Note: Access to static files, including PDF files that are not dynamically generated from our web-based content, is unaffected.

Jump to: navigation, search

Query Customer Profile

ApiRef2.png GET /profiles/${customer_id}
Available since 8.0.100.00

Description

Queries the Customer Profile based on the customer ID parameter. According to the query's fields, your application can retrieve profile and extension attributes in addition to the identified customer ID. The response always contains all attributes of the customer profile resource, and all attributes of the specified extensions, to avoid ambiguity in further updates (see Update Customer Profile). Information.png To get the schema of the profile and extension attributes, use the Query Profile Schema operation.

Operation

Prerequisites: A Customer Profile Schema (a list of Attribute Schema) is available.
ID CV.WS.PROF.1
Method GET
URL /profiles/${customer_id}
Field Name   Type   Mandatory Description
URI Parameters
${customer_id} string yes Specified in the URI, the ID of the customer.
extensions string no The list of extensions to return within the result. Your application can specify multiple extension names, separated with comas. For instance: extensions=contacts,purchases

<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 HTTP Response Codes and Errors for further details on the possible codes that this operation can return.

Response
HTTP code 200
HTTP message OK
Field Name   Type   Mandatory Description
Body: Customer Profile<ref>The returned result contains parts of the profile or the complete profile according to the parameters of the request. See Customer Profile for further information on the resource.</ref>
customer_id string yes The unique ID of the given customer. Limited to 16 characters.
<attribute n>
  • string
  • datetime
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>:[YYYY]-[MM]-[DD]T[HH]:[mm]:[ss].[SSS]Z.

<extension n> Extension
or Extension[]
no By default, no extension is returned. The returned extensions are specified in the parameters of the request. For further details, see Extension.

<references />

Example

For example, the customer profile (id=0004Va58A92T0017) has three attributes: "name","birthdate" and "EmailAddress". This profile also has two defined extensions:

  • contacts: one or more phone numbers (a multi-valued extension).
  • preferences: a single-valued extension representing customer preferences for receiving a weekly newsletter, receiving notification of new offers, and the desired e-mail type.

Operation

 GET /profiles/0004Va58A92T0017?extensions=contacts,preferences 

Result

 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" } 
 }
This page was last edited on November 23, 2017, at 16:01.

Feedback

Comment on this article:

blog comments powered by Disqus