{"info":{"_postman_id":"ad6ca158-4a39-4843-9c43-db49f0ef0023","name":"Magento 2 Affiliate GraphQL & Example","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"10589000","collectionId":"ad6ca158-4a39-4843-9c43-db49f0ef0023","publishedId":"U16nLQVw","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-09-14T09:20:48.000Z"},"item":[{"name":"Get Affiliate Config Info","id":"d053a167-f3be-4668-91bf-f56e1a0fe498","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"graphql","graphql":{"query":"query {\r\n\tMpAffiliateConfigs {\r\n\t\taccount {\r\n\t\t\tbalance_limit\r\n\t\t\tbalance_negative\r\n\t\t\tsign_up_admin_approved\r\n\t\t\tsign_up_default_email_notification\r\n\t\t\tsign_up_default_group\r\n\t\t\tterm_conditions_checkbox_text\r\n\t\t\tterm_conditions_default_checkbox\r\n\t\t\tterm_conditions_enable\r\n\t\t\tterm_conditions_html\r\n\t\t\tterm_conditions_title\r\n\t\t}\r\n\t\tcommission {\r\n\t\t\tby_tax\r\n\t\t\tshipping\r\n\t\t\tprocess {\r\n\t\t\t\tearn_commission_invoice\r\n\t\t\t\tholding_days\r\n\t\t\t\trefund\r\n\t\t\t}\r\n\t\t}\r\n\t\tgeneral {\r\n\t\t\tenable_banner\r\n\t\t\tenabled\r\n\t\t\texpired_time\r\n\t\t\toverwrite_cookies\r\n\t\t\tpage_welcome\r\n\t\t\tshow_link\r\n\t\t\turl_code_length\r\n\t\t\turl_param\r\n\t\t\turl_prefix\r\n\t\t\turl_type\r\n\t\t\tuse_code_as_coupon\r\n\t\t}\r\n\t\trefer {\r\n\t\t\taccount_sharing\r\n\t\t\tdefault_link\r\n\t\t\tenable\r\n\t\t\tsharing_content {\r\n\t\t\t\temail_content\r\n\t\t\t\tsubject\r\n\t\t\t}\r\n\t\t}\r\n\t\twithdraw {\r\n\t\t\tallow_request\r\n\t\t\tmaximum\r\n\t\t\tminimum\r\n\t\t\tminimum_balance\r\n\t\t\tpayment_method\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":"c86e5499-c0a1-4f6d-a2b8-2d578c6f964f","name":"Get Affiliate Config Info Example","originalRequest":{"method":"POST","header":[],"body":{"mode":"graphql","graphql":{"query":"query {\r\n\tMpAffiliateConfigs {\r\n\t\taccount {\r\n\t\t\tbalance_limit\r\n\t\t\tbalance_negative\r\n\t\t\tsign_up_admin_approved\r\n\t\t\tsign_up_default_email_notification\r\n\t\t\tsign_up_default_group\r\n\t\t\tterm_conditions_checkbox_text\r\n\t\t\tterm_conditions_default_checkbox\r\n\t\t\tterm_conditions_enable\r\n\t\t\tterm_conditions_html\r\n\t\t\tterm_conditions_title\r\n\t\t}\r\n\t\tcommission {\r\n\t\t\tby_tax\r\n\t\t\tshipping\r\n\t\t\tprocess {\r\n\t\t\t\tearn_commission_invoice\r\n\t\t\t\tholding_days\r\n\t\t\t\trefund\r\n\t\t\t}\r\n\t\t}\r\n\t\tgeneral {\r\n\t\t\tenable_banner\r\n\t\t\tenabled\r\n\t\t\texpired_time\r\n\t\t\toverwrite_cookies\r\n\t\t\tpage_welcome\r\n\t\t\tshow_link\r\n\t\t\turl_code_length\r\n\t\t\turl_param\r\n\t\t\turl_prefix\r\n\t\t\turl_type\r\n\t\t\tuse_code_as_coupon\r\n\t\t}\r\n\t\trefer {\r\n\t\t\taccount_sharing\r\n\t\t\tdefault_link\r\n\t\t\tenable\r\n\t\t\tsharing_content {\r\n\t\t\t\temail_content\r\n\t\t\t\tsubject\r\n\t\t\t}\r\n\t\t}\r\n\t\twithdraw {\r\n\t\t\tallow_request\r\n\t\t\tmaximum\r\n\t\t\tminimum\r\n\t\t\tminimum_balance\r\n\t\t\tpayment_method\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":"Wed, 22 Sep 2021 03:16:36 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Tue, 22 Sep 2020 03: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=9id5avb9ohjutq8i63csjv41s7; expires=Wed, 22-Sep-2021 04:16:36 GMT; Max-Age=3600; path=/quynh/ce237a; domain=192.168.1.200; HttpOnly; SameSite=Lax"},{"key":"Set-Cookie","value":"private_content_version=f316e25cfa16fe8d055a5a57f4803321; expires=Sat, 20-Sep-2031 03:16:36 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":"1429"},{"key":"Content-Type","value":"application/json"},{"key":"X-Varnish","value":"592713"},{"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        \"MpAffiliateConfigs\": {\n            \"account\": {\n                \"balance_limit\": 100,\n                \"balance_negative\": false,\n                \"sign_up_admin_approved\": 1,\n                \"sign_up_default_email_notification\": 0,\n                \"sign_up_default_group\": 1,\n                \"term_conditions_checkbox_text\": \"I agree to the terms and conditions 000\",\n                \"term_conditions_default_checkbox\": true,\n                \"term_conditions_enable\": true,\n                \"term_conditions_html\": \"affiliate-referfriend-description\",\n                \"term_conditions_title\": \"Terms and Conditions 111\"\n            },\n            \"commission\": {\n                \"by_tax\": true,\n                \"shipping\": true,\n                \"process\": {\n                    \"earn_commission_invoice\": true,\n                    \"holding_days\": 2,\n                    \"refund\": true\n                }\n            },\n            \"general\": {\n                \"enable_banner\": true,\n                \"enabled\": true,\n                \"expired_time\": 365,\n                \"overwrite_cookies\": true,\n                \"page_welcome\": \"women-left-menu-block\",\n                \"show_link\": \",footer_link,top_link\",\n                \"url_code_length\": \"10\",\n                \"url_param\": \"code\",\n                \"url_prefix\": \"u\",\n                \"url_type\": \"hash\",\n                \"use_code_as_coupon\": true\n            },\n            \"refer\": {\n                \"account_sharing\": \"2\",\n                \"default_link\": null,\n                \"enable\": true,\n                \"sharing_content\": {\n                    \"email_content\": \"I've been shopping at {{store_name}} and feel really happy. They provide good customer service and reasonable prices.\",\n                    \"subject\": \"Good product and services\"\n                }\n            },\n            \"withdraw\": {\n                \"allow_request\": true,\n                \"maximum\": 100,\n                \"minimum\": 20,\n                \"minimum_balance\": 50,\n                \"payment_method\": \"{\\\"offline\\\":{\\\"label\\\":\\\"Offline payment\\\",\\\"fee\\\":\\\"1\\\",\\\"active\\\":\\\"1\\\"},\\\"banktranfer\\\":{\\\"label\\\":\\\"Bank Tranfer\\\",\\\"fee\\\":\\\"0\\\",\\\"active\\\":\\\"1\\\"},\\\"paypal\\\":{\\\"label\\\":\\\"Paypal payment\\\",\\\"fee\\\":\\\"2\\\",\\\"active\\\":\\\"1\\\"},\\\"__empty\\\":\\\"\\\"}\"\n            }\n        }\n    }\n}"}],"_postman_id":"d053a167-f3be-4668-91bf-f56e1a0fe498"},{"name":"Customer Get Affiliate Signup Information","id":"6f5dea46-db1f-45c1-bcce-a0f303c1d79d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{customer_token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"query {\r\n\tMpAffiliateSignupInformation {\r\n\t\tcheckbox_text\r\n\t\tcms_block\r\n\t\tis_checked\r\n\t\ttitle\r\n\t}\r\n}\r\n","variables":""}},"url":"{{magento_base_url}}/graphql","urlObject":{"path":["graphql"],"host":["{{magento_base_url}}"],"query":[],"variable":[]}},"response":[{"id":"c4051b9a-a7a2-4bf2-a5d9-0d0f6e9c15b4","name":"Customer Get Affiliate Signup Information Example","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{customer_token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"query {\r\n\tMpAffiliateSignupInformation {\r\n\t\tcheckbox_text\r\n\t\tcms_block\r\n\t\tis_checked\r\n\t\ttitle\r\n\t}\r\n}\r\n","variables":""}},"url":"{{magento_base_url}}/graphql"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 14 Sep 2021 07:09:57 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Mon, 14 Sep 2020 07:09:57 GMT"},{"key":"Cache-Control","value":"max-age=0, must-revalidate, no-cache, no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Set-Cookie","value":"PHPSESSID=89d8dvj8ntfitgeppa5rhclirg; expires=Tue, 14-Sep-2021 08:09:57 GMT; Max-Age=3600; path=/quynh/ce243b/pub; domain=dev.mageplaza.vn; HttpOnly; SameSite=Lax"},{"key":"Set-Cookie","value":"private_content_version=fd387ac69897541ae1e0b1cebf8263d7; expires=Fri, 12-Sep-2031 07:09:57 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":"1932"},{"key":"Content-Type","value":"application/json"},{"key":"X-Varnish","value":"167665"},{"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        \"MpAffiliateSignupInformation\": {\n            \"checkbox_text\": \"I agree to the terms and conditions\",\n            \"cms_block\": \"<p>By filling out the signup form you acknowledge that you have read the terms and conditions, understand, and agree with them.</p>\\n<h3>Joining the Program</h3>\\n<p>By filling out the signup form, and upon acceptance, you will become an affiliate and are bound by the terms of this agreement. Your participation in the program is solely for this purpose: to legally advertise our website to receive a commission on products purchased by your referred individuals.</p>\\n<h3>Affiliate Responsibilities</h3>\\n<p>It is understood that you will introduce our products to your current and prospective customers and will comply with all laws as well those that govern email marketing and anti-spam laws.  reserves the right to accept or reject any prospective customers and will pay you a commission per customer referred using your affiliate code according to the designated payment schedule.</p>\\n<p>Either you or  may terminate the Affiliate relationship at any time. You are only eligible to earn Affiliate payments during your time as an approved Affiliate.  may change the program or service policies and operating procedures at any time.</p>\\n<h3>Affiliate Relationship</h3>\\n<p>This Affiliate relationship is one of independent contractors.  will not be liable for indirect, special or consequential damages arising in connection with this program and our aggregate liability arising with respect to this program will not exceed the total referral fees paid or payable to you. Interspire makes no express or implied warranties or representations with respect to the program. In addition,  makes no representation that the operation of the service will be uninterrupted or error-free, and  will not be liable for the consequences of any interruptions or errors.</p>\",\n            \"is_checked\": 1,\n            \"title\": \"Terms and Conditions\"\n        }\n    }\n}"}],"_postman_id":"6f5dea46-db1f-45c1-bcce-a0f303c1d79d"},{"name":"Customer Get Affiliate Campaigns Information","id":"e10573fb-bdd4-4cd1-95e9-17d8b8470267","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{customer_token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"query {\r\n\tMpAffiliateCampaigns {\r\n\t\tactions_serialized\r\n\t\taffiliate_group_ids\r\n\t\tapply_discount_on_tax\r\n\t\tapply_to_shipping\r\n\t\tcampaign_id\r\n\t\tcode_format\r\n\t\tcode_length\r\n\t\tcommission\r\n\t\tconditions_serialized\r\n\t\tcoupon_code\r\n\t\tcreated_at\r\n\t\tdescription\r\n\t\tdiscount_action\r\n\t\tdiscount_amount\r\n\t\tdiscount_description\r\n\t\tdiscount_qty\r\n\t\tdiscount_step\r\n\t\tdisplay\r\n\t\tfrom_date\r\n\t\tname\r\n\t\tsort_order\r\n\t\tstatus\r\n\t\tto_date\r\n\t\tupdated_at\r\n\t\twebsite_ids\r\n\t}\r\n}\r\n","variables":""}},"url":"{{magento_base_url}}/graphql","urlObject":{"path":["graphql"],"host":["{{magento_base_url}}"],"query":[],"variable":[]}},"response":[{"id":"16cd0140-ef24-4efe-b4ca-8a14c296cef3","name":"Customer Get Affiliate Campaigns Information Example","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{customer_token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"query {\r\n\tMpAffiliateCampaigns {\r\n\t\tactions_serialized\r\n\t\taffiliate_group_ids\r\n\t\tapply_discount_on_tax\r\n\t\tapply_to_shipping\r\n\t\tcampaign_id\r\n\t\tcode_format\r\n\t\tcode_length\r\n\t\tcommission\r\n\t\tconditions_serialized\r\n\t\tcoupon_code\r\n\t\tcreated_at\r\n\t\tdescription\r\n\t\tdiscount_action\r\n\t\tdiscount_amount\r\n\t\tdiscount_description\r\n\t\tdiscount_qty\r\n\t\tdiscount_step\r\n\t\tdisplay\r\n\t\tfrom_date\r\n\t\tname\r\n\t\tsort_order\r\n\t\tstatus\r\n\t\tto_date\r\n\t\tupdated_at\r\n\t\twebsite_ids\r\n\t}\r\n}\r\n","variables":""}},"url":"{{magento_base_url}}/graphql"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 14 Sep 2021 07:11:57 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Mon, 14 Sep 2020 07:11:57 GMT"},{"key":"Cache-Control","value":"max-age=0, must-revalidate, no-cache, no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Set-Cookie","value":"PHPSESSID=89d8dvj8ntfitgeppa5rhclirg; expires=Tue, 14-Sep-2021 08:11:57 GMT; Max-Age=3600; path=/quynh/ce243b/pub; domain=dev.mageplaza.vn; HttpOnly; SameSite=Lax"},{"key":"Set-Cookie","value":"private_content_version=5c0c5080885144589db6711836fba3d4; expires=Fri, 12-Sep-2031 07:11:57 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":"1103"},{"key":"Content-Type","value":"application/json"},{"key":"X-Varnish","value":"68314"},{"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        \"MpAffiliateCampaigns\": [\n            {\n                \"actions_serialized\": \"{\\\"type\\\":\\\"Magento\\\\\\\\SalesRule\\\\\\\\Model\\\\\\\\Rule\\\\\\\\Condition\\\\\\\\Product\\\\\\\\Combine\\\",\\\"attribute\\\":null,\\\"operator\\\":null,\\\"value\\\":true,\\\"is_value_processed\\\":null,\\\"aggregator\\\":\\\"all\\\"}\",\n                \"affiliate_group_ids\": \"1,2,3,4,5\",\n                \"apply_discount_on_tax\": 1,\n                \"apply_to_shipping\": 1,\n                \"campaign_id\": 1,\n                \"code_format\": \"alphanum\",\n                \"code_length\": 3,\n                \"commission\": \"{\\\"tier_1\\\":{\\\"type\\\":\\\"3\\\",\\\"value\\\":\\\"10\\\",\\\"type_second\\\":\\\"3\\\",\\\"value_second\\\":\\\"5\\\",\\\"name\\\":\\\"Tier 1\\\"}}\",\n                \"conditions_serialized\": \"{\\\"type\\\":\\\"Magento\\\\\\\\SalesRule\\\\\\\\Model\\\\\\\\Rule\\\\\\\\Condition\\\\\\\\Combine\\\",\\\"attribute\\\":null,\\\"operator\\\":null,\\\"value\\\":\\\"1\\\",\\\"is_value_processed\\\":null,\\\"aggregator\\\":\\\"all\\\"}\",\n                \"coupon_code\": \"2NS\",\n                \"created_at\": \"2021-09-13 09:54:18\",\n                \"description\": \"This is a sample campaign\",\n                \"discount_action\": \"by_percent\",\n                \"discount_amount\": 10,\n                \"discount_description\": \"Discount Description\",\n                \"discount_qty\": 0,\n                \"discount_step\": 0,\n                \"display\": 1,\n                \"from_date\": null,\n                \"name\": \"Default Campaign\",\n                \"sort_order\": 0,\n                \"status\": 1,\n                \"to_date\": null,\n                \"updated_at\": \"2021-09-13 10:08:16\",\n                \"website_ids\": \"1\"\n            }\n        ]\n    }\n}"}],"_postman_id":"e10573fb-bdd4-4cd1-95e9-17d8b8470267"},{"name":"Customer Get Affiliate Information (Account, Transaction, Refer Info, Withdraw History, Banner (Pro ver))","id":"8a4051f7-bb84-49c4-bcf5-dea8dec7a900","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{customer_token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"query {\r\n\tcustomer {\r\n\t\temail\r\n\t\tfirstname\r\n\t\tlastname\r\n\t\tAffiliate {\r\n\t\t\tAccount {\r\n\t\t\t\taccount_id\r\n\t\t\t\tbalance\r\n\t\t\t\tcode\r\n\t\t\t\tcreated_at\r\n\t\t\t\tcustomer_id\r\n\t\t\t\temail_notification\r\n\t\t\t\tgroup_id\r\n\t\t\t\tholding_balance\r\n\t\t\t\tparent\r\n\t\t\t\tparent_email\r\n\t\t\t\tstatus\r\n\t\t\t\ttotal_commission\r\n\t\t\t\ttotal_paid\r\n\t\t\t\ttree\r\n\t\t\t\twithdraw_information\r\n\t\t\t\twithdraw_method\r\n\t\t\t}\r\n\t\t\tReferInfo {\r\n\t\t\t\trefer_code\r\n\t\t\t\trefer_email\r\n\t\t\t\trefer_url\r\n\t\t\t}\r\n\r\n\t\t\tTransaction(filter: { transaction_id: { neq: \"1\" } }) {\r\n\t\t\t\ttotal_count\r\n\t\t\t\titems {\r\n\t\t\t\t\taccount_id\r\n\t\t\t\t\taction\r\n\t\t\t\t\tamount\r\n\t\t\t\t\tamount_used\r\n\t\t\t\t\tcampaign_id\r\n\t\t\t\t\tcreated_at\r\n\t\t\t\t\tcurrent_balance\r\n\t\t\t\t\tcustomer_id\r\n\t\t\t\t\textra_content\r\n\t\t\t\t\tholding_to\r\n\t\t\t\t\torder_id\r\n\t\t\t\t\torder_increment_id\r\n\t\t\t\t\tstatus\r\n\t\t\t\t\tstore_id\r\n\t\t\t\t\ttitle\r\n\t\t\t\t\ttransaction_id\r\n\t\t\t\t\ttype\r\n\t\t\t\t\tupdated_at\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tWithdrawHistory(filter: { amount: { neq: \"10\" } }) {\r\n\t\t\t\ttotal_count\r\n\t\t\t\titems {\r\n\t\t\t\t\taccount_id\r\n\t\t\t\t\tamount\r\n\t\t\t\t\tbanktranfer\r\n\t\t\t\t\tcreated_at\r\n\t\t\t\t\tcustomer_id\r\n\t\t\t\t\tfee\r\n\t\t\t\t\toffline_address\r\n\t\t\t\t\tpayment_details\r\n\t\t\t\t\tpayment_method\r\n\t\t\t\t\tpaypal_email\r\n\t\t\t\t\tpaypal_transaction_id\r\n\t\t\t\t\tresolved_at\r\n\t\t\t\t\tstatus\r\n\t\t\t\t\ttransaction_id\r\n\t\t\t\t\ttransfer_amount\r\n\t\t\t\t\twithdraw_description\r\n\t\t\t\t\twithdraw_id\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tBanners(filter: { campaign_id: { eq: \"1\" } }) {\r\n\t\t\t\ttotal_count\r\n\t\t\t\titems {\r\n\t\t\t\t\tbanner_id\r\n\t\t\t\t\tcampaign_id\r\n\t\t\t\t\tcontent\r\n\t\t\t\t\tcreated_at\r\n\t\t\t\t\tlink\r\n\t\t\t\t\trel_nofollow\r\n\t\t\t\t\tstatus\r\n\t\t\t\t\ttitle\r\n\t\t\t\t\tupdated_at\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","variables":""}},"url":"{{magento_base_url}}/graphql","description":"<p>Request will run with banner info if install Affiliate Pro</p>\n","urlObject":{"path":["graphql"],"host":["{{magento_base_url}}"],"query":[],"variable":[]}},"response":[{"id":"57059d42-278e-4936-bdcd-19df86f5da12","name":"Customer Get Affiliate Information (Account, Transaction, Refer Info, Withdraw History, Banner (Pro ver)) Example","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{customer_token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"query {\r\n\tcustomer {\r\n\t\temail\r\n\t\tfirstname\r\n\t\tlastname\r\n\t\tAffiliate {\r\n\t\t\tAccount {\r\n\t\t\t\taccount_id\r\n\t\t\t\tbalance\r\n\t\t\t\tcode\r\n\t\t\t\tcreated_at\r\n\t\t\t\tcustomer_id\r\n\t\t\t\temail_notification\r\n\t\t\t\tgroup_id\r\n\t\t\t\tholding_balance\r\n\t\t\t\tparent\r\n\t\t\t\tparent_email\r\n\t\t\t\tstatus\r\n\t\t\t\ttotal_commission\r\n\t\t\t\ttotal_paid\r\n\t\t\t\ttree\r\n\t\t\t\twithdraw_information\r\n\t\t\t\twithdraw_method\r\n\t\t\t}\r\n\t\t\tReferInfo {\r\n\t\t\t\trefer_code\r\n\t\t\t\trefer_email\r\n\t\t\t\trefer_url\r\n\t\t\t}\r\n\r\n\t\t\tTransaction(filter: { transaction_id: { neq: \"1\" } }) {\r\n\t\t\t\ttotal_count\r\n\t\t\t\titems {\r\n\t\t\t\t\taccount_id\r\n\t\t\t\t\taction\r\n\t\t\t\t\tamount\r\n\t\t\t\t\tamount_used\r\n\t\t\t\t\tcampaign_id\r\n\t\t\t\t\tcreated_at\r\n\t\t\t\t\tcurrent_balance\r\n\t\t\t\t\tcustomer_id\r\n\t\t\t\t\textra_content\r\n\t\t\t\t\tholding_to\r\n\t\t\t\t\torder_id\r\n\t\t\t\t\torder_increment_id\r\n\t\t\t\t\tstatus\r\n\t\t\t\t\tstore_id\r\n\t\t\t\t\ttitle\r\n\t\t\t\t\ttransaction_id\r\n\t\t\t\t\ttype\r\n\t\t\t\t\tupdated_at\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tWithdrawHistory(filter: { amount: { neq: \"10\" } }) {\r\n\t\t\t\ttotal_count\r\n\t\t\t\titems {\r\n\t\t\t\t\taccount_id\r\n\t\t\t\t\tamount\r\n\t\t\t\t\tbanktranfer\r\n\t\t\t\t\tcreated_at\r\n\t\t\t\t\tcustomer_id\r\n\t\t\t\t\tfee\r\n\t\t\t\t\toffline_address\r\n\t\t\t\t\tpayment_details\r\n\t\t\t\t\tpayment_method\r\n\t\t\t\t\tpaypal_email\r\n\t\t\t\t\tpaypal_transaction_id\r\n\t\t\t\t\tresolved_at\r\n\t\t\t\t\tstatus\r\n\t\t\t\t\ttransaction_id\r\n\t\t\t\t\ttransfer_amount\r\n\t\t\t\t\twithdraw_description\r\n\t\t\t\t\twithdraw_id\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tBanners(filter: { campaign_id: { eq: \"1\" } }) {\r\n\t\t\t\ttotal_count\r\n\t\t\t\titems {\r\n\t\t\t\t\tbanner_id\r\n\t\t\t\t\tcampaign_id\r\n\t\t\t\t\tcontent\r\n\t\t\t\t\tcreated_at\r\n\t\t\t\t\tlink\r\n\t\t\t\t\trel_nofollow\r\n\t\t\t\t\tstatus\r\n\t\t\t\t\ttitle\r\n\t\t\t\t\tupdated_at\r\n\t\t\t\t}\r\n\t\t\t}\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":"Tue, 14 Sep 2021 08:34:14 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Mon, 14 Sep 2020 08:34:15 GMT"},{"key":"Cache-Control","value":"max-age=0, must-revalidate, no-cache, no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Set-Cookie","value":"PHPSESSID=89d8dvj8ntfitgeppa5rhclirg; expires=Tue, 14-Sep-2021 09:34:14 GMT; Max-Age=3600; path=/quynh/ce243b/pub; domain=dev.mageplaza.vn; HttpOnly; SameSite=Lax"},{"key":"Set-Cookie","value":"private_content_version=b67b6f0d7e235026c301683e92606be6; expires=Fri, 12-Sep-2031 08:34:14 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":"2951"},{"key":"Content-Type","value":"application/json"},{"key":"X-Varnish","value":"301081"},{"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            \"email\": \"roni_cost@example.com\",\n            \"firstname\": \"Veronica\",\n            \"lastname\": \"Costello\",\n            \"Affiliate\": {\n                \"Account\": {\n                    \"account_id\": 1,\n                    \"balance\": 70,\n                    \"code\": \"c83df8\",\n                    \"created_at\": \"2021-09-13 10:08:49\",\n                    \"customer_id\": 1,\n                    \"email_notification\": 1,\n                    \"group_id\": 1,\n                    \"holding_balance\": 5,\n                    \"parent\": null,\n                    \"parent_email\": null,\n                    \"status\": 1,\n                    \"total_commission\": 5,\n                    \"total_paid\": 30,\n                    \"tree\": \"1\",\n                    \"withdraw_information\": null,\n                    \"withdraw_method\": null\n                },\n                \"ReferInfo\": {\n                    \"refer_code\": \"c83df8\",\n                    \"refer_email\": \"roni_cost@example.com\",\n                    \"refer_url\": \"http://dev.mageplaza.vn:8080/quynh/ce243b/pub/affiliate/index/index#u11\"\n                },\n                \"Transaction\": {\n                    \"total_count\": 4,\n                    \"items\": [\n                        {\n                            \"account_id\": 1,\n                            \"action\": \"withdraw/create\",\n                            \"amount\": -30,\n                            \"amount_used\": null,\n                            \"campaign_id\": null,\n                            \"created_at\": \"2021-09-14 07:58:42\",\n                            \"current_balance\": 100,\n                            \"customer_id\": 1,\n                            \"extra_content\": \"[]\",\n                            \"holding_to\": null,\n                            \"order_id\": null,\n                            \"order_increment_id\": null,\n                            \"status\": 3,\n                            \"store_id\": 1,\n                            \"title\": \"Subtract balance for withdraw request\",\n                            \"transaction_id\": 2,\n                            \"type\": \"2\",\n                            \"updated_at\": \"2021-09-14 07:58:42\"\n                        },\n                        {\n                            \"account_id\": 1,\n                            \"action\": \"order/invoice\",\n                            \"amount\": 3.38,\n                            \"amount_used\": null,\n                            \"campaign_id\": null,\n                            \"created_at\": \"2021-09-14 08:06:16\",\n                            \"current_balance\": 70,\n                            \"customer_id\": 1,\n                            \"extra_content\": \"[]\",\n                            \"holding_to\": \"2021-10-14 08:06:16\",\n                            \"order_id\": 8,\n                            \"order_increment_id\": \"000000008\",\n                            \"status\": 3,\n                            \"store_id\": 1,\n                            \"title\": \"Get commission for order #000000008\",\n                            \"transaction_id\": 3,\n                            \"type\": \"1\",\n                            \"updated_at\": \"2021-09-14 08:06:39\"\n                        },\n                        {\n                            \"account_id\": 1,\n                            \"action\": \"order/refund\",\n                            \"amount\": -3.38,\n                            \"amount_used\": null,\n                            \"campaign_id\": null,\n                            \"created_at\": \"2021-09-14 08:09:57\",\n                            \"current_balance\": 73.38,\n                            \"customer_id\": 1,\n                            \"extra_content\": \"{\\\"creditmemo_increment_id\\\":\\\"000000002\\\"}\",\n                            \"holding_to\": null,\n                            \"order_id\": 8,\n                            \"order_increment_id\": \"000000008\",\n                            \"status\": 3,\n                            \"store_id\": 1,\n                            \"title\": \"Taken back commission for refunding order #000000008\",\n                            \"transaction_id\": 4,\n                            \"type\": \"1\",\n                            \"updated_at\": \"2021-09-14 08:09:57\"\n                        },\n                        {\n                            \"account_id\": 1,\n                            \"action\": \"order/invoice\",\n                            \"amount\": 5,\n                            \"amount_used\": null,\n                            \"campaign_id\": null,\n                            \"created_at\": \"2021-09-14 08:13:13\",\n                            \"current_balance\": 70,\n                            \"customer_id\": 1,\n                            \"extra_content\": \"[]\",\n                            \"holding_to\": \"2021-10-14 08:13:13\",\n                            \"order_id\": 9,\n                            \"order_increment_id\": \"000000009\",\n                            \"status\": 2,\n                            \"store_id\": 1,\n                            \"title\": \"Get commission for order #000000009\",\n                            \"transaction_id\": 5,\n                            \"type\": \"1\",\n                            \"updated_at\": \"2021-09-14 08:13:13\"\n                        }\n                    ]\n                },\n                \"WithdrawHistory\": {\n                    \"total_count\": 1,\n                    \"items\": [\n                        {\n                            \"account_id\": 1,\n                            \"amount\": 30,\n                            \"banktranfer\": null,\n                            \"created_at\": \"2021-09-14 07:58:46\",\n                            \"customer_id\": 1,\n                            \"fee\": 0,\n                            \"offline_address\": null,\n                            \"payment_details\": \"{\\\"paypal_email\\\":\\\"example@gamil.com\\\",\\\"paypal_transaction_id\\\":null}\",\n                            \"payment_method\": \"paypal\",\n                            \"paypal_email\": null,\n                            \"paypal_transaction_id\": null,\n                            \"resolved_at\": null,\n                            \"status\": 1,\n                            \"transaction_id\": 2,\n                            \"transfer_amount\": 30,\n                            \"withdraw_description\": \"test\",\n                            \"withdraw_id\": 1\n                        }\n                    ]\n                },\n                \"Banners\": {\n                    \"total_count\": 1,\n                    \"items\": [\n                        {\n                            \"banner_id\": 1,\n                            \"campaign_id\": 1,\n                            \"content\": \"Test Banner\",\n                            \"created_at\": \"2021-09-14 08:33:55\",\n                            \"link\": null,\n                            \"rel_nofollow\": 1,\n                            \"status\": 1,\n                            \"title\": \"Banner\",\n                            \"updated_at\": \"2021-09-14 08:34:11\"\n                        }\n                    ]\n                }\n            }\n        }\n    }\n}"}],"_postman_id":"8a4051f7-bb84-49c4-bcf5-dea8dec7a900"},{"name":"Get Affiliate Info in Cart when Apply Affiliate Discount","id":"119e9ebd-ae3a-4ef9-b673-fbf232a9583f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"graphql","graphql":{"query":"query {\r\n\tcart(cart_id: \"EYpSaLJAMP6xtS2eXDYvcvZvLsRJFkse\") {\r\n\t\tid\r\n\t\ttotal_quantity\r\n\t\titems {\r\n\t\t\tproduct {\r\n\t\t\t\tname\r\n\t\t\t\tsku\r\n\t\t\t}\r\n\t\t\tprices {\r\n\t\t\t\tprice {\r\n\t\t\t\t\tcurrency\r\n\t\t\t\t\tvalue\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tprices {\r\n\t\t\tsegments {\r\n\t\t\t\taffiliate_commission\r\n\t\t\t\taffiliate_shipping_commission\r\n\t\t\t\taffiliate_discount_amount\r\n\t\t\t\tbase_affiliate_discount_amount\r\n\t\t\t\taffiliate_discount_shipping_amount\r\n\t\t\t\tbase_affiliate_discount_shipping_amount\r\n\t\t\t\taffiliate_key\r\n\t\t\t}\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":"b5ab1203-0d4b-4dda-a6da-6b46ba2d47e1","name":"Get Affiliate Info in Cart when Apply Affiliate Discount Example","originalRequest":{"method":"POST","header":[],"body":{"mode":"graphql","graphql":{"query":"query {\r\n\tcart(cart_id: \"EYpSaLJAMP6xtS2eXDYvcvZvLsRJFkse\") {\r\n\t\tid\r\n\t\ttotal_quantity\r\n\t\titems {\r\n\t\t\tproduct {\r\n\t\t\t\tname\r\n\t\t\t\tsku\r\n\t\t\t}\r\n\t\t\tprices {\r\n\t\t\t\tprice {\r\n\t\t\t\t\tcurrency\r\n\t\t\t\t\tvalue\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tprices {\r\n\t\t\tsegments {\r\n\t\t\t\taffiliate_commission\r\n\t\t\t\taffiliate_shipping_commission\r\n\t\t\t\taffiliate_discount_amount\r\n\t\t\t\tbase_affiliate_discount_amount\r\n\t\t\t\taffiliate_discount_shipping_amount\r\n\t\t\t\tbase_affiliate_discount_shipping_amount\r\n\t\t\t\taffiliate_key\r\n\t\t\t}\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":"Tue, 14 Sep 2021 07:25:32 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Mon, 14 Sep 2020 07:25:32 GMT"},{"key":"Cache-Control","value":"max-age=0, must-revalidate, no-cache, no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Set-Cookie","value":"PHPSESSID=89d8dvj8ntfitgeppa5rhclirg; expires=Tue, 14-Sep-2021 08:25:32 GMT; Max-Age=3600; path=/quynh/ce243b/pub; domain=dev.mageplaza.vn; HttpOnly; SameSite=Lax"},{"key":"Set-Cookie","value":"private_content_version=9ad40de57e28dee95e14e92547461823; expires=Fri, 12-Sep-2031 07:25:32 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":"469"},{"key":"Content-Type","value":"application/json"},{"key":"X-Varnish","value":"4238"},{"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        \"cart\": {\n            \"id\": \"EYpSaLJAMP6xtS2eXDYvcvZvLsRJFkse\",\n            \"total_quantity\": 1,\n            \"items\": [\n                {\n                    \"product\": {\n                        \"name\": \"Joust Duffle Bag\",\n                        \"sku\": \"24-MB01\"\n                    },\n                    \"prices\": {\n                        \"price\": {\n                            \"currency\": \"USD\",\n                            \"value\": 34\n                        }\n                    }\n                }\n            ],\n            \"prices\": {\n                \"segments\": {\n                    \"affiliate_commission\": \"{\\\"1\\\":{\\\"1\\\":10}}\",\n                    \"affiliate_shipping_commission\": \"0\",\n                    \"affiliate_discount_amount\": 3.4,\n                    \"base_affiliate_discount_amount\": 3.4,\n                    \"affiliate_discount_shipping_amount\": 0,\n                    \"base_affiliate_discount_shipping_amount\": 0,\n                    \"affiliate_key\": \"1\"\n                }\n            }\n        }\n    }\n}"}],"_postman_id":"119e9ebd-ae3a-4ef9-b673-fbf232a9583f"},{"name":"Get Customer Orders","id":"d4b49b4a-7679-4092-9f7e-789831659348","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{customer_token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"query {\r\n\tcustomerOrders {\r\n\t\titems {\r\n\t\t\tid\r\n\t\t\torder_number\r\n\t\t\tstatus\r\n\t\t\tsegments {\r\n\t\t\t\taffiliate_commission\r\n\t\t\t\taffiliate_commission_invoiced\r\n\t\t\t\taffiliate_commission_refunded\r\n\t\t\t\taffiliate_discount_amount\r\n\t\t\t\taffiliate_discount_invoiced\r\n\t\t\t\taffiliate_discount_refunded\r\n\t\t\t\taffiliate_discount_shipping_amount\r\n\t\t\t\taffiliate_earn_commission_invoice_after\r\n\t\t\t\taffiliate_key\r\n\t\t\t\taffiliate_shipping_commission\r\n\t\t\t\tbase_affiliate_discount_amount\r\n\t\t\t\tbase_affiliate_discount_invoiced\r\n\t\t\t\tbase_affiliate_discount_refunded\r\n\t\t\t\tbase_affiliate_discount_shipping_amount\r\n\t\t\t}\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":"fdab6c4b-dbe1-4fec-8b2b-10278d32998f","name":"Get Customer's Order","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{customer_token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"query {\r\n\tcustomerOrders {\r\n\t\titems {\r\n\t\t\tid\r\n\t\t\torder_number\r\n\t\t\tstatus\r\n\t\t\tsegments {\r\n\t\t\t\taffiliate_commission\r\n\t\t\t\taffiliate_commission_invoiced\r\n\t\t\t\taffiliate_commission_refunded\r\n\t\t\t\taffiliate_discount_amount\r\n\t\t\t\taffiliate_discount_invoiced\r\n\t\t\t\taffiliate_discount_refunded\r\n\t\t\t\taffiliate_discount_shipping_amount\r\n\t\t\t\taffiliate_earn_commission_invoice_after\r\n\t\t\t\taffiliate_key\r\n\t\t\t\taffiliate_shipping_commission\r\n\t\t\t\tbase_affiliate_discount_amount\r\n\t\t\t\tbase_affiliate_discount_invoiced\r\n\t\t\t\tbase_affiliate_discount_refunded\r\n\t\t\t\tbase_affiliate_discount_shipping_amount\r\n\t\t\t}\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":"Tue, 14 Sep 2021 09:15:49 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Mon, 14 Sep 2020 09:15:49 GMT"},{"key":"Cache-Control","value":"max-age=0, must-revalidate, no-cache, no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Set-Cookie","value":"PHPSESSID=89d8dvj8ntfitgeppa5rhclirg; expires=Tue, 14-Sep-2021 10:15:49 GMT; Max-Age=3600; path=/quynh/ce243b/pub; domain=dev.mageplaza.vn; HttpOnly; SameSite=Lax"},{"key":"Set-Cookie","value":"private_content_version=7f272cd09c2f242d3d2b24d19ab83ce2; expires=Fri, 12-Sep-2031 09:15:49 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":"653"},{"key":"Content-Type","value":"application/json"},{"key":"X-Varnish","value":"662997"},{"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        \"customerOrders\": {\n            \"items\": [\n                {\n                    \"id\": \"12\",\n                    \"order_number\": \"000000012\",\n                    \"status\": \"processing\",\n                    \"segments\": {\n                        \"affiliate_commission\": \"{\\\"1\\\":{\\\"1\\\":10},\\\"2\\\":{\\\"1\\\":5}}\",\n                        \"affiliate_commission_invoiced\": \"{\\\"1\\\":15}\",\n                        \"affiliate_commission_refunded\": null,\n                        \"affiliate_discount_amount\": 14,\n                        \"affiliate_discount_invoiced\": 14,\n                        \"affiliate_discount_refunded\": null,\n                        \"affiliate_discount_shipping_amount\": 0,\n                        \"affiliate_earn_commission_invoice_after\": \"1\",\n                        \"affiliate_key\": \"1\",\n                        \"affiliate_shipping_commission\": \"0\",\n                        \"base_affiliate_discount_amount\": 14,\n                        \"base_affiliate_discount_invoiced\": 14,\n                        \"base_affiliate_discount_refunded\": null,\n                        \"base_affiliate_discount_shipping_amount\": 0\n                    }\n                }\n            ]\n        }\n    }\n}"}],"_postman_id":"d4b49b4a-7679-4092-9f7e-789831659348"},{"name":"Signup Affiliate Account","id":"d4824da6-f156-4674-a2bc-3763a7429ae3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{customer_token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"mutation {\r\n\tMpAffiliateSignup(input: { email: \"roni_cost@example.com\" })\r\n}\r\n","variables":""}},"url":"{{magento_base_url}}/graphql","description":"<p>\"email\" : enter email address of parent account</p>\n","urlObject":{"path":["graphql"],"host":["{{magento_base_url}}"],"query":[],"variable":[]}},"response":[{"id":"04b60c40-c791-4658-b1cf-6ae1692008c1","name":"Signup Affiliate Account Example","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{customer_token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"mutation {\r\n\tMpAffiliateSignup(input: { email: \"roni_cost@example.com\" })\r\n}\r\n","variables":""}},"url":"{{magento_base_url}}/graphql"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 14 Sep 2021 08:09:15 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Mon, 14 Sep 2020 08:09:19 GMT"},{"key":"Cache-Control","value":"max-age=0, must-revalidate, no-cache, no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Set-Cookie","value":"PHPSESSID=89d8dvj8ntfitgeppa5rhclirg; expires=Tue, 14-Sep-2021 09:09:15 GMT; Max-Age=3600; path=/quynh/ce243b/pub; domain=dev.mageplaza.vn; HttpOnly; SameSite=Lax"},{"key":"Set-Cookie","value":"private_content_version=f5b34f4610ccafc1a50c3a78607ccc0f; expires=Fri, 12-Sep-2031 08:09:15 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":"70"},{"key":"Content-Type","value":"application/json"},{"key":"X-Varnish","value":"561862"},{"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        \"MpAffiliateSignup\": \"{\\\"status\\\":1,\\\"affiliate_id\\\":\\\"2\\\"}\"\n    }\n}"}],"_postman_id":"d4824da6-f156-4674-a2bc-3763a7429ae3"},{"name":"Create Refer Link","id":"64479c40-005b-4175-8add-9004c4c820cb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{customer_token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"mutation {\r\n\tMpAffiliateCreateReferLink(\r\n\t\tinput: { refer_url: \"http://dev.mageplaza.vn/product\" }\r\n\t)\r\n}\r\n","variables":""}},"url":"{{magento_base_url}}/graphql","urlObject":{"path":["graphql"],"host":["{{magento_base_url}}"],"query":[],"variable":[]}},"response":[{"id":"764c9430-dd63-4c7b-a7f1-f2cab1f67798","name":"Create Refer Link Example","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{customer_token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"mutation {\r\n\tMpAffiliateCreateReferLink(\r\n\t\tinput: { refer_url: \"http://dev.mageplaza.vn/product\" }\r\n\t)\r\n}\r\n","variables":""}},"url":"{{magento_base_url}}/graphql"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 14 Sep 2021 07:33:59 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Mon, 14 Sep 2020 07:34:00 GMT"},{"key":"Cache-Control","value":"max-age=0, must-revalidate, no-cache, no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Set-Cookie","value":"PHPSESSID=89d8dvj8ntfitgeppa5rhclirg; expires=Tue, 14-Sep-2021 08:33:59 GMT; Max-Age=3600; path=/quynh/ce243b/pub; domain=dev.mageplaza.vn; HttpOnly; SameSite=Lax"},{"key":"Set-Cookie","value":"private_content_version=870c4ea6636a973b85d6d573fb767270; expires=Fri, 12-Sep-2031 07:33:59 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":"80"},{"key":"Content-Type","value":"application/json"},{"key":"X-Varnish","value":"397806"},{"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        \"MpAffiliateCreateReferLink\": \"http://dev.mageplaza.vn/product#u11\"\n    }\n}"}],"_postman_id":"64479c40-005b-4175-8add-9004c4c820cb"},{"name":"Invite","id":"5210cfd9-4923-4006-a427-cefe7f2ced77","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{customer_token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"mutation {\r\n\tMpAffiliateInvite(\r\n\t\tinput: {\r\n\t\t\tcontacts: \"example@gmail.com\"\r\n\t\t\tcontent: \"test\"\r\n\t\t\trefer_url: \"http://dev.mageplaza.vn/product#u16eb79\"\r\n\t\t\tsubject: \"MpAffiliateInvite\"\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":"43913147-dca6-498b-9298-a7cfcf793688","name":"Invite Example","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{customer_token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"mutation {\r\n\tMpAffiliateInvite(\r\n\t\tinput: {\r\n\t\t\tcontacts: \"example@gmail.com\"\r\n\t\t\tcontent: \"test\"\r\n\t\t\trefer_url: \"http://dev.mageplaza.vn/product#u16eb79\"\r\n\t\t\tsubject: \"MpAffiliateInvite\"\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":"Tue, 14 Sep 2021 07:48:56 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Mon, 14 Sep 2020 07:49:04 GMT"},{"key":"Cache-Control","value":"max-age=0, must-revalidate, no-cache, no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Set-Cookie","value":"PHPSESSID=89d8dvj8ntfitgeppa5rhclirg; expires=Tue, 14-Sep-2021 08:49:01 GMT; Max-Age=3600; path=/quynh/ce243b/pub; domain=dev.mageplaza.vn; HttpOnly; SameSite=Lax"},{"key":"Set-Cookie","value":"private_content_version=cb32686066ad7ac7c54805f91f8a30b4; expires=Fri, 12-Sep-2031 07:49:01 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":"82"},{"key":"Content-Type","value":"application/json"},{"key":"X-Varnish","value":"363708"},{"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        \"MpAffiliateInvite\": \"{\\\"success\\\":[\\\"example@gmail.com\\\"],\\\"fail\\\":[]}\"\n    }\n}"}],"_postman_id":"5210cfd9-4923-4006-a427-cefe7f2ced77"},{"name":"Affiliate Subscriptions","id":"4cfce848-ae36-4bfd-a733-16a49613cdb3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{customer_token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"mutation {\r\n\tMpAffiliateSubscribe(input: { is_subscribe: true })\r\n}\r\n","variables":""}},"url":"{{magento_base_url}}/graphql","urlObject":{"path":["graphql"],"host":["{{magento_base_url}}"],"query":[],"variable":[]}},"response":[{"id":"9a0acb43-5932-465f-bac1-e106c60ecf0c","name":"Affiliate Subscriptions Example","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{customer_token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"mutation {\r\n\tMpAffiliateSubscribe(input: { is_subscribe: true })\r\n}\r\n","variables":""}},"url":"{{magento_base_url}}/graphql"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 14 Sep 2021 07:50:47 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Mon, 14 Sep 2020 07:50:47 GMT"},{"key":"Cache-Control","value":"max-age=0, must-revalidate, no-cache, no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Set-Cookie","value":"PHPSESSID=89d8dvj8ntfitgeppa5rhclirg; expires=Tue, 14-Sep-2021 08:50:47 GMT; Max-Age=3600; path=/quynh/ce243b/pub; domain=dev.mageplaza.vn; HttpOnly; SameSite=Lax"},{"key":"Set-Cookie","value":"private_content_version=24ea922b41470a7600875f4a4d6094a1; expires=Fri, 12-Sep-2031 07:50:47 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":"40"},{"key":"Content-Type","value":"application/json"},{"key":"X-Varnish","value":"168472"},{"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        \"MpAffiliateSubscribe\": \"true\"\n    }\n}"}],"_postman_id":"4cfce848-ae36-4bfd-a733-16a49613cdb3"},{"name":"Create Withdraw","id":"c50c20b6-f55e-48fc-8080-915f2ac95291","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{customer_token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"mutation {\r\n\tMpAffiliateWithdraw(\r\n\t\tinput: {\r\n\t\t\tamount: 30\r\n\t\t\tpayment_method: \"paypal\"\r\n\t\t\tpaypal_email: \"example@gamil.com\"\r\n\t\t\t#banktranfer:\"abc\"\r\n\t\t\t#offline_address:\"abc\"\r\n\t\t\twithdraw_description: \"test\"\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":"c972e588-2163-487f-8830-733f8986efbf","name":"Create Withdraw Example","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{customer_token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"mutation {\r\n\tMpAffiliateWithdraw(\r\n\t\tinput: {\r\n\t\t\tamount: 30\r\n\t\t\tpayment_method: \"paypal\"\r\n\t\t\tpaypal_email: \"example@gamil.com\"\r\n\t\t\t#banktranfer:\"abc\"\r\n\t\t\t#offline_address:\"abc\"\r\n\t\t\twithdraw_description: \"test\"\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":"Tue, 14 Sep 2021 07:58:42 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Mon, 14 Sep 2020 07:58:46 GMT"},{"key":"Cache-Control","value":"max-age=0, must-revalidate, no-cache, no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Set-Cookie","value":"PHPSESSID=89d8dvj8ntfitgeppa5rhclirg; expires=Tue, 14-Sep-2021 08:58:42 GMT; Max-Age=3600; path=/quynh/ce243b/pub; domain=dev.mageplaza.vn; HttpOnly; SameSite=Lax"},{"key":"Set-Cookie","value":"private_content_version=879c1e72532a78ad4528420b17d543f2; expires=Fri, 12-Sep-2031 07:58:42 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":"36"},{"key":"Content-Type","value":"application/json"},{"key":"X-Varnish","value":"69305"},{"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        \"MpAffiliateWithdraw\": \"1\"\n    }\n}"}],"_postman_id":"c50c20b6-f55e-48fc-8080-915f2ac95291"}]}