{"info":{"_postman_id":"13a838b8-f89a-4cc1-a613-7255b8a1b6f0","name":"Magento 2 Loyalty Program GraphQL","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"10589000","collectionId":"13a838b8-f89a-4cc1-a613-7255b8a1b6f0","publishedId":"TVsrEoVD","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-12-17T02:49:44.000Z"},"item":[{"name":"Get Loyalty Program Dashboard","id":"10cd5b3b-6d64-42bd-92ec-abba6101e78c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","type":"text","value":"Bearer {{customer_token}}"}],"body":{"mode":"graphql","graphql":{"query":"query {\r\n\tcustomer {\r\n\t\tmp_loyalty_program_dashboard {\r\n\t\t\tstatistics {\r\n\t\t\t\tdescription\r\n\t\t\t\tis_email_enabled\r\n\t\t\t\tis_enable_email_notify\r\n\t\t\t\tprogram_name\r\n\t\t\t\tto\r\n\t\t\t\tcols {\r\n\t\t\t\t\tduration\r\n\t\t\t\t\tend\r\n\t\t\t\t\tname\r\n\t\t\t\t\tstart\r\n\t\t\t\t}\r\n\t\t\t\trows {\r\n\t\t\t\t\trow {\r\n\t\t\t\t\t\tname\r\n\t\t\t\t\t\tvalue\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbenefit\r\n\t\t}\r\n\t}\r\n}\r\n","variables":""}},"url":"{{magento_base_url}}/graphql","urlObject":{"path":["graphql"],"host":["{{magento_base_url}}"],"query":[],"variable":[]}},"response":[{"id":"9d2efdd7-359f-44a5-b288-9a00653a78c6","name":"Get Loyalty Program Dashboard Example","originalRequest":{"method":"POST","header":[{"key":"Authorization","type":"text","value":"Bearer {{customer_token}}"}],"body":{"mode":"graphql","graphql":{"query":"query {\r\n\tcustomer {\r\n\t\tmp_loyalty_program_dashboard {\r\n\t\t\tstatistics {\r\n\t\t\t\tdescription\r\n\t\t\t\tis_email_enabled\r\n\t\t\t\tis_enable_email_notify\r\n\t\t\t\tprogram_name\r\n\t\t\t\tto\r\n\t\t\t\tcols {\r\n\t\t\t\t\tduration\r\n\t\t\t\t\tend\r\n\t\t\t\t\tname\r\n\t\t\t\t\tstart\r\n\t\t\t\t}\r\n\t\t\t\trows {\r\n\t\t\t\t\trow {\r\n\t\t\t\t\t\tname\r\n\t\t\t\t\t\tvalue\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbenefit\r\n\t\t}\r\n\t}\r\n}\r\n","variables":""}},"url":"{{magento_base_url}}/graphql"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 17 Dec 2020 02:51:46 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Tue, 17 Dec 2019 02:51:50 GMT"},{"key":"Cache-Control","value":"max-age=0, must-revalidate, no-cache, no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Set-Cookie","value":"PHPSESSID=vdje6oj38o0iv21bmigkefa8u6; expires=Thu, 17-Dec-2020 03:51:49 GMT; Max-Age=3600; path=/quynh/ce240c; domain=192.168.1.200; HttpOnly"},{"key":"Set-Cookie","value":"private_content_version=2186ddd4042e89369f1df31f4309f72b; expires=Sun, 15-Dec-2030 02:51:49 GMT; Max-Age=315360000; path=/"},{"key":"X-Magento-Tags","value":"FPC"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"1736"},{"key":"Content-Type","value":"application/json"},{"key":"X-Varnish","value":"1101752"},{"key":"Age","value":"0"},{"key":"Via","value":"1.1 varnish (Varnish/5.2)"},{"key":"Accept-Ranges","value":"bytes"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"customer\": {\n            \"mp_loyalty_program_dashboard\": {\n                \"statistics\": {\n                    \"description\": \"<p>Discount upto 50%</p>\",\n                    \"is_email_enabled\": 1,\n                    \"is_enable_email_notify\": 1,\n                    \"program_name\": \"Vip Program\",\n                    \"to\": \"Jan 5, 2021\",\n                    \"cols\": [\n                        {\n                            \"duration\": null,\n                            \"end\": null,\n                            \"name\": \"Name\",\n                            \"start\": null\n                        },\n                        {\n                            \"duration\": \"day\",\n                            \"end\": \"0\",\n                            \"name\": \"Day\",\n                            \"start\": \"1\"\n                        },\n                        {\n                            \"duration\": \"month\",\n                            \"end\": \"0\",\n                            \"name\": \"Month\",\n                            \"start\": \"1\"\n                        },\n                        {\n                            \"duration\": \"year\",\n                            \"end\": \"0\",\n                            \"name\": \"Year\",\n                            \"start\": \"1\"\n                        }\n                    ],\n                    \"rows\": [\n                        {\n                            \"row\": [\n                                {\n                                    \"name\": \"Number of Order\",\n                                    \"value\": \"\"\n                                },\n                                {\n                                    \"name\": \"Number of Order\",\n                                    \"value\": \"0\"\n                                },\n                                {\n                                    \"name\": \"Number of Order\",\n                                    \"value\": \"2\"\n                                },\n                                {\n                                    \"name\": \"Number of Order\",\n                                    \"value\": \"2\"\n                                }\n                            ]\n                        },\n                        {\n                            \"row\": [\n                                {\n                                    \"name\": \"Total Order Amount\",\n                                    \"value\": \"\"\n                                },\n                                {\n                                    \"name\": \"Total Order Amount\",\n                                    \"value\": \"$0.00\"\n                                },\n                                {\n                                    \"name\": \"Total Order Amount\",\n                                    \"value\": \"$76.03\"\n                                },\n                                {\n                                    \"name\": \"Total Order Amount\",\n                                    \"value\": \"$76.03\"\n                                }\n                            ]\n                        },\n                        {\n                            \"row\": [\n                                {\n                                    \"name\": \"Average Order Amount\",\n                                    \"value\": \"\"\n                                },\n                                {\n                                    \"name\": \"Average Order Amount\",\n                                    \"value\": \"$0.00\"\n                                },\n                                {\n                                    \"name\": \"Average Order Amount\",\n                                    \"value\": \"$38.02\"\n                                },\n                                {\n                                    \"name\": \"Average Order Amount\",\n                                    \"value\": \"$38.02\"\n                                }\n                            ]\n                        }\n                    ]\n                },\n                \"benefit\": \"<div>\\n                <p>\\n                    <span>Welcome to the loyalty program for our customers at our store.</span><br/>\\n                    <span>When you become our customer, all the time and money that you spend on our website will\\n                    give you special offers/discounts. Stay in our website and start shopping now.</span>\\n                </p>\\n                <p>\\n                    <strong>Loyalty Program Name</strong><br/>\\n                    <span>- You can receive a certain discount for each product or an order</span><br/>\\n                    <span>- You can also get special coupon codes to apply to certain cart</span><br/>\\n                </p>\\n        </div>\"\n            }\n        }\n    }\n}"}],"_postman_id":"10cd5b3b-6d64-42bd-92ec-abba6101e78c"},{"name":"Customer Change Email Notify","id":"ab3f521a-dd85-4d3d-8017-e63c735b3198","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{customer_token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"mutation{\r\n  MpLoyaltyProgramNotification(status:true)\r\n}","variables":""}},"url":"{{magento_base_url}}/graphql","description":"<p>\"status\" has two values:</p>\n<ul>\n<li>true: customers receive email notifications related to loyalty program</li>\n<li>false: customers don't receive email notifications related to loyalty program</li>\n</ul>\n","urlObject":{"path":["graphql"],"host":["{{magento_base_url}}"],"query":[],"variable":[]}},"response":[{"id":"a3f2e95c-345e-4d1f-80d4-78a5cf919424","name":"Customer Change Email Notify Example","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{customer_token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"mutation{\r\n  MpLoyaltyProgramNotification(status:true)\r\n}","variables":""}},"url":"{{magento_base_url}}/graphql"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 17 Dec 2020 02:07:22 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Tue, 17 Dec 2019 02:07:22 GMT"},{"key":"Cache-Control","value":"max-age=0, must-revalidate, no-cache, no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Set-Cookie","value":"PHPSESSID=6iieqp4tb3ma1ql8o63b96vqci; expires=Thu, 17-Dec-2020 03:07:22 GMT; Max-Age=3600; path=/quynh/ce236a; domain=192.168.1.100; HttpOnly"},{"key":"Set-Cookie","value":"private_content_version=082b6f4a9d3fb62a8f6a75730db2eec2; expires=Sun, 15-Dec-2030 02:07:22 GMT; Max-Age=315360000; path=/"},{"key":"X-Magento-Cache-Control","value":"max-age=0, must-revalidate, no-cache, no-store"},{"key":"X-Magento-Tags","value":"FPC"},{"key":"X-Magento-Cache-Debug","value":"MISS"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"46"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"MpLoyaltyProgramNotification\": true\n    }\n}"}],"_postman_id":"ab3f521a-dd85-4d3d-8017-e63c735b3198"}]}