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

Adspaces Methods

From Wiki.zanox.com

Jump to: navigation, search

An advertising space (adspace) is usually the website or landing page of a publisher and contains certain properties like the URL and audience of the website and some other parameters. A publisher can own several advertising spaces in order to separate statistics. Based on the given properties of an advertising space various actions are performed in order to optimize the customer targeting.

Adspaces can be created, updated and deleted as well as their properties retrieved.


Contents

GetAdspace

Parameters

adspaceId int mandatory soap body parameter the id of the adspace
applicationId String mandatory soap body parameter applicationId is required for the authorization it is your (public key).
timestamp String mandatory soap body parameter the date that was used to build the signature in the following date format (yyyy-MM-ddTHH:mm:ss.000Z).
signature String mandatory soap body parameter the crypted hash signature that was build with the shared key (private key) and the timestamp. For a detailed description how to build the signautre see here SOAP API authentication.

Example Request

This show an example soap request. Be patient timestamp and signature parameters depent on the time of the soap call so that means if you want to try this request use your applicationId and use the current timestamp and build the signature.

 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://api.zanox.com/namespace/2009-02-01/">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:GetAdspace>
         <!--type: int-->
         <ns:adspaceId>511703</ns:adspaceId>
         <!--type: string-->
         <ns:applicationId>01795644F96AF9C4DF84</ns:applicationId>
         <!--type: string-->
         <ns:timestamp>2009-03-10T14:00:00</ns:timestamp>
         <!--type: string-->
         <ns:signature>kds2YVa5bc7owMzV7n3XuKULgVY=</ns:signature>
      </ns:GetAdspace>
   </soapenv:Body>
</soapenv:Envelope>
 

Example Response

This show an example getAdspace response.

 
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <GetAdspaceResponse xmlns="http://api.zanox.com/namespace/2009-02-01/">
         <return>
            <adspacesResult>
               <adspaceItem lang="de" id="511703">
                  <name>pussinboots</name>
                  <url>www.pussinboots.2mydns.com</url>
                  <type>WEBSITE</type>
                  <scope>PRIVATE</scope>
                  <visitors>10</visitors>
                  <impressions>10</impressions>
                  <regions>
                     <region>DE</region>
                  </regions>
                  <categories>
                     <category id="11">Internetservices</category>
                     <category id="18">Computer &amp; Konsolen</category>
                  </categories>
               </adspaceItem>
            </adspacesResult>
         </return>
      </GetAdspaceResponse>
   </soap:Body>
</soap:Envelope>
 

Explanation of Response Items

GetAdspaceResponse mandatory soap response wrapper contains the return object.
return mandatory soap response object contains the adspacesResult object.
adspacesResult mandatory soap response list object contains the adspaceItem object (for this method it contains always 0 or 1 adspaceItem).
adspaceItem mandatory soap response item object This object represent the adspace and contains the adspace informations see below.
name mandatory string The name of the adspace.
url mandatory string (URL) The url of the adspace.
type mandatory string (possible values are NONE, WEBSITE, EMAIL, NEWSLETTER, HANDY or SEARCH_ENGINE) The type of the adspace.
scope mandatory string (possible values are NONE, PRIVATE or BUSINESS) The scope of the adspace.
visitors mandatory int The number of visitors of the adspace per month (entered by the owner of the adspace).
impressions mandatory int The number of impressions of the adspace per month (entered by the owner of the adspace).
regions mandatory soap list object contains the adspace associated regions.
region mandatory string The ISO 3166-1-alpha-2 country code associated to this adspace.
categories mandatory soap list object contains the adspace associated categerories.

See: Explanation of Response Items SOAP GetAdspace

GetAdspaces

Parameters

applicationId String mandatory soap body parameter applicationId is required for the authorization it is your (public key).
timestamp String mandatory soap body parameter the date that was used to build the signature in the following date format (yyyy-MM-ddTHH:mm:ss.000Z).
signature String mandatory soap body parameter the crypted hash signature that was build with the shared key (private key) and the timestamp. For a detailed description how to build the signautre see here SOAP API authentication.

Example Request

 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://api.zanox.com/namespace/2008-05-21/">
	<soapenv:Header/>
	<soapenv:Body>
		<ns:GetAdspaces>
			<ns:applicationId>9483E574075AA858AA2E</ns:applicationId>
			<ns:timestamp>2008-08-25T13:38:57.000Z</ns:timestamp>
			<ns:signature>JZLlcT0nkBrxbZYi99rtBH8tGTw=</ns:signature>
		</ns:GetAdspaces>
	</soapenv:Body>
</soapenv:Envelope>
 

Example Response

 
<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
	<env:Header></env:Header>
	<env:Body>
		<GetAdspacesResponse xmlns="http://api.zanox.com/namespace/2008-05-21/">
			<return>
				<adspacesResult>
					<adspaceItem lang="de" id="784330">...</adspaceItem>
					<adspaceItem lang="de" id="784334">...</adspaceItem>
				</adspacesResult>
			</return>
		</GetAdspacesResponse>
	</env:Body>
</env:Envelope>
 

Explanation of Response Items

See: Explanation of Response Items SOAP GetAdspaces

CreateAdspace

Parameters

applicationId String mandatory soap body parameter applicationId is required for the authorization it is your (public key).
timestamp String mandatory soap body parameter the date that was used to build the signature in the following date format (yyyy-MM-ddTHH:mm:ss.000Z).
signature String mandatory soap body parameter the crypted hash signature that was build with the shared key (private key) and the timestamp. For a detailed description how to build the signautre see here SOAP API authentication.

Example Request

 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://api.zanox.com/namespace/2008-05-21/">
	<soapenv:Header/>
	<soapenv:Body>
		<ns:CreateAdspace>
			<ns:request>
				<ns:adspaceItem id="12345" lang="de">
					<ns:name>test</ns:name>
					<ns:url>http://www.test.com</ns:url>
					<ns:contact>info@test.com</ns:contact>
					<ns:description>This is a Test AdSpace</ns:description>
					<ns:type>Website</ns:type>
					<ns:scope>Test Scope</ns:scope>
					<ns:visitors>10000</ns:visitors>
					<ns:impressions>9000000</ns:impressions>
					<ns:adrank>9</ns:adrank>
					<ns:regions>
                  		               <!--Zero or more repetitions:-->
						<ns:region>DE</ns:region>
					</ns:regions>
					<ns:categories>
		                                <!--Zero or more repetitions:-->
						<ns:category id="34">Shopping</ns:category>
					</ns:categories>
					<ns:keywords>
        		                        <!--Zero or more repetitions:-->
						<ns:keyword>Test Keyword</ns:keyword>
					</ns:keywords>
				</ns:adspaceItem>
			</ns:request>
			<ns:applicationId>1234567890987654321</ns:applicationId>
			<ns:timestamp>2008-08-25T13:47:44.000Z</ns:timestamp>
			<ns:signature>bj+Cbp+z24uwmFpvDTLLKw8vhQo=</ns:signature>
		</ns:CreateAdspace>
	</soapenv:Body>
</soapenv:Envelope>
 

Example Response

 
<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
	<env:Header></env:Header>
	<env:Body>
		<CreateAdspaceResponse xmlns="http://api.zanox.com/namespace/2008-05-21/">
			<return><code>200</code>
				<message>Successfully created new website with the Name: test and id: 1040671.</message>
			</return>
		</CreateAdspaceResponse>
	</env:Body>
</env:Envelope>
 
 

Explanation of Response Items

See: Explanation of Response Items SOAP CreateAdspace

UpdateAdspace

Parameters

applicationId String mandatory soap body parameter applicationId is required for the authorization it is your (public key).
timestamp String mandatory soap body parameter the date that was used to build the signature in the following date format (yyyy-MM-ddTHH:mm:ss.000Z).
signature String mandatory soap body parameter the crypted hash signature that was build with the shared key (private key) and the timestamp. For a detailed description how to build the signautre see here SOAP API authentication.

Example Request

 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://api.zanox.com/namespace/2008-05-21/">
	<soapenv:Header/>
	<soapenv:Body>
		<ns:UpdateAdspace>
			<ns:request>
				<ns:adspaceItem id="1040671" lang="de">
					<ns:name>test</ns:name>
					<ns:url>http://www.test.au.com</ns:url>
					<ns:contact>info@test.au.com</ns:contact>
					<ns:description>another description</ns:description>
					<ns:type>Website</ns:type>
					<ns:scope>business</ns:scope>
					<ns:visitors>1234</ns:visitors>
					<ns:impressions>5678</ns:impressions>
					<ns:adrank>7</ns:adrank>
					<ns:regions>
                  <!--Zero or more repetitions:-->
						<ns:region>FR</ns:region>
					</ns:regions>
					<ns:categories>
                  <!--Zero or more repetitions:-->
						<ns:category id="34">Shopping</ns:category>
					</ns:categories>
					<ns:keywords>
                  <!--Zero or more repetitions:-->
						<ns:keyword>Superduper</ns:keyword>
					</ns:keywords>
				</ns:adspaceItem>
			</ns:request>
			<ns:applicationId>'+$zanox_applicaton_id+'</ns:applicationId>
			<ns:timestamp>'+$zanox_get_param_date+'</ns:timestamp>
			<ns:signature>'+$zanox_signature+'</ns:signature>
		</ns:UpdateAdspace>
	</soapenv:Body>
</soapenv:Envelope>
 

Example Response

 
 
 

Explanation of Response Items

See: Explanation of Response Items SOAP UpdateAdspace

DeleteAdspace

Parameters

adspaceId int mandatory soap body parameter the adspace to remove
applicationId String mandatory soap body parameter applicationId is required for the authorization it is your (public key).
timestamp String mandatory soap body parameter the date that was used to build the signature in the following date format (yyyy-MM-ddTHH:mm:ss.000Z).
signature String mandatory soap body parameter the crypted hash signature that was build with the shared key (private key) and the timestamp. For a detailed description how to build the signautre see here SOAP API authentication.

Example Request

 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://api.zanox.com/namespace/2008-05-21/">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:DeleteAdspace>
         <ns:adspaceId>1040671</ns:adspaceId>
		 <ns:applicationId>9483E574075AA858AA2E</ns:applicationId>
		 <ns:timestamp>2008-08-25T14:00:45.000Z</ns:timestamp>
		 <ns:signature>PW8uIii9GpAm6d5f03U8+YFsoSw=</ns:signature>
      </ns:DeleteAdspace>
   </soapenv:Body>
</soapenv:Envelope>
 

Example Response

 
<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
	<env:Header></env:Header>
	<env:Body>
		<DeleteAdspaceResponse xmlns="http://api.zanox.com/namespace/2008-05-21/">
			<return><code>409</code>
                            <message>An Error occured. The adSpace cannot be removed!!</message>
                       </return>
		</DeleteAdspaceResponse>
	</env:Body>
</env:Envelope>
 

Explanation of Response Items

See: Explanation of Response Items SOAP DeleteAdspace

Personal tools