Calling the Engine API

Request Requirements

when an engine api request is made, monetate's decision engine evaluates all active omnichannel experiences in the account and uses the provided context to make decisions about which experiences and actions for which the customer has qualified all engine api requests must be made via a request decisions and include the following content type header body endpoint the endpoint for engine api requests is as follows engine api endpoint https //engine monetate net/api/engine/v1/decide/{retailershortname} the {retailershortname} placeholder is a unique identifier that specifies the parent value of the account this identifier is provided by your dedicated services team you can also find it on the api tab of the integration page of the monetate platform settings a subsequent channel key value pair is required in the request body that specifies the account, domain, and instance (for example, "channel" "a 887f2483/p/example com" ) content type header the content type header is required and may be set to either application/json or text/plain monetate recommends text/plain to avoid an extra round trip (the cors preflight options request associated with application/json ) body the request decisions of an engine api request consists of json that identifies the account and passes page and user level data via events events in a request each of the three event types instructs the engine api to do different things with the associated information event types that begin with monetate\ decision request that the engine api evaluate active experiences and return actions event types that begin with monetate\ context provide information about the visitor or page that monetate uses for targeting and decision making purposes event types that begin with monetate\ record provide information that monetate should record but that isn't used for targeting or decision making purposes all engine api requests should follow the same structure as noted in the request decisions however, including various api models depends on individual integrations and use cases include the pagetype parameter within the model monetate\ context\ pageview event to use corresponding action conditions include the model monetate\ context\ useragent event and the end user's useragent annotated example engine api request as context for analytics so that stealth sessions are registered properly include the model monetate\ context\ productthumbnailview event to communicate all items present on a listing page or search results page, which can then be used for target, event, & condition mapping or advanced product recommendations use cases include the model monetate\ context\ productdetailview event to communicate a product view has occurred and subsequently target/condition based on a specific product, brand, product type/category, or advanced product recommendations use cases include the model monetate\ context\ cart event to communicate cart contents which are used for behavioral analytics and cart content targets or action conditions include the model monetate\ context\ purchase event to communicate a purchase has occurred for behavioral analytics and purchase see target, event, & condition mapping for more extensive mapping of engine api models and how you can use them for targeting and action conditions in experiences and actions