{"info":{"_postman_id":"e87b4951-c150-4292-bb8d-9d0f7793640d","name":"GrapQL Free Gift","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json"},"item":[{"name":"Get Gifts By Product SKU","id":"3ce169de-ac4e-4902-b915-bf83c016b5cd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"graphql"},"url":"{{magento_base_url}}graphql"},"response":[{"id":"5fc9b600-2884-4e87-941d-2020319f0558","name":"Get Gifts By Product SKU Example","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"query{\r\n  mpFreeGiftsByProductSku(\r\n    sku:\"24-MB01\"\r\n  )\r\n  {\r\n    rule_id\r\n    auto_add\r\n    max_gift\r\n    gifts{\r\n      id\r\n      name\r\n      gift_price\r\n      free_ship\r\n      added\r\n      configurable\r\n      required_option\r\n      final_price\r\n    }\r\n    total_added\r\n  }\r\n}\r\n","variables":""}},"url":"{{magento_base_url}}graphql"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 20 Feb 2020 09:45:11 GMT"},{"key":"Expires","value":"Wed, 20 Feb 2019 09:45:21 GMT"},{"key":"Cache-Control","value":"max-age=0, must-revalidate, no-cache, no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Set-Cookie","value":"PHPSESSID=rqcf3smclqrkgt5t6svo5dh4tr; expires=Thu, 20-Feb-2020 10:45:20 GMT; Max-Age=3600; path=/api/api; domain=develop.mageplaza.com; HttpOnly"},{"key":"Set-Cookie","value":"private_content_version=a235888140607516e55d0fdaa28a2034; expires=Sun, 17-Feb-2030 09:45:20 GMT; Max-Age=315360000; path=/"},{"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":"1050"},{"key":"Content-Type","value":"application/json"},{"key":"Age","value":"0"},{"key":"X-Cache","value":"MISS"},{"key":"X-Cache-Hits","value":"0"},{"key":"Accept-Ranges","value":"bytes"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"mpFreeGiftsByProductSku\": [\n            {\n                \"rule_id\": \"2\",\n                \"auto_add\": 1,\n                \"max_gift\": 6,\n                \"gifts\": [\n                    {\n                        \"id\": 3,\n                        \"name\": \"Crown Summit Backpack\",\n                        \"gift_price\": \"$7.60\",\n                        \"free_ship\": 1,\n                        \"added\": false,\n                        \"configurable\": false,\n                        \"required_option\": false,\n                        \"final_price\": \"$38.00\"\n                    },\n                    {\n                        \"id\": 4,\n                        \"name\": \"Wayfarer Messenger Bag\",\n                        \"gift_price\": \"$30.00\",\n                        \"free_ship\": 0,\n                        \"added\": false,\n                        \"configurable\": false,\n                        \"required_option\": false,\n                        \"final_price\": \"$45.00\"\n                    },\n                    {\n                        \"id\": 5,\n                        \"name\": \"Rival Field Messenger\",\n                        \"gift_price\": \"$0.00\",\n                        \"free_ship\": 1,\n                        \"added\": false,\n                        \"configurable\": false,\n                        \"required_option\": false,\n                        \"final_price\": \"$45.00\"\n                    },\n                    {\n                        \"id\": 2030,\n                        \"name\": \"Ina Compression Short\",\n                        \"gift_price\": \"$4.90\",\n                        \"free_ship\": 0,\n                        \"added\": false,\n                        \"configurable\": true,\n                        \"required_option\": false,\n                        \"final_price\": \"$49.00\"\n                    },\n                    {\n                        \"id\": 2023,\n                        \"name\": \"Ana Running Short\",\n                        \"gift_price\": \"$40.00\",\n                        \"free_ship\": 0,\n                        \"added\": false,\n                        \"configurable\": true,\n                        \"required_option\": false,\n                        \"final_price\": \"$40.00\"\n                    },\n                    {\n                        \"id\": 68,\n                        \"name\": \"Chaz Kangeroo Hoodie\",\n                        \"gift_price\": \"$0.00\",\n                        \"free_ship\": 1,\n                        \"added\": false,\n                        \"configurable\": true,\n                        \"required_option\": false,\n                        \"final_price\": \"$52.00\"\n                    }\n                ],\n                \"total_added\": 0\n            }\n        ]\n    }\n}"}],"_postman_id":"3ce169de-ac4e-4902-b915-bf83c016b5cd"},{"name":"Get Gifts By Quote Item ID","id":"608bb7fb-fa37-4d1d-88b5-76e9831f8577","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"graphql"},"url":"{{magento_base_url}}graphql"},"response":[{"id":"ded15f00-4c8d-4c99-922e-bf8dddc308a2","name":"Get Gifts By Quote Item ID Example","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"query{\n    mpFreeGiftsByQuoteItem(\n        item_id:56\n    \n        )\n        {\n    rule_id\n    auto_add\n    max_gift\n    gifts{\n      id\n      name\n      gift_price\n      free_ship\n      added\n      configurable\n      required_option\n      final_price\n    }\n    total_added\n  }\n}","variables":""}},"url":"{{magento_base_url}}graphql"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 20 Feb 2020 09:45:13 GMT"},{"key":"Expires","value":"Wed, 20 Feb 2019 09:45: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=rqcf3smclqrkgt5t6svo5dh4tr; expires=Thu, 20-Feb-2020 10:45:21 GMT; Max-Age=3600; path=/api/api; domain=develop.mageplaza.com; HttpOnly"},{"key":"Set-Cookie","value":"private_content_version=4b639a8e3c1dc5cfe9daa968c9c041fc; expires=Sun, 17-Feb-2030 09:45:21 GMT; Max-Age=315360000; path=/"},{"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":"1045"},{"key":"Content-Type","value":"application/json"},{"key":"Age","value":"0"},{"key":"X-Cache","value":"MISS"},{"key":"X-Cache-Hits","value":"0"},{"key":"Accept-Ranges","value":"bytes"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"mpFreeGiftsByQuoteItem\": [\n            {\n                \"rule_id\": \"2\",\n                \"auto_add\": 1,\n                \"max_gift\": 6,\n                \"gifts\": [\n                    {\n                        \"id\": 3,\n                        \"name\": \"Crown Summit Backpack\",\n                        \"gift_price\": \"$7.60\",\n                        \"free_ship\": 1,\n                        \"added\": true,\n                        \"configurable\": false,\n                        \"required_option\": false,\n                        \"final_price\": \"$38.00\"\n                    },\n                    {\n                        \"id\": 4,\n                        \"name\": \"Wayfarer Messenger Bag\",\n                        \"gift_price\": \"$30.00\",\n                        \"free_ship\": 0,\n                        \"added\": false,\n                        \"configurable\": false,\n                        \"required_option\": false,\n                        \"final_price\": \"$45.00\"\n                    },\n                    {\n                        \"id\": 5,\n                        \"name\": \"Rival Field Messenger\",\n                        \"gift_price\": \"$0.00\",\n                        \"free_ship\": 1,\n                        \"added\": true,\n                        \"configurable\": false,\n                        \"required_option\": false,\n                        \"final_price\": \"$45.00\"\n                    },\n                    {\n                        \"id\": 2030,\n                        \"name\": \"Ina Compression Short\",\n                        \"gift_price\": \"$4.90\",\n                        \"free_ship\": 0,\n                        \"added\": true,\n                        \"configurable\": true,\n                        \"required_option\": false,\n                        \"final_price\": \"$49.00\"\n                    },\n                    {\n                        \"id\": 2023,\n                        \"name\": \"Ana Running Short\",\n                        \"gift_price\": \"$40.00\",\n                        \"free_ship\": 0,\n                        \"added\": true,\n                        \"configurable\": true,\n                        \"required_option\": false,\n                        \"final_price\": \"$40.00\"\n                    },\n                    {\n                        \"id\": 68,\n                        \"name\": \"Chaz Kangeroo Hoodie\",\n                        \"gift_price\": \"$0.00\",\n                        \"free_ship\": 1,\n                        \"added\": false,\n                        \"configurable\": true,\n                        \"required_option\": false,\n                        \"final_price\": \"$52.00\"\n                    }\n                ],\n                \"total_added\": 4\n            }\n        ]\n    }\n}"}],"_postman_id":"608bb7fb-fa37-4d1d-88b5-76e9831f8577"},{"name":"Add Gift By ID","id":"b04f7a18-3190-44ff-bbfd-d1e68e4aff81","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"graphql"},"url":"{{magento_base_url}}graphql"},"response":[{"id":"48805762-8b11-4b7e-932e-3bc040d40f5f","name":"Add Gift By ID Example","originalRequest":{"method":"POST","header":[{"key":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"graphql","graphql":{"query":"mutation{\n    mpFreeGiftsAddGift(\n        input:{\n            cart_id:\"ooB8hmUh62VTJvhDoS05W0AFnOYnRg38\"\n            rule_id:2,\n          gift_id: 68,\n             configurable_options: [\n                {\n                    option_id: 93\n                    option_value: 5479\n                },\n                {\n                    option_id: 142\n                    option_value: 1\n                }\n            ]\n           \n        }\n        \n        )\n        {\n            status\n            message\n            rule_id\n            quote_id\n            quote_item_id\n            product_gift_id\n        }\n}","variables":""}},"url":"{{magento_base_url}}graphql"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 21 Feb 2020 09:16:35 GMT"},{"key":"Expires","value":"Thu, 21 Feb 2019 09:16:36 GMT"},{"key":"Cache-Control","value":"max-age=0, must-revalidate, no-cache, no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Set-Cookie","value":"PHPSESSID=m53mloj7k2j1vhqtn297rl2r97; expires=Fri, 21-Feb-2020 10:16:35 GMT; Max-Age=3600; path=/api/api; domain=develop.mageplaza.com; HttpOnly"},{"key":"Set-Cookie","value":"private_content_version=24007e5ed74692389fd6dad6760d2be1; expires=Mon, 18-Feb-2030 09:16:35 GMT; Max-Age=315360000; path=/"},{"key":"Set-Cookie","value":"private_content_version=04931d407d22ea68137706c014a2c8b0; expires=Mon, 18-Feb-2030 09:16:36 GMT; Max-Age=315360000; path=/"},{"key":"Set-Cookie","value":"private_content_version=9b2e6566a7b05eaa2adaadc49971e684; expires=Mon, 18-Feb-2030 09:16:36 GMT; Max-Age=315360000; path=/"},{"key":"X-Magento-Debug","value":"1"},{"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":"178"},{"key":"Content-Type","value":"application/json"},{"key":"Age","value":"0"},{"key":"X-Cache","value":"MISS"},{"key":"X-Cache-Hits","value":"0"},{"key":"Accept-Ranges","value":"bytes"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"mpFreeGiftsAddGift\": {\n            \"status\": \"error\",\n            \"message\": \"You need to choose options for your item.\",\n            \"rule_id\": \"2\",\n            \"quote_id\": \"88\",\n            \"quote_item_id\": null,\n            \"product_gift_id\": \"68\"\n        }\n    }\n}"}],"_postman_id":"b04f7a18-3190-44ff-bbfd-d1e68e4aff81"},{"name":"Delete Gift By Quote Item ID","id":"a015e2c5-26ae-4a81-9090-498d07835287","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"graphql"},"url":"{{magento_base_url}}graphql"},"response":[{"id":"2032e294-6f38-41f5-8cfa-5cc60f3f0ca9","name":"Delete Gift By Quote Item ID Example","originalRequest":{"method":"POST","header":[{"key":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"graphql","graphql":{"query":"mutation{\n    mpFreeGiftsDeleteByQuoteItem(\n        cart_id:\"ooB8hmUh62VTJvhDoS05W0AFnOYnRg38\"\n        item_id:537\n        )\n        \n}","variables":""}},"url":"{{magento_base_url}}graphql"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 20 Feb 2020 10:36:19 GMT"},{"key":"Expires","value":"Wed, 20 Feb 2019 10:36:28 GMT"},{"key":"Cache-Control","value":"max-age=0, must-revalidate, no-cache, no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Set-Cookie","value":"PHPSESSID=rqcf3smclqrkgt5t6svo5dh4tr; expires=Thu, 20-Feb-2020 11:36:27 GMT; Max-Age=3600; path=/api/api; domain=develop.mageplaza.com; HttpOnly"},{"key":"Set-Cookie","value":"private_content_version=3674efac9e8f27c282d0950b1c09e497; expires=Sun, 17-Feb-2030 10:36:27 GMT; Max-Age=315360000; path=/"},{"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":"Content-Type","value":"application/json"},{"key":"Age","value":"0"},{"key":"X-Cache","value":"MISS"},{"key":"X-Cache-Hits","value":"0"},{"key":"Accept-Ranges","value":"bytes"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"mpFreeGiftsDeleteByQuoteItem\": true\n    }\n}"}],"_postman_id":"a015e2c5-26ae-4a81-9090-498d07835287"}]}