Profiles Resource
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 |
[edit] Example 1: Retrieve the user profile
[edit] Example Request
GET /profiles HTTP/1.1 Host: api.zanox.com Date: Mon, 09 Sep 2008 08:17:35 GMT Authorization: ZXWS CE665464E0186EA44282:sharedKey
[edit] 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><!--Can't be updated....maybe should been located somewhere else--> <firstname>John</firstname> <lastname>Doe</lastname> <company>my company</company> <street1>Stralauer Allee 2</street1> <street2></street2> <zipcode>10245</zipcode> <city>Berlin</city> <country>Deutschland</country><!--Should be the ISO CODE--> <phone>+12345</phone> <mobile>+12-345-123456</mobile> <fax>+12345</fax> <email>test@example.com</email> </profileItem> </profilesResult> </response>
[edit] Example 2: Update the user profile
[edit] Example Request
PUT /profiles HTTP/1.1 Host: api.zanox.com Date: Mon, 09 Sep 2008 08:17:35 GMT Authorization: ZXWS CE665464E0186EA44282:sharedKey
[edit] Example Request (Body)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <request> <profileItem> <company>MyCompany</company> <email>contact@mycompany.com</email> </profileItem> </request>
[edit] 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>