Akkroo
  1. Support
  2. Developers
  3. API
  4. Getting Started

Getting Started Guide

The aim of this documentation is to make it really easy for developers to get up and running with the Akkroo REST API and to start sharing data with us.

This guide will walk you through making your first API request.

Before You Start

Before you are able to use the Akkroo API you need your client credentials. You can get these from your dashboard here.

Your client credentials are used to retrieve an access token from the API which is used to authorise each request.

Your client credentials will look something like this:

hS4sfKsdlPPg74tbg7u0ghjPW1EBWrej0g9111SR2KHGsAxXNSs32

Getting an Access Token

To get your access token you need to use the Authentication method on the API. Here’s an example, sending over the client credentials.

    POST https://akkroo.com/api/auth
    POST /api/auth HTTP/1.1
Authorization: Basic <client credentials>
Accept: application/vnd.akkroo-v1.1.5+json
Content-Type: application/vnd.akkroo-v1.1.5+json

{
    "grant_type": "client_credentials",
    "scope":      "PublicAPI"
}

In this request the Authorization header that was sent over included the personal client credentials from Akkroo. The body of the call contained a JSON formatted object defining the desired grant type and scope (you will always need to use the values shown).

If the authorisation request is successful you should receive a response like below:

HTTP/1.1 200 OK
Content-Type: application/vnd.akkroo-v1.1.5+json
{
    "access_token": "hS4sfKsdlPPg74tbg7u0ghjPW1EBWrej0g9111SR2KHGsAxXNSs32",
    "expires_in":   "1209600",
    "token_type":   "bearer",
    "scope":        "PublicAPI"
}

As you can see the response contains a JSON formatted object containing a number of parameters. For more information, see the Authentication page.

Requesting some data from the API

After you have stored your access token in your application you can start performing API calls. The example below shows information on the company being retrieved from the endpoint:

    GET https://akkroo.com/api/company
    GET /api/company HTTP/1.1
Authorization: Bearer <access_token>
Accept: application/vnd.akkroo-v1.1.5+json
Content-Type: application/vnd.akkroo-v1.1.5+json

HTTP/1.1 200 OK
Content-Type: application/vnd.akkroo-v1.1.5+json
{
	"id":2,
	"lastModified":"Thu, 01 Aug 2013 10:01:27 +0100",
	"name":"Wexler Inc",
	"urlHash":"abcdefghijkl",
	"username":"wexler",
	"appPasscode":"12345"
}

If you have any questions or problems with this example, or anything in the API documentation, please don’t hesitate to get in touch. You can email us at support@akkroo.com or call us.

Next steps

We recommend you read the API principles, authentication and versioning pages, and then review the specific pages for the endpoints you will use. Check if there is a client library for the language you use to make your life easier. When implementing, be sure to handle all API errors.