Difference between revisions of "NATS5 REST API Affiliate PATCH settings"
From TMM Wiki
Jump to navigationJump to search (Created page with "{{NATS5 Manual | show_api_admin_section = true }} == '''PATCH /affiliate/settings''' == '''Note''': This is an autogenerated wiki page for the NATS5 API. There may be addition...") |
|||
Line 1: | Line 1: | ||
{{NATS5 Manual | {{NATS5 Manual | ||
− | | | + | | show_api_admin_affiliate_section = true |
}} | }} | ||
== '''PATCH /affiliate/settings''' == | == '''PATCH /affiliate/settings''' == |
Latest revision as of 16:58, 9 August 2019
PATCH /affiliate/settings
Note: This is an autogenerated wiki page for the NATS5 API. There may be additional descriptions or examples available on the NATS 4 API wiki for this API.
Description
- Update settings for a specific affiliate
Resource URL
- http://domain/api/affiliate/settings
- Replace domain with the nats domain
- PATCH
Response Format
- JSON
- HTTP headers
Parameters
Parameters can be sent as url encoded params
- loginid
- required
- unencoded
- type: digit
- optional
- startpage
- optional
- live_update_defaults
- type: digit
- optional
- flag1
- type: digit
- optional
- flag2
- type: digit
- optional
- flag3
- type: digit
- optional
- flag4
- type: digit
- optional
- flag5
- type: digit
- optional
- select1
- optional
- select2
- optional
- select3
- optional
- select4
- optional
- select5
- optional
- notify_password
- type: digit
- optional
- notify_payvia
- type: digit
- optional
- notify_payvia_info
- type: digit
- optional
- notify_defaults
- type: digit
- optional
- notify_details
- type: digit
- optional
- notify_settings
- type: digit
- optional
- notify_badlinkcode
- type: digit
- optional
- notify_member_change
- type: digit
- optional
- notify_member_voided
- type: digit
- optional
- notify_member_chargeback
- type: digit
- optional
- notify_member_credited
- type: digit
- optional
- notify_member_insufficient
- type: digit
- optional
- notify_member_cancelled
- type: digit
- optional
- notify_member_rebilled
- type: digit
- optional
- notify_member_joined
- type: digit
- optional
- notify_member_pre_joined
- type: digit
- optional
- notify_member_pending_joined
- type: digit
- optional
- notify_member_pre_rebilled
- type: digit
- optional
- notify_member_pending_rebilled
- type: digit
- optional
- notify_member_void_reversal
- type: digit
- optional
- notify_member_credit_reversal
- type: digit
- optional
- notify_member_chargeback_reversal
- type: digit
- optional
- notify_member_insufficient_reversal
- type: digit
- optional
- email_promotional
- type: digit
- optional
- email_on_notify
- type: digit
- optional
- email_on_member_change
- type: digit
- optional
- email_on_member_voided
- type: digit
- optional
- email_on_member_chargeback
- type: digit
- optional
- email_on_member_credited
- type: digit
- optional
- email_on_member_insufficient
- type: digit
- optional
- email_on_member_cancelled
- type: digit
- optional
- email_on_member_rebilled
- type: digit
- optional
- email_on_member_joined
- type: digit
- optional
- email_on_member_pre_joined
- type: digit
- optional
- email_on_member_pending_joined
- type: digit
- optional
- email_on_member_pre_rebilled
- type: digit
- optional
- email_on_member_pending_rebilled
- type: digit
- optional
- email_on_member_void_reversal
- type: digit
- optional
- email_on_member_credit_reversal
- type: digit
- optional
- email_on_member_chargeback_reversal
- type: digit
- optional
- email_on_member_insufficient_reversal
- type: digit
- optional
- verify_details
- type: digit
- optional
- verify_settings
- type: digit
- optional
- verify_defaults
- type: digit
- optional
- verify_payvia
- type: digit
- optional
- verify_payvia_info
- type: digit
- optional
- old_post_member_approval
- optional
- old_post_member_rebill
- optional
- old_post_member_upgrade
- optional
- old_post_member_expire
- optional
- old_post_member_insufficient_fund
- optional
- old_post_member_credit
- optional
- old_post_member_chargeback
- optional
- old_post_member_void
- optional
- old_post_member_upgradedeny
- optional
- old_post_member_change_details
- optional
- old_post_member_void_reversal
- optional
- old_post_member_credit_reversal
- optional
- old_post_member_chargeback_reversal
- optional
- old_post_member_insufficient_reversal
- optional
- old_post_member_pre_approval
- optional
- old_post_member_pre_rebill
- optional
- old_post_member_pending_approval
- optional
- old_post_member_pending_rebill
- optional
- default_stats_view
- type: digit
- optional
- default_stats_date_range
- type: digit
- optional
- default_stats_limit_site
- type: digit
- optional
- default_stats_limit_program
- type: digit
- optional
- default_stats_limit_campaign
- type: digit
- optional
- default_stats_small_map_1_data
- type: digit
- optional
- default_stats_small_map_2_data
- type: digit
- optional
- default_stats_pie_chart_1_data
- type: digit
- optional
- default_stats_pie_chart_2_data
- type: digit
- optional
- default_stats_pie_chart_3_data
- type: digit
- optional
- default_stats_pie_chart_4_data
- type: digit
- optional
- default_stats_pie_chart_5_data
- type: digit
- optional
- default_stats_pie_chart_1_break
- type: digit
- optional
- default_stats_pie_chart_2_break
- type: digit
- optional
- default_stats_pie_chart_3_break
- type: digit
- optional
- default_stats_pie_chart_4_break
- type: digit
- optional
- default_stats_pie_chart_5_break
- type: digit
- optional
- default_stats_mixed_chart_1_type
- type: digit
- optional
- default_stats_mixed_chart_2_type
- type: digit
- optional
- default_stats_mixed_chart_1_data
- type: digit
- optional
- default_stats_mixed_chart_2_data
- type: digit
- optional
- default_stats_multi_graph_data_1
- type: digit
- optional
- default_stats_multi_graph_data_2
- type: digit
- optional
- default_stats_multi_graph_data_3
- type: digit
- optional
- default_stats_large_map_data
- type: digit
- optional
- default_stats_comp_data
- type: digit
- optional
- default_stats_order
- type: digit
- optional
- default_stats_table_column1
- type: digit
- optional
- default_stats_table_column2
- type: digit
- optional
- default_stats_table_column3
- type: digit
- optional
- default_stats_table_column4
- type: digit
- optional
- default_stats_table_column5
- type: digit
- optional
- default_stats_table_column6
- type: digit
- optional
- default_stats_table_column7
- type: digit
- optional
- default_stats_table_column8
- type: digit
- optional
- default_stats_table_column9
- type: digit
- optional
- default_adtools_use_limits
- type: digit
- optional
- default_adtools_view
- type: digit
- optional
- default_adtools_cat_1_type
- type: digit
- optional
- default_adtools_cat_2_type
- type: digit
- optional
- default_adtools_cat_3_type
- type: digit
- optional
- default_adtools_cat_4_type
- type: digit
- optional
- default_adtools_cat_5_type
- type: digit
- optional
- default_adtools_publish_setting
- type: digit
- optional
- default_adtools_publish_date
- optional
- default_adtools_dump_separater
- type: digit
- optional
- default_adtools_dump_record_end
- type: digit
- optional
- default_adtools_dump_field_1
- type: digit
- optional
- default_adtools_dump_field_2
- type: digit
- optional
- default_adtools_dump_field_3
- type: digit
- optional
- default_adtools_dump_field_4
- type: digit
- optional
- default_adtools_dump_field_5
- type: digit
- optional
- default_adtools_dump_field_6
- type: digit
- optional
- default_adtools_dump_field_7
- type: digit
- optional
- default_adtools_dump_field_8
- type: digit
- optional
- default_news_announcement_section
- type: digit
- optional
- default_news_section
- type: digit
- optional
- default_news_count
- type: digit
- optional
- default_account_view
- type: digit
- optional
- default_account_changes_count
- type: digit
- optional
- default_account_changes_order
- type: digit
- optional
- default_account_campaign_count
- type: digit
- optional
- default_account_campaign_order
- type: digit
- optional
- default_adtools_dump_format
- type: digit
- optional
- email_on_message
- type: digit
- optional
- affiliate_contact1
- optional
- affiliate_contact2
- optional
- affiliate_contact3
- optional
- affiliate_contact4
- optional
- affiliate_contact5
- optional
- old_post_member_pending_ncr
- optional
- email_on_payment_stored
- type: digit
- optional
- email_on_payment_paid
- type: digit
- optional
- post_member_approval_disallow
- type: digit
- optional
- post_member_rebill_disallow
- type: digit
- optional
- post_member_upgrade_disallow
- type: digit
- optional
- post_member_expire_disallow
- type: digit
- optional
- post_member_insufficient_fund_disallow
- type: digit
- optional
- post_member_credit_disallow
- type: digit
- optional
- post_member_chargeback_disallow
- type: digit
- optional
- post_member_void_disallow
- type: digit
- optional
- post_member_upgradedeny_disallow
- type: digit
- optional
- post_member_change_details_disallow
- type: digit
- optional
- post_member_void_reversal_disallow
- type: digit
- optional
- post_member_credit_reversal_disallow
- type: digit
- optional
- post_member_chargeback_reversal_disallow
- type: digit
- optional
- post_member_insufficient_reversal_disallow
- type: digit
- optional
- post_member_pre_approval_disallow
- type: digit
- optional
- post_member_pre_rebill_disallow
- type: digit
- optional
- post_member_pending_approval_disallow
- type: digit
- optional
- post_member_pending_rebill_disallow
- type: digit
- optional
- post_member_perminute_allowed
- type: digit
- optional
- post_member_perminute_disallow
- type: digit
- optional
- post_member_seconds_allowed
- type: digit
- optional
- post_member_seconds_disallow
- type: digit
- optional
- post_member_initial_allowed
- type: digit
- optional
- post_member_initial_disallow
- type: digit
- optional
- post_member_trial_allowed
- type: digit
- optional
- post_member_trial_disallow
- type: digit
- optional
- post_member_insufficient_funds_reversal_allowed
- type: digit
- optional
- post_member_insufficient_funds_reversal_disallow
- type: digit
- optional
- post_member_pending_ncr_allowed
- type: digit
- optional
- post_member_pending_ncr_disallow
- type: digit
- optional
- post_extra_vars_campaignid_allowed
- type: digit
- optional
- post_extra_vars_programid_allowed
- type: digit
- optional
- post_extra_vars_siteid_allowed
- type: digit
- optional
- post_extra_vars_tourid_allowed
- type: digit
- optional
- post_extra_vars_optionid_allowed
- type: digit
- optional
- post_extra_vars_adtoolid_allowed
- type: digit
- optional
- post_extra_vars_subid1_allowed
- type: digit
- optional
- post_extra_vars_subid2_allowed
- type: digit
- optional
- post_extra_vars_billerid_allowed
- type: digit
- optional
- post_extra_vars_countryid_allowed
- type: digit
- optional
- post_extra_vars_promotionalid_allowed
- type: digit
- optional
- post_extra_vars_campaignid_disallow
- type: digit
- optional
- post_extra_vars_programid_disallow
- type: digit
- optional
- post_extra_vars_siteid_disallow
- type: digit
- optional
- post_extra_vars_tourid_disallow
- type: digit
- optional
- post_extra_vars_optionid_disallow
- type: digit
- optional
- post_extra_vars_adtoolid_disallow
- type: digit
- optional
- post_extra_vars_subid1_disallow
- type: digit
- optional
- post_extra_vars_subid2_disallow
- type: digit
- optional
- post_extra_vars_billerid_disallow
- type: digit
- optional
- post_extra_vars_countryid_disallow
- type: digit
- optional
- post_extra_vars_promotionalid_disallow
- type: digit
- optional
- post_member_approval_allowed
- type: digit
- optional
- post_member_rebill_allowed
- type: digit
- optional
- post_member_upgrade_allowed
- type: digit
- optional
- post_member_expire_allowed
- type: digit
- optional
- post_member_insufficient_fund_allowed
- type: digit
- optional
- post_member_credit_allowed
- type: digit
- optional
- post_member_chargeback_allowed
- type: digit
- optional
- post_member_void_allowed
- type: digit
- optional
- post_member_upgradedeny_allowed
- type: digit
- optional
- post_member_change_details_allowed
- type: digit
- optional
- post_member_void_reversal_allowed
- type: digit
- optional
- post_member_credit_reversal_allowed
- type: digit
- optional
- post_member_chargeback_reversal_allowed
- type: digit
- optional
- post_member_insufficient_reversal_allowed
- type: digit
- optional
- post_member_pre_approval_allowed
- type: digit
- optional
- post_member_pre_rebill_allowed
- type: digit
- optional
- post_member_pending_approval_allowed
- type: digit
- optional
- post_member_pending_rebill_allowed
- type: digit
- optional
- notify_member_conversion
- type: digit
- optional
- email_on_member_conversion
- type: digit
- optional
- left_sidebar_collapse
- type: digit
- optional
- default_admin_area
- type: digit
- optional
Example Request
Method: PATCH
URL: http://domain/api/affiliate/settings
Form Data:
- loginid: 3
- notify_password: 1
- notify_payvia: 1
- notify_payvia_info: 0
- notify_defaults: 0
- notify_details: 1
Response:
{ "result": 5, "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', 'notify_password' => 1, 'notify_payvia' => 1, 'notify_payvia_info' => 0, 'notify_defaults' => 0, 'notify_details' => 1, ); $request = Array( 'method' => 'PATCH', 'path' => 'v1/affiliate/settings', '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); ?>