Organisation APIs

Get Organisation List

OVERVIEW


Get a list of organisations

This API call is used to retrieve a list of organisations from the system.

HTTP Request

GET  /api/4/organisations?{parameters}

 

URL Query Parameters

 

Parameter

Format

Description

domain

String

Domain to search for. Domain name must be a single value. We will not support CSV for this field.

industry

String

The ID of the organisation industry

category

String

The ID of the organisation category

search

String

Will search across all organisation fields for a matching string. This should be the same search

status 

String

Status:  active | archive | pending.

sort

String

Allow ascending and descending sorting of a single field.

GET /api/4/organisations?ordertype=name

This returns a list of organisations sorted by name in ascending order.

possible fields: id, name, status,createddate,users

order by

String

Allow ascending and descending sorting of a single field.

GET /api/4/organisations?orderby=desc

possible fields: asc,desc

limit

String

Limits the number of organisations returned. e.g.

GET /api/4/organisations?offset=10&limit=5

Default: 100

offset

String

Allows paging of organisations. e.g.

GET /api/4/organisations?offset=10&limit=5

Default: 0

Example

GET  http://example.com/context/api/4/organisations?domain=google.com&industry=0,1&category=12,13,14&status=active,pending,archive&ordertype=id&orderby=asc&limit=25&offset=5

 

HTTP Response

Success

HTTP response 200 with a list of Organisation summary Object 

Error

See API Error messages

 

JSON format response

 

{
  "organisations": {
    "total": "74",
    "totalCount": "70",
    "organisation": [
      {
        "orgid": "1",
        "name": "HighQ",
        "internal": "1",
        "status": "ACTIVE",
        "noofusers": "38",
        "createddate": "22 Mar 2017 14:20",
        "link": "https://divyanghp.local.com/divyang_4_live/api/4/organisations/1"
      },
      {
        "orgid": "3",
        "name": "test",
        "internal": "0",
        "status": "ACTIVE",
        "noofusers": "3",
        "createddate": "17 Oct 2017 07:33",
        "link": "https://divyanghp.local.com/divyang_4_live/api/4/organisations/3"
      }
    ]
  }
}

 

XML format response

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<organisations>
    <total>74</total>
    <totalCount>70</totalCount>
    <organisation>
        <orgid>1</orgid>
        <name>HighQ</name>
        <internal>1</internal>
        <status>ACTIVE</status>
        <noofusers>38</noofusers>
        <createddate>22 Mar 2017 14:20</createddate>
        <link>https://divyanghp.local.com/divyang_4_live/api/4/organisations/1</link>
    </organisation>
    <organisation>
        <orgid>3</orgid>
        <name>test</name>
        <internal>0</internal>
        <status>ACTIVE</status>
        <noofusers>3</noofusers>
        <createddate>17 Oct 2017 07:33</createddate>
        <link>https://divyanghp.local.com/divyang_4_live/api/4/organisations/3</link>
    </organisation>
</organisations>

 

Error messages

 

Summary Ref Code (V4) Ref Code (before V4)

The industry is invalid

293 N/A

The category is invalid

294 N/A

The status is Invalid.

295 N/A

The limit value is invalid.

291 N/A

The offset value is invalid.

292 N/A

The ordertype is Invalid.

289 N/A

The orderby value is invalid. Please use either asc or desc

290 N/A

 

 

Comments


5 Comments

Last Updated: Jun 09,2023