For the complete documentation index, see llms.txt. This page is also available as Markdown.

/api/site/option

get

Get option details

Authorizations
api-keystringRequired
api-usernamestringRequired
Query parameters
optionidintegerRequired
formattedstringOptionalDefault: 0
option_billerstringOptionalDefault: 0
Responses
200

success

successbooleanOptionalExample: true
get/api/site/option
PHP (cURL)
<?php

$headers = array( //set your username and API key here
	'api-key: 44b5498dbcb481a0d00b404c0169af62',
	'api-username: tmm1phrvezsbu'
);
$url = 'https://yourdomain.com'; //set your NATS URL here

$data = array(
		'optionid' => 2,
		'formatted' => 1,
		'option_biller' => 1
	);

$request = array(
	'method' => 'GET',
	'path' => 'site/option',
	'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);
?>
200

success

{
  "success": true,
  "option": {
    "optionid": "2",
    "siteid": "2",
    "networkid": "0",
    "deleted": "0",
    "enabled": "0",
    "orderid": "1",
    "option_type_id": "0",
    "billerid": "0",
    "programid": "0",
    "legacy": "0",
    "siteid_nice": "test site name",
    "biller_details": [
      {
        "billerid": "2",
        "biller": "CCBILL",
        "fields": [
          {
            "display": "CC Payment ID",
            "required": "1",
            "size": "6",
            "type": "",
            "name": "biller_optioninfo_subscriptionTypeId_cc",
            "value": "",
            "required_type": "cc",
            "display_value": ""
          },
          {
            "display": "Check Payment ID",
            "required": "1",
            "size": "6",
            "type": "",
            "name": "biller_optioninfo_subscriptionTypeId_check",
            "value": "",
            "required_type": "check",
            "display_value": ""
          },
          {
            "display": "Web900 Payment ID",
            "required": "1",
            "size": "6",
            "type": "",
            "name": "biller_optioninfo_subscriptionTypeId_900",
            "value": "",
            "required_type": "900",
            "display_value": ""
          },
          {
            "display": "Debit Payment ID",
            "required": "1",
            "size": "6",
            "type": "",
            "name": "biller_optioninfo_subscriptionTypeId_elv",
            "value": "",
            "required_type": "elv",
            "display_value": ""
          },
          {
            "display": "Direct Pay Payment ID",
            "required": "1",
            "size": "6",
            "type": "",
            "name": "biller_optioninfo_subscriptionTypeId_dp",
            "value": "",
            "required_type": "dp",
            "display_value": ""
          },
          {
            "display": "Alter-Sub",
            "required": "0",
            "size": "6",
            "type": "",
            "name": "biller_optioninfo_clientSubacc",
            "value": "",
            "display_value": ""
          },
          {
            "display": "Alter-Upgrade",
            "required": "0",
            "size": "6",
            "type": "",
            "name": "biller_optioninfo_upgradesub",
            "value": "",
            "display_value": ""
          },
          {
            "display": "Alter CC Form",
            "required": "0",
            "size": "6",
            "type": "",
            "name": "biller_optioninfo_formName_cc",
            "value": "",
            "display_value": ""
          },
          {
            "display": "Alter Check Form",
            "required": "0",
            "size": "6",
            "type": "",
            "name": "biller_optioninfo_formName_check",
            "value": "",
            "display_value": ""
          },
          {
            "display": "Alter Web900 Form",
            "required": "0",
            "size": "6",
            "type": "",
            "name": "biller_optioninfo_formName_900",
            "value": "",
            "display_value": ""
          },
          {
            "display": "Alter Debit Form",
            "required": "0",
            "size": "6",
            "type": "",
            "name": "biller_optioninfo_formName_elv",
            "value": "",
            "required_type": "elv",
            "display_value": ""
          },
          {
            "display": "Alter Direct Pay Form",
            "required": "0",
            "size": "6",
            "type": "",
            "name": "biller_optioninfo_formName_dp",
            "value": "",
            "required_type": "dp",
            "display_value": ""
          }
        ]
      },
      {
        "billerid": "1",
        "biller": "NETBILLING",
        "fields": [
          {
            "display": "Auth Amount ($0 initial only)",
            "required": "0",
            "size": "",
            "type": "",
            "name": "biller_optioninfo_auth_amount",
            "value": "",
            "display_value": ""
          },
          {
            "display": "Discount Upgrade Price",
            "required": "0",
            "size": "",
            "type": "",
            "name": "biller_optioninfo_upgradeprice",
            "value": "",
            "display_value": ""
          },
          {
            "display": "Disable Initial AVS",
            "required": "0",
            "size": "1",
            "type": "checkbox",
            "name": "biller_optioninfo_disable_avs",
            "value": "",
            "display_value": "No"
          },
          {
            "display": "Disable Initial Fraud Checking",
            "required": "0",
            "size": "1",
            "type": "checkbox",
            "name": "biller_optioninfo_disable_fraud_checking",
            "value": "",
            "display_value": "No"
          },
          {
            "display": "Enable Oneclick AVS",
            "required": "0",
            "size": "1",
            "type": "checkbox",
            "name": "biller_optioninfo_enable_oneclick_avs",
            "value": "",
            "display_value": "No"
          },
          {
            "display": "Enable Oneclick Fraud Checking",
            "required": "0",
            "size": "1",
            "type": "checkbox",
            "name": "biller_optioninfo_enable_oneclick_fraud_checking",
            "value": "",
            "display_value": "No"
          },
          {
            "display": "Packageplus Prorate",
            "required": "0",
            "size": "1",
            "type": "checkbox",
            "name": "biller_optioninfo_prorate",
            "value": "",
            "display_value": "No"
          },
          {
            "display": "Free Trial No Auth",
            "required": "0",
            "size": "1",
            "type": "checkbox",
            "name": "biller_optioninfo_free_trial_no_auth",
            "value": "",
            "display_value": "No"
          }
        ]
      }
    ],
    "details": {
      "name": "Join Form",
      "initial": "1",
      "initial_days": "1",
      "rebill": "30",
      "rebill_days": "30",
      "no_old_members": "0",
      "initial_dec": "$1.00",
      "rebill_dec": "$30.00",
      "trial": 1,
      "active_all": "0"
    },
    "is_gateway": 0,
    "details_formatted": [
      {
        "name": "name",
        "display": "Join Form Text",
        "required": true,
        "section": "main",
        "special_design": true,
        "value": "Join Form",
        "display_value": "Join Form"
      },
      {
        "name": "initial",
        "display": "Initial Cost",
        "check": "alnum_number_check",
        "section": "main",
        "special_design": true,
        "value": "1",
        "display_value": "1"
      },
      {
        "name": "initial_days",
        "display": "Initial Days",
        "check": "alnum_number_check",
        "section": "main",
        "special_design": true,
        "value": "1",
        "display_value": "1"
      },
      {
        "name": "rebill",
        "display": "Recurring Cost",
        "check": "alnum_number_check",
        "section": "main",
        "special_design": true,
        "value": "30",
        "display_value": "30"
      },
      {
        "name": "rebill_days",
        "display": "Recurring Days",
        "check": "alnum_number_check",
        "section": "main",
        "special_design": true,
        "value": "30",
        "display_value": "30"
      },
      {
        "name": "package_upgrade_allowed",
        "display": "Package Upgrade Allowed",
        "type": "checkbox",
        "section": "package",
        "special_design": true,
        "value": "",
        "display_value": "No"
      },
      {
        "name": "enable_global_package_upgrade",
        "display": "Package Upgrade Globally",
        "type": "checkbox",
        "section": "package",
        "special_design": true,
        "value": "",
        "display_value": "No"
      },
      {
        "name": "package_use_initial",
        "display": "Package Use Initial",
        "type": "checkbox",
        "section": "package",
        "special_design": true,
        "value": "",
        "display_value": "No"
      },
      {
        "name": "packageid",
        "display": "Package ID",
        "check": "alnum_number_check",
        "section": "package",
        "special_design": true,
        "value": "",
        "display_value": ""
      },
      {
        "name": "no_old_members",
        "display": "Disallow for Old Members",
        "type": "checkbox",
        "section": "misc",
        "special_design": false,
        "value": "0",
        "display_value": "No"
      },
      {
        "name": "hidden",
        "display": "Hide on Join Form",
        "type": "checkbox",
        "section": "misc",
        "special_design": false,
        "value": "",
        "display_value": "No"
      },
      {
        "name": "active_all",
        "display": "Active by Default",
        "type": "checkbox",
        "section": "misc",
        "special_design": false,
        "value": "0",
        "display_value": "No"
      }
    ],
    "name": "Join Form",
    "initial": "1",
    "initial_days": "1",
    "rebill": "30",
    "rebill_days": "30",
    "no_old_members": "0",
    "initial_dec": "$1.00",
    "rebill_dec": "$30.00",
    "trial": 1,
    "active_all": "0",
    "site": {
      "siteid": "2",
      "networkid": "0",
      "site": "testSite",
      "deleted": "0",
      "name": "test site name",
      "type": "0",
      "hidden": "0",
      "date_added": "1559932173",
      "date_live": "0",
      "network": "0",
      "reuse_active": "0",
      "no_personal_member_info": "0",
      "mobile_tour": "0",
      "site_group_id": "0",
      "featured": "0",
      "brand_id": "0",
      "require_atvod_verification": "0",
      "atvod_client_id": "",
      "atvod_operator_id": "",
      "atvod_password": "",
      "atvod_authenticate_profile_id": "",
      "atvod_passport_profile_id": "",
      "atvod_driving_licence_profile_id": "",
      "type_nice": "Membership",
      "site_group_nice": "None"
    }
  },
  "option_type": {
    "key": 0,
    "name": "normal",
    "mapping": "optioninfo",
    "special": 0,
    "nosite": 0,
    "extra_offers": 1,
    "incoming_sale": 0,
    "rule_type": "option"
  }
}
post

Add join option

Authorizations
api-keystringRequired
api-usernamestringRequired
Query parameters
siteidintegerOptionalDefault: 0
option_type_idintegerOptionalDefault: 0
detailsstringRequired
billerstringOptional
Responses
200

success

successbooleanOptionalExample: true
post/api/site/option
PHP (cURL)
<?php

$headers = array( //set your username and API key here
	'api-key: 44b5498dbcb481a0d00b404c0169af62',
	'api-username: tmm1phrvezsbu'
);
$url = 'https://yourdomain.com'; //set your NATS URL here

$data = array(
		'siteid' => '2',
		'details' => json_encode(array ( 0 =>  array (  'name' => 'name',  'value' => 'Join Form', ), 1 =>  array (  'name' => 'initial',  'value' => '1', ), 2 =>  array (  'name' => 'initial_days',  'value' => '1', ), 3 =>  array (  'name' => 'rebill',  'value' => '30', ), 4 =>  array (  'name' => 'rebill_days',  'value' => '30', ), 5 =>  array (  'name' => 'no_old_members',  'value' => false, ), 6 =>  array (  'name' => 'active_all',  'value' => true, ),)),
		'biller' => json_encode(array ( 'billerid' => 1, 'fields' =>  array ( ),))
	);

$request = array(
	'method' => 'POST',
	'path' => 'site/option',
	'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);
?>
200

success

{
  "success": true,
  "optionid": 2,
  "result": "option added"
}
delete

Delete join option

Authorizations
api-keystringRequired
api-usernamestringRequired
Query parameters
optionidintegerRequired
Responses
200

success

successbooleanOptionalExample: true
delete/api/site/option
PHP (cURL)
<?php

$headers = array( //set your username and API key here
	'api-key: 44b5498dbcb481a0d00b404c0169af62',
	'api-username: tmm1phrvezsbu'
);
$url = 'https://yourdomain.com'; //set your NATS URL here

$data = array(
		'optionid' => 2
	);

$request = array(
	'method' => 'DELETE',
	'path' => 'site/option',
	'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);
?>
200

success

{
  "success": true,
  "result": "option deleted"
}
patch

Edit join option

Authorizations
api-keystringRequired
api-usernamestringRequired
Query parameters
optionidintegerRequired
detailsstringOptional
billerstringOptional
Responses
200

success

successbooleanOptionalExample: true
patch/api/site/option
PHP (cURL)
<?php

$headers = array( //set your username and API key here
	'api-key: 44b5498dbcb481a0d00b404c0169af62',
	'api-username: tmm1phrvezsbu'
);
$url = 'https://yourdomain.com'; //set your NATS URL here

$data = array(
		'optionid' => 2,
		'details' => json_encode(array ( 'name' => 'package_upgrade_allowed', 'value' => '1',))
	);

$request = array(
	'method' => 'PATCH',
	'path' => 'site/option',
	'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);
?>
200

success

{
  "success": true,
  "optionid": 2,
  "result": "option updated"
}

Last updated

Was this helpful?