deactivateSingleOffer()

This is one and only option to disable offer. It has to be your offer.
Read more about offers in Tutorial 2 - Creating Offers. Remember, offers are not deleted, you can always check disable offer using getSingleOffer method

Parameters:

Name Type Description
publisherToken string You can find your publisher token at api-keys page.
offerId string Put here an offer id you want to disable. You have to be the offer owner.
- required parameter

Request:

    {
    "method": "deactivateSingleOffer",
    "params": {
    "publisherToken": "VNUNiFwbWJwJMD6aXbfqsTWouI8wbVKwQPh2ABnyb8dHnPtR",
    "offerId": "A727024001_US"
    },
    "jsonrpc": "2.0",
    "id": 1
    }

Response:

    {
    "result": {
    "id": "A727024001_US",
    "publisherId": "761790883",
    "url": "http:\/\/your-site.url",
    "title": "Monetize your content",
    "description": "Great article how you can monetize your content using Cleeng",
    "currency": "EUR",
    "videoId": "",
    "contentExternalId": "",
    "contentExternalData": "",
    "averageRating": 4,
    "active": false,
    "createdAt": 1353067309,
    "updatedAt": 1353067309,
    "price": 12,
    "tags": [

    ]
    },
    "id": "1",
    "error": null,
    "jsonrpc": "2.0"
    }

Example:

<?php
    $offerId = 'A727024001_PL';

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

    $cleengApi->deactivateSingleOffer($offerId);
    

Remember! you can always check it by yourself using API Console - deactivateSingleOffer()

Back to Single Offers