Choose a language javascript

Organisations

This object represents an organisation and/or it's child organisation(s).

Child organisations are a special feature provided to some customers, allowing organisational inheritance and complex organisational structures.

Only a parent organisation (or Felloh) can update an organisations settings, which will usually depend on the subscription or subscription of the parent organisation.


The organisation object

The Organisation Object

{
"id": "X00001",
"name": "Felloh",
"created_at": "2022-01-15T00:48:42.091Z",
"updated_at": "2022-01-18T11:27:25.018Z",
"parent": {
"id": "X00002",
"name": "Big Corp"
}
}

The Compact Organisation Object

{
"id": "X00001",
"name": "Felloh"
}

idstring

Unique identifier for the organisation.

namestring

The name of the organisation

created_atstring

The datetime at which the organisation was created within our systems

updated_atdatetime

The datetime at which the organisation was last updated.

parentobject

A compact organisation object referencing the parent organisation account (if one exists)


List all organisations

Request

const kittn = require('kittn');
let api = kittn.authorize('meowmeowmeow');
let kittens = api.kittens.get();
curl "http://example.com/api/kittens"
-H "Authorization: meowmeowmeow"
const kittn = require('kittn');
let api = kittn.authorize('meowmeowmeow');
let kittens = api.kittens.get();

Response

[
{
"id": 1,
"name": "Fluffums",
"breed": "calico",
"fluffiness": 6,
"cuteness": 7
},
{
"id": 2,
"name": "Max",
"breed": "unknown",
"fluffiness": 5,
"cuteness": 10
}
]

This endpoint retrieves all kittens.

HTTP Request

GET http://example.com/api/kittens

Query Parameters

ParameterDefaultDescription
include_catsfalseIf set to true, the result will also include cats.
availabletrueIf set to false, the result will include kittens that have already been adopted.

Retrieve an organisation

const kittn = require('kittn');
let api = kittn.authorize('meowmeowmeow');
let max = api.kittens.get(2);
curl "http://example.com/api/kittens/2"
-H "Authorization: meowmeowmeow"
const kittn = require('kittn');
let api = kittn.authorize('meowmeowmeow');
let max = api.kittens.get(2);

The above command returns JSON structured like this:

{
"id": 2,
"name": "Max",
"breed": "unknown",
"fluffiness": 5,
"cuteness": 10
}

This endpoint retrieves a specific kitten.

HTTP Request

GET http://example.com/kittens/<ID>

URL Parameters

ParameterDescription
IDThe ID of the kitten to retrieve