Organisations

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


The organisation object

The Organisation Object

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

idstring

Unique identifier for the organisation.

namestring

The name of the organisation


Fetch all

POST/partner/organisations

import axios from 'axios';
const response = await axios(
{
method: 'get',
url: 'https://api.felloh.com/partner/organisations',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer <YOUR TOKEN HERE>`,
},
}
);
use GuzzleHttp\Client;
function getPartnerOrganisations($token) {
$url = "https://api.felloh.com/partner/organisations";
$client = new Client();
$response = $client->get($url, [
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => "Bearer $token",
],
]);
return $response->getBody();
}
$token = "<YOUR TOKEN HERE>";
$response = getPartnerOrganisations($token);
import requests
def get_partner_organisations(token):
url = 'https://api.felloh.com/partner/organisations'
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {token}'
}
response = requests.get(url, headers=headers)
response.raise_for_status()
result = response.json()['data']
return result
result = get_partner_organisations('<YOUR TOKEN HERE>')
print(result)
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
var token = "<YOUR TOKEN HERE>";
var response = await GetPartnerOrganisations(token);
Console.WriteLine(response);
}
static async Task<string> GetPartnerOrganisations(string token)
{
using (var httpClient = new HttpClient())
{
var url = "https://api.felloh.com/partner/organisations";
httpClient.DefaultRequestHeaders.Add("Content-Type", "application/json");
httpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {token}");
var response = await httpClient.GetAsync(url);
response.EnsureSuccessStatusCode();
var responseData = await response.Content.ReadAsStringAsync();
var result = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(responseData).data;
return result;
}
}
}

RESPONSE

{
"data": [
{
"id": "X00001",
"name": "Felloh"
}
],
"errors": {},
"meta": {
"code": 200,
"reason": "OK",
"message": "The request was successful",
"request_id": "cdd40f5c-9d82-44c2-92e3-b5d2cad364f6",
"count": 1
}
}

This endpoint retrieves all the organisations that your partner account has access to.

HTTP Method

POST

HTTP Endpoint

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

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

Response

Returns an array of Organisation Objects