Skip to content

Edit Offer

PATCH /offer/edit_offer

Description URL Response Format Request Method Authentication
Edits an existing offer https://domain/api/offer/edit_offer JSON PATCH HTTP headers

Parameters

Name Description Type Required
offerid id of the landing page to edit string yes
name Name of this landing page string no
offer_description Description to display to affiliates string no
hidden Offer does not show up in the affiliate offer list string no
date_live Time when offer should become available to affiliates. String to time on the string provided.
Default is empty
string no
date_expire Time when offer should stop being available to affiliates. String to time on the string provided.
Default is empty.
string no
featured Clean url to display to affiliates boolean no
thumb_url Url of offer thumbnail image string no
force_url Flags this as a featured offer.
Default FALSE
string no
expire_url External URL to redirect traffic to if the offer is expired string no
expire_landing_pageid ID of landing page to redirect traffic to if the offer is expired string no
no_personal_member_info Prevent name and address information from being stored in the customer record string no
subject_lines Comma separated list of recommended subject lines for affiliates promoting via email. Only displayed when "Display Offer Email Fields" is enabled string no
from_addresses Comma separated list of recommended from addresses for affiliates promoting via email. Only displayed when "Display Offer Email Fields" is enabled string no
ip_lookup Set cookieless tracking to match on only IP instead of IP+Browser Details.
Default FALSE
boolean no
ip_uniqueness_seconds Set the number of seconds before a repeat visit by the same visitor will trigger the 'unique' offer redirect contition. This does not affect them showing as unique in stats. Default is unset on the offer level and inheriting from the "Unique Visitor Time" configuration setting. integer no
offer_groups Accepts an existing offer group id, comma separated list of group ids, or array of group ids to associate with this offer int,string,array no
marketing_types Accepts an existing marketing type id, comma separated list of marketing type ids, or array of marketing type ids to associate with this offer int,string,array no
categories Accepts an existing category id or category name, comma separated list of ids/names, or array of ids/names to associate with this offer. Creates new categories if a category name is passed that does not exist int,string,array no
authorized Accepts a comma separated list or array of 2 letter country codes where traffic is authorized to use this offer. Defaults to the 'Default Authorized Countries' configuration setting string,array no
unauthorized Accepts a comma separated list or array of 2 letter country codes where traffic is not authorized to use this offer. Defaults to the 'Default Unauthorized Countries' configuration setting.
note: If no authorized or unauthorized countries are set even after checking the network configurations, the offer is authorized for all countries by default.
string,array no
device_types Accepts an array of device types to accept. Send empty array to unset. Possible values: array no
0 - desktop
1 - mobile
2 - tablet
suppress_conversion_pixels If true, conversions will not trigger affiliate pixels (but goals assigned to the conversion column still will) boolean no
suppress_continuity_pixels If true, continuities will not trigger affiliate pixels (but goals assigned to the continuity column still will) boolean no

Advertiser Parameters

| name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no |

Fraud Prevention Parameters

| name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no |

Revenue Parameters

| name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no |

Commission Parameters

| name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no | | name | Name of this landing page | string | no |

Example Request

PATCH

http://domain/api/offer/edit_offer
name=edited API TEST OFFER
authorized=GB,IT
advertiserid=9
advertiser_cost_type=conversion
advertiser_cost_flat=25
commission_type=cps
percentage_of_customer_conversion=15
percentage_of_customer_continuity=5

Response:

{
    "result":"Success",
    "message": "offer_saved"
}

Example Code

php

<?php 
$url = 'http://domain/api/offer/edit_offer';
$curl = curl_init(); 

$headers = array( 
    'api-key: 44b5498dbcb481a0d00b404c0169af62', 
    'api-username: productsupport' 
);

 $data = Array(
    'offerid' => 251,
    'name' => 'edited API TEST Offer',
    'authorized' => 'GB,IT',
    'advertiserid' => 9,
    'advertiser_cost_type' => 'conversion',
    'advertiser_cost_flat'=> 25,
    'commission_type' => cps,
    'percentage_of_customer_conversion' => 15,
    'percentage_of_customer_continuity' => 5,
); 

curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); 
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));

$resp = curl_exec($curl); 
//dumps an associative array representation of the json response
$output = json_decode($resp, true);
if($output !== NULL) {
    //json was valid. Dump the decoded array
    print_r($output);
}
else {
    //invalid json, just dump the raw response
    print_r($resp);
}
// Close request to clear up some resources 
curl_close($curl); 
?>