{"info":{"_postman_id":"c8e90b0f-34fc-4eee-acad-2a11b04fc75c","name":"GraphQL Extra Fee","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"10589000","collectionId":"c8e90b0f-34fc-4eee-acad-2a11b04fc75c","publishedId":"UzBto4Qt","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-06-29T04:47:42.000Z"},"item":[{"name":"Update Extra Fee with Customer","id":"1d61e349-18fd-43c0-a603-fd5af8a0d51d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"mutation{\r\n  MpExtraFeeRules(\r\n        area:\"2\",\r\n        cart_id:\"FecZaLNmTQSry4KO1UGbr1HC9qNNEENN\",\r\n        address_information:{\r\n        shipping_address: {\r\n            region: \"New York\",\r\n            region_id: 43,\r\n            country_code: \"US\",\r\n            street: [\r\n                \"123 Oak Ave\"\r\n            ],\r\n            postcode: \"10577\",\r\n            city: \"Purchase\",\r\n            firstname: \"Jane\",\r\n            lastname: \"Doe\",\r\n            telephone: \"512-555-1111\"\r\n         },\r\n        billing_address: {\r\n            region: \"New York\",\r\n            region_id: 43,\r\n            country_code: \"US\",\r\n            street: [\r\n                \"123 Oak Ave\"\r\n            ],\r\n            postcode: \"10577\",\r\n            city: \"Purchase\",\r\n            firstname: \"Jane\",\r\n            lastname: \"Doe\",\r\n            telephone: \"512-555-1111\"\r\n        },\r\n\r\n    }\r\n    )  \r\n    {\r\n      selected_options,\r\n      \r\n      rules{\r\n        payment_method{\r\n        rule_id\r\n        name\r\n        status\r\n        store_ids\r\n        customer_groups\r\n        priority\r\n        conditions_serialized\r\n        apply_type\r\n        fee_type\r\n        amount\r\n        area\r\n        display_type\r\n        is_required\r\n        fee_tax\r\n        sort_order\r\n        refundable\r\n        stop_further_processing\r\n        labels\r\n        options\r\n        created_at\r\n        updated_at\r\n        },\r\n        shipping_method{\r\n        rule_id\r\n        name\r\n        status\r\n        store_ids\r\n        customer_groups\r\n        priority\r\n        conditions_serialized\r\n        apply_type\r\n        fee_type\r\n        amount\r\n        area\r\n        display_type\r\n        is_required\r\n        fee_tax\r\n        sort_order\r\n        refundable\r\n        stop_further_processing\r\n        labels\r\n        options\r\n        created_at\r\n        updated_at\r\n        },\r\n        cart_summary{\r\n        rule_id\r\n        name\r\n        status\r\n        store_ids\r\n        customer_groups\r\n        priority\r\n        conditions_serialized\r\n        apply_type\r\n        fee_type\r\n        amount\r\n        area\r\n        display_type\r\n        is_required\r\n        fee_tax\r\n        sort_order\r\n        refundable\r\n        stop_further_processing\r\n        labels\r\n        options\r\n        created_at\r\n        updated_at\r\n      }\r\n      }\r\n      \r\n    }  \r\n    }\r\n    \r\n    \r\n","variables":""}},"url":"{{magento_base_url}}graphql","urlObject":{"host":["{{magento_base_url}}graphql"],"query":[],"variable":[]}},"response":[{"id":"b3e4b598-2b3f-444f-97f0-79cf6b4908e0","name":"Update Extra Fee with Customer Example","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"mutation{\r\n  MpExtraFeeRules(\r\n        area:\"2\",\r\n        cart_id:\"FecZaLNmTQSry4KO1UGbr1HC9qNNEENN\",\r\n        address_information:{\r\n        shipping_address: {\r\n            region: \"New York\",\r\n            region_id: 43,\r\n            country_code: \"US\",\r\n            street: [\r\n                \"123 Oak Ave\"\r\n            ],\r\n            postcode: \"10577\",\r\n            city: \"Purchase\",\r\n            firstname: \"Jane\",\r\n            lastname: \"Doe\",\r\n            telephone: \"512-555-1111\"\r\n         },\r\n        billing_address: {\r\n            region: \"New York\",\r\n            region_id: 43,\r\n            country_code: \"US\",\r\n            street: [\r\n                \"123 Oak Ave\"\r\n            ],\r\n            postcode: \"10577\",\r\n            city: \"Purchase\",\r\n            firstname: \"Jane\",\r\n            lastname: \"Doe\",\r\n            telephone: \"512-555-1111\"\r\n        },\r\n\r\n    }\r\n    )  \r\n    {\r\n      selected_options,\r\n      \r\n      rules{\r\n        payment_method{\r\n        rule_id\r\n        name\r\n        status\r\n        store_ids\r\n        customer_groups\r\n        priority\r\n        conditions_serialized\r\n        apply_type\r\n        fee_type\r\n        amount\r\n        area\r\n        display_type\r\n        is_required\r\n        fee_tax\r\n        sort_order\r\n        refundable\r\n        stop_further_processing\r\n        labels\r\n        options\r\n        created_at\r\n        updated_at\r\n        },\r\n        shipping_method{\r\n        rule_id\r\n        name\r\n        status\r\n        store_ids\r\n        customer_groups\r\n        priority\r\n        conditions_serialized\r\n        apply_type\r\n        fee_type\r\n        amount\r\n        area\r\n        display_type\r\n        is_required\r\n        fee_tax\r\n        sort_order\r\n        refundable\r\n        stop_further_processing\r\n        labels\r\n        options\r\n        created_at\r\n        updated_at\r\n        },\r\n        cart_summary{\r\n        rule_id\r\n        name\r\n        status\r\n        store_ids\r\n        customer_groups\r\n        priority\r\n        conditions_serialized\r\n        apply_type\r\n        fee_type\r\n        amount\r\n        area\r\n        display_type\r\n        is_required\r\n        fee_tax\r\n        sort_order\r\n        refundable\r\n        stop_further_processing\r\n        labels\r\n        options\r\n        created_at\r\n        updated_at\r\n      }\r\n      }\r\n      \r\n    }  \r\n    }\r\n    \r\n    \r\n","variables":""}},"url":"{{magento_base_url}}graphql"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 29 Jun 2022 04:48:43 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Tue, 29 Jun 2021 04:48:43 GMT"},{"key":"Cache-Control","value":"max-age=0, must-revalidate, no-cache, no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Set-Cookie","value":"PHPSESSID=0cbpv4euneq97s9ng0k7a6duku; expires=Wed, 29-Jun-2022 05:48:43 GMT; Max-Age=3600; path=/dangmaianh/ce243p1/pub; domain=dev.mageplaza.vn; HttpOnly; SameSite=Lax"},{"key":"Set-Cookie","value":"private_content_version=da63cfd31afd85bd1c4899e6f4cc5c5b; expires=Sat, 26-Jun-2032 04:48:43 GMT; Max-Age=315360000; path=/; SameSite=Lax"},{"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":"2438"},{"key":"Content-Type","value":"application/json"},{"key":"X-Varnish","value":"4530871"},{"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        \"MpExtraFeeRules\": {\n            \"selected_options\": \"{\\\"2\\\":\\\"option_0\\\",\\\"3\\\":{\\\"option_0\\\":\\\"option_0\\\",\\\"option_1\\\":\\\"option_1\\\"}}\",\n            \"rules\": {\n                \"payment_method\": null,\n                \"shipping_method\": [\n                    {\n                        \"rule_id\": 1,\n                        \"name\": \"Extra Fee\",\n                        \"status\": 1,\n                        \"store_ids\": \"0\",\n                        \"customer_groups\": \"0,1,2,3\",\n                        \"priority\": 0,\n                        \"conditions_serialized\": null,\n                        \"apply_type\": 2,\n                        \"fee_type\": 1,\n                        \"amount\": 20,\n                        \"area\": 2,\n                        \"display_type\": 1,\n                        \"is_required\": 0,\n                        \"fee_tax\": 0,\n                        \"sort_order\": 0,\n                        \"refundable\": 0,\n                        \"stop_further_processing\": 0,\n                        \"labels\": \"{\\\"1\\\":\\\"\\\",\\\"4\\\":\\\"\\\",\\\"5\\\":\\\"\\\",\\\"6\\\":\\\"\\\"}\",\n                        \"options\": \"{\\\"option\\\":{\\\"order\\\":{\\\"option_0\\\":\\\"1\\\",\\\"option_1\\\":\\\"2\\\",\\\"option_2\\\":\\\"3\\\"},\\\"value\\\":{\\\"option_0\\\":{\\\"type\\\":\\\"1\\\",\\\"amount\\\":5,\\\"0\\\":\\\"8-Hour shipping fee\\\",\\\"1\\\":\\\"\\\",\\\"4\\\":\\\"\\\",\\\"5\\\":\\\"\\\",\\\"6\\\":\\\"\\\",\\\"calculated_amount\\\":5,\\\"calculated_amount_incl_tax\\\":5},\\\"option_1\\\":{\\\"type\\\":\\\"2\\\",\\\"amount\\\":15,\\\"0\\\":\\\"4-Hour shipping fee\\\",\\\"1\\\":\\\"\\\",\\\"4\\\":\\\"\\\",\\\"5\\\":\\\"\\\",\\\"6\\\":\\\"\\\",\\\"calculated_amount\\\":15,\\\"calculated_amount_incl_tax\\\":15},\\\"option_2\\\":{\\\"type\\\":\\\"3\\\",\\\"amount\\\":10,\\\"0\\\":\\\"1-Hour shipping fee\\\",\\\"1\\\":\\\"\\\",\\\"4\\\":\\\"\\\",\\\"5\\\":\\\"\\\",\\\"6\\\":\\\"\\\",\\\"calculated_amount\\\":4.4,\\\"calculated_amount_incl_tax\\\":4.4}},\\\"delete\\\":{\\\"option_0\\\":\\\"\\\",\\\"option_1\\\":\\\"\\\",\\\"option_2\\\":\\\"\\\"}},\\\"default\\\":[\\\"option_1\\\"],\\\"dropdown_attribute_validation\\\":\\\"\\\",\\\"dropdown_attribute_validation_unique\\\":\\\"\\\"}\",\n                        \"created_at\": \"2022-06-23 04:52:05\",\n                        \"updated_at\": \"2022-06-29 03:47:48\"\n                    },\n                    {\n                        \"rule_id\": 2,\n                        \"name\": \"Normal Shipping (2-5 days)\",\n                        \"status\": 1,\n                        \"store_ids\": \"0\",\n                        \"customer_groups\": \"0,1,2,3\",\n                        \"priority\": 0,\n                        \"conditions_serialized\": null,\n                        \"apply_type\": 2,\n                        \"fee_type\": 1,\n                        \"amount\": 20,\n                        \"area\": 2,\n                        \"display_type\": 1,\n                        \"is_required\": 0,\n                        \"fee_tax\": 0,\n                        \"sort_order\": 0,\n                        \"refundable\": 0,\n                        \"stop_further_processing\": 0,\n                        \"labels\": \"{\\\"1\\\":\\\"\\\",\\\"4\\\":\\\"\\\",\\\"5\\\":\\\"\\\",\\\"6\\\":\\\"\\\"}\",\n                        \"options\": \"{\\\"option\\\":{\\\"order\\\":{\\\"option_0\\\":\\\"1\\\",\\\"option_1\\\":\\\"2\\\"},\\\"value\\\":{\\\"option_0\\\":{\\\"type\\\":\\\"1\\\",\\\"amount\\\":3,\\\"0\\\":\\\"Exchange fee per item\\\",\\\"1\\\":\\\"\\\",\\\"4\\\":\\\"\\\",\\\"5\\\":\\\"\\\",\\\"6\\\":\\\"\\\",\\\"calculated_amount\\\":3,\\\"calculated_amount_incl_tax\\\":3},\\\"option_1\\\":{\\\"type\\\":\\\"2\\\",\\\"amount\\\":15,\\\"0\\\":\\\"Whole Cart\\\",\\\"1\\\":\\\"\\\",\\\"4\\\":\\\"\\\",\\\"5\\\":\\\"\\\",\\\"6\\\":\\\"\\\",\\\"calculated_amount\\\":15,\\\"calculated_amount_incl_tax\\\":15}},\\\"delete\\\":{\\\"option_0\\\":\\\"\\\",\\\"option_1\\\":\\\"\\\"}},\\\"default\\\":[],\\\"dropdown_attribute_validation\\\":\\\"\\\",\\\"dropdown_attribute_validation_unique\\\":\\\"\\\"}\",\n                        \"created_at\": \"2022-06-29 03:50:38\",\n                        \"updated_at\": \"2022-06-29 04:00:46\"\n                    }\n                ],\n                \"cart_summary\": null\n            }\n        }\n    }\n}"}],"_postman_id":"1d61e349-18fd-43c0-a603-fd5af8a0d51d"},{"name":"Extra Fee Select Option","id":"314f6a76-5b41-40e6-a5aa-7c54769495a3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"mutation {\r\n  MpExtraFeeSelectOptions(\r\n      cart_id: \"FecZaLNmTQSry4KO1UGbr1HC9qNNEENN\",\r\n      area:\"2\",\r\n      formData:\"rule%5B2%5D=option_0&rule%5B3%5D%5Boption_0%5D=option_0&rule%5B3%5D%5Boption_1%5D=option_1\"\r\n  ){\r\n    code,\r\n    title,\r\n    value,\r\n    currency\r\n  }\r\n}","variables":""}},"url":"{{magento_base_url}}graphql","urlObject":{"host":["{{magento_base_url}}graphql"],"query":[],"variable":[]}},"response":[{"id":"93523eb4-be14-4179-b1b9-b819a93c817b","name":"Extra Fee Select Option Example","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"mutation {\r\n  MpExtraFeeSelectOptions(\r\n      cart_id: \"FecZaLNmTQSry4KO1UGbr1HC9qNNEENN\",\r\n      area:\"2\",\r\n      formData:\"rule%5B2%5D=option_0&rule%5B3%5D%5Boption_0%5D=option_0&rule%5B3%5D%5Boption_1%5D=option_1\"\r\n  ){\r\n    code,\r\n    title,\r\n    value,\r\n    currency\r\n  }\r\n}","variables":""}},"url":"{{magento_base_url}}graphql"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 29 Jun 2022 04:41:02 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Tue, 29 Jun 2021 04:41:03 GMT"},{"key":"Cache-Control","value":"max-age=0, must-revalidate, no-cache, no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Set-Cookie","value":"PHPSESSID=0cbpv4euneq97s9ng0k7a6duku; expires=Wed, 29-Jun-2022 05:41:02 GMT; Max-Age=3600; path=/dangmaianh/ce243p1/pub; domain=dev.mageplaza.vn; HttpOnly; SameSite=Lax"},{"key":"Set-Cookie","value":"private_content_version=ac5a89fa0aa5dcae7f8dde3cc24e853f; expires=Sat, 26-Jun-2032 04:41:02 GMT; Max-Age=315360000; path=/; SameSite=Lax"},{"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":"592"},{"key":"Content-Type","value":"application/json"},{"key":"X-Varnish","value":"4285994"},{"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        \"MpExtraFeeSelectOptions\": [\n            {\n                \"code\": \"subtotal\",\n                \"title\": \"Subtotal\",\n                \"value\": 22,\n                \"currency\": null\n            },\n            {\n                \"code\": \"shipping\",\n                \"title\": \"Shipping & Handling (Flat Rate - Fixed)\",\n                \"value\": 0,\n                \"currency\": null\n            },\n            {\n                \"code\": \"tax\",\n                \"title\": \"Tax\",\n                \"value\": 0,\n                \"currency\": null\n            },\n            {\n                \"code\": \"mp_extra_fee_rule_1_option_0\",\n                \"title\": \"8-Hour shipping fee\",\n                \"value\": 5,\n                \"currency\": null\n            },\n            {\n                \"code\": \"mp_extra_fee_rule_2_option_0\",\n                \"title\": \"Exchange fee per item\",\n                \"value\": 3,\n                \"currency\": null\n            },\n            {\n                \"code\": \"osc_gift_wrap\",\n                \"title\": \"Gift Wrap\",\n                \"value\": 0,\n                \"currency\": null\n            },\n            {\n                \"code\": \"grand_total\",\n                \"title\": \"Grand Total\",\n                \"value\": 35,\n                \"currency\": null\n            }\n        ]\n    }\n}"}],"_postman_id":"314f6a76-5b41-40e6-a5aa-7c54769495a3"}]}