updateSubscriptionOffer()


Update your subscription offer. Read more about all types of offers in Tutorial 2 - Creating Offers.
If property is omitted, it won't be updated.

Parameters:

Name Type Description
publisherToken string You can find your publisher token at api-keys page.
offerId string Single offer identifier
offerData object No description
-price floatOffer price (in publisher's currency)
-period stringSubscription period: week / month / 3months / 6months / year
-title stringTitle of the offer, up to 70 chars.
-url stringUrl to content
-description stringAdditional offer description, up to 110 chars
-freePeriods intSet your free periods number
-freeDays intSet your free days number
-accessToTags arrayTo which tags customer has access. Multiple tags are defined as "OR" (not "AND"). Set "(all)" if you want to give access to all of your offers.
-geoRestrictionEnabled boolSet "true" to enable geo-restriction on this offer
-geoRestrictionType stringChoose type of geo-restriction: whitelist / blacklist
-geoRestrictionCountries arrayBased on geoRestrictionType, set the array of whitelisted/blacklisted countries.

- required parameter


Request:

{
    "method": "updateSubscriptionOffer",
    "params": {
        "publisherToken": "VNUNiFwbWJwJMD6aXbfqsTWouI8wbVKwQPh2ABnyb8dHnPtR",
        "offerId": "S580476507_US",
        "offerData": {
            "price": "75",
            "period": "week",
            "title": "not test anymorre",
            "url": "http:\/\/test.com\/page_with_content",
            "description": "my first update with Cleeng",
            "accessToTags": [
                ""
            ]
        }
    },
    "jsonrpc": "2.0",
    "id": 1
}

Response:

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

Example:

<?php
                            
    $offerId = 'S123123213_US';

    $offerSetup = array(
    'price' => 14.00,
    'description' => 'Christmas sale! Get access to every Bip Bip and Coyote episode for only 14$/month'
    );

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

    $cleengApi->updateSubscriptionOffer($offerId, $offerSetup);
    
?>

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

Back to Subscription Offers