Home » updateCreativeIOLineItemRef

updateCreativeIOLineItemRef

Description

Updates the IO for a given creative.

Attributes

FieldTypeDescriptionRequiredAccepted Value
creativeIdintThe creative Id for which the IO needs to be updatedTrueA valid creative Id
iOLineItemRefstringIOLineItemRef value that needs to be setTrueA valid IO value

Samples

Java

import javax.xml.namespace.QName;
import org.apache.axis2.AxisFault;

import com.zedo.zapi.ZEDOAPIStub;
import com.zedo.zapi.ZEDOAPIStub.UpdateCreativeIOLineItemRef;
import com.zedo.zapi.zclients.config.Config;

public class UpdateCreativeIOLineItemRef {

 public static void main(String[] args) {
 UpdateCreativeIOLineItemRef.updateTest();
 }

 private static void updateTest() {
 
 try {
 
 ZEDOAPIStub stub = new ZEDOAPIStub("http://api.zedo.com//v8/?wsdl&java");
 stub._getServiceClient().addStringHeader(new QName("http://api.zedo.com", "user", "zedoapi"), "example@example.com");
 stub._getServiceClient().addStringHeader(new QName("http://api.zedo.com", "password", "zedoapi"),"password");
 stub._getServiceClient().addStringHeader(new QName("http://api.zedo.com", "network", "zedoapi"),"network");
 stub._getServiceClient().getOptions().setTimeOutInMilliSeconds(10 * 60 * 1000);
 
 
 UpdateCreativeIOLineItemRef iou= new UpdateCreativeIOLineItemRef();
 iou.setCreativeId(2601577);
 iou.setIOLineItemRef("lineio");
 stub.updateCreativeIOLineItemRef(iou);

 System.out.println("Update done!");
 
 } catch (Exception e) {
 System.err.println("ERROR: FAILED!");
 System.err.println("Exception: " + e.getMessage());
 if (e instanceof AxisFault) {
 AxisFault af = (AxisFault) e;
 System.err.println("AxisFault's detail: " + af.getDetail());
 af.printStackTrace();
 } else {
 e.printStackTrace();
 }
 }
 }
}

PHP

include_once './zlib/ZEDOAPI.php';
 
 /**
 *Create Client Stub
 */
 $config = Array();
 $config['location'] = 'http://api.zedo.com//v8/?wsdl&java'; //URL of the SOAP server to send the request to
 $config['exceptions'] = true; //Enable Exception Handling
 
 $stub = new ZEDOAPI($config);
 
 $header = Array();
 $header[0] = new SoapHeader('http://api.zedo.com','user', 'example@example.com');
 $header[1] = new SoapHeader('http://api.zedo.com','password', 'password');
 $header[2] = new SoapHeader('http://api.zedo.com','network','525');
 $header[3] = new SoapHeader('http://api.zedo.com','callinfo','zapiCall');
 $stub->__setSoapHeaders($header);
 
 /**
 *Define Call Parameters 
 */

 $creativeId=2601577;
 $iOLineItemRef="lineIO";
 
 $param = new updateCreativeIOLineItemRef($creativeId, $iOLineItemRef);
 
 /**
 *Execute API Call 
 */
 try {
 $response = $stub->updateCreativeIOLineItemRef($param);
 }catch (SoapFault $ex) {
 var_dump($ex->faultcode, $ex->faultstring, $ex->detail);
 echo "UPDATE FAILED\n";
 die();
 }
 
 /**
 * Response
 */
 echo "UPDATE COMPLETE\n\n";
 echo "\nReponse:\n";
 echo $stub->__getLastResponse();

SOAP

Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:zapi="http://zapi.zedo.com">
 <soapenv:Header>
<zedoapi:user xmlns:zedoapi="http://api.zedo.com">example@zedo.com</zedoapi:user>
<zedoapi:password xmlns:zedoapi="http://api.zedo.com">password</zedoapi:password>
<zedoapi:network xmlns:zedoapi="http://api.zedo.com">525</zedoapi:network>
</soapenv:Header>
 <soapenv:Body>
 <zapi:updateCreativeIOLineItemRef>
 <zapi:creativeId>2601577</zapi:creativeId>
 <zapi:iOLineItemRef>lineIO</zapi:iOLineItemRef>
 </zapi:updateCreativeIOLineItemRef>
 </soapenv:Body>
</soapenv:Envelope>

Response

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
 <soapenv:Body>
 <ns:updateCreativeIOLineItemRefResponse xmlns:ns="http://zapi.zedo.com">
 <ns:return>0</ns:return>
 </ns:updateCreativeIOLineItemRefResponse>
 </soapenv:Body>
</soapenv:Envelope>