Loading...
Area: Episerver Profile Store
Applies to versions: 1.3.0 and higher

Profile methods

This topic describes the GET, POST, and PUT methods of the Episerver Profile Store API, used for querying profile data in Profile Store. Profiles are used for storing aggregated data from visitor interactions.

In this topic

GET api/v1.0/profiles/{scope}/{profileid}

  • Returns HTTP 200 OK with the profile in the response body, for the ID provided.
  • Returns HTTP 404 NOT FOUND if no profile with the ID was found.

Example of response body:

{
  "ProfileId": "6243d1c0-70dd-453e-9cc4-63c577cb25ad",
  "DeviceIds": [
     "9f4447e4-9f00-4fa8-ad30-a1a971d4fbf6"
  ],
  "Name": "Nikki A Blomqvist",
  "ProfileManager": null, 
  "FirstSeen": "2017-12-01T12:34:56",
  "LastSeen": "2018-05-19T11:33:12",
  "Visits": 1150,
  "Scope": "DefaultScope"
  "Info": {
      "Website": "https://example.com"
      "Picture": "http://example.com/Nikki A Blomqvist_avatar.png",
      "Country: "SW",
      "Email": "Nikki.Blomqvist@example.com"
  },
  "ContactInformation": [
    "Mailable",
    "Anonymous"
  ],
  "Payload": {
    "customField": 14,
    "otherCustomField": "apple"
  }
}

POST api/v1.0/profiles/

  • Maximum request body size: 256KB
  • Creates a new profile object.

Example of request body. (Note that no ID should be sent because it is generated by the API.)

{
  "DeviceIds": [
     "1f68f8a6-894b-42ce-aa2a-d5110eba1fba"
  ],
  "Name": "Luke Skywalker",
  "ProfileManager": null,
  "LastSeen": "2018-06-15T00:00:00",
  "Scope": "CommerceSite",
  "Visits": 1205,
  "Info": {
    "Website": "https://example.com"
    "Picture": "http://example.com/profile/luke_avatar.png",
    "InferredCountry": "Sweden",
    "Email": "Luke.Skywalker@example.com"
  },
  "Payload": {
    "customField": 10,
    "otherCustomField": "banana"
  }
}
  • In case Scope is null or no Scope is sent, the default value for Scope will be default.
  • Returns HTTP 201 CREATED with the created profile in the response body, and with the same structure as when retrieving a profile with the GET method as described above.

    The HTTP response header Location contains the URL to the profile:

    HTTP/1.1 201 Created Location: http://www.example.org/api/v1.0/profiles/df9fbdb3-4141-4d85-b37b-f5664b11a9dc
  • Returns HTTP 413 REQUEST ENTITY TOO LARGE if request body is > 256KB.

PUT api/v1.0/profiles/{id}

  • Maximum request body size: 256KB
  • Replaces an existing profile, or creates a new one if no profile with the specified ID was found.
  • Returns:
    • HTTP 201 CREATED (same response as POST method) if profile with ID was not found, so it was created.
    • HTTP 200 OK when a profile was found and replaced (same response as GET method).
    • HTTP 413 REQUEST ENTITY TOO LARGE if request body is > 256KB.

Related topics

Last updated: Sep 27, 2018

Feedback?