If you have any question left, please drop a note with the discussion link of this page.
REST V2011-03-01 Profiles
From Wiki.zanox.com
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
| 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. |
| 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/profiles // REST JSON http://api.zanox.com/json/2011-03-01/profiles // REST XML using Header Authorization GET xml/2011-03-01/profiles HTTP/1.1 Host: api.zanox.com Date: Mon, 09 Sep 2010 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/2011-03-01/"> <profileItem id="13123"> <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> </response>
PUT: Update the user profile
Parameters
| 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. |
| 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. |
Example Request
// REST XML
http://api.zanox.com/xml/2011-03-01/profiles
// REST JSON
http://api.zanox.com/json/2011-03-01/profiles
// REST XML using Header Authorization
PUT xml/2011-03-01/profiles HTTP/1.1
Host: api.zanox.com
Date: Mon, 09 Sep 2010 08:17:35 GMT
Authorization: ZXWS CE665464E0186EA44282:sharedKey
//example message body
<xml>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<request>
<profileItem>
<company>newCompany</company>
<email>newtestcontact@mycompany.com</email>
</profileItem>
</request>
</xml>
Example Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response xmlns="http://webservices.zanox.com/namespace/2011-03-01/"> <profileItem id="13123"> <adrank>8.1</adrank> <firstname>John</firstname> <lastname>Doe</lastname> <company>newCompany</company> <!-- updated company value --> <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>newtestcontact@mycompany.com</email> <!-- updated email value</font> --> </profileItem> </response>