Required XML Feed Fields

Here’s some info on REQUIRED fields (besides the <auth> and <token> mentioned before). If <auth> and <token> are not present, or are found to be invalid - the whole post request will fail. However, if any of the following required fields fail, only that particular POST will not be saved to the ClickaPost database.

<title>

  • requirement: REQUIRED
  • values: alphanumeric content of 60 characters max [NO HTML ACCEPTED – ONLY TEXT]
  • description: post’s title

<category>

  • requirement: REQUIRED
  • values: integer (unique ID of a ClickaPost subcategory)
  • description: it is one of the most important variables; it’s values are specific and can be found using the GET method or from the ClickaPost Categories list; furthermore, you may post only in end-categories (those which do not have any subcategories defined), i.e. you cannot post in For Sale category directly, but you can post in Animals (a subcategory of For Sale), since Animals sub-category contains no other subcategories. This is so all posts on ClickaPost can always be properly classified.

<description>

  • requirement: REQUIRED
  • values: text of at least 50 characters in length [CAN contain HTML but ONLY if escaped with CDATA]
  • description: it is the second most important variable. It contains the post body.
  • special note: You MUST encapsulate the description content within <!CDATA[ *** ]]> tags if you wish to preserve any HTML / XML tags within the description. If the description is not wrapped in CDATA tag – it will be saved simply as text. Any HTML tags will be removed completely. In short: if your descriptions contain HTML – use CDATA, if they are simply text – do not use CDATA.

<country>

  • requirement: REQUIRED
  • values: it can be either the unique ClickaPost Country ID, or ISO standards compliant country name representation in either ISO A2 or ISO A3 format (US or USA for example).
  • description: represents where the post is being stored under (ID’s can be found using the GET method)

Here's a simplest post request (containing only required fields):

<?xml version="1.0" encoding="UTF-8"?>
<request>
<auth>
	<token>126974fc1fb7ec3719372c120039d4b4c5c126a73b6a023e7609c03e83864f10</token>
</auth>
 
<posts>
	<post>
		<title>This is a simple test post</title>
		<category>241</category>
		<description>This is a description of the simple test post. It will allow people to immediately start playing around with our API and get more posts into the system.</description>
		<country>USA</country>
	</post>
</posts>
</request>

Now, isn’t that that simple?

Next Step

 
required_fields.txt · Last modified: 2008/12/15 21:13 by peconi
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki