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)



Fetch all

POST/user/organisations

import axios from 'axios';
const response = await axios(
{
method: 'get',
url: 'https://api.felloh.com/user/organisations',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer <YOUR TOKEN HERE>`,
},
},
);
use GuzzleHttp\Client;
function fetchOrganisations($token) {
$url = "https://api.felloh.com/user/organisations";
$client = new Client();
$response = $client->get($url, [
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => "Bearer $token",
],
]);
$data = json_decode($response->getBody(), true);
return $data;
}
$token = "<YOUR TOKEN HERE>";
$response = fetchOrganisations($token);
import requests
def get_user_organisations(access_token):
api_url = 'https://api.felloh.com/user/organisations'
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {access_token}'
}
response = requests.get(api_url, headers=headers)
response.raise_for_status()
return response.text
response_data = get_user_organisations('<YOUR TOKEN HERE>')
print(response_data)
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
var response = await GetUserOrganisations("<YOUR TOKEN HERE>");
Console.WriteLine(response);
}
static async Task<string> GetUserOrganisations(string accessToken)
{
using (HttpClient client = new HttpClient())
{
string apiUrl = "https://api.felloh.com/user/organisations";
client.DefaultRequestHeaders.Add("Content-Type", "application/json");
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");
var httpResponse = await client.GetAsync(apiUrl);
httpResponse.EnsureSuccessStatusCode();
return await httpResponse.Content.ReadAsStringAsync();
}
}
}

RESPONSE

{
"data": [
{
"created_at": "2022-01-15T00:48:42.091Z",
"currencies" : [
"GBX"
],
"deleted_at" : null,
"features" : [
{
"created_at" : "2022-01-15T01:10:35.687Z",
"id" : "ded40f5c-9d82-44c2-92e3-b5d2cad364f6",
"machine_name" : "booking-and-payment",
"name" : "Booking & Payment"
},
{
"created_at" : "2022-07-27T22:17:51.389Z",
"id" : "efd40f5c-9d82-44c2-92e3-b5d2cad364f6",
"machine_name" : "chargebacks",
"name" : "Chargebacks"
},
],
"id" : "X00001",
"image" : null,
"legacy_id" : "bcd40f5c-9d82-44c2-92e3-b5d2cad364f6",
"name" : "Felloh",
"parent" : "X00002",
"payment_methods" : [
"MOTO_IN_PERSON",
"MOTO_OTHER",
"ONLINE"
]
}
],
"errors": {},
"meta": {
"code": 200,
"reason": "OK",
"message": "The request was successful",
"request_id": "cdd40f5c-9d82-44c2-92e3-b5d2cad364f6"
}
}

This endpoint retrieves all organisations accessible in the authenticated session.

HTTP Method

POST

HTTP Endpoint

PRODhttps://api.felloh.com/user/organisations

SANDBOXhttps://sandbox.felloh.com/user/organisations

Response

Returns an array of Organisation Objects