{"info":{"_postman_id":"b3e5d33f-69aa-460f-ae44-26d67d1dd4fe","name":"Milestone","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"10589000","collectionId":"b3e5d33f-69aa-460f-ae44-26d67d1dd4fe","publishedId":"T1LJm8wp","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-08-10T02:55:07.000Z"},"item":[{"name":"Get Rule by ID","id":"b33da7fa-6b61-44db-bf52-162e343ffc3a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Bearer {{admin_token}}","type":"text"}],"url":"{{magento_base_url}}/rest/V1/mpMilestone/rules/:id","urlObject":{"path":["rest","V1","mpMilestone","rules",":id"],"host":["{{magento_base_url}}"],"query":[],"variable":[{"type":"string","value":"1","key":"id"}]}},"response":[{"id":"1fa56415-82ac-4576-b685-dfe9b1893fce","name":"Get Rule by ID Example","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Bearer {{admin_token}}","type":"text"}],"url":{"raw":"{{magento_base_url}}/rest/V1/mpMilestone/rules/:id","host":["{{magento_base_url}}"],"path":["rest","V1","mpMilestone","rules",":id"],"variable":[{"key":"id","value":"1"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 10 Aug 2020 02:39:35 GMT"},{"key":"Set-Cookie","value":"PHPSESSID=bq41bon1qocslkntqikos8uq11; expires=Mon, 10-Aug-2020 03:39:35 GMT; Max-Age=3600; path=/api/ce235; domain=dev.mageplaza.vn; HttpOnly"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"493"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"X-Varnish","value":"590968"},{"key":"Via","value":"1.1 varnish (Varnish/6.1)"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"-1"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate, max-age=0"},{"key":"Accept-Ranges","value":"bytes"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"rule_id\": 1,\n    \"name\": \"Rule 1\",\n    \"description\": \"mageplaza test\",\n    \"is_active\": 1,\n    \"website\": \"1\",\n    \"from_date\": \"2020-08-10\",\n    \"to_date\": \"2020-08-14\",\n    \"priority\": 0,\n    \"condition\": {\n        \"condition_type\": \"Magento\\\\Rule\\\\Model\\\\Condition\\\\Combine\",\n        \"aggregator_type\": \"all\",\n        \"operator\": null,\n        \"value\": \"1\"\n    },\n    \"original\": \"1\",\n    \"destination\": \"3\",\n    \"process_type\": \"events\",\n    \"process_event\": \"order\",\n    \"coupon_rule\": \"0\",\n    \"email_template\": \"mpmilestone_customer_template\",\n    \"created_at\": \"2020-08-10 02:32:45\",\n    \"updated_at\": \"2020-08-10 02:39:02\"\n}"}],"_postman_id":"b33da7fa-6b61-44db-bf52-162e343ffc3a"},{"name":"Get Rule List","id":"5f6bf99d-2d34-4c30-bea6-165136f4b78b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"Bearer {{admin_token}}"}],"url":"{{magento_base_url}}/rest/V1/mpMilestone/rules?searchCriteria[filter_groups][0][filters][0][field]=is_active&searchCriteria[filter_groups][0][filters][0][value]=1&searchCriteria[filter_groups][0][filters][0][condition_type]=eq","description":"<p>You can filter by using params SearchCriteria</p>\n","urlObject":{"path":["rest","V1","mpMilestone","rules"],"host":["{{magento_base_url}}"],"query":[{"key":"searchCriteria[filter_groups][0][filters][0][field]","value":"is_active"},{"key":"searchCriteria[filter_groups][0][filters][0][value]","value":"1"},{"key":"searchCriteria[filter_groups][0][filters][0][condition_type]","value":"eq"}],"variable":[]}},"response":[{"id":"50b2b3bc-d16a-460e-a7b9-af81d522c48a","name":"Get Rule List Example","originalRequest":{"method":"GET","header":[{"key":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"Bearer {{admin_token}}"}],"url":{"raw":"{{magento_base_url}}/rest/V1/mpMilestone/rules?searchCriteria[filter_groups][0][filters][0][field]=is_active&searchCriteria[filter_groups][0][filters][0][value]=1&searchCriteria[filter_groups][0][filters][0][condition_type]=eq","host":["{{magento_base_url}}"],"path":["rest","V1","mpMilestone","rules"],"query":[{"key":"searchCriteria[filter_groups][0][filters][0][field]","value":"is_active"},{"key":"searchCriteria[filter_groups][0][filters][0][value]","value":"1"},{"key":"searchCriteria[filter_groups][0][filters][0][condition_type]","value":"eq"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 10 Aug 2020 02:39:18 GMT"},{"key":"Set-Cookie","value":"PHPSESSID=bq41bon1qocslkntqikos8uq11; expires=Mon, 10-Aug-2020 03:39:18 GMT; Max-Age=3600; path=/api/ce235; domain=dev.mageplaza.vn; HttpOnly"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"629"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"X-Varnish","value":"590965"},{"key":"Via","value":"1.1 varnish (Varnish/6.1)"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"-1"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate, max-age=0"},{"key":"Accept-Ranges","value":"bytes"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"items\": [\n        {\n            \"rule_id\": 1,\n            \"name\": \"Rule 1\",\n            \"description\": \"mageplaza test\",\n            \"is_active\": 1,\n            \"website\": \"1\",\n            \"from_date\": \"2020-08-10\",\n            \"to_date\": \"2020-08-14\",\n            \"priority\": 0,\n            \"condition\": {\n                \"condition_type\": \"Magento\\\\Rule\\\\Model\\\\Condition\\\\Combine\",\n                \"aggregator_type\": \"all\",\n                \"operator\": null,\n                \"value\": \"1\"\n            },\n            \"original\": \"1\",\n            \"destination\": \"3\",\n            \"process_type\": \"events\",\n            \"process_event\": \"order\",\n            \"coupon_rule\": \"0\",\n            \"email_template\": \"mpmilestone_customer_template\",\n            \"created_at\": \"2020-08-10 02:32:45\",\n            \"updated_at\": \"2020-08-10 02:39:02\"\n        }\n    ],\n    \"search_criteria\": {\n        \"filter_groups\": [\n            {\n                \"filters\": [\n                    {\n                        \"field\": \"is_active\",\n                        \"value\": \"1\",\n                        \"condition_type\": \"eq\"\n                    }\n                ]\n            }\n        ]\n    },\n    \"total_count\": 1\n}"}],"_postman_id":"5f6bf99d-2d34-4c30-bea6-165136f4b78b"},{"name":"Create/Update Rule","id":"47d866df-2fa0-47c4-8388-416a7e776e88","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"Bearer {{admin_token}}"}],"body":{"mode":"raw","raw":"{\r\n    \"rule\": {\r\n        \"name\": \"create/update rule by api\",\r\n        \"description\": \"mageplaza test\",\r\n        \"is_active\": 1,\r\n        \"website\": \"1\",\r\n        \"from_date\": \"2020-08-10\",\r\n        \"to_date\": \"2020-08-14\",\r\n        \"priority\": 0,\r\n        \"condition\": {\r\n            \"condition_type\": \"Magento\\\\Rule\\\\Model\\\\Condition\\\\Combine\",\r\n            \"aggregator_type\": \"all\",\r\n            \"operator\": null,\r\n            \"value\": \"1\"\r\n        },\r\n        \"original\": \"1\",\r\n        \"destination\": \"3\",\r\n        \"process_type\": \"events\",\r\n        \"process_event\": \"order\",\r\n        \"coupon_rule\": \"1\",\r\n        \"email_template\": \"mpmilestone_customer_template\"\r\n    }\r\n}"},"url":"{{magento_base_url}}/rest/V1/mpMilestone/rules","description":"<p>To update rule, please add \"rule_id\" field in the Body section.</p>\n","urlObject":{"path":["rest","V1","mpMilestone","rules"],"host":["{{magento_base_url}}"],"query":[],"variable":[]}},"response":[{"id":"193f88f8-2467-401a-b014-0ea197e876b9","name":"Create Rule Example","originalRequest":{"method":"POST","header":[{"key":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"Bearer {{admin_token}}"}],"body":{"mode":"raw","raw":"{\r\n    \"rule\": {\r\n        \"name\": \"create rule by api\",\r\n        \"description\": \"mageplaza test\",\r\n        \"is_active\": 1,\r\n        \"website\": \"1\",\r\n        \"from_date\": \"2020-08-10\",\r\n        \"to_date\": \"2020-08-14\",\r\n        \"priority\": 0,\r\n        \"condition\": {\r\n            \"condition_type\": \"Magento\\\\Rule\\\\Model\\\\Condition\\\\Combine\",\r\n            \"aggregator_type\": \"all\",\r\n            \"operator\": null,\r\n            \"value\": \"1\"\r\n        },\r\n        \"original\": \"1\",\r\n        \"destination\": \"3\",\r\n        \"process_type\": \"events\",\r\n        \"process_event\": \"order\",\r\n        \"coupon_rule\": \"1\",\r\n        \"email_template\": \"mpmilestone_customer_template\"\r\n    }\r\n}"},"url":"{{magento_base_url}}/rest/V1/mpMilestone/rules"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 10 Aug 2020 02:32:45 GMT"},{"key":"Set-Cookie","value":"PHPSESSID=bq41bon1qocslkntqikos8uq11; expires=Mon, 10-Aug-2020 03:32:45 GMT; Max-Age=3600; path=/api/ce235; domain=dev.mageplaza.vn; HttpOnly"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"505"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"X-Varnish","value":"362358"},{"key":"Via","value":"1.1 varnish (Varnish/6.1)"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"-1"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate, max-age=0"},{"key":"Accept-Ranges","value":"bytes"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"rule_id\": 1,\n    \"name\": \"create rule by api\",\n    \"description\": \"mageplaza test\",\n    \"is_active\": 1,\n    \"website\": \"1\",\n    \"from_date\": \"2020-08-10\",\n    \"to_date\": \"2020-08-14\",\n    \"priority\": 0,\n    \"condition\": {\n        \"condition_type\": \"Magento\\\\Rule\\\\Model\\\\Condition\\\\Combine\",\n        \"aggregator_type\": \"all\",\n        \"operator\": null,\n        \"value\": \"1\"\n    },\n    \"original\": \"1\",\n    \"destination\": \"3\",\n    \"process_type\": \"events\",\n    \"process_event\": \"order\",\n    \"coupon_rule\": \"1\",\n    \"email_template\": \"mpmilestone_customer_template\",\n    \"created_at\": \"2020-08-10 02:32:45\",\n    \"updated_at\": \"2020-08-10 02:32:45\"\n}"},{"id":"995aab99-3502-45bd-ad0e-e61640824aec","name":"Update Rule Example","originalRequest":{"method":"POST","header":[{"key":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"Bearer {{admin_token}}"}],"body":{"mode":"raw","raw":"{\r\n    \"rule\": {\r\n        \"rule_id\": 1,\r\n        \"name\": \"update rule by api\",\r\n        \"description\": \"mageplaza test\",\r\n        \"is_active\": 1,\r\n        \"website\": \"1\",\r\n        \"from_date\": \"2020-08-10\",\r\n        \"to_date\": \"2020-08-14\",\r\n        \"priority\": 0,\r\n        \"condition\": {\r\n            \"condition_type\": \"Magento\\\\Rule\\\\Model\\\\Condition\\\\Combine\",\r\n            \"aggregator_type\": \"all\",\r\n            \"operator\": null,\r\n            \"value\": \"1\"\r\n        },\r\n        \"original\": \"1\",\r\n        \"destination\": \"3\",\r\n        \"process_type\": \"events\",\r\n        \"process_event\": \"order\",\r\n        \"coupon_rule\": \"1\",\r\n        \"email_template\": \"mpmilestone_customer_template\"\r\n    }\r\n}"},"url":"{{magento_base_url}}/rest/V1/mpMilestone/rules"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 10 Aug 2020 02:34:34 GMT"},{"key":"Set-Cookie","value":"PHPSESSID=bq41bon1qocslkntqikos8uq11; expires=Mon, 10-Aug-2020 03:34:34 GMT; Max-Age=3600; path=/api/ce235; domain=dev.mageplaza.vn; HttpOnly"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"505"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"X-Varnish","value":"362361"},{"key":"Via","value":"1.1 varnish (Varnish/6.1)"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"-1"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate, max-age=0"},{"key":"Accept-Ranges","value":"bytes"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"rule_id\": 1,\n    \"name\": \"update rule by api\",\n    \"description\": \"mageplaza test\",\n    \"is_active\": 1,\n    \"website\": \"1\",\n    \"from_date\": \"2020-08-10\",\n    \"to_date\": \"2020-08-14\",\n    \"priority\": 0,\n    \"condition\": {\n        \"condition_type\": \"Magento\\\\Rule\\\\Model\\\\Condition\\\\Combine\",\n        \"aggregator_type\": \"all\",\n        \"operator\": null,\n        \"value\": \"1\"\n    },\n    \"original\": \"1\",\n    \"destination\": \"3\",\n    \"process_type\": \"events\",\n    \"process_event\": \"order\",\n    \"coupon_rule\": \"1\",\n    \"email_template\": \"mpmilestone_customer_template\",\n    \"created_at\": \"2020-08-10 02:32:45\",\n    \"updated_at\": \"2020-08-10 02:34:34\"\n}"}],"_postman_id":"47d866df-2fa0-47c4-8388-416a7e776e88"},{"name":"Delete Rule","id":"a45f6500-f768-43bb-881d-ac499fcde499","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"Bearer {{admin_token}}"}],"url":"{{magento_base_url}}/rest/V1/mpMilestone/rules/:id","urlObject":{"path":["rest","V1","mpMilestone","rules",":id"],"host":["{{magento_base_url}}"],"query":[],"variable":[{"type":"string","value":"3","key":"id"}]}},"response":[{"id":"9ddbc2c1-611b-4e43-8531-b8e54d4c5540","name":"Delete Rule Example","originalRequest":{"method":"DELETE","header":[{"key":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"Bearer {{admin_token}}"}],"url":{"raw":"{{magento_base_url}}/rest/V1/mpMilestone/rules/:id","host":["{{magento_base_url}}"],"path":["rest","V1","mpMilestone","rules",":id"],"variable":[{"key":"id","value":"3"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 10 Aug 2020 02:40:30 GMT"},{"key":"Set-Cookie","value":"PHPSESSID=bq41bon1qocslkntqikos8uq11; expires=Mon, 10-Aug-2020 03:40:30 GMT; Max-Age=3600; path=/api/ce235; domain=dev.mageplaza.vn; HttpOnly"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"4"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"X-Varnish","value":"362473"},{"key":"Via","value":"1.1 varnish (Varnish/6.1)"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"-1"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate, max-age=0"},{"key":"Accept-Ranges","value":"bytes"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"true"}],"_postman_id":"a45f6500-f768-43bb-881d-ac499fcde499"},{"name":"Get Customer Group","id":"13bef84a-f74b-42e7-8292-e9d9c037efa7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"Bearer {{customer_token}}"}],"url":"{{magento_base_url}}/rest/V1/mpMilestone/mine/customer-group","urlObject":{"path":["rest","V1","mpMilestone","mine","customer-group"],"host":["{{magento_base_url}}"],"query":[],"variable":[]}},"response":[{"id":"66599f31-88c7-48e0-8d74-2b9317077119","name":"Get Customer Group Example","originalRequest":{"method":"GET","header":[{"key":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"Bearer {{customer_token}}"}],"url":"{{magento_base_url}}/rest/V1/mpMilestone/mine/customer-group"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 10 Aug 2020 02:41:26 GMT"},{"key":"Set-Cookie","value":"PHPSESSID=bq41bon1qocslkntqikos8uq11; expires=Mon, 10-Aug-2020 03:41:26 GMT; Max-Age=3600; path=/api/ce235; domain=dev.mageplaza.vn; HttpOnly"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"11"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"X-Varnish","value":"590982"},{"key":"Via","value":"1.1 varnish (Varnish/6.1)"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"-1"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate, max-age=0"},{"key":"Accept-Ranges","value":"bytes"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"\"Wholesale\""}],"_postman_id":"13bef84a-f74b-42e7-8292-e9d9c037efa7"}]}