The PUT method allows you to update the data in resources that support it.
Syntax
$response = $api->put($resource , $data);
Where:
- $resource – an API resource (i.e. /levels)
- $data – an associative array of data to pass to the API
Returns:
$response – string: can be either serialized PHP data, JSON or XML
Example
To change the name of a membership level
<?php $level_id = 1234567890; $data = array('name' => 'New Level Name'); $response = $api->put('/levels/'.$level_id, $data); ?>