Calling the Engine API
Request Requirements
when an engine api request is made, monetate's decision engine evaluates all active https //docs monetate com/docs/create an omnichannel experience 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 docid\ lqst4abe9zqx k3ta8nnh 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 https //docs monetate com/docs/integration tools#api 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 docid\ lqst4abe9zqx k3ta8nnh 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 docid\ lqst4abe9zqx k3ta8nnh however, including various api models depends on individual integrations and use cases include the pagetype parameter within the docid 0s1uvo4ctyzdyzrpvevdn event to use corresponding action conditions include the docid\ ngmnvrdcuytmtldlguyyr event and the end user's useragent docid 9cg lczaqtiaflswbjpb2 as context for analytics so that stealth sessions are registered properly include the docid 9vi5lbvf0klh3qj6xa2 e event to communicate all items present on a listing page or search results page, which can then be used for docid\ n vumbacftg0jlhtikean or advanced https //docs monetate com/docs/recommendations use cases include the docid 0qyzqpap6dhh9e bnp6iy 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 docid\ cclzbgzdajwm9hubh3fbi event to communicate cart contents which are used for behavioral analytics and cart content targets or action conditions include the docid 1wbw8jiq4stq8kcorsh2n event to communicate a purchase has occurred for behavioral analytics and purchase see docid\ n vumbacftg0jlhtikean for more extensive mapping of engine api models and how you can use them for targeting and action conditions in experiences and actions