updateCustomerRental()

Extend expiry date of customer access to your specific offer.

Parameters:

Name Type Description
publisherToken string You can find your publisher token at api-keys page.
customerEmail string Set customer email for which you want to change expiration date of content access.
offerId string set the Id of an offer which you want to change expire date of access by * the customer.
rentalData object
-   expiresAt string Unix timestamp. Rental expiration time can only be extended.
- required parameter

Request:

    [
    {
    "method": "updateCustomerRental",
    "params": {
    "publisherToken": "TeurE3xRXcFtF7gSbhYCXx_qC1IrvnDWGejDv114-OE0cdZ9",
    "customerEmail": "customer@email.com",
    "offerId": "R709223879_FR",
    "rentalData": {
    "expiresAt": "1359184821"
    }
    },
    "jsonrpc": "2.0",
    "id": 1
    }
    ]

Response:

    [
    {
    "result": {
    "offerId": "R709223879_FR",
    "expiresAt": "1359184821"
    },
    "id": "1",
    "error": null,
    "jsonrpc": "2.0"
    }
    ]

Example:

<?php
    $offerId = 'R709223879_FR';
    $customerEmail = 'customer@email.com';
    $rentalData = array('expiresAt' => 1359184821);

    $cleengApi = new Cleeng_Api();

    $cleengApi->updateCustomerRental($customerEmail, $offerId, $rentalData);
    

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

Back to Customer API