POST api/Decisions/Contexts/{clientID}/{contextName}/{visitorID}?slotName={slotName}&returnAll={returnAll}

Requests multiple decision results for a given context

Request Information

URI Parameters

NameDescriptionTypeAdditional information
clientID

Client ID

globally unique identifier

Required

visitorID

Visitor ID

string

Required

contextName

Context name

string

Required

slotName

Slot name

string

Default value is

returnAll

If no slot name is provided, returnAll controls if all content decisions are returned or just the default

boolean

Default value is False

Body Parameters

Request details

DynamicContentRequest
NameDescriptionTypeAdditional information
NumberOfResults

Number of content results to return (default is one)

integer

None.

ApplyNumberResultsToNested

Applies the NumberOfResults parameter to nested, otherwise only one nested content selected

boolean

None.

DeviceID

Optional ID to indentify the device

string

None.

PublishID

Published Instance ID (if from RPI landing page)

string

None.

MinuteOffsetUTC

Client offset in minutes from UTC (default 0)

integer

None.

APIContext

Context API is called from, used for non web page calls to persist decision metadata

string

None.

IsMasterMessage

Used by RPI for message list management

boolean

None.

Attributes

List of parameters to add to the visitor profile prior to decision making

Collection of VisitorAttribute

None.

Geolocation

Geolocation coordinates

GeolocationCoords

None.

Request Formats

application/json, text/json

Sample:
{
  "NumberOfResults": 1,
  "ApplyNumberResultsToNested": true,
  "DeviceID": "sample string 2",
  "PublishID": "sample string 3",
  "MinuteOffsetUTC": 1,
  "APIContext": "sample string 4",
  "IsMasterMessage": true,
  "Attributes": [
    {
      "Name": "sample string 1",
      "Value": "sample string 2"
    },
    {
      "Name": "sample string 1",
      "Value": "sample string 2"
    }
  ],
  "Geolocation": {
    "Longitude": "sample string 1",
    "Latitude": "sample string 2"
  }
}

application/xml, text/xml

Sample:
<DynamicContentRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RedPoint.InteractionRealtime.Models">
  <APIContext>sample string 4</APIContext>
  <ApplyNumberResultsToNested>true</ApplyNumberResultsToNested>
  <Attributes>
    <VisitorAttribute>
      <Name>sample string 1</Name>
      <Value>sample string 2</Value>
    </VisitorAttribute>
    <VisitorAttribute>
      <Name>sample string 1</Name>
      <Value>sample string 2</Value>
    </VisitorAttribute>
  </Attributes>
  <DeviceID>sample string 2</DeviceID>
  <Geolocation>
    <Latitude>sample string 2</Latitude>
    <Longitude>sample string 1</Longitude>
  </Geolocation>
  <IsMasterMessage>true</IsMasterMessage>
  <MinuteOffsetUTC>1</MinuteOffsetUTC>
  <NumberOfResults>1</NumberOfResults>
  <PublishID>sample string 3</PublishID>
</DynamicContentRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Collection of DecisionResult
NameDescriptionTypeAdditional information
ContentName

string

None.

ResultID

globally unique identifier

None.

ContentID

string

None.

Result

string

None.

ResultContent

Object

None.

ResultContentXML

XElement

None.

ContentFormat

DecisionContentFormat

None.

IsCachedContent

boolean

None.

DefaultKey

string

None.

DivName

string

None.

ContentPath

string

None.

IsEmptyResult

boolean

None.

PluginTag

string

None.

PluginTagDefault

string

None.

ContextName

string

None.

SlotName

string

None.

VisitorID

string

None.

DecisionType

string

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "ContentName": "sample string 1",
    "ResultID": "3fd333b2-917e-4f8b-abc4-4c6d8d77bbbc",
    "ContentID": "sample string 3",
    "Result": "sample string 4",
    "ResultContent": {},
    "ResultContentXML": null,
    "ContentFormat": "TEXT",
    "IsCachedContent": true,
    "DefaultKey": "sample string 7",
    "DivName": "sample string 8",
    "ContentPath": "sample string 9",
    "IsEmptyResult": true,
    "PluginTag": "sample string 11",
    "PluginTagDefault": "sample string 12",
    "ContextName": "sample string 13",
    "SlotName": "sample string 14",
    "VisitorID": "sample string 15",
    "DecisionType": "sample string 16"
  },
  {
    "ContentName": "sample string 1",
    "ResultID": "3fd333b2-917e-4f8b-abc4-4c6d8d77bbbc",
    "ContentID": "sample string 3",
    "Result": "sample string 4",
    "ResultContent": {},
    "ResultContentXML": null,
    "ContentFormat": "TEXT",
    "IsCachedContent": true,
    "DefaultKey": "sample string 7",
    "DivName": "sample string 8",
    "ContentPath": "sample string 9",
    "IsEmptyResult": true,
    "PluginTag": "sample string 11",
    "PluginTagDefault": "sample string 12",
    "ContextName": "sample string 13",
    "SlotName": "sample string 14",
    "VisitorID": "sample string 15",
    "DecisionType": "sample string 16"
  }
]

application/xml, text/xml

Sample:
<ArrayOfDecisionResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RedPoint.Resonance.Web.Shared">
  <DecisionResult>
    <ContentFormat>TEXT</ContentFormat>
    <ContentID>sample string 3</ContentID>
    <ContentName>sample string 1</ContentName>
    <ContentPath>sample string 9</ContentPath>
    <ContextName>sample string 13</ContextName>
    <DecisionType>sample string 16</DecisionType>
    <DefaultKey>sample string 7</DefaultKey>
    <DivName>sample string 8</DivName>
    <IsCachedContent>true</IsCachedContent>
    <IsEmptyResult>true</IsEmptyResult>
    <PluginTag>sample string 11</PluginTag>
    <PluginTagDefault>sample string 12</PluginTagDefault>
    <Result>sample string 4</Result>
    <ResultContent />
    <ResultContentXML i:nil="true" />
    <ResultID>3fd333b2-917e-4f8b-abc4-4c6d8d77bbbc</ResultID>
    <SlotName>sample string 14</SlotName>
    <VisitorID>sample string 15</VisitorID>
  </DecisionResult>
  <DecisionResult>
    <ContentFormat>TEXT</ContentFormat>
    <ContentID>sample string 3</ContentID>
    <ContentName>sample string 1</ContentName>
    <ContentPath>sample string 9</ContentPath>
    <ContextName>sample string 13</ContextName>
    <DecisionType>sample string 16</DecisionType>
    <DefaultKey>sample string 7</DefaultKey>
    <DivName>sample string 8</DivName>
    <IsCachedContent>true</IsCachedContent>
    <IsEmptyResult>true</IsEmptyResult>
    <PluginTag>sample string 11</PluginTag>
    <PluginTagDefault>sample string 12</PluginTagDefault>
    <Result>sample string 4</Result>
    <ResultContent />
    <ResultContentXML i:nil="true" />
    <ResultID>3fd333b2-917e-4f8b-abc4-4c6d8d77bbbc</ResultID>
    <SlotName>sample string 14</SlotName>
    <VisitorID>sample string 15</VisitorID>
  </DecisionResult>
</ArrayOfDecisionResult>