API

general information about API

Cangooroo's API is delivered in two different flavours: SOAP and REST. Use the one that fits your needs! Our services are explained here.

endpoint

Detailed information will be provided along with each contract. The basic is initial part of the URL which is provided by the owner of the Cangooroo licensee. Unless otherwise specified the the URL follows this pattern: https://ws-[clientIdentification].cangooroo.net.

what is SOAP?

SOAP (originally: Simple Object Access Protocol) is a messaging protocol specification for exchanging structured information in the implementation of web services in computer networks. Its purpose is to induce extensibility, neutrality and independence. It uses XML Information Set for its message format, and relies on application layer protocols, most often Hypertext Transfer Protocol (HTTP) or Simple Mail Transfer Protocol (SMTP), for message negotiation and transmission. See more.

what is REST?

REST (originally: Representational state transfer) is a software architectural style that defines a set of constraints to be used for creating Web services. Web services that conform to the REST architectural style, called RESTful Web services, provide interoperability between computer systems on the Internet. RESTful Web services allow the requesting systems to access and manipulate textual representations of Web resources by using a uniform and predefined set of stateless operations. See more.

making requests

REST requires that a client make a request to the server in order to retrieve or modify data on the server. A request generally consists of:

  • an HTTP verb, which defines what kind of operation to perform

  • a header, which allows the client to pass along information about the request

  • a path to a resource

  • an optional message body containing data

HTTP verbs

There are 4 basic HTTP verbs we use in requests to interact with resources in a REST system:

  • GET — Retrieve a resource or group of resources

  • POST — Create a new resource

  • PUT — Update an existing resource

  • DELETE — Delete an existing resource

  • OPTIONS — View allowed verbs against a specific resource

accept header

The API provides JSON responses. It doesn't currently require the , but might in the future. If not set, the API will use application/json.

VERB https://ws-[clientIdentification].cangooroo.net/API/REST/* HTTP/1.1

Accept: application/json

response codes

Responses from the server contain status codes to alert the client to information about the success of the operation. As a developer, you do not need to know every status code (there are many of them), but you should know the most common ones and how they are used:

status codeMeaning

  • 200 (OK) - This is the standard response for successful HTTP requests.

  • 201 (CREATED) - This is the standard response for an HTTP request that resulted in an item being successfully created.

  • 204 (NO CONTENT) - This is the standard response for successful HTTP requests, where nothing is being returned in the response body.

  • 400 (BAD REQUEST) - The request cannot be processed because of bad request syntax, excessive size, or another client error.

  • 403 (FORBIDDEN) - The client does not have permission to access this resource.

  • 404 (NOT FOUND) - The resource could not be found at this time. It is possible it was deleted, or does not exist yet.

  • 500 (INTERNAL SERVER ERROR) - The generic answer for an unexpected failure if there is no more specific information available.

To facilitate the interaction between the client and the server, Cangooroo's REST WebServices use JSON format text files in their requests and their responses, the files in JSON are simple to interpret, text parameters can be identified by placing them double quotes ("example"), Boolean parameters and numbers can be sent normally without special formatting.


thing that you should know

using GZip compression

All the methods within Cangooroo API work with GZip Compression. It's important to use compression because it reduces the network traffic and the download time between our servers and your application.

tools that helps your development

Below are some of the tools we recommend you use when it comes for Webservice integration, testing and providing us with all the information we might need to try and help you.

Please remember that we do not give any support to the tools below.

    1. Soap-UI - used to test Webservices (we use it to test Soap Webservices).

    2. Fiddler - used to capture http requests / responses.

    3. Postman - used to test Webservices (we use it to test Rest Webservices).

authentication and authorization

Cangooroo's API relies on the usage of a combination between Credentials and Token to both authenticate and authorize Requests to access our resources.

credentials

As explained before, Credentials for Cangooroo's API must be generated by the Operator who owns the Cangooroo's instance that you're trying to consume and they usually come in the form of an UserName and a Password.

token

A Token is an automatically generated encripted value that will be connected to a single Availability Response, independent of the Service searched. For example, if you make a Request to our SearchAvailability method for the Hotel service, with the Response you will receive a Token. An unique String that you will have to store and use on the next steps since your Availability Response (the rates, dates and etc.) is bound by your Credentials and Token.

Is important to be aware that a token expires after 30 minutes, giving you a limited window to confirm a Booking after you made your search.

timezone

Always send your request without any timezone information. If we need to have this information it will be clearly explained.