{"info":{"_postman_id":"36b5d37d-3d80-4297-83ac-a863d9b90bca","name":"Mailkit EventAPI v2 (REST)","description":"<html><head></head><body><p>Mailkit EventAPI v2 backend provides a RESTful endpoint interface to the EventAPI. This version of API can be used in <em>unsecure</em> mode for frontend scripts authenticated by API ID and Referrer/Host or for backend server-to-server implementation in <em>secure</em> more authenticated by API ID and API Hash.</p>\n<p>One of the advantages of using EventAPI is the ability to collect information about visitor/user behavior and use such information to trigger remarketing campaigns, within email campaigns, or automatically pass the information to recommendation engine.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"286268","collectionId":"36b5d37d-3d80-4297-83ac-a863d9b90bca","publishedId":"U16nJPP7","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"dd212a"},"publishDate":"2021-09-13T09:35:42.000Z"},"item":[{"name":"Event control","item":[{"name":"initEvent - Initialize Event","event":[{"listen":"test","script":{"id":"f5ceae62-ce7a-4984-8691-8f61d19e4af6","exec":["var jsonData = pm.response.json();\r","pm.test(\"initEvent success\", function () {\r","    pm.expect(pm.response).to.be.ok;\r","    pm.expect(jsonData).to.have;\r","});\r","if (pm.response.code == 200) {\r","    pm.test(\"Hash received\", function () {\r","        pm.expect(jsonData.hash).to.be.a('string');\r","        pm.expect(jsonData.hash).to.be.lengthOf.above(20);\r","        pm.environment.set(\"hash\", jsonData.hash);\r","    });\r","   pm.test(\"Tag received\", function () {\r","        pm.expect(jsonData.event_tag).to.exist;\r","        pm.environment.set(\"event_tag\", jsonData.event_tag);\r","    });\r","}\r",""],"type":"text/javascript"}}],"id":"a5604cea-6a0b-433f-b47e-e6e0149b24cb","protocolProfileBehavior":{"disableBodyPruning":true,"disableCookies":false},"request":{"method":"POST","header":[{"key":"x-api-key","value":"{{api_id}}","description":"<p><strong>REQUIRED</strong> - API ID of the customer - see your Mailkit account Profile/Integrations</p>\n","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"<p><strong>OPTIONAL</strong> - the hash of the event as returned by initEvent call if available</p>\n","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"<p><strong>REQUIRED FOR CLIENT-TO-SERVER</strong> - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)</p>\n","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"<p><strong>SERVER-TO-SERVER ONLY</strong> - Server-to-Server calls should be authenticated by the API Hash instead of host domain. <strong>DO NOT USE FOR CLIENT INTEGRATIONS</strong> as it would reveal your secret hash to the user!</p>\n","type":"text"},{"key":"Referer","value":"{{referer}}","description":"<p>URL of the webpage where the event has taken place</p>\n","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"email","value":"{{email}}","description":"<p>Email address of the event owner, eg. page visitor. It's an optional value that only has to be passed once when the visitor is identified and is retained in the event. To autodetec visitor pass <strong>detect</strong> along with the <em>ident</em> attribute.</p>\n","type":"text"},{"key":"event_tag","value":"{{event_tag}}","description":"<p><strong>RECOMMENDED</strong> Sets the tag of the event. The tag can be only set once when the event is created and must be used in all subsequent calls to properly identify the event. Tags are used to differentiate different types of events of a single visitor. Events with no event_tag set will be classified as <em>Untagged</em></p>\n","type":"text"},{"key":"return_url","value":"{{return_url}}","description":"<p>URL that relates to the event content, usually a URL to the shopping cart.</p>\n","type":"text"},{"key":"description","value":"{{description}}","description":"<p>Description for the event and it's contents. The content can later be used within campaign content</p>\n","type":"text"},{"key":"language","value":"{{language}}","description":"<p>ISO639-1 language identification</p>\n","type":"text"},{"key":"currency","value":"{{currency}}","description":"<p>ISO 4217 currency code</p>\n","type":"text"},{"key":"decimal_separator","value":"{{separator}}","description":"<p>Decimal separator to be used for all numeric values</p>\n","type":"text"},{"key":"first_name","value":"{{first_name}}","description":"<p>First name of the event owner (visitor, email recipient)</p>\n","type":"text"},{"key":"last_name","value":"{{last_name}}","description":"<p>Last name of the event owner (visitor, email recipient)</p>\n","type":"text"},{"key":"gender","value":"{{gender}}","description":"<p>Gender of the event owner (visitor,email recipient)</p>\n","type":"text"},{"key":"order_no","value":"{{order_no}}","description":"<p>Order number for the event</p>\n","type":"text"},{"key":"promo","value":"{{promo}}","description":"<p>Promo code for the event</p>\n","type":"text"},{"key":"promo_value","value":"{{promo_value}}","description":"<p>Value of the promo code</p>\n","type":"text"},{"key":"promo_teaser","value":"{{promo_teaser}}","description":"<p>Description of the promotion</p>\n","type":"text"},{"key":"referrer","value":"{{referrer}}","description":"<p>Referrer URL - the page triggering the event for tracking visits <strong>Only for Server-tO-Server calls</strong></p>\n","type":"text"},{"key":"lifetime","value":"30","description":"<p>Cookie lifetime</p>\n","type":"text","disabled":true},{"key":"reply_to","value":"jakub@mailkit.com","description":"<p>Set a reply-to address</p>\n","type":"text"},{"key":"sender_name","value":"Jakub Olexa","description":"<p>Set sender name</p>\n","type":"text"},{"key":"resolution","value":"1920x1280","description":"<p>Client display resolution</p>\n","type":"text"},{"key":"ident","value":"{{ident}}","description":"<p><em>OPTIONAL</em> content of the MKT/TRK cookies for visitor auto-detection. This is required in order for visitor and session autodetection to work when visitor can not be identified in the remote application.</p>\n","type":"text","disabled":true}]},"url":"https://api.mailkit.eu/api/js_v2/initEvent","description":"<h3 id=\"initializing-event\">Initializing Event</h3>\n<p>initEvent is the primary initiator for all subsequent event calls. It will create a new event envelope whenever necessary or reopen and update an existing one. Whether a new or existing event envelope will be used is determined by multiple factors:</p>\n<p>If hash parameter has been provided and the event with given hash is still <em>open</em>, the existing event will be used and the <strong>hash</strong> in the response will match the request.</p>\n<p>In case the hash provided belongs to a <em>finished</em> event the response will contain a <strong>new hash</strong> value for the newly created event.</p>\n<p>In case there is no hash provided a <strong>new event</strong> will be created.</p>\n<p>The initEvent call is used not only to initiate the event but also to update event envelope data. Since the information for the event may become available over time, eg. email, language, first_name, last_name, etc. when the user is identified, the initEvent must be used to update the event envelope by passing such information.</p>\n","auth":{"type":"noauth","isInherited":true,"source":{"_postman_id":"b6391ec8-9890-4ca8-b119-c225eb62af7e","id":"b6391ec8-9890-4ca8-b119-c225eb62af7e","name":"Event control","type":"folder"}},"urlObject":{"path":["initEvent"],"host":["https://api.mailkit.eu/api/js_v2"],"query":[],"variable":[]}},"response":[{"id":"a1b78c26-a3cb-4c2b-ac8d-a2be6720dd73","name":"Success - Event initialized","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"{{api_id}}","description":"**REQUIRED** - API ID of the customer - see your Mailkit account Profile/Integrations","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"**OPTIONAL** - the hash of the event as returned by initEvent call if available","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"**REQUIRED FOR CLIENT-TO-SERVER** - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"**SERVER-TO-SERVER ONLY** - Server-to-Server calls should be authenticated by the API Hash instead of host domain. **DO NOT USE FOR CLIENT INTEGRATIONS** as it would reveal your secret hash to the user!","type":"text"},{"key":"Referer","value":"{{referer}}","description":"URL of the webpage where the event has taken place","type":"text","disabled":true}],"body":{"mode":"formdata","formdata":[{"key":"email","value":"{{email}}","description":"Email address of the event owner, eg. page visitor. It's an optional value that only has to be passed once when the visitor is identified and is retained in the event.","type":"text"},{"key":"event_tag","value":"{{event_tag}}","description":"**RECOMMENDED** Sets the tag of the event. The tag can be only set once when the event is created and must be used in all subsequent calls to properly identify the event. Tags are used to differentiate different types of events of a single visitor. Events with no event_tag set will be classified as *Untagged*","type":"text"},{"key":"return_url","value":"{{return_url}}","description":"URL that relates to the event content, usually a URL to the shopping cart.","type":"text"},{"key":"description","value":"{{description}}","description":"Description for the event and it's contents. The content can later be used within campaign content","type":"text"},{"key":"language","value":"{{language}}","description":"ISO639-1 language identification","type":"text"},{"key":"currency","value":"{{currency}}","description":"ISO 4217 currency code","type":"text"},{"key":"decimal_separator","value":"{{separator}}","description":"Decimal separator to be used for all numeric values","type":"text"},{"key":"first_name","value":"{{first_name}}","description":"First name of the event owner (visitor, email recipient)","type":"text"},{"key":"last_name","value":"{{last_name}}","description":"Last name of the event owner (visitor, email recipient)","type":"text"},{"key":"gender","value":"{{gender}}","description":"Gender of the event owner (visitor,email recipient)","type":"text"},{"key":"order_no","value":"{{order_no}}","description":"Order number for the event","type":"text"},{"key":"promo","value":"{{promo}}","description":"Promo code for the event","type":"text"},{"key":"promo_value","value":"{{promo_value}}","description":"Value of the promo code","type":"text"},{"key":"promo_teaser","value":"{{promo_teaser}}","description":"Description of the promotion","type":"text"},{"key":"referrer","value":"{{referrer}}","description":"Referrer URL - the page triggering the event for tracking visits **Only for Server-tO-Server calls**","type":"text"},{"key":"lifetime","value":"30","description":"Cookie lifetime","type":"text","disabled":true},{"key":"reply_to","value":"jakub@mailkit.com","description":"Set a reply-to address","type":"text"},{"key":"sender_name","value":"Jakub Olexa","description":"Set sender name","type":"text"},{"key":"resolution","value":"1920x1280","description":"Client display resolution","type":"text"},{"key":"ident","value":"{{hash}}","description":"*OPTIONAL* content of the MKT/TRK cookie","type":"text"}]},"url":"https://api.mailkit.eu/api/js_v2/initEvent"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 01 Sep 2021 10:24:39 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Set-Cookie","value":"TRK_69607853=4fb8455b0a62b1782e40290b19281dbf; domain=mailkit.dev; SameSite=None; Secure; path=/"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"lifetime\": null,\n    \"hash\": \"4fb8455b0a62b1782e40290b19281dbf\",\n    \"event_tag\": \"Test\"\n}"},{"id":"a351709d-1d8a-4232-9cf7-0a66a7ed6f4e","name":"Error - Unauthorized domain","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"{{api_id}}","description":"**REQUIRED** - API ID of the customer - see your Mailkit account Profile/Integrations","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"**OPTIONAL** - the hash of the event as returned by initEvent call if available","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"**REQUIRED FOR CLIENT-TO-SERVER** - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)","type":"text","disabled":true},{"key":"x-api-hash","value":"{{api_hash}}","description":"**SERVER-TO-SERVER ONLY** - Server-to-Server calls should be authenticated by the API Hash instead of host domain. **DO NOT USE FOR CLIENT INTEGRATIONS** as it would reveal your secret hash to the user!","type":"text","disabled":true},{"key":"Referer","value":"{{referer}}","description":"URL of the webpage where the event has taken place","type":"text","disabled":true}],"body":{"mode":"formdata","formdata":[{"key":"email","value":"{{email}}","description":"Email address of the event owner, eg. page visitor. It's an optional value that only has to be passed once when the visitor is identified and is retained in the event.","type":"text"},{"key":"event_tag","value":"{{event_tag}}","description":"**RECOMMENDED** Sets the tag of the event. The tag can be only set once when the event is created and must be used in all subsequent calls to properly identify the event. Tags are used to differentiate different types of events of a single visitor. Events with no event_tag set will be classified as *Untagged*","type":"text"},{"key":"return_url","value":"{{return_url}}","description":"URL that relates to the event content, usually a URL to the shopping cart.","type":"text"},{"key":"description","value":"{{description}}","description":"Description for the event and it's contents. The content can later be used within campaign content","type":"text"},{"key":"language","value":"{{language}}","description":"ISO639-1 language identification","type":"text"},{"key":"currency","value":"{{currency}}","description":"ISO 4217 currency code","type":"text"},{"key":"decimal_separator","value":"{{separator}}","description":"Decimal separator to be used for all numeric values","type":"text"},{"key":"first_name","value":"{{first_name}}","description":"First name of the event owner (visitor, email recipient)","type":"text"},{"key":"last_name","value":"{{last_name}}","description":"Last name of the event owner (visitor, email recipient)","type":"text"},{"key":"gender","value":"{{gender}}","description":"Gender of the event owner (visitor,email recipient)","type":"text"},{"key":"order_no","value":"{{order_no}}","description":"Order number for the event","type":"text"},{"key":"promo","value":"{{promo}}","description":"Promo code for the event","type":"text"},{"key":"promo_value","value":"{{promo_value}}","description":"Value of the promo code","type":"text"},{"key":"promo_teaser","value":"{{promo_teaser}}","description":"Description of the promotion","type":"text"},{"key":"referrer","value":"{{referrer}}","description":"Referrer URL - the page triggering the event for tracking visits **Only for Server-tO-Server calls**","type":"text"},{"key":"lifetime","value":"30","description":"Cookie lifetime","type":"text","disabled":true},{"key":"reply_to","value":"jakub@mailkit.com","description":"Set a reply-to address","type":"text"},{"key":"sender_name","value":"Jakub Olexa","description":"Set sender name","type":"text"},{"key":"resolution","value":"1920x1280","description":"Client display resolution","type":"text"},{"key":"ident","value":"{{hash}}","description":"*OPTIONAL* content of the MKT/TRK cookie","type":"text"}]},"url":"https://api.mailkit.eu/api/js_v2/initEvent"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 01 Sep 2021 11:55:50 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Unauthorized Refferer/domain\",\n    \"status\": 401\n}"},{"id":"ff3b0cfb-8e22-4316-9e9e-55ed21f7f9ab","name":"Error - Invalid API hash","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"{{api_id}}","description":"**REQUIRED** - API ID of the customer - see your Mailkit account Profile/Integrations","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"**OPTIONAL** - the hash of the event as returned by initEvent call if available","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"**REQUIRED FOR CLIENT-TO-SERVER** - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}x","description":"**SERVER-TO-SERVER ONLY** - Server-to-Server calls should be authenticated by the API Hash instead of host domain. **DO NOT USE FOR CLIENT INTEGRATIONS** as it would reveal your secret hash to the user!","type":"text"},{"key":"Referer","value":"{{referer}}","description":"URL of the webpage where the event has taken place","type":"text","disabled":true}],"body":{"mode":"formdata","formdata":[{"key":"email","value":"{{email}}","description":"Email address of the event owner, eg. page visitor. It's an optional value that only has to be passed once when the visitor is identified and is retained in the event.","type":"text"},{"key":"event_tag","value":"{{event_tag}}","description":"**RECOMMENDED** Sets the tag of the event. The tag can be only set once when the event is created and must be used in all subsequent calls to properly identify the event. Tags are used to differentiate different types of events of a single visitor. Events with no event_tag set will be classified as *Untagged*","type":"text"},{"key":"return_url","value":"{{return_url}}","description":"URL that relates to the event content, usually a URL to the shopping cart.","type":"text"},{"key":"description","value":"{{description}}","description":"Description for the event and it's contents. The content can later be used within campaign content","type":"text"},{"key":"language","value":"{{language}}","description":"ISO639-1 language identification","type":"text"},{"key":"currency","value":"{{currency}}","description":"ISO 4217 currency code","type":"text"},{"key":"decimal_separator","value":"{{separator}}","description":"Decimal separator to be used for all numeric values","type":"text"},{"key":"first_name","value":"{{first_name}}","description":"First name of the event owner (visitor, email recipient)","type":"text"},{"key":"last_name","value":"{{last_name}}","description":"Last name of the event owner (visitor, email recipient)","type":"text"},{"key":"gender","value":"{{gender}}","description":"Gender of the event owner (visitor,email recipient)","type":"text"},{"key":"order_no","value":"{{order_no}}","description":"Order number for the event","type":"text"},{"key":"promo","value":"{{promo}}","description":"Promo code for the event","type":"text"},{"key":"promo_value","value":"{{promo_value}}","description":"Value of the promo code","type":"text"},{"key":"promo_teaser","value":"{{promo_teaser}}","description":"Description of the promotion","type":"text"},{"key":"referrer","value":"{{referrer}}","description":"Referrer URL - the page triggering the event for tracking visits **Only for Server-tO-Server calls**","type":"text"},{"key":"lifetime","value":"30","description":"Cookie lifetime","type":"text","disabled":true},{"key":"reply_to","value":"jakub@mailkit.com","description":"Set a reply-to address","type":"text"},{"key":"sender_name","value":"Jakub Olexa","description":"Set sender name","type":"text"},{"key":"resolution","value":"1920x1280","description":"Client display resolution","type":"text"},{"key":"ident","value":"{{hash}}","description":"*OPTIONAL* content of the MKT/TRK cookie","type":"text"}]},"url":"https://api.mailkit.eu/api/js_v2/initEvent"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 01 Sep 2021 11:56:52 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 401,\n    \"message\": \"Unauthorized hash\"\n}"}],"_postman_id":"a5604cea-6a0b-433f-b47e-e6e0149b24cb"},{"name":"finishEvent - Finish Event","event":[{"listen":"test","script":{"id":"704c9199-7d32-458b-96ea-54f94bffeba1","exec":["var jsonData = pm.response.json();\r","pm.test(\"initEvent success\", function () {\r","    pm.expect(pm.response).to.be.ok;\r","    pm.expect(jsonData).to.have;\r","});\r","if (pm.response.code == 200) {\r","    pm.test(\"Hash received\", function () {\r","        pm.expect(jsonData.hash).to.be.a('string');\r","        pm.expect(jsonData.hash).to.be.lengthOf.above(20);\r","        pm.environment.set(\"hash\", jsonData.hash);\r","    });\r","   pm.test(\"Tag received\", function () {\r","        pm.expect(jsonData.event_tag).to.exist;\r","        pm.environment.set(\"event_tag\", jsonData.event_tag);\r","    });\r","\r","}"],"type":"text/javascript"}}],"id":"6e2fb354-5399-40f7-980a-8a94c1eb2477","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"x-api-key","value":"{{api_id}}","description":"<p><strong>REQUIRED</strong> - API ID of the customer - see your Mailkit account Profile/Integrations</p>\n","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"<p><strong>REQUIRED</strong> - the hash of the event as returned by initEvent call</p>\n","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"<p><strong>REQUIRED FOR CLIENT-TO-SERVER</strong> - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)</p>\n","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"<p><strong>SERVER-TO-SERVER ONLY</strong> - Server-to-Server calls should be authenticated by the API Hash instead of host domain. <strong>DO NOT USE FOR CLIENT INTEGRATIONS</strong> as it would reveal your secret hash to the user!</p>\n","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"event_tag","value":"{{event_tag}}","description":"<p><strong>REQUIRED</strong> - tag of the original event (if tag was set)</p>\n","type":"text"},{"key":"status_url","value":"{{status_url}}","description":"<p>URL to a status page, eg. order status page</p>\n","type":"text"},{"key":"invoice_no","value":"{{invoice_no}}","description":"<p>Invoice number</p>\n","type":"text"},{"key":"invoice_url","value":"{{invoice_url}}","description":"<p>URL to invoice</p>\n","type":"text"},{"key":"thank_you","value":"{{thank_you}}","description":"<p>Message to the event owner (email recipient). This message can be included in the campaign body.</p>\n","type":"text"},{"key":"ident","value":"{{ident}}","description":"<p>Contents of the TRK_ cookie of the visitor. This is required for conversion tracking to work and to assign conversions to individual campaigns and sends.</p>\n","type":"text"}]},"url":"https://api.mailkit.eu/api/js_v2/finishEvent","description":"<h2 id=\"finish-an-event\">Finish an event</h2>\n<p>finishEvent method is used to close an event when a set goal is reached - eg. order completed. Once an event is closed it can no longer be accessed using the API.</p>\n<p>Finishing an event can trigger a remarketing campaign to send an email using the data stored in the event immediately or with a set delay.</p>\n","auth":{"type":"noauth","isInherited":true,"source":{"_postman_id":"b6391ec8-9890-4ca8-b119-c225eb62af7e","id":"b6391ec8-9890-4ca8-b119-c225eb62af7e","name":"Event control","type":"folder"}},"urlObject":{"path":["finishEvent"],"host":["https://api.mailkit.eu/api/js_v2"],"query":[],"variable":[]}},"response":[{"id":"e4fb54dd-64bd-4835-a270-da1232d58289","name":"Success - Event finished","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"{{api_id}}","description":"**REQUIRED** - API ID of the customer - see your Mailkit account Profile/Integrations","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"**REQUIRED** - the hash of the event as returned by initEvent call","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"**REQUIRED FOR CLIENT-TO-SERVER** - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"**SERVER-TO-SERVER ONLY** - Server-to-Server calls should be authenticated by the API Hash instead of host domain. **DO NOT USE FOR CLIENT INTEGRATIONS** as it would reveal your secret hash to the user!","type":"text"},{"key":"Referer","value":"{{referer}}","description":"URL of the webpage where the event has taken place","type":"text","disabled":true}],"body":{"mode":"formdata","formdata":[{"key":"event_tag","value":"{{event_tag}}","description":"**REQUIRED** - tag of the original event (if tag was set)","type":"text"},{"key":"status_url","value":"{{status_url}}","description":"URL to a status page, eg. order status page","type":"text"},{"key":"invoice_no","value":"{{invoice_no}}","description":"Invoice number","type":"text"},{"key":"invoice_url","value":"{{invoice_url}}","description":"URL to invoice","type":"text"},{"key":"thank_you","value":"{{thank_you}}","description":"Message to the event owner (email recipient). This message can be included in the campaign body.","type":"text"}]},"url":"https://api.mailkit.eu/api/js_v2/finishEvent"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 01 Sep 2021 11:50:20 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"hash\": null,\n    \"event_tag\": \"Test\",\n    \"message\": \"Event finished\"\n}"},{"id":"75555ad8-6852-4546-9bcb-2e48814ab4cf","name":"Error - Empty event can't be finished","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"{{api_id}}","description":"**REQUIRED** - API ID of the customer - see your Mailkit account Profile/Integrations","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"**REQUIRED** - the hash of the event as returned by initEvent call","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"**REQUIRED FOR CLIENT-TO-SERVER** - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"**SERVER-TO-SERVER ONLY** - Server-to-Server calls should be authenticated by the API Hash instead of host domain. **DO NOT USE FOR CLIENT INTEGRATIONS** as it would reveal your secret hash to the user!","type":"text"},{"key":"Referer","value":"{{referer}}","description":"URL of the webpage where the event has taken place","type":"text","disabled":true}],"body":{"mode":"formdata","formdata":[{"key":"event_tag","value":"{{event_tag}}","description":"**REQUIRED** - tag of the original event (if tag was set)","type":"text"},{"key":"status_url","value":"{{status_url}}","description":"URL to a status page, eg. order status page","type":"text"},{"key":"invoice_no","value":"{{invoice_no}}","description":"Invoice number","type":"text"},{"key":"invoice_url","value":"{{invoice_url}}","description":"URL to invoice","type":"text"},{"key":"thank_you","value":"{{thank_you}}","description":"Message to the event owner (email recipient). This message can be included in the campaign body.","type":"text"}]},"url":"https://api.mailkit.eu/api/js_v2/finishEvent"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 01 Sep 2021 11:57:20 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Connection","value":"close"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Empty event can not be finished\",\n    \"hash\": \"3f4167252171f8c8427876ded8408193\",\n    \"event_tag\": \"Test\",\n    \"status\": 400\n}"},{"id":"f0deb063-7b62-4aca-81c9-838eebe6f4dc","name":"Error - No event matching passed hash","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"{{api_id}}","description":"**REQUIRED** - API ID of the customer - see your Mailkit account Profile/Integrations","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"**REQUIRED** - the hash of the event as returned by initEvent call","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"**REQUIRED FOR CLIENT-TO-SERVER** - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"**SERVER-TO-SERVER ONLY** - Server-to-Server calls should be authenticated by the API Hash instead of host domain. **DO NOT USE FOR CLIENT INTEGRATIONS** as it would reveal your secret hash to the user!","type":"text"},{"key":"Referer","value":"{{referer}}","description":"URL of the webpage where the event has taken place","type":"text","disabled":true}],"body":{"mode":"formdata","formdata":[{"key":"event_tag","value":"{{event_tag}}","description":"**REQUIRED** - tag of the original event (if tag was set)","type":"text"},{"key":"status_url","value":"{{status_url}}","description":"URL to a status page, eg. order status page","type":"text"},{"key":"invoice_no","value":"{{invoice_no}}","description":"Invoice number","type":"text"},{"key":"invoice_url","value":"{{invoice_url}}","description":"URL to invoice","type":"text"},{"key":"thank_you","value":"{{thank_you}}","description":"Message to the event owner (email recipient). This message can be included in the campaign body.","type":"text"}]},"url":"https://api.mailkit.eu/api/js_v2/finishEvent"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 01 Sep 2021 11:58:10 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Keep-Alive","value":"timeout=5, max=98"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"No matching event to finish\",\n    \"status\": 404\n}"}],"_postman_id":"6e2fb354-5399-40f7-980a-8a94c1eb2477"},{"name":"_log_error - Error logging","event":[{"listen":"test","script":{"id":"0123a556-72f3-4e2b-b213-7d8cc3cd3521","exec":["var jsonData = pm.response.json();\r","pm.test(\"initEvent success\", function () {\r","    pm.expect(pm.response).to.be.ok;\r","    pm.expect(jsonData).to.have;\r","});\r","if (pm.response.code == 200) {\r","    pm.test(\"Hash received\", function () {\r","        pm.expect(jsonData.hash).to.be.a('string');\r","        pm.expect(jsonData.hash).to.be.lengthOf.above(20);\r","        pm.environment.set(\"hash\", jsonData.hash);\r","    });\r","   pm.test(\"Tag received\", function () {\r","        pm.expect(jsonData.event_tag).to.exist;\r","        pm.environment.set(\"event_tag\", jsonData.event_tag);\r","    });\r","}"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"28e35d21-32ec-418c-9c07-0cbe3cee7f65","exec":["var r_msg = pm.variables.replaceIn('Quia quaerat ea ut rerum fugit excepturi repudiandae.');\r","pm.environment.set(\"random_message\", r_msg);\r",""],"type":"text/javascript"}}],"id":"5144aa5e-b963-42d8-910f-bac59154a4a4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"x-api-key","value":"{{api_id}}","description":"<p><strong>REQUIRED</strong> - API ID of the customer - see your Mailkit account Profile/Integrations</p>\n","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"<p><strong>REQUIRED</strong> - the hash of the event as returned by initEvent call if available</p>\n","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"<p><strong>REQUIRED FOR CLIENT-TO-SERVER</strong> - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)</p>\n","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"<p><strong>SERVER-TO-SERVER ONLY</strong> - Server-to-Server calls should be authenticated by the API Hash instead of host domain. <strong>DO NOT USE FOR CLIENT INTEGRATIONS</strong> as it would reveal your secret hash to the user!</p>\n","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"msg","value":"{{random_message}}","description":"<p>Message to be stored in the server log - usually this would be the debug from the UI scripts, eg. cookie not set, etc.</p>\n","type":"text"}]},"url":"https://api.mailkit.eu/api/js_v2/_logerror","description":"<h2 id=\"log-an-event-error\">Log an event error</h2>\n<p>_log_error method is used to pass frontend errors to the backend for later analysis. These could be any errors related to the script operation, eg. script is unable to run due to blocked cookies, etc.</p>\n","auth":{"type":"noauth","isInherited":true,"source":{"_postman_id":"b6391ec8-9890-4ca8-b119-c225eb62af7e","id":"b6391ec8-9890-4ca8-b119-c225eb62af7e","name":"Event control","type":"folder"}},"urlObject":{"path":["_logerror"],"host":["https://api.mailkit.eu/api/js_v2"],"query":[],"variable":[]}},"response":[{"id":"9eb10129-862c-4f3c-845e-75cbb8794555","name":"Success - Message logged","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"{{api_id}}","description":"**REQUIRED** - API ID of the customer - see your Mailkit account Profile/Integrations","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"**REQUIRED** - the hash of the event as returned by initEvent call if available","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"**REQUIRED FOR CLIENT-TO-SERVER** - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"**SERVER-TO-SERVER ONLY** - Server-to-Server calls should be authenticated by the API Hash instead of host domain. **DO NOT USE FOR CLIENT INTEGRATIONS** as it would reveal your secret hash to the user!","type":"text"},{"key":"Referer","value":"{{referer}}","description":"URL of the webpage where the event has taken place","type":"text","disabled":true}],"body":{"mode":"formdata","formdata":[{"key":"msg","value":"{{random_message}}","description":"Message to be stored in the server log - usually this would be the debug from the UI scripts, eg. cookie not set, etc.","type":"text"}]},"url":"https://api.mailkit.eu/api/js_v2/_logerror"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 01 Sep 2021 11:50:26 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Dignissimos veritatis nihil illo placeat et iusto omnis.\"\n}"}],"_postman_id":"5144aa5e-b963-42d8-910f-bac59154a4a4"}],"id":"b6391ec8-9890-4ca8-b119-c225eb62af7e","description":"<p>This section contains the main endpoints for controlling individual events. Events act as envelope for items (content of event). This means that a single event envelope persist throughout multiple user interactions.</p>\n<p>The events are not supposed to be created and finished for single interactions (eg. new event-&gt;add item-&gt; finish), but for a series of related interactions, eg. new event -&gt; add item -&gt; add item -&gt; finish.</p>\n<p>An event has 2 states:</p>\n<p><strong>open</strong> - this is the initial state of an event. The event items can be manipulated while it's in an open status.\n<strong>finished</strong> - a finished event is closed to any manipulation.</p>\n<p>All event parameters passed by initEvent and finishEvent methods can be used in the campaign body except for api_id, host, hash and action values.</p>\n","auth":{"type":"noauth","isInherited":false},"event":[{"listen":"prerequest","script":{"id":"57cdee2e-7472-4691-84bd-ecb95e58ebca","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"c72a282a-5158-4282-ba58-ed29b5cc28dd","type":"text/javascript","exec":[""]}}],"_postman_id":"b6391ec8-9890-4ca8-b119-c225eb62af7e"},{"name":"Item manipulation","item":[{"name":"addItem - Add Item","event":[{"listen":"test","script":{"id":"3c341f14-2e8d-4882-b053-c014eda674aa","exec":["var jsonData = pm.response.json();\r","pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","if (pm.response.code == 200) {\r","    pm.test(\"item_id matched\", function () {\r","        pm.expect(jsonData.product_id).to.exist;\r","        pm.expect(jsonData.product_id).to.be.eql(pm.environment.get(\"item_id\"));\r","    });\r","    pm.test(\"item_qty matched\", function () {\r","        pm.expect(jsonData.item_qty).to.exist;\r","        pm.expect(jsonData.item_qty == pm.environment.get(\"item_qty\"));\r","    });\r","    pm.test(\"item_total matched\", function () {\r","        pm.expect(jsonData.item_total).to.exist;\r","        pm.expect(jsonData.item_total == pm.variables.get(\"item_total\"));\r","    });\r","}\r",""],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"69a08032-2f21-46e0-9a4f-407b6ba4c9f8","exec":["let item_total = pm.variables.get('item_price') * pm.variables.get('item_qty');\r","pm.variables.set('item_total',item_total);"],"type":"text/javascript"}}],"id":"13d14831-4796-460c-b929-5048fc89ac8c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"x-api-key","value":"{{api_id}}","description":"<p><strong>REQUIRED</strong> - API ID of the customer - see your Mailkit account Profile/Integrations</p>\n","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"<p><strong>REQUIRED</strong> - the hash of the event as returned by initEvent call</p>\n","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"<p><strong>REQUIRED FOR CLIENT-TO-SERVER</strong> - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)</p>\n","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"<p><strong>SERVER-TO-SERVER ONLY</strong> - Server-to-Server calls should be authenticated by the API Hash instead of host domain. <strong>DO NOT USE FOR CLIENT INTEGRATIONS</strong> as it would reveal your secret hash to the user!</p>\n","type":"text"},{"key":"Referer","value":"{{referer}}","description":"<p>URL of the webpage where the event has taken place</p>\n","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"product_id","value":"{{item_id}}","description":"<p><strong>REQUIRED</strong> Unique item identificator, usually a product SKU. Each item must have a different unique identifier. (max 32 chars)</p>\n","type":"text"},{"key":"name","value":"{{item_name}}","description":"<p>Item name (max. 256 chars)</p>\n","type":"text"},{"key":"description","value":"{{item_description}}","description":"<p>Item description (max. 2048 chars)</p>\n","type":"text"},{"key":"teaser","value":"{{item_teaser}}","description":"<p>Item teaser - additional text (max. 256 chars)</p>\n","type":"text"},{"key":"price","value":"{{item_price}}","description":"<p>Item unit price (number/decimal)</p>\n","type":"text"},{"key":"price_orig","value":"{{item_price_orig}}","description":"<p>Original Item unit price before discount (number/decimal)</p>\n","type":"text"},{"key":"item_qty","value":"{{item_qty}}","description":"<p>Item quantity (number/decimal)</p>\n","type":"text"},{"key":"item_total","value":"{{item_total}}","description":"<p>Total price for the quantity of item (the sum of price * item_qty)</p>\n","type":"text"},{"key":"item_discount","value":"{{item_discount}}","description":"<p>Discount value as a number or percentage (max 8 chars)</p>\n","type":"text"},{"key":"item_available","value":"{{item_available}}","description":"<p>Item availability (max. 64 chars)</p>\n","type":"text"},{"key":"product_url","value":"{{item_product_url}}","description":"<p>URL of the item (max. 256 chars)</p>\n","type":"text"},{"key":"product_category","value":"{{item_product_category}}","description":"<p>Category of the item (max. 64 chars)</p>\n","type":"text"},{"key":"product_cat_url","value":"{{item_product_cat_url}}","description":"<p>URL of the item category (max. 256 chars)</p>\n","type":"text"},{"key":"image_url","value":"{{item_image_url}}","description":"<p>URL of the item image (max. 256 chars)</p>\n","type":"text"}]},"url":"https://api.mailkit.eu/api/js_v2/addItem","description":"<h2 id=\"add-item-to-event-bulk\">Add Item to event (bulk)</h2>\n<p>addItem method is used to add an item to the event in quantity. The item must contain quantity and a calculated item total price. The quantity of items can not be updated using this method and subsequent calls to add an item with the same product_id will be ignored - see <em>Increase Item Quantity</em> and <em>Decrease Item Quantity</em> for updating item quantities.</p>\n","urlObject":{"path":["addItem"],"host":["https://api.mailkit.eu/api/js_v2"],"query":[],"variable":[]}},"response":[{"id":"3b5a1525-215e-486d-8657-f2c8353999f6","name":"Success - Item added","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"{{api_id}}","description":"**REQUIRED** - API ID of the customer - see your Mailkit account Profile/Integrations","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"**REQUIRED** - the hash of the event as returned by initEvent call","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"**REQUIRED FOR CLIENT-TO-SERVER** - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"**SERVER-TO-SERVER ONLY** - Server-to-Server calls should be authenticated by the API Hash instead of host domain. **DO NOT USE FOR CLIENT INTEGRATIONS** as it would reveal your secret hash to the user!","type":"text"},{"key":"Referer","value":"{{referer}}","description":"URL of the webpage where the event has taken place","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"product_id","value":"{{item_id}}","description":"**REQUIRED** Unique item identificator, usually a product SKU. Each item must have a different unique identifier. (max 32 chars)","type":"text"},{"key":"name","value":"{{item_name}}","description":"Item name (max. 256 chars)","type":"text"},{"key":"description","value":"{{item_description}}","description":"Item description (max. 2048 chars)","type":"text"},{"key":"teaser","value":"{{item_teaser}}","description":"Item teaser - additional text (max. 256 chars)","type":"text"},{"key":"price","value":"{{item_price}}","description":"Item unit price (number/decimal)","type":"text"},{"key":"price_orig","value":"{{item_price_orig}}","description":"Original Item unit price before discount (number/decimal)","type":"text"},{"key":"item_qty","value":"{{item_qty}}","description":"Item quantity (number/decimal)","type":"text"},{"key":"item_total","value":"{{item_total}}","description":"Total price for the quantity of item (the sum of price * item_qty)","type":"text"},{"key":"item_discount","value":"{{item_discount}}","description":"Discount value as a number or percentage (max 8 chars)","type":"text"},{"key":"item_available","value":"{{item_available}}","description":"Item availability (max. 64 chars)","type":"text"},{"key":"product_url","value":"{{item_product_url}}","description":"URL of the item (max. 256 chars)","type":"text"},{"key":"product_category","value":"{{item_product_category}}","description":"Category of the item (max. 64 chars)","type":"text"},{"key":"product_cat_url","value":"{{item_product_cat_url}}","description":"URL of the item category (max. 256 chars)","type":"text"},{"key":"image_url","value":"{{item_image_url}}","description":"URL of the item image (max. 256 chars)","type":"text"}]},"url":"https://api.mailkit.eu/api/js_v2/addItem"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 01 Sep 2021 11:51:18 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Keep-Alive","value":"timeout=5, max=99"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"item_qty\": 2,\n    \"item_total\": 200,\n    \"product_id\": \"SKUno001\"\n}"},{"id":"dad89f06-e591-467c-9ae2-ff8d0c06f3b9","name":"Error - event not initialized","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"{{api_id}}","description":"**REQUIRED** - API ID of the customer - see your Mailkit account Profile/Integrations","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"**REQUIRED** - the hash of the event as returned by initEvent call","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"**REQUIRED FOR CLIENT-TO-SERVER** - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"**SERVER-TO-SERVER ONLY** - Server-to-Server calls should be authenticated by the API Hash instead of host domain. **DO NOT USE FOR CLIENT INTEGRATIONS** as it would reveal your secret hash to the user!","type":"text"},{"key":"Referer","value":"{{referer}}","description":"URL of the webpage where the event has taken place","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"product_id","value":"{{item_id}}","description":"**REQUIRED** Unique item identificator, usually a product SKU. Each item must have a different unique identifier. (max 32 chars)","type":"text"},{"key":"name","value":"{{item_name}}","description":"Item name (max. 256 chars)","type":"text"},{"key":"description","value":"{{item_description}}","description":"Item description (max. 2048 chars)","type":"text"},{"key":"teaser","value":"{{item_teaser}}","description":"Item teaser - additional text (max. 256 chars)","type":"text"},{"key":"price","value":"{{item_price}}","description":"Item unit price (number/decimal)","type":"text"},{"key":"price_orig","value":"{{item_price_orig}}","description":"Original Item unit price before discount (number/decimal)","type":"text"},{"key":"item_qty","value":"{{item_qty}}","description":"Item quantity (number/decimal)","type":"text"},{"key":"item_total","value":"{{item_total}}","description":"Total price for the quantity of item (the sum of price * item_qty)","type":"text"},{"key":"item_discount","value":"{{item_discount}}","description":"Discount value as a number or percentage (max 8 chars)","type":"text"},{"key":"item_available","value":"{{item_available}}","description":"Item availability (max. 64 chars)","type":"text"},{"key":"product_url","value":"{{item_product_url}}","description":"URL of the item (max. 256 chars)","type":"text"},{"key":"product_category","value":"{{item_product_category}}","description":"Category of the item (max. 64 chars)","type":"text"},{"key":"product_cat_url","value":"{{item_product_cat_url}}","description":"URL of the item category (max. 256 chars)","type":"text"},{"key":"image_url","value":"{{item_image_url}}","description":"URL of the item image (max. 256 chars)","type":"text"}]},"url":"https://api.mailkit.eu/api/js_v2/addItem"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 01 Sep 2021 11:50:38 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Event ID not found\",\n    \"status\": 404\n}"},{"id":"18ffe9fc-4e7d-488b-90da-e8b2a2d18db9","name":"Error - Item already exists","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"{{api_id}}","description":"**REQUIRED** - API ID of the customer - see your Mailkit account Profile/Integrations","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"**REQUIRED** - the hash of the event as returned by initEvent call","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"**REQUIRED FOR CLIENT-TO-SERVER** - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"**SERVER-TO-SERVER ONLY** - Server-to-Server calls should be authenticated by the API Hash instead of host domain. **DO NOT USE FOR CLIENT INTEGRATIONS** as it would reveal your secret hash to the user!","type":"text"},{"key":"Referer","value":"{{referer}}","description":"URL of the webpage where the event has taken place","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"product_id","value":"{{item_id}}","description":"**REQUIRED** Unique item identificator, usually a product SKU. Each item must have a different unique identifier. (max 32 chars)","type":"text"},{"key":"name","value":"{{item_name}}","description":"Item name (max. 256 chars)","type":"text"},{"key":"description","value":"{{item_description}}","description":"Item description (max. 2048 chars)","type":"text"},{"key":"teaser","value":"{{item_teaser}}","description":"Item teaser - additional text (max. 256 chars)","type":"text"},{"key":"price","value":"{{item_price}}","description":"Item unit price (number/decimal)","type":"text"},{"key":"price_orig","value":"{{item_price_orig}}","description":"Original Item unit price before discount (number/decimal)","type":"text"},{"key":"item_qty","value":"{{item_qty}}","description":"Item quantity (number/decimal)","type":"text"},{"key":"item_total","value":"{{item_total}}","description":"Total price for the quantity of item (the sum of price * item_qty)","type":"text"},{"key":"item_discount","value":"{{item_discount}}","description":"Discount value as a number or percentage (max 8 chars)","type":"text"},{"key":"item_available","value":"{{item_available}}","description":"Item availability (max. 64 chars)","type":"text"},{"key":"product_url","value":"{{item_product_url}}","description":"URL of the item (max. 256 chars)","type":"text"},{"key":"product_category","value":"{{item_product_category}}","description":"Category of the item (max. 64 chars)","type":"text"},{"key":"product_cat_url","value":"{{item_product_cat_url}}","description":"URL of the item category (max. 256 chars)","type":"text"},{"key":"image_url","value":"{{item_image_url}}","description":"URL of the item image (max. 256 chars)","type":"text"}]},"url":"https://api.mailkit.eu/api/js_v2/addItem"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 01 Sep 2021 11:51:33 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Connection","value":"close"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Item with this product_id already exists\",\n    \"status\": 400\n}"}],"_postman_id":"13d14831-4796-460c-b929-5048fc89ac8c"},{"name":"addItemU - Increase Item Quantity","event":[{"listen":"test","script":{"id":"579ea642-0395-4482-b502-e31bb1e6f8f7","exec":["var jsonData = pm.response.json();\r","pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","if (pm.response.code == 200) {\r","    pm.test(\"item_id matched\", function () {\r","        pm.expect(jsonData.product_id).to.exist;\r","        pm.expect(jsonData.product_id).to.be.eql(pm.environment.get(\"item_id\"));\r","    });\r","    pm.test(\"item_qty matched\", function () {\r","        pm.expect(jsonData.item_qty).to.exist;\r","        pm.expect(jsonData.item_qty == pm.environment.get(\"item_qty\"));\r","    });\r","    pm.test(\"item_total matched\", function () {\r","        pm.expect(jsonData.item_total).to.exist;\r","        pm.expect(jsonData.item_total == pm.variables.get(\"item_total\"));\r","    });\r","}\r",""],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"a0af18b5-8f0b-412b-93af-42a91f69b1f0","exec":["let item_total = pm.variables.get('item_price') * pm.variables.get('item_qty');\r","pm.variables.set('item_total',item_total);"],"type":"text/javascript"}}],"id":"6a78d5e1-3dc3-447e-a53f-9b53f2b392b7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"x-api-key","value":"{{api_id}}","description":"<p><strong>REQUIRED</strong> - API ID of the customer - see your Mailkit account Profile/Integrations</p>\n","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"<p><strong>REQUIRED</strong> - the hash of the event as returned by initEvent call</p>\n","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"<p><strong>REQUIRED FOR CLIENT-TO-SERVER</strong> - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)</p>\n","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"<p><strong>SERVER-TO-SERVER ONLY</strong> - Server-to-Server calls should be authenticated by the API Hash instead of host domain. <strong>DO NOT USE FOR CLIENT INTEGRATIONS</strong> as it would reveal your secret hash to the user!</p>\n","type":"text"},{"key":"Referer","value":"{{referer}}","description":"<p>URL of the webpage where the event has taken place</p>\n","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"product_id","value":"{{item_id}}","description":"<p><strong>REQUIRED</strong> Unique item identificator, usually a product SKU. Each item must have a different unique identifier. (max 32 chars)</p>\n","type":"text"},{"key":"name","value":"{{item_name}}","description":"<p>Item name (max. 256 chars)</p>\n","type":"text"},{"key":"description","value":"{{item_description}}","description":"<p>Item description (max. 2048 chars)</p>\n","type":"text"},{"key":"teaser","value":"{{item_teaser}}","description":"<p>Item teaser - additional text (max. 256 chars)</p>\n","type":"text"},{"key":"price","value":"{{item_price}}","description":"<p>Item unit price (number/decimal)</p>\n","type":"text"},{"key":"price_orig","value":"{{item_price_orig}}","description":"<p>Original Item unit price before discount (number/decimal)</p>\n","type":"text"},{"key":"item_qty","value":"{{item_qty}}","description":"<p>Item quantity (number/decimal)</p>\n","type":"text"},{"key":"item_total","value":"{{item_total}}","description":"<p>Total price for the quantity of item (the sum of price * item_qty)</p>\n","type":"text"},{"key":"item_discount","value":"{{item_discount}}","description":"<p>Discount value as a number or percentage (max 8 chars)</p>\n","type":"text"},{"key":"item_available","value":"{{item_available}}","description":"<p>Item availability (max. 64 chars)</p>\n","type":"text"},{"key":"product_url","value":"{{item_product_url}}","description":"<p>URL of the item (max. 256 chars)</p>\n","type":"text"},{"key":"product_category","value":"{{item_product_category}}","description":"<p>Category of the item (max. 64 chars)</p>\n","type":"text"},{"key":"product_cat_url","value":"{{item_product_cat_url}}","description":"<p>URL of the item category (max. 256 chars)</p>\n","type":"text"},{"key":"image_url","value":"{{item_image_url}}","description":"<p>URL of the item image (max. 256 chars)</p>\n","type":"text"}]},"url":"https://api.mailkit.eu/api/js_v2/addItemU","description":"<h2 id=\"increase-item-quantity\">Increase item quantity</h2>\n<p>addItemU method is used to increase the item quantity. The item MAY contain quantity and a single item price otherwise the item_qty will be increased by 1. The backend will calculate the item_total and total quantity based on the submitted data as well as the count of items already stored in the event.</p>\n","urlObject":{"path":["addItemU"],"host":["https://api.mailkit.eu/api/js_v2"],"query":[],"variable":[]}},"response":[{"id":"145e8ccb-9272-4eea-940a-873b96d0f4e7","name":"Success - Item added","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"{{api_id}}","description":"**REQUIRED** - API ID of the customer - see your Mailkit account Profile/Integrations","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"**REQUIRED** - the hash of the event as returned by initEvent call","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"**REQUIRED FOR CLIENT-TO-SERVER** - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"**SERVER-TO-SERVER ONLY** - Server-to-Server calls should be authenticated by the API Hash instead of host domain. **DO NOT USE FOR CLIENT INTEGRATIONS** as it would reveal your secret hash to the user!","type":"text"},{"key":"Referer","value":"{{referer}}","description":"URL of the webpage where the event has taken place","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"product_id","value":"{{item_id}}","description":"**REQUIRED** Unique item identificator, usually a product SKU. Each item must have a different unique identifier. (max 32 chars)","type":"text"},{"key":"name","value":"{{item_name}}","description":"Item name (max. 256 chars)","type":"text"},{"key":"description","value":"{{item_description}}","description":"Item description (max. 2048 chars)","type":"text"},{"key":"teaser","value":"{{item_teaser}}","description":"Item teaser - additional text (max. 256 chars)","type":"text"},{"key":"price","value":"{{item_price}}","description":"Item unit price (number/decimal)","type":"text"},{"key":"price_orig","value":"{{item_price_orig}}","description":"Original Item unit price before discount (number/decimal)","type":"text"},{"key":"item_qty","value":"{{item_qty}}","description":"Item quantity (number/decimal)","type":"text"},{"key":"item_total","value":"{{item_total}}","description":"Total price for the quantity of item (the sum of price * item_qty)","type":"text"},{"key":"item_discount","value":"{{item_discount}}","description":"Discount value as a number or percentage (max 8 chars)","type":"text"},{"key":"item_available","value":"{{item_available}}","description":"Item availability (max. 64 chars)","type":"text"},{"key":"product_url","value":"{{item_product_url}}","description":"URL of the item (max. 256 chars)","type":"text"},{"key":"product_category","value":"{{item_product_category}}","description":"Category of the item (max. 64 chars)","type":"text"},{"key":"product_cat_url","value":"{{item_product_cat_url}}","description":"URL of the item category (max. 256 chars)","type":"text"},{"key":"image_url","value":"{{item_image_url}}","description":"URL of the item image (max. 256 chars)","type":"text"}]},"url":"https://api.mailkit.eu/api/js_v2/addItemU"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 01 Sep 2021 11:51:58 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"item_total\": \"400\",\n    \"item_qty\": \"4\",\n    \"product_id\": \"SKUno001\"\n}"}],"_postman_id":"6a78d5e1-3dc3-447e-a53f-9b53f2b392b7"},{"name":"removeItem - Remove Item","event":[{"listen":"test","script":{"id":"88ea2069-ac8c-45cd-9c30-b5e4d6d535e4","exec":["var jsonData = pm.response.json();\r","pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","if (pm.response.code == 200) {\r","    pm.test(\"item_id matched\", function () {\r","        pm.expect(jsonData.product_id).to.exist;\r","        pm.expect(jsonData.product_id).to.be.eql(pm.environment.get(\"item_id\"));\r","    });\r","}\r",""],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"8e07132f-1a5b-4fee-8246-6b9f77f8b679","exec":[""],"type":"text/javascript"}}],"id":"f81d3db0-3f48-46d6-9b54-47fbc787db29","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"x-api-key","value":"{{api_id}}","description":"<p><strong>REQUIRED</strong> - API ID of the customer - see your Mailkit account Profile/Integrations</p>\n","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"<p><strong>REQUIRED</strong> - the hash of the event as returned by initEvent call</p>\n","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"<p><strong>REQUIRED FOR CLIENT-TO-SERVER</strong> - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)</p>\n","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"<p><strong>SERVER-TO-SERVER ONLY</strong> - Server-to-Server calls should be authenticated by the API Hash instead of host domain. <strong>DO NOT USE FOR CLIENT INTEGRATIONS</strong> as it would reveal your secret hash to the user!</p>\n","type":"text"},{"key":"Referer","value":"{{referer}}","description":"<p>URL of the webpage where the event has taken place</p>\n","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"product_id","value":"{{item_id}}","description":"<p><strong>REQUIRED</strong> Unique item identificator, usually a product SKU to be removed from the event</p>\n","type":"text"}]},"url":"https://api.mailkit.eu/api/js_v2/removeItem","description":"<h2 id=\"remove-an-item-from-event\">Remove an Item from event</h2>\n<p>Removes the item from the event completely (no matter the quantity present). This method can not be used to subtract item - see <em>removeItemU</em> for subtracting item quantity.</p>\n","urlObject":{"path":["removeItem"],"host":["https://api.mailkit.eu/api/js_v2"],"query":[],"variable":[]}},"response":[{"id":"3ce670a0-2b22-4fa0-8126-2b3e437bf77b","name":"Success - Item deleted","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"{{api_id}}","description":"**REQUIRED** - API ID of the customer - see your Mailkit account Profile/Integrations","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"**REQUIRED** - the hash of the event as returned by initEvent call","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"**REQUIRED FOR CLIENT-TO-SERVER** - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"**SERVER-TO-SERVER ONLY** - Server-to-Server calls should be authenticated by the API Hash instead of host domain. **DO NOT USE FOR CLIENT INTEGRATIONS** as it would reveal your secret hash to the user!","type":"text"},{"key":"Referer","value":"{{referer}}","description":"URL of the webpage where the event has taken place","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"product_id","value":"{{item_id}}","description":"**REQUIRED** Unique item identificator, usually a product SKU to be removed from the event","type":"text"}]},"url":"https://api.mailkit.eu/api/js_v2/removeItem"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 01 Sep 2021 11:52:17 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"deleted\": 1,\n    \"product_id\": \"SKUno001\"\n}"},{"id":"978d9599-27cb-4bac-9473-78cb800aa3fe","name":"Error - Item not found","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"{{api_id}}","description":"**REQUIRED** - API ID of the customer - see your Mailkit account Profile/Integrations","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"**REQUIRED** - the hash of the event as returned by initEvent call","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"**REQUIRED FOR CLIENT-TO-SERVER** - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"**SERVER-TO-SERVER ONLY** - Server-to-Server calls should be authenticated by the API Hash instead of host domain. **DO NOT USE FOR CLIENT INTEGRATIONS** as it would reveal your secret hash to the user!","type":"text"},{"key":"Referer","value":"{{referer}}","description":"URL of the webpage where the event has taken place","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"product_id","value":"{{item_id}}","description":"**REQUIRED** Unique item identificator, usually a product SKU to be removed from the event","type":"text"}]},"url":"https://api.mailkit.eu/api/js_v2/removeItem"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 01 Sep 2021 11:52:29 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Product ID 'SKUno001' not found in Event\",\n    \"status\": 404\n}"}],"_postman_id":"f81d3db0-3f48-46d6-9b54-47fbc787db29"},{"name":"removeItemU - Decrease Item Quantity","event":[{"listen":"test","script":{"id":"35eecbc2-c1b4-4198-8f0d-41d0e31b77b2","exec":["var jsonData = pm.response.json();\r","pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","if (pm.response.code == 200) {\r","    pm.test(\"item_id matched\", function () {\r","        pm.expect(jsonData.product_id).to.exist;\r","        pm.expect(jsonData.product_id).to.be.eql(pm.environment.get(\"item_id\"));\r","    });\r","}\r",""],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"42d50583-9359-4f3f-bd95-8c7309543d05","exec":[""],"type":"text/javascript"}}],"id":"6f47db06-8a7d-4cf9-ad94-5ab81b79661b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"x-api-key","value":"{{api_id}}","description":"<p><strong>REQUIRED</strong> - API ID of the customer - see your Mailkit account Profile/Integrations</p>\n","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"<p><strong>REQUIRED</strong> - the hash of the event as returned by initEvent call</p>\n","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"<p><strong>REQUIRED FOR CLIENT-TO-SERVER</strong> - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)</p>\n","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"<p><strong>SERVER-TO-SERVER ONLY</strong> - Server-to-Server calls should be authenticated by the API Hash instead of host domain. <strong>DO NOT USE FOR CLIENT INTEGRATIONS</strong> as it would reveal your secret hash to the user!</p>\n","type":"text"},{"key":"Referer","value":"{{referer}}","description":"<p>URL of the webpage where the event has taken place</p>\n","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"product_id","value":"{{item_id}}","description":"<p><strong>REQUIRED</strong> Unique item identificator, usually a product SKU to be removed from the event</p>\n","type":"text"},{"key":"item_qty","value":"{{item_qty}}","description":"<p>Item quantity (number/decimal)</p>\n","type":"text"}]},"url":"https://api.mailkit.eu/api/js_v2/removeItemU","description":"<h2 id=\"decrease-item-count\">Decrease item count</h2>\n<p>Reduces the item_qty of the item in the event. The item_qty MAY be provided to decrease quantity by other amount than 1. In case the resulting remaining quantity reaches 0 the item is removed from the event completely.</p>\n","urlObject":{"path":["removeItemU"],"host":["https://api.mailkit.eu/api/js_v2"],"query":[],"variable":[]}},"response":[{"id":"551e2661-93fe-456a-953d-f66aeefb8b9d","name":"Success - Decrease item qty","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"{{api_id}}","description":"**REQUIRED** - API ID of the customer - see your Mailkit account Profile/Integrations","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"**REQUIRED** - the hash of the event as returned by initEvent call","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"**REQUIRED FOR CLIENT-TO-SERVER** - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"**SERVER-TO-SERVER ONLY** - Server-to-Server calls should be authenticated by the API Hash instead of host domain. **DO NOT USE FOR CLIENT INTEGRATIONS** as it would reveal your secret hash to the user!","type":"text"},{"key":"Referer","value":"{{referer}}","description":"URL of the webpage where the event has taken place","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"product_id","value":"{{item_id}}","description":"**REQUIRED** Unique item identificator, usually a product SKU to be removed from the event","type":"text"},{"key":"item_qty","value":"{{item_qty}}","description":"Item quantity (number/decimal)","type":"text"}]},"url":"https://api.mailkit.eu/api/js_v2/removeItemU"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 01 Sep 2021 11:53:07 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"product_id\": \"SKUno001\",\n    \"item_total\": 0,\n    \"item_qty\": 0\n}"},{"id":"cca2f7af-e464-44ac-babb-8eebfe38d230","name":"Error - Item not found","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"{{api_id}}","description":"**REQUIRED** - API ID of the customer - see your Mailkit account Profile/Integrations","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"**REQUIRED** - the hash of the event as returned by initEvent call","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"**REQUIRED FOR CLIENT-TO-SERVER** - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"**SERVER-TO-SERVER ONLY** - Server-to-Server calls should be authenticated by the API Hash instead of host domain. **DO NOT USE FOR CLIENT INTEGRATIONS** as it would reveal your secret hash to the user!","type":"text"},{"key":"Referer","value":"{{referer}}","description":"URL of the webpage where the event has taken place","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"product_id","value":"{{item_id}}","description":"**REQUIRED** Unique item identificator, usually a product SKU to be removed from the event","type":"text"},{"key":"item_qty","value":"{{item_qty}}","description":"Item quantity (number/decimal)","type":"text"}]},"url":"https://api.mailkit.eu/api/js_v2/removeItemU"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 01 Sep 2021 11:54:19 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Product ID 'SKUno001' not found in Event\",\n    \"status\": 404\n}"}],"_postman_id":"6f47db06-8a7d-4cf9-ad94-5ab81b79661b"},{"name":"clearItems - Clear All Items","event":[{"listen":"test","script":{"id":"5c0e89f4-d7f0-4c68-8dc7-9c909f4aada0","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r",""],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"9d6c0754-de45-46e8-861e-40138cf193c7","exec":[""],"type":"text/javascript"}}],"id":"a40350ef-0efa-41b9-8390-0836c95aac33","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"x-api-key","value":"{{api_id}}","description":"<p><strong>REQUIRED</strong> - API ID of the customer - see your Mailkit account Profile/Integrations</p>\n","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"<p><strong>REQUIRED</strong> - the hash of the event as returned by initEvent call</p>\n","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"<p><strong>REQUIRED FOR CLIENT-TO-SERVER</strong> - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)</p>\n","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"<p><strong>SERVER-TO-SERVER ONLY</strong> - Server-to-Server calls should be authenticated by the API Hash instead of host domain. <strong>DO NOT USE FOR CLIENT INTEGRATIONS</strong> as it would reveal your secret hash to the user!</p>\n","type":"text"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.mailkit.eu/api/js_v2/clearItems","description":"<h2 id=\"flush-all-items-of-event\">Flush all items of event</h2>\n<p>Flushes all the items stored in the event and permanently removes them. This is similar to emptying a shopping cart.</p>\n<p>** THIS IS NOT INTENDED TO BE CALLED WHEN EVENT IS FINISHED **</p>\n","urlObject":{"path":["clearItems"],"host":["https://api.mailkit.eu/api/js_v2"],"query":[],"variable":[]}},"response":[],"_postman_id":"a40350ef-0efa-41b9-8390-0836c95aac33"},{"name":"listItems - List Items","event":[{"listen":"test","script":{"id":"fe5a7d33-7f07-415b-8731-df8f4818e43c","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r",""],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"17493e9c-52c7-4f68-a09f-68bb4e1701e2","exec":[""],"type":"text/javascript"}}],"id":"3db37677-295a-4ef9-a539-8b25ee063793","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-api-key","value":"{{api_id}}","description":"<p><strong>REQUIRED</strong> - API ID of the customer - see your Mailkit account Profile/Integrations</p>\n","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"<p><strong>REQUIRED</strong> - the hash of the event as returned by initEvent call</p>\n","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"<p><strong>REQUIRED FOR CLIENT-TO-SERVER</strong> - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)</p>\n","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"<p><strong>SERVER-TO-SERVER ONLY</strong> - Server-to-Server calls should be authenticated by the API Hash instead of host domain. <strong>DO NOT USE FOR CLIENT INTEGRATIONS</strong> as it would reveal your secret hash to the user!</p>\n","type":"text"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.mailkit.eu/api/js_v2/listItems","description":"<h2 id=\"list-all-items-of-event\">List all items of event</h2>\n<p>Returns an array listing all items currently stored in the event.</p>\n<p><strong>This endpoint is only available for server-to-server requests authenticated using API ID &amp; API Hash</strong></p>\n","urlObject":{"path":["listItems"],"host":["https://api.mailkit.eu/api/js_v2"],"query":[],"variable":[]}},"response":[{"id":"442a9d8d-de98-4a9e-a053-9e235ac86cc7","name":"Success - Item list","originalRequest":{"method":"GET","header":[{"key":"x-api-key","value":"{{api_id}}","description":"**REQUIRED** - API ID of the customer - see your Mailkit account Profile/Integrations","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"**REQUIRED** - the hash of the event as returned by initEvent call","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"**REQUIRED FOR CLIENT-TO-SERVER** - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"**SERVER-TO-SERVER ONLY** - Server-to-Server calls should be authenticated by the API Hash instead of host domain. **DO NOT USE FOR CLIENT INTEGRATIONS** as it would reveal your secret hash to the user!","type":"text"},{"key":"Referer","value":"{{referer}}","description":"URL of the webpage where the event has taken place","type":"text","disabled":true}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.mailkit.eu/api/js_v2/listItems"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 01 Sep 2021 11:47:30 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"items\": [\n        {\n            \"item_price\": \"100.0000\",\n            \"product_id\": \"SKUno001\",\n            \"item_qty\": \"2.0000\"\n        }\n    ]\n}"},{"id":"0d453006-9cdd-43d8-b668-934e7b05e890","name":"Error - No items","originalRequest":{"method":"GET","header":[{"key":"x-api-key","value":"{{api_id}}","description":"**REQUIRED** - API ID of the customer - see your Mailkit account Profile/Integrations","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"**REQUIRED** - the hash of the event as returned by initEvent call","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"**REQUIRED FOR CLIENT-TO-SERVER** - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"**SERVER-TO-SERVER ONLY** - Server-to-Server calls should be authenticated by the API Hash instead of host domain. **DO NOT USE FOR CLIENT INTEGRATIONS** as it would reveal your secret hash to the user!","type":"text"},{"key":"Referer","value":"{{referer}}","description":"URL of the webpage where the event has taken place","type":"text","disabled":true}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.mailkit.eu/api/js_v2/listItems"},"status":"No Content","code":204,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 01 Sep 2021 11:54:47 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"3db37677-295a-4ef9-a539-8b25ee063793"},{"name":"viewItem - Item Detail pageview","event":[{"listen":"test","script":{"id":"8930e5a0-e47a-4503-adf4-46c4e004bbfa","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r",""],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"1e0915b6-61cc-49c2-857e-9779dc5b61b2","exec":[""],"type":"text/javascript"}}],"id":"a8c27d02-bdfc-4e22-8b89-508e770518bf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"x-api-key","value":"{{api_id}}","description":"<p><strong>REQUIRED</strong> - API ID of the customer - see your Mailkit account Profile/Integrations</p>\n","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"<p><strong>REQUIRED</strong> - the hash of the event as returned by initEvent call</p>\n","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"<p><strong>REQUIRED FOR CLIENT-TO-SERVER</strong> - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)</p>\n","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"<p><strong>SERVER-TO-SERVER ONLY</strong> - Server-to-Server calls should be authenticated by the API Hash instead of host domain. <strong>DO NOT USE FOR CLIENT INTEGRATIONS</strong> as it would reveal your secret hash to the user!</p>\n","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"product_id","value":"{{item_id}}","description":"<p><strong>REQUIRED</strong> Unique item identificator, usually a product SKU. Each item must have a different unique identifier. (max 32 chars)</p>\n","type":"text"}]},"url":"https://api.mailkit.eu/api/js_v2/viewItem","description":"<h2 id=\"item-detail-pageview\">Item Detail pageview</h2>\n<p>records a view of a product detail page and passes the information to the recommendations platform (if integration exists).</p>\n","urlObject":{"path":["viewItem"],"host":["https://api.mailkit.eu/api/js_v2"],"query":[],"variable":[]}},"response":[],"_postman_id":"a8c27d02-bdfc-4e22-8b89-508e770518bf"}],"id":"42baefd4-9b67-4cbc-a635-8507fda69f73","_postman_id":"42baefd4-9b67-4cbc-a635-8507fda69f73","description":""},{"name":"Recommendations","item":[{"name":"recommUser - Retrieve products recommended to user","event":[{"listen":"test","script":{"id":"3e7cf789-0cc8-4437-8cf9-1b7ef20e46eb","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r",""],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"6e6c5d27-f899-44e8-87cb-f75c37562baf","exec":[""],"type":"text/javascript"}}],"id":"c8390269-6ed9-443a-b018-24f674fb3bb7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-api-key","value":"{{api_id}}","description":"<p><strong>REQUIRED</strong> - API ID of the customer - see your Mailkit account Profile/Integrations</p>\n","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"<p><strong>REQUIRED</strong> - the hash of the event as returned by initEvent call</p>\n","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"<p><strong>REQUIRED FOR CLIENT-TO-SERVER</strong> - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)</p>\n","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"<p><strong>SERVER-TO-SERVER ONLY</strong> - Server-to-Server calls should be authenticated by the API Hash instead of host domain. <strong>DO NOT USE FOR CLIENT INTEGRATIONS</strong> as it would reveal your secret hash to the user!</p>\n","type":"text"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.mailkit.eu/api/js_v2/recommUser?count=4&returnProperties=true","description":"<h2 id=\"retrieve-product-recommendations-for-visitor\">Retrieve product recommendations for visitor</h2>\n<p>Returns a list of recommendations from the Recombee API.</p>\n<p>See <a href=\"https://docs.recombee.com/api.html#recommend-items-to-user\">https://docs.recombee.com/api.html#recommend-items-to-user</a> for complete documentation.</p>\n<p><strong>This endpoint requires an active Recombee connection</strong></p>\n","urlObject":{"path":["recommUser"],"host":["https://api.mailkit.eu/api/js_v2"],"query":[{"description":{"content":"<p>Number of items to be recommended (N for the top-N recommendation).</p>\n","type":"text/plain"},"key":"count","value":"4"},{"disabled":true,"description":{"content":"<p>Scenario defines a particular application of recommendations. It can be for example “homepage”, “cart” or “emailing”. You can set various settings to the scenario in the Recombee Admin UI.</p>\n","type":"text/plain"},"key":"scenario","value":null},{"disabled":true,"description":{"content":"<p>If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows for example rotations in the following recommendations for that user, as the user will be already known to the system.</p>\n","type":"text/plain"},"key":"cascadeCreate","value":"false"},{"description":{"content":"<p>With returnProperties=true, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used for easy displaying of the recommended items to the user.</p>\n","type":"text/plain"},"key":"returnProperties","value":"true"},{"disabled":true,"description":{"content":"<p>Boolean-returning ReQL expression which allows you to filter recommended items based on the values of their attributes.</p>\n","type":"text/plain"},"key":"filter","value":null},{"disabled":true,"description":{"content":"<p>Number-returning ReQL expression which allows you to boost recommendation rate of some items based on the values of their attributes.</p>\n","type":"text/plain"},"key":"booster","value":null},{"disabled":true,"description":{"content":"<p>Logic specifies particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. See this section for list of available logics and other details.</p>\n","type":"text/plain"},"key":"logic","value":null},{"disabled":true,"description":{"content":"<p><strong>Expert option</strong> Specifies the threshold of how much relevant must the recommended items be to the user. Possible values one of: “low”, “medium”, “high”.</p>\n","type":"text/plain"},"key":"minRelevance","value":null},{"disabled":true,"description":{"content":"<p><strong>Expert option</strong> If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times.</p>\n","type":"text/plain"},"key":"rotationRate","value":null},{"disabled":true,"description":{"content":"<p><strong>Expert option</strong> Taking rotationRate into account, specifies how long time it takes to an item to recover from the penalization.</p>\n","type":"text/plain"},"key":"rotationTime","value":null}],"variable":[]}},"response":[{"id":"96e84f43-af59-4f80-a42f-db50bd66692c","name":"Success - recommended products","originalRequest":{"method":"GET","header":[{"key":"x-api-key","value":"{{api_id}}","description":"**REQUIRED** - API ID of the customer - see your Mailkit account Profile/Integrations","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"**REQUIRED** - the hash of the event as returned by initEvent call","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"**REQUIRED FOR CLIENT-TO-SERVER** - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"**SERVER-TO-SERVER ONLY** - Server-to-Server calls should be authenticated by the API Hash instead of host domain. **DO NOT USE FOR CLIENT INTEGRATIONS** as it would reveal your secret hash to the user!","type":"text"},{"key":"Referer","value":"{{referer}}","description":"URL of the webpage where the event has taken place","type":"text","disabled":true}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.mailkit.eu/api/js_v2/recommUser"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 06 Sep 2021 10:01:49 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"recommId\": \"45331b2552cb8a8a6679da36f7617865\",\n    \"numberNextRecommsCalls\": 0,\n    \"recomms\": [\n        {\n            \"id\": \"14333\"\n        }\n    ]\n}"},{"id":"7d7ea1c7-e686-4008-9ec5-de3faeb3d10d","name":"Error - no such user","originalRequest":{"method":"GET","header":[{"key":"x-api-key","value":"{{api_id}}","description":"**REQUIRED** - API ID of the customer - see your Mailkit account Profile/Integrations","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"**REQUIRED** - the hash of the event as returned by initEvent call","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"**REQUIRED FOR CLIENT-TO-SERVER** - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"**SERVER-TO-SERVER ONLY** - Server-to-Server calls should be authenticated by the API Hash instead of host domain. **DO NOT USE FOR CLIENT INTEGRATIONS** as it would reveal your secret hash to the user!","type":"text"},{"key":"Referer","value":"{{referer}}","description":"URL of the webpage where the event has taken place","type":"text","disabled":true}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.mailkit.eu/api/js_v2/recommUser"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 06 Sep 2021 10:05:29 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 404,\n    \"message\": \"User \\\"49430f121a30ff26fec53ee51ed8a2ff\\\" does not exist!\"\n}"}],"_postman_id":"c8390269-6ed9-443a-b018-24f674fb3bb7"},{"name":"recommItem - Retrieve related product recommendations","event":[{"listen":"test","script":{"id":"d1a91f60-e031-480e-bc34-1e3e6b7b98f0","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r",""],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"26cd9440-ba7e-4a4b-b80b-9e1adc269fe5","exec":[""],"type":"text/javascript"}}],"id":"05faa71c-7a47-4e35-9a08-735e658ac64d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"x-api-key","value":"{{api_id}}","description":"<p><strong>REQUIRED</strong> - API ID of the customer - see your Mailkit account Profile/Integrations</p>\n","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"<p><strong>REQUIRED</strong> - the hash of the event as returned by initEvent call</p>\n","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"<p><strong>REQUIRED FOR CLIENT-TO-SERVER</strong> - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)</p>\n","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"<p><strong>SERVER-TO-SERVER ONLY</strong> - Server-to-Server calls should be authenticated by the API Hash instead of host domain. <strong>DO NOT USE FOR CLIENT INTEGRATIONS</strong> as it would reveal your secret hash to the user!</p>\n","type":"text"}],"body":{"mode":"formdata","formdata":[]},"url":"https://api.mailkit.eu/api/js_v2/recommItem?product_id={{item_id}}&count=4","description":"<h2 id=\"retrieve-recommended-related-products\">Retrieve recommended related products</h2>\n<p>Returns a list of recommended related products from the Recombee API.</p>\n<p>See <a href=\"https://docs.recombee.com/api.html#recommend-items-to-item\">https://docs.recombee.com/api.html#recommend-items-to-item</a> for complete documentation.</p>\n<p><strong>This endpoint requires an active Recombee connection</strong></p>\n","urlObject":{"path":["recommItem"],"host":["https://api.mailkit.eu/api/js_v2"],"query":[{"description":{"content":"<p><strong>REQUIRED</strong> ID of the item for which the recommendations are to be generated.</p>\n","type":"text/plain"},"key":"product_id","value":"{{item_id}}"},{"description":{"content":"<p>Number of items to be recommended (N for the top-N recommendation).</p>\n","type":"text/plain"},"key":"count","value":"4"},{"disabled":true,"description":{"content":"<p>Scenario defines a particular application of recommendations. It can be for example “homepage”, “cart” or “emailing”. You can set various settings to the scenario in the Recombee Admin UI.</p>\n","type":"text/plain"},"key":"scenario","value":null},{"disabled":true,"description":{"content":"<p>If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows for example rotations in the following recommendations for that user, as the user will be already known to the system.</p>\n","type":"text/plain"},"key":"cascadeCreate","value":"false"},{"disabled":true,"description":{"content":"<p>With returnProperties=true, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used for easy displaying of the recommended items to the user.</p>\n","type":"text/plain"},"key":"returnProperties","value":"true"},{"disabled":true,"description":{"content":"<p>Boolean-returning ReQL expression which allows you to filter recommended items based on the values of their attributes.</p>\n","type":"text/plain"},"key":"filter","value":null},{"disabled":true,"description":{"content":"<p>Number-returning ReQL expression which allows you to boost recommendation rate of some items based on the values of their attributes.</p>\n","type":"text/plain"},"key":"booster","value":null},{"disabled":true,"description":{"content":"<p>Logic specifies particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. See this section for list of available logics and other details.</p>\n","type":"text/plain"},"key":"logic","value":null},{"disabled":true,"description":{"content":"<p><strong>Expert option</strong> Specifies the threshold of how much relevant must the recommended items be to the user. Possible values one of: “low”, “medium”, “high”.</p>\n","type":"text/plain"},"key":"minRelevance","value":null},{"disabled":true,"description":{"content":"<p><strong>Expert option</strong> If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times.</p>\n","type":"text/plain"},"key":"rotationRate","value":null},{"disabled":true,"description":{"content":"<p><strong>Expert option</strong> Taking rotationRate into account, specifies how long time it takes to an item to recover from the penalization.</p>\n","type":"text/plain"},"key":"rotationTime","value":null}],"variable":[]}},"response":[{"id":"ca12acce-0895-40bf-84f0-ff30ef735ece","name":"Success - related items","originalRequest":{"method":"GET","header":[{"key":"x-api-key","value":"{{api_id}}","description":"**REQUIRED** - API ID of the customer - see your Mailkit account Profile/Integrations","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"**REQUIRED** - the hash of the event as returned by initEvent call","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"**REQUIRED FOR CLIENT-TO-SERVER** - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"**SERVER-TO-SERVER ONLY** - Server-to-Server calls should be authenticated by the API Hash instead of host domain. **DO NOT USE FOR CLIENT INTEGRATIONS** as it would reveal your secret hash to the user!","type":"text"},{"key":"Referer","value":"{{referer}}","description":"URL of the webpage where the event has taken place","type":"text","disabled":true}],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"https://api.mailkit.eu/api/js_v2/recommItem?product_id={{item_id}}&count=4","host":["https://api.mailkit.eu/api/js_v2"],"path":["recommItem"],"query":[{"key":"product_id","value":"{{item_id}}","description":"ID of the item for which the recommendations are to be generated.","type":"text"},{"key":"count","value":"4","description":"Number of items to be recommended (N for the top-N recommendation)."},{"key":"scenario","value":null,"description":"Scenario defines a particular application of recommendations. It can be for example “homepage”, “cart” or “emailing”. You can set various settings to the scenario in the Recombee Admin UI.","type":"text","disabled":true},{"key":"cascadeCreate","value":"false","description":"If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows for example rotations in the following recommendations for that user, as the user will be already known to the system.","type":"text","disabled":true},{"key":"returnProperties","value":"true","description":"With returnProperties=true, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used for easy displaying of the recommended items to the user.","disabled":true},{"key":"filter","value":null,"description":"Boolean-returning ReQL expression which allows you to filter recommended items based on the values of their attributes.","type":"text","disabled":true},{"key":"booster","value":null,"description":"Number-returning ReQL expression which allows you to boost recommendation rate of some items based on the values of their attributes.","type":"text","disabled":true},{"key":"logic","value":null,"description":"Logic specifies particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. See this section for list of available logics and other details.","type":"text","disabled":true},{"key":"minRelevance","value":null,"description":"**Expert option** Specifies the threshold of how much relevant must the recommended items be to the user. Possible values one of: “low”, “medium”, “high”.","type":"text","disabled":true},{"key":"rotationRate","value":null,"description":"**Expert option** If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times.","type":"text","disabled":true},{"key":"rotationTime","value":null,"description":"**Expert option** Taking rotationRate into account, specifies how long time it takes to an item to recover from the penalization.","type":"text","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 06 Sep 2021 10:57:08 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Keep-Alive","value":"timeout=5, max=99"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"numberNextRecommsCalls\": 0,\n    \"recommId\": \"a2101d46bfc068d6f7b0003097b28fa5\",\n    \"recomms\": [\n        {\n            \"id\": \"14333\"\n        },\n        {\n            \"id\": \"serw\"\n        },\n        {\n            \"id\": \"727187\"\n        },\n        {\n            \"id\": \"727188\"\n        }\n    ]\n}"},{"id":"cc87642f-2bb7-48cf-b179-0730aa2611df","name":"Error - no such item","originalRequest":{"method":"GET","header":[{"key":"x-api-key","value":"{{api_id}}","description":"**REQUIRED** - API ID of the customer - see your Mailkit account Profile/Integrations","type":"text"},{"key":"x-event-hash","value":"{{hash}}","description":"**REQUIRED** - the hash of the event as returned by initEvent call","type":"text"},{"key":"x-event-host","value":"{{host}}","description":"**REQUIRED FOR CLIENT-TO-SERVER** - hostname of the request originator (must be listed in allowed domains in Profile/Integrations)","type":"text"},{"key":"x-api-hash","value":"{{api_hash}}","description":"**SERVER-TO-SERVER ONLY** - Server-to-Server calls should be authenticated by the API Hash instead of host domain. **DO NOT USE FOR CLIENT INTEGRATIONS** as it would reveal your secret hash to the user!","type":"text"},{"key":"Referer","value":"{{referer}}","description":"URL of the webpage where the event has taken place","type":"text","disabled":true}],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"https://api.mailkit.eu/api/js_v2/recommItem?product_id={{item_id}}xxx&count=4","host":["https://api.mailkit.eu/api/js_v2"],"path":["recommItem"],"query":[{"key":"product_id","value":"{{item_id}}xxx","description":"ID of the item for which the recommendations are to be generated."},{"key":"count","value":"4","description":"Number of items to be recommended (N for the top-N recommendation)."},{"key":"scenario","value":null,"description":"Scenario defines a particular application of recommendations. It can be for example “homepage”, “cart” or “emailing”. You can set various settings to the scenario in the Recombee Admin UI.","type":"text","disabled":true},{"key":"cascadeCreate","value":"false","description":"If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows for example rotations in the following recommendations for that user, as the user will be already known to the system.","type":"text","disabled":true},{"key":"returnProperties","value":"true","description":"With returnProperties=true, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used for easy displaying of the recommended items to the user.","disabled":true},{"key":"filter","value":null,"description":"Boolean-returning ReQL expression which allows you to filter recommended items based on the values of their attributes.","type":"text","disabled":true},{"key":"booster","value":null,"description":"Number-returning ReQL expression which allows you to boost recommendation rate of some items based on the values of their attributes.","type":"text","disabled":true},{"key":"logic","value":null,"description":"Logic specifies particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. See this section for list of available logics and other details.","type":"text","disabled":true},{"key":"minRelevance","value":null,"description":"**Expert option** Specifies the threshold of how much relevant must the recommended items be to the user. Possible values one of: “low”, “medium”, “high”.","type":"text","disabled":true},{"key":"rotationRate","value":null,"description":"**Expert option** If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times.","type":"text","disabled":true},{"key":"rotationTime","value":null,"description":"**Expert option** Taking rotationRate into account, specifies how long time it takes to an item to recover from the penalization.","type":"text","disabled":true}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 06 Sep 2021 10:58:13 GMT"},{"key":"Server","value":"Apache/2.4.25 (Debian)"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 404,\n    \"message\": \"Item \\\"SKUno001xxx\\\" does not exist!\"\n}"}],"_postman_id":"05faa71c-7a47-4e35-9a08-735e658ac64d"}],"id":"76ef0374-39da-4c59-a7b2-a450a9c83891","description":"<p>EventAPI endpoint can provide recommendations from Recombee engine. For this feature to be available a Recombee connection must be setup in your account under Profile/Integrations.</p>\n<p>The EventAPI acts as a proxy allowing you to use a single API endpoint instead of having multiple individual integrations.</p>\n","_postman_id":"76ef0374-39da-4c59-a7b2-a450a9c83891"}],"event":[{"listen":"prerequest","script":{"id":"e1f7c1b6-fa70-4cab-aa2a-66853afc4f6b","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"4df5c93e-95c9-4daf-a94f-7c16ed8b2193","type":"text/javascript","exec":[""]}}],"variable":[{"key":"BASE_URL","value":"https://api.mailkit.eu/api/js_v2"}]}