If you have any question left, please drop a note with the discussion link of this page.

REST V2011-03-01 ProgramApplications

From Wiki.zanox.com

Jump to: navigation, search

The program applications RESTFul API resource enables the retrieval and management of the user's applications to zanox advertiser programs.

GET methods return all program applications, e.g. for programs that have been terminated, or those which rejected the user's application in the past.

Contents

GET: Returns all program applications for this user

Parameters

Name Necessity Parameter type Description
connectid mandatory header or query parameter connectid is required for authorization to eliminate any possibility of data abuse.
timestamp mandatory header or query parameter timestamp is required for authorization to eliminate any possibility of data abuse.
nonce mandatory header or query parameter nonce is required for authorization to eliminate any possibility of data abuse.
signature mandatory header or query parameter signature is required for authorization to eliminate any possibility of data abuse.
adspace optional query parameter restrict results to program applications to this adspace
program optional query parameter restrict results to applications to this program
status optional query parameter restrict results to program applications with this status: "open", "confirmed", "rejected", "deferred", "waiting", "blocked", "terminated", "canceled", "called", "declined", "deleted"
items optional query parameter number of items in the result set [1..n] (default = 10; maximum = 50)
page optional query parameter page position [0..n] (default: 0)
callback optional query parameter Supported if format is JSON. Name of the JS function the result is wrapped in.

Example Request

// REST XML
http://api.zanox.com/xml/2011-03-01/programapplications/?connectid=580599047DF8F5311043&date=Mon,%2009%20Sep%202010%2008:17:35%20GMT&signature=FN+JGAMxDShoyh3sfayql6jWCRc=&nonce=12345678912345678911

// REST JSON
http://api.zanox.com/json/2011-03-01/programapplications/?connectid=580599047DF8F5311043&date=Mon,%2009%20Sep%202010%2008:17:35%20GMT&signature=FN+JGAMxDShoyh3sfayql6jWCRc=&nonce=12345678912345678911

// REST XML using Header Authorization
GET /xml/2011-03-01/programapplications/ HTTP/1.1
Host: api.zanox.com
Date: Mon, 09 Jun 2010 08:17:35 GMT
Authorization: ZXWS 580599047DF8F5311043:FN+JGAMxDShoyh3sfayql6jWCRc=
Nonce: 12345678912345678911

Example Response

 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response xmlns="http://api.zanox.com/namespace/2011-03-01/">
            <page>0</page>
            <items>2</items>
            <total>2</total>
            <programApplicationItems>
                <programApplicationItem id="7548412">
                    <program id="3471">congstar DE</program>
                    <adspace id="1367416">test adspace</adspace>
                    <status>rejected</status>
                    <advertiserComment>keine deutsche seite</advertiserComment>
                </programApplicationItem>
                <programApplicationItem id="7548413">
                    <program id="125">Vodafone D2 Onlineshop DE</program>
                    <adspace id="1367416">test adspace</adspace>
                    <status>rejected</status>
                </programApplicationItem>
            </programApplicationItems>
 </response>
 

POST: Creating a new program application

Parameters

Name Necessity Parameter type Description
connectid mandatory header or query parameter connectid is required for authorization to eliminate any possibility of data abuse.
timestamp mandatory header or query parameter timestamp is required for authorization to eliminate any possibility of data abuse.
nonce mandatory header or query parameter nonce is required for authorization to eliminate any possibility of data abuse.
signature mandatory header or query parameter signature is required for authorization to eliminate any possibility of data abuse.
program mandatory path parameter the program to be applied to.
adspace mandatory path parameter the adspace for which the program application is made.
callback optional query parameter Supported if format is JSON. Name of the JS function the result is wrapped in.

Example Request

// REST XML
http://api.zanox.com/xml/2011-03-01/programapplications/program/3471/adspace/1367416/?connectid=580599047DF8F5311043&date=Mon,%2009%20Sep%202010%2008:17:35%20GMT&signature=FN+JGAMxDShoyh3sfayql6jWCRc=&nonce=12345678912345678911
  
// REST JSON
http://api.zanox.com/json/2011-03-01/programapplications/program/3471/adspace/1367416/?connectid=580599047DF8F5311043&date=Mon,%2009%20Sep%202010%2008:17:35%20GMT&signature=FN+JGAMxDShoyh3sfayql6jWCRc=&nonce=12345678912345678911
 
// REST XML using Header Authorization
POST /xml/2011-03-01/programapplications/program/3471/adspace/1367416/ HTTP/1.1
Host: api.zanox.com
Date: Mon, 09 Jun 2010 08:17:35 GMT
Authorization: ZXWS 580599047DF8F5311043:FN+JGAMxDShoyh3sfayql6jWCRc=
Nonce: 12345678912345678911

Example Response

 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response xmlns="http://api.zanox.com/namespace/2011-03-01/">
            <programApplicationItem id="8921286">
                <program id="3471">Conrad DE</program>
                <adspace id="1367416">test adspace</adspace>
                <status>open</status>
            </programApplicationItem>
</response>
 

DELETE: Deleting an existing program application

Parameters

Name Necessity Parameter type Description
connectid mandatory header or query parameter connectid is required for authorization to eliminate any possibility of data abuse.
timestamp mandatory header or query parameter timestamp is required for authorization to eliminate any possibility of data abuse.
nonce mandatory header or query parameter nonce is required for authorization to eliminate any possibility of data abuse.
signature mandatory header or query parameter signature is required for authorization to eliminate any possibility of data abuse.
programId mandatory path parameter id of the program to be deleted.
adspaceId mandatory path parameter id of the adspace for which the program application was submitted.
callback optional query parameter Supported if format is JSON. Name of the JS function the result is wrapped in.

Example Request

// REST XML
http://api.zanox.com/xml/2011-03-01/programapplications/program/3471/adspace/1367416/?connectid=580599047DF8F5311043&date=Mon,%2009%20Sep%202010%2008:17:35%20GMT&signature=FN+JGAMxDShoyh3sfayql6jWCRc=&nonce=12345678912345678911


// REST JSON
http://api.zanox.com/json/2011-03-01/programapplications/program/3471/adspace/1367416/?connectid=580599047DF8F5311043&date=Mon,%2009%20Sep%202010%2008:17:35%20GMT&signature=FN+JGAMxDShoyh3sfayql6jWCRc=&nonce=12345678912345678911


// REST XML using Header Authorization
DELETE /xml/2011-03-01/programapplications/program/3471/adspace/1367416 HTTP/1.1
Host: api.zanox.com
Date: Mon, 09 Jun 2010 08:17:35 GMT
Authorization: ZXWS 580599047DF8F5311043:FN+JGAMxDShoyh3sfayql6jWCRc=
Nonce: 12345678912345678911

Example Response

 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response xmlns="http://api.zanox.com/namespace/2011-03-01/">
	<count>1</count>
</response>
 
Personal tools