Available XML Get Methods

Below you will find a list of all information you may get programmatically from ClickaPost by simply calling a get server with your token and a couple of specific variables which depend on which information you are looking for. By default all Get Methods return an XML response simply because it’s both human readable and easily parsed programmatically by your application.

Country Information

While ClickaPost is flexible enough and allows you to specify a country as an ISO A2 abbreviation (US), ISO A3 abbreviation (USA), and can even try and match the country based on a full name you specify (ex. The United States of America), internally all countries are assigned unique numeric IDs. To find out information about all countries, or a specific one you are looking for, you may use the following methods.

http://api.clickapost.com/get.php?token=12345&entity=countries&id=184

- Returns a list containing information on a country with an ID of 184 (formed as XML above with just one country in response)

http://api.clickapost.com/get.php?token=12345&entity=countries&country=United

- Returns a list of countries which have “United” within their name (ex. United States, United Kingdom, etc.)

http://api.clickapost.com/get.php?token=12345&entity=countries&isoA2=US

- Returns a country with an ISO A2 code of “US”

http://api.clickapost.com/get.php?token=12345&entity=countries&isoA3=USA

- Returns a country with an ISO A3 code of “USA”

http://api.clickapost.com/get.php?token=12345&entity=countries

- With no id or name specified, the system returns a list of all countries in ClickaPost database. You will be glad to find out this includes every single country in the World.

State / Province Information

While <country> tag is required, <stateProvince> tag is optional, but highly recommended. If you are posting in the USA, ClickaPost simplifies this for you even further by giving you the ability to send the states data as both 2 letter and full state names (OH and Ohio are acceptable). However, if you are posting in UK, or Canada, you will need to get the unique State/Province ID to post properly. Here’s how to get the states information:

http://api.clickapost.com/get.php?token=12345&entity=states&id=12

- Returns a list containing information on the state with an ID of 12

http://api.clickapost.com/get.php?token=12345&entity=states&country=184

- Returns a list of states for the country with an ID 184 (which is USA in this example). Note that you must specify country as a numeric ID in order to get a list of all states for that country (get call for countries explained previously helps with this).

http://api.clickapost.com/get.php?token=12345&entity=states&state=Ohio

- Returns a list of states which contain “Ohio” in their name. Note that this is not very useful call, but if you combine it with country variable as noted below – you’ll get much more usable set of results.

http://api.clickapost.com/get.php?token=12345&entity=states&country=184&state=Ala

- Returns a list of states for the country with an ID 184 which contain “Ala” in their name. This way you may search for a state based on it’s name within a given country – a much more useful task. Note that the above call will return both Alabama and Alaska.

http://api.clickapost.com/get.php?token=12345&entity=states

- While this may seem like a valid call – we do not allow users to get a list of all states in the system. It’s simply not that useful and the combination of calls above should give you all the information you may need.

City Information

To get a list of cities for a given Country/State combination you may use the following calls:

http://api.clickapost.com/get.php?token=12345&entity=cities&id=1355

- Returns a list containing information on a city with an ID of 1355

http://api.clickapost.com/get.php?token=12345&entity=cities&city=Columbus

- Returns a list containing information on all cities with “Columbus” in their name

http://api.clickapost.com/get.php?token=12345&entity=cities&state=12

- Returns a list of all cities in a state with an ID of 12

http://api.clickapost.com/get.php?token=12345&entity=cities&state=6&country=184

- Returns a list of all cities in ClickaPost database for a country with ID of 184 and state with an ID of 6. In this example, it will give you the list of all cities in state of Colorado in the USA.

http://api.clickapost.com/get.php?token=12345&entity=cities&country=184

- Returns a list of all cities in ClickaPost database for a country with ID of 184 (note, this is not really a very useful call unless you are building an application which integrates with ClickaPost).

http://api.clickapost.com/get.php?token=12345&entity=cities

- While this may seem like a valid call – we do not allow users to get a list of all cities in the system. It’s simply not that useful and the combination of calls above should give you all the information you may need.

Category Information

One of the most important pieces for posting on ClickaPost is the Category ID. Unlike other Classifieds Systems, ClickaPost has more than 400 categories and subcategories available, allowing you to place your listings precisely where they belong.

Important fact to note when it comes to categories is that posts may reside ONLY in the subcategory which is not a parent to any other subcategories. To illustrate, you may not post directly into Vehicles category (since it contains other subcategories), but you may post in Cars & Trucks, a subcategory Vehicles category. For this reason, it is very important to make sure that the category you are trying to post in has no other subcategories.

Also, it’s important to note that ClickaPost contains 10 Top Categories, which are the main parents of all other subcategories: For Sale, Vehicles, Services, Community Events, Real Estate, Personals, Jobs, Resumes, Wanted, and Video Channels.

Most of services and companies using the ClickaPost API will post in a set of specific categories. If you are syncing your Real Estate listings, you will mostly utilize just a small subset of categories available, therefore it may be easier for you to go to ClickaPost Categories page, look up the set of categories you will be using and then directly program those into you application. Category ID’s are set in stone and will never change.

If you are building a service or an application which is to synchronize posts with ClickaPost in all different categories, you may find the following calls useful.

Here’s how you may find out the exact Category IDs you may need, and if they are OK to post in:

http://api.clickapost.com/get.php?token=12345&entity=categories&group=top

- Returns a list containing information on all Top Categories available on ClickaPost.

http://api.clickapost.com/get.php?token=12345&entity=categories

- Returns a list containing information on all categories available on ClickaPost.

http://api.clickapost.com/get.php?token=12345&entity=categories&id=206

- Returns a list containing information on a category with an ID of 206 (in this example, this is a Cars & Trucks subcategory of Vehicles category.

http://api.clickapost.com/get.php?token=12345&entity=categories&category=Condos

- Returns a list containing information on all categories containing Condos keyword in their name. Note that this particular example will return both Condos subcategories of both For Sale and For Rent subcategories of Real Estate category.

http://api.clickapost.com/get.php?token=12345&entity=categories&parent=276&category=Condos

- To narrow down the search even further, you may utilize the parent variable to specify the ID of a category in which the search for a category name you specified will be performed.

http://api.clickapost.com/get.php?token=12345&entity=categories&parent=276

- If you wish to see a list of all subcategories of a given category – simply call with parent variable and the category ID in it. You will get all the “children” (subcategories) of that “parent”. Note: this is recursive so you will get not only children, but any grandchildren as well – the whole tree.

Note: the XML response for categories will also include a <openForDirectPosts>true</openForDirectPosts> tag informing you if you may directly post into that category. If a category has <openForDirectPosts>false</openForDirectPosts> tag – it means it’s either a top category or that it contains subcategories which you should direct your post into instead.

Keywords Information

Keywords are second most important part for your posts. The system uses them in order to narrow down the search results better, as well as for the Search Genie – which helps users narrow down the posts by keywords they choose. For this reason, posts not containing keywords will not be shown at all if a user chooses to narrow down by a specific keyword. Only posts having that keyword set will be shown in the narrowed down list of posts. Example: you post an apartment but do not enter number of bedrooms under keywords. If a user chooses to narrow down the listings to show all posts with 2 bedrooms – yours wont be shown if this keyword is missing.

Furthermore, these keywords are not something you may choose. They are specifically pre-set for each and every category and subcategory in the system and you need to either get them from the API website, or call on them programmatically via the following links:

http://api.clickapost.com/get.php?token=12345&entity=keywords&category=206

- Returns a list containing information all keywords for a category ID 206 (in this case Cars and Trucks subcategory of Vehicles)

Note: while you may choose to provide any keywords or not – if you do provide the keywords – they have to be valid. Some keywords are text-only value, others you must choose form a list of offered choices. If a choice is EMPTY-KEY – this particular keyword may be left empty as well. The XML file the above call returns will make things a lot more clear.

Post Duration Information

Every ClickaPost category has it’s own set of options on how long the posts can stay on-line; for example: most categories allow either 1, 2, 3 or 4 weeks for the duration, however, Video Channels category allows videos to be posted for even up to 1 year.

This piece of information is optional, and if not provided, your posts will automatically be set for the longest period of time available for that category.

If you need a finer control over this, you may use the following call:

http://api.clickapost.com/get.php?token=12345&entity=duration&category=206

- This will return a list of possible duration choices for a category with an ID of 206.

These are easily readable and easy to understand. You set them in plain English as in “1 week”, “2 weeks”, etc. depending on what your category allows. If you are posting in non-STRICT mode – you may put these however you please since if your option is not found – the system will simply put it to the maximum automatically.

Embedded Video Services

There are certain on-line video services, which ClickaPost supports, from which you may link your videos directly to your posts. It’s explained in the section 1.3 above which of these we support and what service names are allowed in the <service> tag for a video in <embededVideos> branch. At the time of this document writing they are (bliptv, google, leak, metacafe, myspace, veoh, wellcomemat, yahoo and youtube - respectively meaning: Blip.TV, Google Video, Live Leak, MetaCafe, MySpace, Veoh, WellcomeMat, Yahoo Video and YouTube).

To get the list of these services all you have to do is to make the following call:

http://api.clickapost.com/get.php?token=12345&entity=videoservices

- This will return a list of all video services supported on ClickaPost, as well as examples on how a valid link should look like.

Posts Information

Last set of information you may get from using the Get methods is, of course, information on all of your currently active posts. This may come in handy if your application/script needs to check which posts you have on ClickaPost.

http://api.clickapost.com/get.php?token=12345&entity=posts

- This will return a list of all of your active (non-expired) posts in the system, together with all other useful information like: post title, permanent link, category, status, description, title, etc.

http://api.clickapost.com/get.php?token=12345&entity=posts&id=45655

- This call will return information on the post with ClickaPost ID 45655, if that post belongs to you (this is determined by your unique TOKEN sent as a part of the request).

http://api.clickapost.com/get.php?token=12345&entity=posts&custom_id=6789

- This call will return information on the post with your own Custom ID of 6789, again, if that post belongs to you.

 
available_xml_get_methods.txt · Last modified: 2008/12/04 00:45 by peconi
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki