PATCH /affiliate/allsettings
Description
- Update all affiliate settings
Resource URL
- http://domain/api/affiliate/allsettings
- Replace domain with the nats domain
Request Method
Response Format
Authentication
Parameters
Parameters can be sent as url encoded params
- loginid
- reviewed
- invoicer
- req_docs
- w9
- trust_level
- payout_approval
- type: boolean_digit (0 or 1)
- optional
- custom1
- custom2
- custom3
- custom4
- custom5
- default_campaign
- default_program
- default_site
- inhouse
- firstname
- lastname
- email
- company
- url
- tel
- icq
- aim
- msn
- address1
- address2
- city
- state
- country
- zip_code
- tax_id_or_ssn
- mailok
- allow_subscription_passthrough
- type: boolean_digit (0 or 1)
- optional
- allow_option_force
- type: boolean_digit (0 or 1)
- optional
- remote_access
- type: boolean_digit (0 or 1)
- optional
- remote_adtool
- type: boolean_digit (0 or 1)
- optional
- remote_payment
- type: boolean_digit (0 or 1)
- optional
- language
- unencoded
- startpage
- live_update_defaults
- flag1
- flag2
- flag3
- flag4
- flag5
- select1
- select2
- select3
- select4
- select5
- notify_password
- notify_payvia
- notify_payvia_info
- notify_defaults
- notify_details
- notify_settings
- notify_badlinkcode
- notify_member_change
- notify_member_voided
- notify_member_chargeback
- notify_member_credited
- notify_member_insufficient
- notify_member_cancelled
- notify_member_rebilled
- notify_member_joined
- notify_member_pre_joined
- notify_member_pending_joined
- notify_member_pre_rebilled
- notify_member_pending_rebilled
- notify_member_void_reversal
- notify_member_credit_reversal
- notify_member_chargeback_reversal
- notify_member_insufficient_reversal
- email_promotional
- email_on_notify
- email_on_member_change
- email_on_member_voided
- email_on_member_chargeback
- email_on_member_credited
- email_on_member_insufficient
- email_on_member_cancelled
- email_on_member_rebilled
- email_on_member_joined
- email_on_member_pre_joined
- email_on_member_pending_joined
- email_on_member_pre_rebilled
- email_on_member_pending_rebilled
- email_on_member_void_reversal
- email_on_member_credit_reversal
- email_on_member_chargeback_reversal
- email_on_member_insufficient_reversal
- verify_details
- verify_settings
- verify_defaults
- verify_payvia
- verify_payvia_info
- old_post_member_approval
- old_post_member_rebill
- old_post_member_upgrade
- old_post_member_expire
- old_post_member_insufficient_fund
- old_post_member_credit
- old_post_member_chargeback
- old_post_member_void
- old_post_member_upgradedeny
- old_post_member_change_details
- old_post_member_void_reversal
- old_post_member_credit_reversal
- old_post_member_chargeback_reversal
- old_post_member_insufficient_reversal
- old_post_member_pre_approval
- old_post_member_pre_rebill
- old_post_member_pending_approval
- old_post_member_pending_rebill
- default_stats_view
- default_stats_date_range
- default_stats_limit_site
- default_stats_limit_program
- default_stats_limit_campaign
- default_stats_small_map_1_data
- default_stats_small_map_2_data
- default_stats_pie_chart_1_data
- default_stats_pie_chart_2_data
- default_stats_pie_chart_3_data
- default_stats_pie_chart_4_data
- default_stats_pie_chart_5_data
- default_stats_pie_chart_1_break
- default_stats_pie_chart_2_break
- default_stats_pie_chart_3_break
- default_stats_pie_chart_4_break
- default_stats_pie_chart_5_break
- default_stats_mixed_chart_1_type
- default_stats_mixed_chart_2_type
- default_stats_mixed_chart_1_data
- default_stats_mixed_chart_2_data
- default_stats_multi_graph_data_1
- default_stats_multi_graph_data_2
- default_stats_multi_graph_data_3
- default_stats_large_map_data
- default_stats_comp_data
- default_stats_order
- default_stats_table_column1
- default_stats_table_column2
- default_stats_table_column3
- default_stats_table_column4
- default_stats_table_column5
- default_stats_table_column6
- default_stats_table_column7
- default_stats_table_column8
- default_stats_table_column9
- default_adtools_use_limits
- default_adtools_view
- default_adtools_cat_1_type
- default_adtools_cat_2_type
- default_adtools_cat_3_type
- default_adtools_cat_4_type
- default_adtools_cat_5_type
- default_adtools_publish_setting
- default_adtools_publish_date
- default_adtools_dump_separater
- default_adtools_dump_record_end
- default_adtools_dump_field_1
- default_adtools_dump_field_2
- default_adtools_dump_field_3
- default_adtools_dump_field_4
- default_adtools_dump_field_5
- default_adtools_dump_field_6
- default_adtools_dump_field_7
- default_adtools_dump_field_8
- default_news_announcement_section
- default_news_section
- default_news_count
- default_account_view
- default_account_changes_count
- default_account_changes_order
- default_account_campaign_count
- default_account_campaign_order
- default_adtools_dump_format
- email_on_message
- affiliate_contact1
- affiliate_contact2
- affiliate_contact3
- affiliate_contact4
- affiliate_contact5
- old_post_member_pending_ncr
- email_on_payment_stored
- email_on_payment_paid
- post_member_approval_disallow
- post_member_rebill_disallow
- post_member_upgrade_disallow
- post_member_expire_disallow
- post_member_insufficient_fund_disallow
- post_member_credit_disallow
- post_member_chargeback_disallow
- post_member_void_disallow
- post_member_upgradedeny_disallow
- post_member_change_details_disallow
- post_member_void_reversal_disallow
- post_member_credit_reversal_disallow
- post_member_chargeback_reversal_disallow
- post_member_insufficient_reversal_disallow
- post_member_pre_approval_disallow
- post_member_pre_rebill_disallow
- post_member_pending_approval_disallow
- post_member_pending_rebill_disallow
- post_member_perminute_allowed
- post_member_perminute_disallow
- post_member_seconds_allowed
- post_member_seconds_disallow
- post_member_initial_allowed
- post_member_initial_disallow
- post_member_trial_allowed
- post_member_trial_disallow
- post_member_insufficient_funds_reversal_allowed
- post_member_insufficient_funds_reversal_disallow
- post_member_pending_ncr_allowed
- post_member_pending_ncr_disallow
- post_extra_vars_campaignid_allowed
- post_extra_vars_programid_allowed
- post_extra_vars_siteid_allowed
- post_extra_vars_tourid_allowed
- post_extra_vars_optionid_allowed
- post_extra_vars_adtoolid_allowed
- post_extra_vars_subid1_allowed
- post_extra_vars_subid2_allowed
- post_extra_vars_billerid_allowed
- post_extra_vars_countryid_allowed
- post_extra_vars_promotionalid_allowed
- post_extra_vars_campaignid_disallow
- post_extra_vars_programid_disallow
- post_extra_vars_siteid_disallow
- post_extra_vars_tourid_disallow
- post_extra_vars_optionid_disallow
- post_extra_vars_adtoolid_disallow
- post_extra_vars_subid1_disallow
- post_extra_vars_subid2_disallow
- post_extra_vars_billerid_disallow
- post_extra_vars_countryid_disallow
- post_extra_vars_promotionalid_disallow
- post_member_approval_allowed
- post_member_rebill_allowed
- post_member_upgrade_allowed
- post_member_expire_allowed
- post_member_insufficient_fund_allowed
- post_member_credit_allowed
- post_member_chargeback_allowed
- post_member_void_allowed
- post_member_upgradedeny_allowed
- post_member_change_details_allowed
- post_member_void_reversal_allowed
- post_member_credit_reversal_allowed
- post_member_chargeback_reversal_allowed
- post_member_insufficient_reversal_allowed
- post_member_pre_approval_allowed
- post_member_pre_rebill_allowed
- post_member_pending_approval_allowed
- post_member_pending_rebill_allowed
- notify_member_conversion
- email_on_member_conversion
- left_sidebar_collapse
- default_admin_area
Example Request
Method: PATCH
URL: http://domain/api/affiliate/allsettings
Form Data:
- loginid: 3
- reviewed: 0
- firstname: test
- lastname: affiliate
- email: test@email.com
- company: TMM
- url: www.toomuchmedia.com
- tel: 666-666-6666
- address1: 1 address street
- city: city
- state: NJ
- country: US
- zip_code: 66666
- mailok: 1
- allow_subscription_passthrough: 1
- allow_option_force: 1
- remote_access: 1
- remote_adtool: 1
- remote_payment: 1
- language: en
Response:
{
"result": 1,
"success": true
}
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',
'reviewed' => 0,
'firstname' => 'test',
'lastname' => 'affiliate',
'email' => 'test@email.com',
'company' => 'TMM',
'url' => 'www.toomuchmedia.com',
'tel' => '666-666-6666',
'address1' => '1 address street',
'city' => 'city',
'state' => 'NJ',
'country' => 'US',
'zip_code' => '66666',
'mailok' => 1,
'allow_subscription_passthrough' => 1,
'allow_option_force' => 1,
'remote_access' => 1,
'remote_adtool' => 1,
'remote_payment' => 1,
'language' => 'en',
);
$request = Array(
'method' => 'PATCH',
'path' => 'v1/affiliate/allsettings',
'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);
?>