deactivateRentalOffer()

One and only option to disable offer, remember that you have to be owner of the offer. Read more about all types of offers in Tutorial 2 - Creating Offers. Remember, offers are not deleted, you can always check disable offer using getRentalOffer method

Parameters:

Name Type Description
publisherToken string You can find your publisher token at api-keys page.
offerId string Set identifier of the offer you want to disable.
- required parameter

Request:

    {
    "method": "getRentalOffer",
    "params": {
    "offerId": "R948468705_US"
    },
    "jsonrpc": "2.0",
    "id": 1
    }

Response:

    {
    "result": {
    "id": "A727024001_US",
    "publisherEmail": "publisher@gmail.com",
    "url": "http:\/\/test.com\/page_with_content",
    "title": "test",
    "description": "my first offer with Cleeng",
    "currency": "EUR",
    "videoId": "",
    "contentExternalId": "",
    "contentExternalData": "",
    "averageRating": 4,
    "active": false,
    "createdAt": 1353067309,
    "updatedAt": 1353067309,
    "price": 12,
    "tags": [
    "sport",
    "hockey"
    ]
    },
    "id": "1",
    "error": null,
    "jsonrpc": "2.0"
    }

Example:

<?php
    $offerId = 'R727024001_PL';

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

    $cleengApi->deactivateRentalOffer($offerId);
    

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

Back to Rental Offers