Overview

You can use this request to reactivate a suspended customer.

The Method

API-Method
RESTPOSThttps://[Your URL]/api/2.0/customers/unsuspend/:id

Parameters

Required Parameters

You must include the following parameter for this request to work:

Property TypeDescriptionDefaultRequired
$idintegerID of the customer to unsuspend.noneyes

Example Request

<?php
$username = 'administrator';
$apiKey = '7IjRKva9OzwCsy9xaCwsihA6HxUTwE7a_999';
$localUrl = 'https://localhost';
$customerId = 2;
$packageIdentifier = 24;
$url = $localUrl . '/api/2.0/customers/unsuspend/' . $customerId;
$method = 'POST';
$auth = base64_encode($username . ':' . $apiKey);

$cSession = curl_init();

curl_setopt($cSession, CURLOPT_URL, $url);
curl_setopt($cSession, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cSession, CURLOPT_HEADER, false);
curl_setopt($cSession, CURLOPT_CUSTOMREQUEST, strtoupper($method));
curl_setopt($cSession, CURLOPT_POSTFIELDS, '{}');
curl_setopt($cSession, CURLOPT_HTTPHEADER, [
    'Authorization: Basic ' . $auth,
    'Content-Type: application/json'
]);

$response = curl_exec($cSession);
var_dump($response);

curl_close($cSession);

Example Response

{
   "links":[
      {
         "title":"Self",
         "rel":"self",
         "href":"http:\/\/localhost\/api\/2.0\/customers\/unsuspend\/2"
      },
      {
         "title":"Home",
         "rel":"home",
         "href":"http:\/\/localhost\/api\/2.0\/"
      }
   ],
   "value":"success"
}