home > support > API > Marketplace API > making a connection

Making a connection

If you are connecting to the TourCMS Marketplace API using PHP or .NET then you may find it easier to use the PHP Client Library or .NET Client Library rather than rolling your own code, the libraries are released under a very permissive MIT license so you may reuse it as you see fit in closed or open source applications.

There is also an open source third partyy Ruby implementation developed by the team at Flextrip.

RESTful API

The TourCMS Marketplace is a RESTful (REpresentational STate) XML based API which allows you to read (and possibly write) certain resources within TourCMS accounts that grant you access permissions.

Put simply: To call API methods you will be requesting a URL (with header information for authentication), possibly with querystring parameters and receiving back an XML document. In general calls that read information will be sent via HTTP GET and those that modify information will be sent via HTTP POST.

A full list of URLs (methods) that you can call plus the responses you will get back is available on the main API page.

Connection concept

The TourCMS Marketplace lets you connect to multiple individual TourCMS accounts via a single API. Marketplace partners accessing multiple accounts can use the /p/ (Partner) style calls as well as the /c/ style API.

Individual TourCMS accounts may only call the /c/ (Channel) style API calls (i.e. can only access their own data).

Each channel (think of a channel as a single company) has a Channel ID.
Each Marketplace partner has a Marketplace Account ID (MAID).

To connect as Marketplace Partner 10. For individual TourCMS accounts (/c/ API calls only)

Authentication headers

Authentication is handled by passing in two special headers when making any request to the API:

Example headers

x-tourcms-date: Thu, 05 Aug 2010 10:51:29 GMT 
Authorization: TourCMS 0:1:rJaU8iuQlVWlHNi7sbAN187ziY63qIedWSFluEm4PKI%3D

Signature Generation

This section will be updated fully shortly however in the meantime for a reference implementation please see the generate_signature function in the PHP Client Library.

© 2003-2012 Travel UCD Limited. All rights reserved. TourCMS® is a registered trademark of Travel UCD Limited, United Kingdom. View Privacy policy.