REST API v1: PUT minirule condition
Warning: You are viewing the documentation for the old REST API. We recommend using our latest version of the REST API.
A method to edit conditions for a minirule. This method does not support parameters. It is called by sending an HTTP POST request to the following URL:
https://api.copernica.com/v1/minirule/$id/conditions/$type?access_token=xxxx
In this, $id
needs to be replaced by the numerical identifier or the
name of the minirule you wish to edit the condition of. The $type
specifies
the type of the condition you want to edit. After a successful call the
ID of the created request is returned.
Available parameters
The message body can hold the following properties for a condition:
- type: type of condition
Based on the condition type, specific properties are set. For an overview of the supported conditions and the properties that they support, check the specific articles:
- Change conditions
- Date conditions
- DoubleField conditions
- Email conditions
- Field conditions
- Interest conditions
- LastContact conditions
- Miniview conditions
- SMS conditions
- Todo conditions
- Survey conditions
- Part conditions
- ReferView conditions
PHP example
The following example demonstrates how to use this method:
// dependencies
require_once('copernica_rest_api.php');
// change this into your access token
$api = new CopernicaRestApi("your-access-token");
// parameters to pass to the call
$data = array(
'type' = 'date'
)
// do the call, and print result
$api->post("minirule/id/conditions/type", array(), $data);
// return id of created request if successful
The example above requires the CopernicaRestApi class.