1. Home
  2. API
  3. POST: Creating New Data

POST: Creating New Data

Contents

Where possible, WishList Member allows you to create new data through the API by making am HTTP POST request to a specific resource.

Syntax

$response = $api->post($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 create a new Membership Level using the API.

<?php
$data = array('name' => 'Silver Level');
$response = $api->post('/levels', $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