These docs are for v2.0. Click to read the latest docs for v2.1.

deactivateSubscriptionOffer

Disable your subscription offer, by switch active parametr to false. Read more about all types of offers here. Remember, offers are not deleted, you can always check disable offer using getSubscriptionOffer method

📘

You can try that method by clicking here

Parameters

NameTypeDescription
publisherToken*stringYou can find your publisher token at api-keys page.
offerId*stringIdentifier of the offer you want to disable.

API Request/Response

Request

{
  "method":"deactivateSubscriptionOffer",
  "params":{
    "publisherToken":"VNUNiFwbWJwJMD6aXbfqsTWouI8wbVKwQPh2ABnyb8dHnPtR",
    "offerId":"S580476507_US"
  },
  "jsonrpc":"2.0",
  "id":1
}

Response

{
  "result":{
    "id":"S580476507_US",
    "publisherEmail":"[email protected]",
    "title":"not test anymorre",
    "description":"my first update with Cleeng",
    "url":"http:\/\/test.com\/page_with_content",
    "currency":"EUR",
    "country":"PL",
    "period":"week",
    "active":0,
    "price":75,
    "createdAt":1353067309,
    "updatedAt":1353067309,
    "accessToTags":[
      ""
    ]
  },
  "id":"1",
  "error":null,
  "jsonrpc":"2.0"
}

PHP Example

<?php
    $offerId = 'S123123123_US';

    $cleengApi = new Cleeng_Api();
    $cleengApi->setPublisherToken('Y72a8Cr0KQciwzU7DbOcSXOFL1gT9a6gIYRb6hhOvCdPaxKW');

    $cleengApi->deactivateSubscriptionOffer($offerId);

?>