1. Home
  2. API
  3. PUT: Updating Data

PUT: Updating Data

Contents

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);
?>
Updated on July 11, 2018

Was this article helpful?

Related Articles

Not the solution you were looking for?
Click the link below to submit a support ticket
Submit Ticket