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

REST V2009-05-01 Profiles

From Wiki.zanox.com

Jump to: navigation, search

Products
  GET: Retrieving a single product item
  GET: Retrieving all product items by advertiser program
  GET: Contextual Product Search
Admedia
  GET: Retrieving a single admedium item
  GET: Retrieving a list of admedia items
  GET: Retrieving admedia categories
Programs
  GET: Retrieving a single program item
  GET: Retrieving all program items
  GET: Programsearch
  GET: Retrieving programs for a given category
  GET: Returns the last 20 advertiser program news
  GET: Returns all available program categories
  GET: Returns all programs for a specified user adspace
  POST: Creating a new program application
  DELETE: Deleting an existing program application
Reports
  GET: Retrieving a single sale item
  GET: Retrieving a single lead item
  GET: Retrieving all sale items
  GET: Retrieving all lead items
  GET: Retrieving aggregated report
Payments
  GET: Retrieving all payment items
  GET: Retrieving a single payment item
  GET: Retrieving all balance items
  GET: Retrieving a single balance item
  GET: Retrieving all account items
  GET: Retrieving a single account item
Adspaces
  GET: Retrieving a single adspace item
  GET: Retrieving all adspace items related to the user
  POST: Creating a new advertising space
  PUT: Updating properties of an advertising space
  DELETE: Removing an advertising space
Profiles
  GET: Retrieve the user profile
  PUT: Update the user profile

The profiles RESTFul API resource enables the retrieval and update of the publishers profile information.

The publisher profile retrieved as well as updated via this API resource.

Contents

GET: Retrieve the user profile

Parameters

applicationId mandatory header parameter applicationId is required for authorization to eliminate any possibility of data abuse.
timestamp mandatory header parameter timestamp is required for authorization to eliminate any possibility of data abuse.
signature mandatory header parameter signature is required for authorization to eliminate any possibility of data abuse.
callback optional query parameter Supported if format is JSON. Name of the JS function the result is wrapped in. not supported yet

Example Request

// REST XML
http://api.zanox.com/xml/profiles 
 
// REST JSON
http://api.zanox.com/json/profiles 

// REST XML using Header Authorization
GET /profiles HTTP/1.1
Host: api.zanox.com
Date: Mon, 09 Sep 2008 08:17:35 GMT
Authorization: ZXWS CE665464E0186EA44282:sharedKey

Example Response

 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response xmlns="http://api.zanox.com/namespace/2008-05-21/">
    <profilesResult>
        <profileItem id="http://api.zanox.com/xml/2008-05-21/profiles/profile/account">
            <adrank>8.1</adrank>
            <firstname>John</firstname>
            <lastname>Doe</lastname>
            <company>my company</company>
            <street1>Stralauer Allee 2</street1>
            <street2>po 2</street2>
            <zipcode>10245</zipcode>
            <city>Berlin</city>
            <country>DE</country>
            <phone>+12345</phone>
            <mobile>+12-345-123456</mobile>
            <fax>+12345</fax>
            <email>test@example.com</email>
        </profileItem>
    </profilesResult>
</response>
 

PUT: Update the user profile

Parameters

applicationId mandatory only header parameter! applicationId is required for authorization to eliminate any possibility of data abuse.
timestamp mandatory only header parameter! timestamp is required for authorization to eliminate any possibility of data abuse.
signature mandatory only header parameter! signature is required for authorization to eliminate any possibility of data abuse.
profileItem mandatory body parameter the modified profile item.
callback optional query parameter Supported if format is JSON. Name of the JS function the result is wrapped in. not supported yet

Example Request

// REST XML
http://api.zanox.com/xml/profiles 
 
// REST JSON
http://api.zanox.com/json/profiles 

// REST XML using Header Authorization
PUT /profiles HTTP/1.1
Host: api.zanox.com
Date: Mon, 09 Sep 2008 08:17:35 GMT
Authorization: ZXWS CE665464E0186EA44282:sharedKey

//example message body
<xml>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<request>
    <profileItem>
        <company>MyCompany</company>
        <email>contact@mycompany.com</email>
    </profileItem>
</request>
</xml>

Example Response

 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response xmlns="http://webservices.zanox.com/namespace/2008-02-20/">
    <Code>200</Code>
    <Message>Successfully updated your profile</Message>
</response>
 
Personal tools