API

API Keys

Authentification

  • To get started working with the cronsync API you have to create your own API keys which consists of two parts - the account key und the secret key.
  • To create them log in into cronsync and go to Preferences. In Preferences on the “API” - Tab there is the button to create both of the keys.
  • Warning: Everybody who knows these API keys will be able to access your company data.
  • There you can also delete the keys or create new ones. If you create new ones, the existing key does not work anymore, so you have to update them in your API - applications.

Connection

Your URL to the cronsync API consists of multiple parts:

  • account key
  • secret key
  • timestamp (has to be greenwich meantime timestamp)
  • account name (your cronsync subdomain, such as “flashpulse.cronsync.com“)
  • data category (such as “Times” or “Contacts”. All available categories are listed in 2.a)
  • action (all actions for each categories are listed at 2.a )
  • datatype (the answer format, “json” or “xml” )

First you have to calculate a “sha1“ Hash out of the the following String structure :

accountkey/timestamp/category/action.datatype“ concatenated with “secretkey

Important: For calculating a valid hash it is necessary to put the “ / “ between the first parts and the “ . “ between action and datatype

The Hash calculated is named “sha1hash” in the following.

So the complete URL for your API request has the follwing structure:

https://accountname.cronsync.com/api/sha1hash/accountkey/timestamp/category/action.datatype

Datatypes

  • If you send a request to the cronsync API, you have to choose in which format you want the data in the response.
  • cronsync API supports JSON and XML format. Make sure that the datatype in the URL is written lowercase, like “json” or “xml”.

Data categories & actions

The following Data categories are available in the cronsync API:

  • Times
  • Users
  • Addresses
  • Contacts
  • Projects
  • Modules
  • Tasks
  • Invoices
  • Companies

Each category has two actions:

"index"
  • the index action lists all entries from the specified category
number of the entry id
  • if you need one specified ID of an entry, set the ID instead of “index”

Documented Script file

To get an idea how to start working with cronsync API have a look at this full documented Example File.

The example script shows how you could use the cronsync API with PHP.