Coruson API

<back to all web services

GetOrgUnits

Coruson Organisational Units

Requires Authentication
The following routes are available for this service:
GET/api/orgunitsQuery for Coruson Organisational Units
GetOrgUnits Parameters:
NameParameterData TypeRequiredDescription
OrgUnitIdqueryGuidNoFilter by OrgUnitId.
NamequerystringNoFilter by the name of the Org Unit.
CodequerystringNoFilter by the code of the Org Unit.
DescriptionquerystringNoFilter by the description of the Org Unit.
ParentIdqueryGuidNoFilter by the parent OrgUnitId of the Org Unit.
ParentNamequerystringNoFilter by the name of the parent the Org Unit(s) belongs to.
FullHierarchyquerystringNoFilter organisational units by providing their full hierarchy. Format should be: {Root}\\\\..\\\\..\\\\{Parent}.
IsDefaultqueryBooleanFilterYesFilter by the default Org Unit. Only one Org Unit is default.

Allowable Values

  • All
  • True
  • False
IsActivequeryBooleanFilterYesFilter by the Org Unit status.

Allowable Values

  • All
  • True
  • False
OrderByqueryOrgUnitOrderYesProperty to order by in Ascending order. Default is 'Name'.

Allowable Values

  • Default
  • Name
  • ParentName
OrderByDescqueryOrgUnitOrderYesProperty to order by in Descending order.

Allowable Values

  • Default
  • Name
  • ParentName
ThenByqueryOrgUnitOrderYesSecond Property to order by in Ascending order. NOTE: If this value is the same as either the OrderBy or OrderByDesc values, then it will be ignored.

Allowable Values

  • Default
  • Name
  • ParentName
ThenByDescqueryOrgUnitOrderYesSecond Property to order by in Descending order. NOTE: If this value is the same as either the OrderBy or OrderByDesc values, then it will be ignored.

Allowable Values

  • Default
  • Name
  • ParentName
PagingRequestBase<T> Parameters:
NameParameterData TypeRequiredDescription
SkipformIntegerNoNumber of items to skip before returning results. Minimum suitable value is 0 and is also the default value.
TakeformIntegerNoNumber of items to return per page. Must be a number in the range 1-100. Default value is 100.
OrderByformEnumNoOrder By
OrderByDescformEnumNoOrder By Descending
ThenByformEnumNoThen By
ThenByDescformEnumNoThen By Descending
RequestBase Parameters:
NameParameterData TypeRequiredDescription
VersionformintNo
GetOrgUnitsResponse Parameters:
NameParameterData TypeRequiredDescription
OrgUnitsformList<OrgUnit>No
GetResponseBase Parameters:
NameParameterData TypeRequiredDescription
TotalResultsformintNo
SkipformintNo
TakeformintNo
LinksformList<Link>No
ResponseBase Parameters:
NameParameterData TypeRequiredDescription
StatusDescriptionformstringNo
ResponseStatusformResponseStatusNo
Link Parameters:
NameParameterData TypeRequiredDescription
NameformstringNo
RequestUrlformstringNo
MethodformstringNo
OrgUnit Parameters:
NameParameterData TypeRequiredDescription
OrgUnitIdformGuidNo
NameformstringNo
CodeformstringNo
DescriptionformstringNo
ParentIdformGuid?No
ParentNameformstringNo
FullHierarchyformstringNo
IsDefaultformboolNo
IsActiveformboolNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

                    POST /csv/reply/GetOrgUnits HTTP/1.1 
Host: platform.gaelenlighten.com 
Content-Type: text/csv
Content-Length: length

{"OrgUnitId":"00000000-0000-0000-0000-000000000000","Skip":0,"Version":0,"Name":"String","Take":0,"Code":"String","Description":"String","ParentId":"00000000-0000-0000-0000-000000000000","ParentName":"String","FullHierarchy":"String","IsDefault":"All","IsActive":"All","OrderBy":"Default","OrderByDesc":"Default","ThenBy":"Default","ThenByDesc":"Default"}
                    
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"TotalResults":0,"StatusDescription":"String","Skip":0,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Take":0,"Links":[{"Name":"String","RequestUrl":"String","Method":"String"}],"OrgUnits":[{"Name":"String","Code":"String","Description":"String","ParentId":"00000000-0000-0000-0000-000000000000","ParentName":"String","FullHierarchy":"String","IsDefault":false,"IsActive":false}]}