NATS5 REST API Affiliate GET permissions
From TMM Wiki
(Redirected from NATS4 REST API Affiliate GET permissions)
Jump to navigationJump to searchGET /affiliate/permissions
Description
- Get permission details for an account type
Resource URL
- http://domain/api/affiliate/permissions
- Replace domain with the nats domain
- GET
Response Format
- JSON
- HTTP headers
Parameters
Parameters can be sent as url encoded params
- loginid
- type: digit
- optional
- accountid
- type: digit
- optional
- limited
- type: boolean_digit (0 or 1)
- optional
- section
- type: string
- optional
Example Request
Method: GET
URL: http://domain/api/affiliate/permissions
Query String: loginid=3&limited=0
Response:
{ "success": true, "permissions": [ { "key": "overview", "name": "Admin Overview", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "view": [ { "key": "default", "name": "Default Admin Overview", "value": false }, { "key": "mobile_affiliates", "name": "Mobile Affiliates", "value": false }, { "key": "mobile_all", "name": "Mobile All", "value": false }, { "key": "mobile_new_affiliates", "name": "Mobile New Affiliates", "value": false }, { "key": "mobile_new_members", "name": "Mobile New Members", "value": false }, { "key": "mobile_programs", "name": "Mobile Programs", "value": false }, { "key": "mobile_sites", "name": "Mobile Sites", "value": false }, { "key": "mobile_summary", "name": "Mobile Summary", "value": false }, { "key": "original", "name": "Original v4 View", "value": false } ] }, { "key": "adtools", "name": "Adtools Admin", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "view": [ { "key": "bulk", "name": "Add Bulk", "value": false }, { "key": "bulk_update", "name": "Add Bulk Update", "value": false }, { "key": "adtools", "name": "Adtools", "value": false }, { "key": "edit", "name": "Edit", "value": false }, { "key": "edit_rule", "name": "Edit Rules", "value": false }, { "key": "edit_type", "name": "Edit Type", "value": false }, { "key": "group", "name": "Groups", "value": false }, { "key": "search", "name": "Search", "value": false }, { "key": "set_cotd_content", "name": "Set COTD Content", "value": false }, { "key": "set_gbcontent", "name": "Set GB Content", "value": false }, { "key": "set_gbtemplates", "name": "Set GB Templates", "value": false }, { "key": "stop_bulk", "name": "Stop Bulk Importer", "value": false } ], "some_actions": false, "action": [ { "key": "add_cotd_content", "name": "Add COTD Content", "value": false }, { "key": "add_category", "name": "Add Category", "value": false }, { "key": "add_assoc", "name": "Add Group Assoc.", "value": false }, { "key": "add_type_field_mc_option", "name": "Add MC Option", "value": false }, { "key": "add_new_group", "name": "Add New Group", "value": false }, { "key": "add_rule", "name": "Add Rule", "value": false }, { "key": "add_type", "name": "Add Type", "value": false }, { "key": "add_type_field", "name": "Add Type Field", "value": false }, { "key": "bulk_import", "name": "Bulk Import", "value": false }, { "key": "bulk_update", "name": "Bulk Update", "value": false }, { "key": "move", "name": "Change Order", "value": false }, { "key": "delete_cotd_content", "name": "Delete COTD Content", "value": false }, { "key": "delete_category", "name": "Delete Category", "value": false }, { "key": "delete_group", "name": "Delete Group", "value": false }, { "key": "delete_mc_option", "name": "Delete MC Option", "value": false }, { "key": "delete_type", "name": "Delete Type", "value": false }, { "key": "delete_type_field", "name": "Delete Type Field", "value": false }, { "key": "disable_adtool", "name": "Disable Adtool", "value": false }, { "key": "disable_cotd_content", "name": "Disable COTD Content", "value": false }, { "key": "disable_rule", "name": "Disable Rule", "value": false }, { "key": "edit_adtool", "name": "Edit Adtool", "value": false }, { "key": "edit_category", "name": "Edit Category", "value": false }, { "key": "edit_group", "name": "Edit Groups", "value": false }, { "key": "edit_mc_option", "name": "Edit MC Option", "value": false }, { "key": "edit_rule", "name": "Edit Rule", "value": false }, { "key": "edit_type", "name": "Edit Type", "value": false }, { "key": "edit_type_field", "name": "Edit Type Field", "value": false }, { "key": "enable_adtool", "name": "Enable Adtool", "value": false }, { "key": "enable_cotd_content", "name": "Enable COTD Content", "value": false }, { "key": "new_adtool", "name": "New Adtool", "value": false }, { "key": "remove_assoc", "name": "Remove Group Assoc", "value": false }, { "key": "set_cotd_current_content", "name": "Set Current COTD Content", "value": false }, { "key": "set_gbmatches", "name": "Set GB Matches", "value": false }, { "key": "sort", "name": "Sort", "value": false }, { "key": "undelete_category", "name": "Undelete Category", "value": false }, { "key": "undelete_mc_option", "name": "Undelete MC Option", "value": false }, { "key": "undelete_type", "name": "Undelete Type", "value": false }, { "key": "undelete_type_field", "name": "Undelete Type Field", "value": false } ] }, { "key": "affiliates", "name": "Affiliates Admin", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "view": [ { "key": "add_sale", "name": "Add Manual Sale", "value": false }, { "key": "account_access", "name": "Admin Access Changes", "value": false }, { "key": "account_changes", "name": "Affiliate Account Changes", "value": false }, { "key": "affiliate_documents", "name": "Affiliate Documents", "value": false }, { "key": "affiliate_overview", "name": "Affiliate Overview", "value": false }, { "key": "affiliate_payout_period", "name": "Affiliate Payout Changes", "value": false }, { "key": "affiliate_twofactor", "name": "Affiliate Two Factor Auth", "value": false }, { "key": "loginlog", "name": "Affiliate login log", "value": false }, { "key": "affiliate_approve", "name": "Approve Affiliate", "value": false }, { "key": "change_pass", "name": "Change Password", "value": false }, { "key": "affiliate_edit", "name": "Edit Affiliate", "value": false }, { "key": "manual_invoices", "name": "Manual Invoices", "value": false }, { "key": "affiliate_status", "name": "Set Affiliate Status", "value": false }, { "key": "email_csv_dump", "name": "View Affiliate Email Dump", "value": false } ], "some_actions": false, "action": [ { "key": "document_add", "name": "Add Document", "value": false }, { "key": "invoice_add", "name": "Add Manual Invoice", "value": false }, { "key": "add_sale", "name": "Add Manual Sale", "value": false }, { "key": "note_new", "name": "Add Note", "value": false }, { "key": "add_affiliate", "name": "Add a new affiliate", "value": false }, { "key": "access_custom", "name": "Admin Access Exceptions", "value": false }, { "key": "affiliate_twofactor", "name": "Affiliate Two Factor Auth", "value": false }, { "key": "account_changes", "name": "Approve Account Changes", "value": false }, { "key": "approve_deny", "name": "Approve\/Deny New Affiliate", "value": false }, { "key": "access_save", "name": "Change Access Level", "value": false }, { "key": "affiliate_change_api_key", "name": "Change Admin API Key", "value": false }, { "key": "change_pass", "name": "Change Password", "value": false }, { "key": "affiliate_delete", "name": "Delete Affiliate", "value": false }, { "key": "document_delete", "name": "Delete Document", "value": false }, { "key": "invoice_delete", "name": "Delete Manual Invoice", "value": false }, { "key": "document_get", "name": "Download Document", "value": false }, { "key": "edit_save", "name": "Edit Affiliate Settings", "value": false }, { "key": "invoice_edit", "name": "Edit Manual Invoice", "value": false }, { "key": "payout_period_enable", "name": "Enable Payout Period", "value": false }, { "key": "affiliate_clear_rep", "name": "Remove Acct Rep", "value": false }, { "key": "affiliate_clear_referrer", "name": "Remove Referrer", "value": false }, { "key": "affiliate_restore", "name": "Restore Affiliate", "value": false }, { "key": "affiliate_assign_rep", "name": "Set Acct Rep", "value": false }, { "key": "set_payout_period", "name": "Set Affiliate Payout Period", "value": false }, { "key": "update_status", "name": "Set Affiliate Status", "value": false }, { "key": "affiliate_assign_ref", "name": "Set Referrer", "value": false } ] }, { "key": "billers", "name": "Billers Admin", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "view": [ { "key": "add_cascade", "name": "Add Cascade", "value": false }, { "key": "biller_charges", "name": "Biller Charges", "value": false }, { "key": "tax", "name": "Biller Taxes", "value": false }, { "key": "cascade_rules", "name": "Cascade Rules", "value": false }, { "key": "poll_status", "name": "Poll Status", "value": false } ], "some_actions": false, "action": [ { "key": "add_biller", "name": "Add Biller", "value": false }, { "key": "add_cascade", "name": "Add Cascade", "value": false }, { "key": "add_cascade_rule", "name": "Add Cascade Rule", "value": false }, { "key": "set_tax", "name": "Add or Edit Taxes", "value": false }, { "key": "delete_biller", "name": "Delete Biller", "value": false }, { "key": "delete_biller_charge", "name": "Delete Biller Charge", "value": false }, { "key": "delete_cascade", "name": "Delete Cascade", "value": false }, { "key": "delete_cascade_step", "name": "Delete Cascade Step", "value": false }, { "key": "delete_tax", "name": "Delete Taxes", "value": false }, { "key": "disable_cascade_rule", "name": "Disable Cascade Rule", "value": false }, { "key": "edit_biller", "name": "Edit Biller", "value": false }, { "key": "edit_cascade", "name": "Edit Cascade", "value": false }, { "key": "edit_cascade_rule", "name": "Edit Cascade Rule", "value": false }, { "key": "edit_cascade_step", "name": "Edit Cascade Step", "value": false }, { "key": "down_cascade_step", "name": "Move Down", "value": false }, { "key": "up_cascade_step", "name": "Move Up", "value": false }, { "key": "new_cascade_step", "name": "New Cascade Step", "value": false }, { "key": "set_biller_charge", "name": "Set Biller Charge", "value": false }, { "key": "restore_biller", "name": "Undelete Biller", "value": false }, { "key": "restore_cascade", "name": "Undelete Cascade", "value": false } ] }, { "key": "commissions", "name": "Commissions Admin", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "view": [ { "key": "add", "name": "Add Change", "value": false }, { "key": "edit_change", "name": "Edit Change", "value": false }, { "key": "changes", "name": "View Changes", "value": false } ], "some_actions": false, "action": [ { "key": "add", "name": "Add Change", "value": false }, { "key": "add_tier", "name": "Add Tier", "value": false }, { "key": "delete_change", "name": "Delete Change", "value": false }, { "key": "delete_tier", "name": "Delete Tier", "value": false }, { "key": "edit", "name": "Edit Default Payment", "value": false }, { "key": "move", "name": "Move", "value": false }, { "key": "save_change", "name": "Save Change", "value": false }, { "key": "save_tier", "name": "Save Tier", "value": false } ] }, { "key": "config", "name": "Configuration Admin", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "view": [ { "key": "affiliate_default_settings", "name": "Affiliate Default Settings", "value": false }, { "key": "affiliates", "name": "Affiliate Settings", "value": false }, { "key": "currency - all", "name": "All Currency Settings", "value": false }, { "key": "billers", "name": "Biller Settings", "value": false }, { "key": "cronjobs", "name": "Cronjobs", "value": false }, { "key": "display", "name": "Display Settings", "value": false }, { "key": "emails", "name": "E-Mails", "value": false }, { "key": "external programs", "name": "External Program Settings", "value": false }, { "key": "fraud", "name": "Fraud Settings", "value": false }, { "key": "logging", "name": "Logging", "value": false }, { "key": "home", "name": "Main Settings", "value": false }, { "key": "misc", "name": "Miscellaneous Settings", "value": false }, { "key": "notifications", "name": "Notifications Settings", "value": false }, { "key": "postback", "name": "Postback Settings", "value": false }, { "key": "security", "name": "Security", "value": false }, { "key": "surfer", "name": "Surfer Settings", "value": false }, { "key": "third party", "name": "Third Party Settings", "value": false }, { "key": "currency - used", "name": "Used Currency Settings", "value": false } ], "some_actions": false, "action": [ { "key": "revert", "name": "Revert to Default", "value": false }, { "key": "save", "name": "Save Config", "value": false }, { "key": "update_affiliates", "name": "Update Affiliate Settings", "value": false } ] }, { "key": "global", "name": "Global Settings", "editable": false, "some_actions": false, "action": [ { "key": "edit_affiliate", "name": "Edit Affiliates", "value": false }, { "key": "restrict_member_view", "name": "Restrict Member view", "value": false } ], "setting": [ { "key": "affiliate_override", "name": "Override as Affiliate", "value": { "disabled": true, "all_affiliates": false, "my_affiliates": false, "my_network": false } } ] }, { "key": "includes", "name": "Includes Admin", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "view": [ { "key": "edit_chain", "name": "Edit Popup Chain", "value": false }, { "key": "edit_rule", "name": "Edit Rules", "value": false }, { "key": "edit_step", "name": "Edit Step", "value": false }, { "key": "rules", "name": "Rules", "value": false }, { "key": "steps", "name": "Steps", "value": false } ], "some_actions": false, "action": [ { "key": "add", "name": "Add", "value": false }, { "key": "add_rule", "name": "Add Rule", "value": false }, { "key": "add_step", "name": "Add Step", "value": false }, { "key": "delete", "name": "Delete", "value": false }, { "key": "delete_rule", "name": "Delete Rule", "value": false }, { "key": "delete_step", "name": "Delete Step", "value": false }, { "key": "edit", "name": "Edit", "value": false }, { "key": "edit_rule", "name": "Edit Rule", "value": false }, { "key": "edit_step", "name": "Edit Step", "value": false }, { "key": "undelete", "name": "Undelete", "value": false }, { "key": "undelete_step", "name": "Undelete Step", "value": false } ] }, { "key": "codes", "name": "Linkcodes & Tools", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "view": [ { "key": "links", "name": "Generate Gallery Links", "value": false }, { "key": "strack", "name": "Generate Strack Links", "value": false } ], "some_actions": false }, { "key": "logging", "name": "Logs Admin", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "view": [ { "key": "admin_actions", "name": "Admin Action Log", "value": false }, { "key": "view_log", "name": "View Log", "value": false } ], "some_actions": false, "action": [ { "key": "search_log", "name": "Search Log", "value": false } ] }, { "key": "mails", "name": "Mailing Admin", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "view": [ { "key": "queue", "name": "Mailing Queue", "value": false }, { "key": "remove", "name": "Remove Addresses", "value": false }, { "key": "mail", "name": "View\/Edit Mail", "value": false } ], "some_actions": false, "action": [ { "key": "add", "name": "Add Mail", "value": false }, { "key": "add_rule", "name": "Add Rule", "value": false }, { "key": "delete", "name": "Delete", "value": false }, { "key": "delete_queue_mail", "name": "Delete Email From Queue", "value": false }, { "key": "disable_rule", "name": "Disable Rule", "value": false }, { "key": "edit", "name": "Edit Mail", "value": false }, { "key": "edit_rule", "name": "Edit Rule", "value": false }, { "key": "removelist_save", "name": "Remove Addresses", "value": false }, { "key": "reset", "name": "Reset", "value": false }, { "key": "undelete_queue_mail", "name": "Restore Email From Queue", "value": false }, { "key": "retry_queue_mail", "name": "Retry Email Queue", "value": false }, { "key": "send", "name": "Send Mail", "value": false }, { "key": "send_test", "name": "Send Test", "value": false } ] }, { "key": "cleanup", "name": "Maintenance Admin", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "view": [ { "key": "clean_log", "name": "Clean Log", "value": false }, { "key": "clean_table", "name": "Clean Table", "value": false }, { "key": "cron", "name": "Cron", "value": false }, { "key": "errors", "name": "Errors", "value": false }, { "key": "fix_error", "name": "Fix Error", "value": false }, { "key": "logs", "name": "Logs", "value": false }, { "key": "status", "name": "Server Status", "value": false }, { "key": "reports", "name": "View Cache\/Summary Table", "value": false }, { "key": "build_report", "name": "View Summary Table", "value": false }, { "key": "view_table", "name": "View Table", "value": false } ], "some_actions": false, "action": [ { "key": "build_report", "name": "Build Report Summary", "value": false }, { "key": "clean_log", "name": "Clean Log", "value": false }, { "key": "remove_log", "name": "Clean Log", "value": false }, { "key": "clean_table", "name": "Clean Table", "value": false }, { "key": "clear_cache", "name": "Clear Cache", "value": false }, { "key": "remove_error", "name": "Remove Error", "value": false }, { "key": "resolve_error", "name": "Resolve Error", "value": false } ] }, { "key": "members", "name": "Members Admin", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "view": [ { "key": "add", "name": "Add Member", "value": false }, { "key": "edit", "name": "Edit Member", "value": false }, { "key": "member", "name": "View Member", "value": false }, { "key": "email_csv_dump", "name": "View Member Email Dump", "value": false }, { "key": "full_csv_dump", "name": "View Member Full Dump", "value": false } ], "some_actions": false, "action": [ { "key": "add", "name": "Add Member", "value": false }, { "key": "new_note", "name": "Add Note", "value": false }, { "key": "delete", "name": "Delete Member", "value": false }, { "key": "delete_note", "name": "Delete Note", "value": false }, { "key": "edit", "name": "Edit Member", "value": false }, { "key": "lock_member", "name": "Lock Member", "value": false }, { "key": "mark", "name": "Mark Member", "value": false }, { "key": "unlock_member", "name": "Unlock Member", "value": false } ] }, { "key": "network", "name": "Network Admin", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "some_actions": false, "action": [ { "key": "add_network", "name": "Add Network", "value": false }, { "key": "save_changes", "name": "Save Changes", "value": false } ] }, { "key": "news", "name": "News Admin", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "view": [ { "key": "new_news", "name": "Add News", "value": false }, { "key": "edit", "name": "Edit News Article", "value": false }, { "key": "notifications", "name": "Notifications", "value": false }, { "key": "reply_message", "name": "Reply Message", "value": false }, { "key": "send_message", "name": "Send Message", "value": false }, { "key": "send_note", "name": "Send Note", "value": false }, { "key": "messages", "name": "View Messages", "value": false }, { "key": "view", "name": "View News Article", "value": false }, { "key": "view_note", "name": "View Note", "value": false } ], "some_actions": false, "action": [ { "key": "add", "name": "Add News", "value": false }, { "key": "add_section", "name": "Add Section", "value": false }, { "key": "delete_all", "name": "Delete All", "value": false }, { "key": "delete", "name": "Delete News", "value": false }, { "key": "delete_note", "name": "Delete Note", "value": false }, { "key": "del_section", "name": "Delete Section", "value": false }, { "key": "edit", "name": "Edit News", "value": false }, { "key": "mark_all_read", "name": "Mark All Read", "value": false }, { "key": "mark_all_unread", "name": "Mark All Unread", "value": false }, { "key": "unviewed", "name": "Mark Unviewed", "value": false }, { "key": "viewed", "name": "Mark Viewed", "value": false }, { "key": "reply_message", "name": "Reply Message", "value": false }, { "key": "undelete_all", "name": "Restore All", "value": false }, { "key": "send_message", "name": "Send Message", "value": false }, { "key": "send_note", "name": "Send Note", "value": false }, { "key": "undelete_note", "name": "Undelete Note", "value": false } ] }, { "key": "payments", "name": "Payments Admin", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "view": [ { "key": "edit_dump", "name": "Edit Dump Format", "value": false }, { "key": "edit_payvia_field_mc", "name": "Edit Multiple Choice", "value": false }, { "key": "edit_open_payments", "name": "Edit Open Payments", "value": false }, { "key": "edit_payout_period", "name": "Edit Payout Period", "value": false }, { "key": "edit_payvia", "name": "Edit Payvia", "value": false }, { "key": "edit_payvia_field", "name": "Edit Payvia Field", "value": false }, { "key": "edit_payvia_field_mc_details", "name": "Edit Payvia Multiple Choice Details", "value": false }, { "key": "edit_payvia_rule", "name": "Edit Payvia Rule", "value": false }, { "key": "edit_payvia_setup", "name": "Edit Payvia Setup", "value": false }, { "key": "dumps", "name": "Get Dump Formats", "value": false }, { "key": "payout_periods", "name": "Payout Periods", "value": false }, { "key": "payout_periods_set_affiliates", "name": "Set Affiliate Payout Periods", "value": false }, { "key": "payvia_rules", "name": "Set Payvia Rules", "value": false }, { "key": "auto", "name": "View Auto Payments", "value": false }, { "key": "view_dump", "name": "View Dump Format", "value": false }, { "key": "view_payment_dump", "name": "View Payment Dump", "value": false }, { "key": "payvia", "name": "View Payvia", "value": false } ], "some_actions": false, "action": [ { "key": "add_dump", "name": "Add Dump Format", "value": false }, { "key": "add_payvia_field_mc", "name": "Add Multiple Choice", "value": false }, { "key": "add_payout_period", "name": "Add Payout Period", "value": false }, { "key": "add_payvia", "name": "Add Payvia", "value": false }, { "key": "add_payvia_field", "name": "Add Payvia Field", "value": false }, { "key": "add_payvia_rule", "name": "Add Payvia Rule", "value": false }, { "key": "bulk_changes", "name": "Bulk Changes", "value": false }, { "key": "copy_dump", "name": "Copy Dump Format", "value": false }, { "key": "delete_payout_period", "name": "Delete Payout Period", "value": false }, { "key": "payvia_field_mc_disable", "name": "Disable Option", "value": false }, { "key": "disable_payvia", "name": "Disable Payvia", "value": false }, { "key": "payvia_field_disable", "name": "Disable Payvia Field", "value": false }, { "key": "disable_payvia_rule", "name": "Disable Payvia Rule", "value": false }, { "key": "edit_dump", "name": "Edit Dump Format", "value": false }, { "key": "edit_payvia_field_mc", "name": "Edit Option", "value": false }, { "key": "edit_payment", "name": "Edit Payments", "value": false }, { "key": "edit_payout_period", "name": "Edit Payout Period", "value": false }, { "key": "edit_payvia", "name": "Edit Payvia", "value": false }, { "key": "edit_payvia_field", "name": "Edit Payvia Field", "value": false }, { "key": "edit_payvia_rule", "name": "Edit Payvia Rule", "value": false }, { "key": "payvia_field_mc_enable", "name": "Enable Option", "value": false }, { "key": "enable_payvia", "name": "Enable Payvia", "value": false }, { "key": "payvia_field_enable", "name": "Enable Payvia Field", "value": false }, { "key": "mark_as_paid", "name": "Mark as Paid", "value": false }, { "key": "payvia_field_mc_move_down", "name": "Move Down Option", "value": false }, { "key": "payvia_field_move_down", "name": "Move Down Payvia", "value": false }, { "key": "payvia_field_mc_move_up", "name": "Move Up Option", "value": false }, { "key": "payvia_field_move_up", "name": "Move Up Payvia", "value": false }, { "key": "payout_period_default", "name": "Payout Period Default", "value": false }, { "key": "payout_periods_set_affiliates", "name": "Payout Periods Set Affiliates", "value": false }, { "key": "restore_payout_period", "name": "Restore Payout Period", "value": false }, { "key": "store_open_payments", "name": "Store Open Payments", "value": false }, { "key": "store_open_payment", "name": "Store an Open Payment", "value": false }, { "key": "unstore_stored_payment", "name": "Unstore Payment", "value": false }, { "key": "unstore_payments", "name": "Unstore Payments", "value": false } ] }, { "key": "programs", "name": "Programs Admin", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "view": [ { "key": "add", "name": "Add Program", "value": false }, { "key": "edit", "name": "Edit Program", "value": false }, { "key": "set_affiliates", "name": "Enable Affiliates", "value": false }, { "key": "list_disabled", "name": "List Disabled", "value": false }, { "key": "list_enabled", "name": "List Enabled", "value": false } ], "some_actions": false, "action": [ { "key": "add_tour_all", "name": "Add All Tours", "value": false }, { "key": "add", "name": "Add Program", "value": false }, { "key": "add_tour", "name": "Add Tour", "value": false }, { "key": "change_disabled", "name": "Change Disabled", "value": false }, { "key": "change_enabled", "name": "Change Enabled", "value": false }, { "key": "delete", "name": "Delete Program", "value": false }, { "key": "disable", "name": "Disable Program", "value": false }, { "key": "edit_payout", "name": "Edit Payout", "value": false }, { "key": "edit", "name": "Edit Program", "value": false }, { "key": "enable", "name": "Enable Program", "value": false }, { "key": "remove_tour_all", "name": "Remove All Tours", "value": false }, { "key": "remove_tour", "name": "Remove Tour", "value": false } ] }, { "key": "promotionals", "name": "Promotionals Admin", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "view": [ { "key": "edit_promotional", "name": "Edit Promotional", "value": false }, { "key": "promotional_link", "name": "Promotional Link", "value": false }, { "key": "promotional_rules", "name": "Promotonal Rules", "value": false } ], "some_actions": false, "action": [ { "key": "add_promotional", "name": "Add Promotional", "value": false }, { "key": "add_rule", "name": "Add Rule", "value": false }, { "key": "delete_promotional", "name": "Delete Promotional", "value": false }, { "key": "disable_rule", "name": "Disable Rule", "value": false }, { "key": "edit_promotional", "name": "Edit Promotional", "value": false }, { "key": "edit_rule", "name": "Edit Rule", "value": false }, { "key": "restore_promotional", "name": "Restore Promotional", "value": false } ] }, { "key": "reporting", "name": "Reporting Admin", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "view": [ { "key": "acct_rep", "name": "Account Rep Report", "value": false }, { "key": "actual_affiliate_payments", "name": "Actual Affiliate Payments Report", "value": false }, { "key": "misc", "name": "Additional Payouts", "value": false }, { "key": "affiliate_ratios", "name": "Affiliate Ratios Report", "value": false }, { "key": "wm_join", "name": "Affiliate Referral Signup Payouts", "value": false }, { "key": "referral", "name": "Affiliate Referral Tier Payouts", "value": false }, { "key": "cascade", "name": "Cascade Report", "value": false }, { "key": "detail_trial", "name": "Detailed Trial Report", "value": false }, { "key": "fraud", "name": "Fraud Report Report", "value": false }, { "key": "graphical_affiliate_comparison", "name": "Graphical Affiliate Comparison Report", "value": false }, { "key": "payments_withheld", "name": "Payments Widthheld Report", "value": false }, { "key": "pending_transaction", "name": "Pending Transactions Report", "value": false }, { "key": "profit_loss", "name": "Profit & Loss Report", "value": false }, { "key": "related_transaction", "name": "Related Transactions Report", "value": false }, { "key": "retention", "name": "Retention Report", "value": false }, { "key": "single_day_comparison", "name": "Single Day Comparison Report", "value": false }, { "key": "subscription", "name": "Subscription Report", "value": false }, { "key": "surfer", "name": "Surfer Report", "value": false }, { "key": "transaction", "name": "Transaction Report", "value": false } ], "some_actions": false, "action": [ { "key": "edit_focus", "name": "Save and Customize Focuses", "value": false }, { "key": "edit_report", "name": "Save and Customize Reports", "value": false } ] }, { "key": "rewards", "name": "Rewards Admin", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "view": [ { "key": "points", "name": "Set Points", "value": false }, { "key": "shipped", "name": "Shipped Rewards", "value": false }, { "key": "unshipped", "name": "Unshipped", "value": false } ], "some_actions": false, "action": [ { "key": "add_cat", "name": "Add Category", "value": false }, { "key": "add_point_change", "name": "Add Point Change", "value": false }, { "key": "add", "name": "Add Reward", "value": false }, { "key": "delete_cat", "name": "Delete Category", "value": false }, { "key": "delete", "name": "Delete Reward", "value": false }, { "key": "delete_change", "name": "Delete Reward Change", "value": false }, { "key": "edit_points", "name": "Edit Points", "value": false }, { "key": "edit", "name": "Edit Reward", "value": false }, { "key": "move", "name": "Move Reward", "value": false }, { "key": "refund", "name": "Refund Points", "value": false }, { "key": "ship", "name": "Shipped", "value": false }, { "key": "undelete_cat", "name": "Undelete Category", "value": false }, { "key": "undelete", "name": "Undelete Reward", "value": false }, { "key": "unship", "name": "Unshipped", "value": false } ] }, { "key": "sites_templates", "name": "Site Templates Admin", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "view": [ { "key": "edit", "name": "Edit Template", "value": false }, { "key": "preview", "name": "Preview Template", "value": false } ], "some_actions": false, "action": [ { "key": "copy", "name": "Copy", "value": false }, { "key": "customize_edit", "name": "Customize Edit", "value": false }, { "key": "revert", "name": "Revert", "value": false }, { "key": "save", "name": "Save", "value": false } ] }, { "key": "sites", "name": "Sites Admin", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "view": [ { "key": "add", "name": "Add Site", "value": false }, { "key": "add_group", "name": "Add Site Group", "value": false }, { "key": "coupon_revisions", "name": "Coupon Revisions", "value": false }, { "key": "edit_coupon", "name": "Edit Coupon", "value": false }, { "key": "edit", "name": "Edit Site", "value": false }, { "key": "edit_group", "name": "Edit Site Group", "value": false }, { "key": "edit_tour", "name": "Edit Tour", "value": false }, { "key": "options", "name": "Options", "value": false }, { "key": "partners", "name": "Partners", "value": false }, { "key": "programs", "name": "Programs", "value": false }, { "key": "redirects", "name": "Redirects", "value": false }, { "key": "special_options", "name": "Special Options", "value": false }, { "key": "css_colors", "name": "View CSS Color Picker", "value": false }, { "key": "coupons", "name": "View Coupons", "value": false }, { "key": "groups", "name": "View Site Groups", "value": false } ], "some_actions": false, "action": [ { "key": "add_color", "name": "Add CSS Color", "value": false }, { "key": "add_coupon", "name": "Add Coupon", "value": false }, { "key": "add_group", "name": "Add Group", "value": false }, { "key": "add_option", "name": "Add Join Option", "value": false }, { "key": "add_option_rule", "name": "Add Option Rule", "value": false }, { "key": "add_redirect", "name": "Add Redirect", "value": false }, { "key": "add_redirect_rule", "name": "Add Redirect Rule", "value": false }, { "key": "add", "name": "Add Site", "value": false }, { "key": "add_partner", "name": "Add Site Partner", "value": false }, { "key": "add_tour", "name": "Add Tour", "value": false }, { "key": "delete_group", "name": "Delete Group", "value": false }, { "key": "delete_option", "name": "Delete Join Option", "value": false }, { "key": "delete_redirect", "name": "Delete Redirect", "value": false }, { "key": "delete", "name": "Delete Site", "value": false }, { "key": "delete_partner", "name": "Delete Site Partner", "value": false }, { "key": "delete_tour", "name": "Delete Tour", "value": false }, { "key": "disable_option_rule", "name": "Disable Option Rule", "value": false }, { "key": "disable_redirect_rule", "name": "Disable Redirect Rule", "value": false }, { "key": "edit_coupon", "name": "Edit Coupon", "value": false }, { "key": "edit_programs", "name": "Edit Enabled Programs", "value": false }, { "key": "edit_group", "name": "Edit Group", "value": false }, { "key": "edit_option", "name": "Edit Join Option", "value": false }, { "key": "edit_option_rule", "name": "Edit Option Rule", "value": false }, { "key": "edit_redirect", "name": "Edit Redirect", "value": false }, { "key": "edit_redirect_rule", "name": "Edit Redirect Rule", "value": false }, { "key": "edit", "name": "Edit Site", "value": false }, { "key": "edit_partner", "name": "Edit Site Partner", "value": false }, { "key": "edit_tour", "name": "Edit Tour", "value": false }, { "key": "edit_tour_options", "name": "Edit Tour Options", "value": false }, { "key": "move", "name": "Move Join Option", "value": false }, { "key": "undelete_group", "name": "Restore Group", "value": false }, { "key": "revert_field", "name": "Revert CSS Color", "value": false }, { "key": "revert_tour_option", "name": "Revert Tour Option", "value": false }, { "key": "set_colors", "name": "Set CSS Colors", "value": false }, { "key": "undelete_option", "name": "Undelete Join Option", "value": false }, { "key": "undelete_redirect", "name": "Undelete Redirect", "value": false }, { "key": "undelete", "name": "Undelete Site", "value": false }, { "key": "undelete_partner", "name": "Undelete Site Partner", "value": false }, { "key": "undelete_tour", "name": "Undelete Tour", "value": false } ] }, { "key": "skins_templates", "name": "Skins & Templates Admin", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "view": [ { "key": "css_colors", "name": "CSS Colors", "value": false }, { "key": "edit", "name": "Edit Specific Template", "value": false }, { "key": "templates", "name": "Edit Templates", "value": false }, { "key": "export", "name": "Export Skin", "value": false }, { "key": "import", "name": "Import Skin", "value": false }, { "key": "preview_recovery", "name": "Preview Recovered Template", "value": false }, { "key": "preview", "name": "Preview Template", "value": false }, { "key": "read", "name": "Read Template", "value": false }, { "key": "special_templates", "name": "Special Templates", "value": false }, { "key": "themes", "name": "Themes", "value": false } ], "some_actions": false, "action": [ { "key": "add_color", "name": "Add CSS Color", "value": false }, { "key": "add_skin", "name": "Add Skin", "value": false }, { "key": "add", "name": "Add Template", "value": false }, { "key": "copy", "name": "Copy Template", "value": false }, { "key": "create_palette", "name": "Create Palette", "value": false }, { "key": "customize", "name": "Customize Template", "value": false }, { "key": "del_skin", "name": "Delete Skin", "value": false }, { "key": "edit_skin", "name": "Edit Skin", "value": false }, { "key": "export_run", "name": "Export Skin", "value": false }, { "key": "flush", "name": "Flush Template Cache", "value": false }, { "key": "import_add", "name": "Import Skin", "value": false }, { "key": "recover", "name": "Recover Template", "value": false }, { "key": "revert", "name": "Revert Template", "value": false }, { "key": "save_defaults", "name": "Save Default Skin", "value": false }, { "key": "save", "name": "Save Template", "value": false }, { "key": "set_colors", "name": "Set CSS Color", "value": false }, { "key": "set_palette", "name": "Set Palette", "value": false } ] }, { "key": "support", "name": "Support Admin", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "view": [ { "key": "admin_areas", "name": "Admin Areas", "value": false }, { "key": "change_log", "name": "Change Log", "value": false } ], "some_actions": false, "action": [ { "key": "delete_link", "name": "Delete Link", "value": false }, { "key": "edit_link", "name": "Edit Link", "value": false }, { "key": "new_link", "name": "New Link", "value": false } ] }, { "key": "third_party", "name": "Third Party Admin", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "view": [ { "key": "biller_charges", "name": "Third Party Fees", "value": false }, { "key": "poll_status", "name": "Third Party Poll Status", "value": false } ], "some_actions": false, "action": [ { "key": "add_biller", "name": "Add Third Party", "value": false }, { "key": "delete_biller", "name": "Delete Third Party", "value": false }, { "key": "delete_biller_charge", "name": "Delete Third Party Fees", "value": false }, { "key": "edit_biller", "name": "Edit Third Party", "value": false }, { "key": "set_biller_charge", "name": "Set Third Party Fees", "value": false }, { "key": "restore_biller", "name": "Undelete Third Party", "value": false } ] }, { "key": "upsells", "name": "Upsells Admin", "display": false, "all_views": false, "all_actions": false, "editable": false, "some_views": false, "view": [ { "key": "incoming_xsells", "name": "Incoming Cross Sails", "value": false }, { "key": "incoming_upsells", "name": "Incoming Upsell", "value": false }, { "key": "outgoing_xsells", "name": "Outgoing Cross Sails", "value": false }, { "key": "outgoing_upsells", "name": "Outgoing Upsell", "value": false } ], "some_actions": false, "action": [ { "key": "add_rule", "name": "Add Rule", "value": false }, { "key": "add", "name": "Add Upsell", "value": false }, { "key": "delete", "name": "Delete Upsell", "value": false }, { "key": "disable_rule", "name": "Disable Rule", "value": false }, { "key": "edit_rule", "name": "Edit Rule", "value": false }, { "key": "edit", "name": "Edit Upsell", "value": false }, { "key": "move", "name": "Move", "value": false }, { "key": "undelete", "name": "Undelete Upsell", "value": false } ] } ], "custom": false }
Example Code
PHP
<?php $headers = array( //set your username and API key here 'api-key: 44b5498dbcb481a0d00b404c0169af62', 'api-username: tmm1phrvezsbu' ); $url = 'http://yourdomain.com'; //set your NATS URL here $data = Array( 'loginid' => '3', 'limited' => 0, ); $request = Array( 'method' => 'GET', 'path' => 'v1/affiliate/permissions', 'data' => $data ); /*code below is the same for (almost) every API call */ $curl = curl_init(); $url = $url.'/api/'.$request['path']; $query = http_build_query($request['data']); if($request['method'] == 'GET'){ //add query string parameters to the end of the url $url = $url.'?'.$query; }else{ //send parameters as POST fields curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, $query); if($request['method'] != 'POST'){ $headers[] ='X-HTTP-Method: '.$request['method']; //send custom request method } } curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $resp = curl_exec($curl); //dumps an associative array representation of the json var_dump(json_decode($resp, true)); // Close request to clear up some resources curl_close($curl); ?>