createMultiCurrencySingleOffer()


Create different offers for different countries and currencies using localizedData array.

Parameters:

Name Type Description
publisherToken string You can find your publisher token at api-keys page.
offerData object No description
-pricefloatOffer price (in publisher's currency), value between 0.14 and 99.99
-titlestringOffer title, up to 70 chars
-urlstringUrl to content
-description stringAdditional offer description, up to 110 chars
-associateEmail stringSet your associate email
-tags arrayTags attached to offer. Read more.
-countrystring2-letter country code
-currencystringChoose one: USD, EUR, GBP, CAD, AUD, NZD, SEK, DKK, NOK, TRL, ZAR, XOF
-pricefloatvalue between 0.14 and 99.99
-titlestringOffer title, unique for the localization, up to 70 chars
-urlstringUrl to content
-description stringOffer description, unique for the localization, up to 110 chars
-videoId stringLink offer with unique video asset id
-contentExternalId stringThis parameter is for your own usage. You can put here id of article or video, anything what can make your offer clearer for you.
-contentExternalData stringIf you want to store a few extra elements related to the sale you can use this string to store additional data.
-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.
localizedData array array of objects, with properties as below:
-pricefloatOffer price (in publisher's currency), value between 0.14 and 99.99
-titlestringOffer title, up to 70 chars
-urlstringUrl to content
-description stringAdditional offer description, up to 110 chars
-associateEmail stringSet your associate email
-tags arrayTags attached to offer. Read more.
-countrystring2-letter country code
-currencystringChoose one: USD, EUR, GBP, CAD, AUD, NZD, SEK, DKK, NOK, TRL, ZAR, XOF
-pricefloatvalue between 0.14 and 99.99
-titlestringOffer title, unique for the localization, up to 70 chars
-urlstringUrl to content
-description stringOffer description, unique for the localization, up to 110 chars
-videoId stringLink offer with unique video asset id
-contentExternalId stringThis parameter is for your own usage. You can put here id of article or video, anything what can make your offer clearer for you.
-contentExternalData stringIf you want to store a few extra elements related to the sale you can use this string to store additional data.
-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": "createMultiCurrencySingleOffer",
        "params": {
            "publisherToken": "Xlrx-SjTLVMCsaRsOf2q2hvWKOlrF57yHknDRRRMX-13Fz-x",
            "offerData": {
                "price": "10",
                "title": "Test offer",
                "url": "http:\/\/www.testoffer.com",
                "description": "Test offer description",
                "associateEmail": "associate@email.com",
                "tags": [
                    "food"
                ]
            },
            "localizedData": [
                {
                    "country": "US",
                    "currency": "USD",
                    "price": "12.00",
                    "title": "Tasty and healthy food",
                    "url": "http:\/\/mysite.com\/tastyandhealthyfood",
                    "description": ""
                },
                {
                    "country": "GB",
                    "currency": "GBP",
                    "price": "9.00",
                    "title": "Tasty and healthy food",
                    "url": "http:\/\/mysite.com\/tastyandhealthyfood",
                    "description": ""
                }
            ]
        },
        "jsonrpc": "2.0",
        "id": 1
    }
]

Response:

[
    {
        "result": {
            "multiCurrencyOfferId": "A898748181",
            "offers": [
                {
                    "id": "A898748181_US",
                    "publisherEmail": "associate@email.com",
                    "url": "http:\/\/www.testoffer.com",
                    "title": "Test offer for US customers",
                    "description": "Test offer description",
                    "currency": "USD",
                    "averageRating": 4,
                    "active": true,
                    "createdAt": 1384260091,
                    "updatedAt": 1384260091,
                    "price": 10,
                    "applicableTaxRate": "0.21",
                    "tags": [
                        "food",
                        "juihk"
                    ],
                    "videoId": "",
                    "contentExternalId": 0,
                    "contentExternalData": null
                },
                {
                    "id": "A898748181_FR",
                    "publisherEmail": "associate@email.com",
                    "url": "http:\/\/testoffer.com\/fr",
                    "title": "Test offer for French customers",
                    "description": "Test offer description",
                    "currency": "EUR",
                    "averageRating": 4,
                    "active": true,
                    "createdAt": 1384260092,
                    "updatedAt": 1384260092,
                    "price": 8,
                    "applicableTaxRate": "0.21",
                    "tags": [
                        "food"
                    ],
                    "videoId": "",
                    "contentExternalId": 0,
                    "contentExternalData": null
                }
            ]
        },
        "id": "1",
        "error": null,
        "jsonrpc": "2.0"
    }
]

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

Back to Single Offers


We use cookies to ensure that we provide you the best service and website experience. Read our Cookie policy for more details.