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
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 |
Reviewed and changes made to ensure consistency with Collaborate APIs
Harigopal Patel We have update the validations message with its unique reference code. So please refer above reference code instead of validations message.
Publisher required following field in response
- No of Users
- Created Date
- Organisation is Internal
Publisher required following sorting
- No of Users
- Created Date
CC - Rishit Patel | Imran Aziz | Linda Kerz
We will support CSV for following fields.
- Category like (10,11,12)
- Industry like (1,2,3)
- Status like (Active,Archive,Pending)
We will support single value for following fields.
search like (highq)
domain like (highq.com)
sort like (name)
orderby like (desc)
Comments
5 Comments