POST OrganizationUnit

Function to get OrganizationUnit data. Do a http post containing input parameters in the request body to "/OrganizationUnit/GET"-url.

Request Information

URI Parameters

None.

Body Parameters

The parameters.

GetOrganizationUnitParameters
NameDescriptionTypeAdditional information
OrganizationID
OrganizationID
integer

Define when you want to get list of organizations OrganizationUnits. This parameter is required if OrganizationUnitID-parameter is not defined.

OrganizationUnitID
OrganizationUnitID
integer

By setting this parameter you can narrow down returned results. For example setting this value and setting IncludeChilds and IncludeParents value to false would return only the OrganizationUnit with provided Id. This parameter is required if OrganizationID-parameter is not defined.

IncludeChilds
IncludeChilds
boolean

Define value only if OrganizationUnitID is defined. If IncludeChilds is set to true the OrganizationUnits under OrganizationUnit defined by OrganizationUnitID will be returned in results.

IncludeParents
IncludeParents
boolean

Define value only if OrganizationUnitID is defined. If IncludeParents is set to true the OrganizationUnits parent to OrganizationUnit defined by OrganizationUnitID will be returned in results.

IncludeSelf
IncludeSelf
boolean

Define value only if OrganizationUnitID is defined. If IncludeSelf is set to false OrganizationUnit defined by OrganizationUnitID won't be returned in results.

IncludeDetails
IncludeDetails
boolean

In case set to true, the results will include organization unit details. The details include organization unit email, phone number, web site, postal address info and invoicing information.

Type
Type
string

Use to narrow down the results by defining type of the OrganizationUnits. Currently only allowed type value is "memberclubs". This type is not in use on every HOIKA customer. For customers that have not this type in use, defining the type does nothing.

IsExported
IsExported
boolean

Optional parameter that defines what should be value of "IsExported"-field of the results.

ClubStatus
Optional parameter that defines what should the status of the club
possible values :
"all" => return all the clubs,
"active" => return only the active clubs,
"deleted" => return only the deleted clubs

N.B: =>:: default :: empty or not set => return only the active clubs,
string

values = "all", "active", "deleted"

AuthUsername
AuthUsername (required)
string

The authentication username. Full name or email address are allowed values.

AuthPassword
AuthPassword (required)
string

The authentication password.

AuthOrganizationUnitID
AuthOrganizationUnitID (required)
integer

OrganizationUnitID of the user used on authentication.

AuthTokenGuid
AuthTokenGuid
string

This parameter is not currently in use.

Request Formats

application/json, text/json, text/html

Sample:
{
  "OrganizationID": 1,
  "OrganizationUnitID": 1,
  "IncludeChilds": true,
  "IncludeParents": true,
  "IncludeSelf": true,
  "IncludeDetails": true,
  "Type": "sample string 1",
  "IsExported": true,
  "ClubStatus": "sample string 2",
  "AuthUsername": "sample string 3",
  "AuthPassword": "sample string 4",
  "AuthOrganizationUnitID": 1,
  "AuthTokenGuid": "sample string 5"
}

application/xml, text/xml

Sample:
<GetOrganizationUnitParameters xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebApi.Models.Parameters">
  <AuthOrganizationUnitID>1</AuthOrganizationUnitID>
  <AuthPassword>sample string 4</AuthPassword>
  <AuthTokenGuid>sample string 5</AuthTokenGuid>
  <AuthUsername>sample string 3</AuthUsername>
  <ClubStatus>sample string 2</ClubStatus>
  <IncludeChilds>true</IncludeChilds>
  <IncludeDetails>true</IncludeDetails>
  <IncludeParents>true</IncludeParents>
  <IncludeSelf>true</IncludeSelf>
  <IsExported>true</IsExported>
  <OrganizationID>1</OrganizationID>
  <OrganizationUnitID>1</OrganizationUnitID>
  <Type>sample string 1</Type>
</GetOrganizationUnitParameters>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

OrganizationUnitListResponse.

OrganizationUnitListResponse
NameDescriptionTypeAdditional information
organizationUnits
Collection of OrganizationUnitViewModel

None.

ResultCode
ResultCode
Result

Numerical value telling result of the operation. "1" if operation was successfull, other value if operation was not successfull.

ResultMessage
ResultMessage
string

Message telling/explaining the result.

Response Formats

application/json, text/json, text/html

Sample:
{
  "organizationUnits": [
    {
      "Status": "sample string 1",
      "id": 2,
      "name": "sample string 3",
      "abbreviation": "sample string 4",
      "email": "sample string 5",
      "phoneNumber": "sample string 6",
      "childrensGroupCalendarUrl": "sample string 7",
      "youthsGroupCalendarUrl": "sample string 8",
      "adultsGroupCalendarUrl": "sample string 9",
      "agingsGroupCalendarUrl": "sample string 10",
      "webSite": "sample string 11",
      "postalAddress": {
        "streetAddress": "sample string 1",
        "postalCode": "sample string 2",
        "city": "sample string 3"
      },
      "userGroups": [
        {
          "id": "sample string 1",
          "name": "sample string 2",
          "isBuiltIn": true
        },
        {
          "id": "sample string 1",
          "name": "sample string 2",
          "isBuiltIn": true
        }
      ],
      "locations": [
        {
          "id": "sample string 1",
          "name": "sample string 2",
          "url": "sample string 3",
          "phoneNumber": "sample string 4",
          "email": "sample string 5",
          "streetAddress": "sample string 6",
          "city": "sample string 7",
          "country": "sample string 8",
          "postcode": "sample string 9",
          "latitude": 1.1,
          "longitude": 1.1,
          "activityTypes": null
        },
        {
          "id": "sample string 1",
          "name": "sample string 2",
          "url": "sample string 3",
          "phoneNumber": "sample string 4",
          "email": "sample string 5",
          "streetAddress": "sample string 6",
          "city": "sample string 7",
          "country": "sample string 8",
          "postcode": "sample string 9",
          "latitude": 1.1,
          "longitude": 1.1,
          "activityTypes": null
        }
      ],
      "externalId": "sample string 12",
      "region": {
        "ID": 1,
        "Name": "sample string 2"
      },
      "InvoicingInformation": [
        {
          "name": "sample string 1",
          "value": "sample string 2"
        },
        {
          "name": "sample string 1",
          "value": "sample string 2"
        }
      ]
    },
    {
      "Status": "sample string 1",
      "id": 2,
      "name": "sample string 3",
      "abbreviation": "sample string 4",
      "email": "sample string 5",
      "phoneNumber": "sample string 6",
      "childrensGroupCalendarUrl": "sample string 7",
      "youthsGroupCalendarUrl": "sample string 8",
      "adultsGroupCalendarUrl": "sample string 9",
      "agingsGroupCalendarUrl": "sample string 10",
      "webSite": "sample string 11",
      "postalAddress": {
        "streetAddress": "sample string 1",
        "postalCode": "sample string 2",
        "city": "sample string 3"
      },
      "userGroups": [
        {
          "id": "sample string 1",
          "name": "sample string 2",
          "isBuiltIn": true
        },
        {
          "id": "sample string 1",
          "name": "sample string 2",
          "isBuiltIn": true
        }
      ],
      "locations": [
        {
          "id": "sample string 1",
          "name": "sample string 2",
          "url": "sample string 3",
          "phoneNumber": "sample string 4",
          "email": "sample string 5",
          "streetAddress": "sample string 6",
          "city": "sample string 7",
          "country": "sample string 8",
          "postcode": "sample string 9",
          "latitude": 1.1,
          "longitude": 1.1,
          "activityTypes": null
        },
        {
          "id": "sample string 1",
          "name": "sample string 2",
          "url": "sample string 3",
          "phoneNumber": "sample string 4",
          "email": "sample string 5",
          "streetAddress": "sample string 6",
          "city": "sample string 7",
          "country": "sample string 8",
          "postcode": "sample string 9",
          "latitude": 1.1,
          "longitude": 1.1,
          "activityTypes": null
        }
      ],
      "externalId": "sample string 12",
      "region": {
        "ID": 1,
        "Name": "sample string 2"
      },
      "InvoicingInformation": [
        {
          "name": "sample string 1",
          "value": "sample string 2"
        },
        {
          "name": "sample string 1",
          "value": "sample string 2"
        }
      ]
    }
  ],
  "ResultCode": 1,
  "ResultMessage": "sample string 1"
}

application/xml, text/xml

Sample:
<OrganizationUnitListResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebApi.Models.Responses">
  <ResultCode xmlns="http://schemas.datacontract.org/2004/07/WebApi.Models">Success</ResultCode>
  <ResultMessage xmlns="http://schemas.datacontract.org/2004/07/WebApi.Models">sample string 1</ResultMessage>
  <organizationUnits xmlns:d2p1="http://schemas.datacontract.org/2004/07/WebApi.Models">
    <d2p1:OrganizationUnitViewModel>
      <InvoicingInformation xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">
        <InvoicingInfo>
          <name>sample string 1</name>
          <value>sample string 2</value>
        </InvoicingInfo>
        <InvoicingInfo>
          <name>sample string 1</name>
          <value>sample string 2</value>
        </InvoicingInfo>
      </InvoicingInformation>
      <abbreviation xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">sample string 4</abbreviation>
      <adultsGroupCalendarUrl xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">sample string 9</adultsGroupCalendarUrl>
      <agingsGroupCalendarUrl xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">sample string 10</agingsGroupCalendarUrl>
      <childrensGroupCalendarUrl xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">sample string 7</childrensGroupCalendarUrl>
      <email xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">sample string 5</email>
      <externalId xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">sample string 12</externalId>
      <id xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">2</id>
      <locations xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">
        <Location>
          <activityTypes i:nil="true" />
          <city>sample string 7</city>
          <country>sample string 8</country>
          <email>sample string 5</email>
          <id>sample string 1</id>
          <latitude>1.1</latitude>
          <longitude>1.1</longitude>
          <name>sample string 2</name>
          <phoneNumber>sample string 4</phoneNumber>
          <postcode>sample string 9</postcode>
          <streetAddress>sample string 6</streetAddress>
          <url>sample string 3</url>
        </Location>
        <Location>
          <activityTypes i:nil="true" />
          <city>sample string 7</city>
          <country>sample string 8</country>
          <email>sample string 5</email>
          <id>sample string 1</id>
          <latitude>1.1</latitude>
          <longitude>1.1</longitude>
          <name>sample string 2</name>
          <phoneNumber>sample string 4</phoneNumber>
          <postcode>sample string 9</postcode>
          <streetAddress>sample string 6</streetAddress>
          <url>sample string 3</url>
        </Location>
      </locations>
      <name xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">sample string 3</name>
      <phoneNumber xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">sample string 6</phoneNumber>
      <postalAddress xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">
        <city>sample string 3</city>
        <postalCode>sample string 2</postalCode>
        <streetAddress>sample string 1</streetAddress>
      </postalAddress>
      <region xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">
        <ID>1</ID>
        <Name>sample string 2</Name>
      </region>
      <userGroups xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">
        <UserGroup>
          <id>sample string 1</id>
          <isBuiltIn>true</isBuiltIn>
          <name>sample string 2</name>
        </UserGroup>
        <UserGroup>
          <id>sample string 1</id>
          <isBuiltIn>true</isBuiltIn>
          <name>sample string 2</name>
        </UserGroup>
      </userGroups>
      <webSite xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">sample string 11</webSite>
      <youthsGroupCalendarUrl xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">sample string 8</youthsGroupCalendarUrl>
      <d2p1:Status>sample string 1</d2p1:Status>
    </d2p1:OrganizationUnitViewModel>
    <d2p1:OrganizationUnitViewModel>
      <InvoicingInformation xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">
        <InvoicingInfo>
          <name>sample string 1</name>
          <value>sample string 2</value>
        </InvoicingInfo>
        <InvoicingInfo>
          <name>sample string 1</name>
          <value>sample string 2</value>
        </InvoicingInfo>
      </InvoicingInformation>
      <abbreviation xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">sample string 4</abbreviation>
      <adultsGroupCalendarUrl xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">sample string 9</adultsGroupCalendarUrl>
      <agingsGroupCalendarUrl xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">sample string 10</agingsGroupCalendarUrl>
      <childrensGroupCalendarUrl xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">sample string 7</childrensGroupCalendarUrl>
      <email xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">sample string 5</email>
      <externalId xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">sample string 12</externalId>
      <id xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">2</id>
      <locations xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">
        <Location>
          <activityTypes i:nil="true" />
          <city>sample string 7</city>
          <country>sample string 8</country>
          <email>sample string 5</email>
          <id>sample string 1</id>
          <latitude>1.1</latitude>
          <longitude>1.1</longitude>
          <name>sample string 2</name>
          <phoneNumber>sample string 4</phoneNumber>
          <postcode>sample string 9</postcode>
          <streetAddress>sample string 6</streetAddress>
          <url>sample string 3</url>
        </Location>
        <Location>
          <activityTypes i:nil="true" />
          <city>sample string 7</city>
          <country>sample string 8</country>
          <email>sample string 5</email>
          <id>sample string 1</id>
          <latitude>1.1</latitude>
          <longitude>1.1</longitude>
          <name>sample string 2</name>
          <phoneNumber>sample string 4</phoneNumber>
          <postcode>sample string 9</postcode>
          <streetAddress>sample string 6</streetAddress>
          <url>sample string 3</url>
        </Location>
      </locations>
      <name xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">sample string 3</name>
      <phoneNumber xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">sample string 6</phoneNumber>
      <postalAddress xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">
        <city>sample string 3</city>
        <postalCode>sample string 2</postalCode>
        <streetAddress>sample string 1</streetAddress>
      </postalAddress>
      <region xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">
        <ID>1</ID>
        <Name>sample string 2</Name>
      </region>
      <userGroups xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">
        <UserGroup>
          <id>sample string 1</id>
          <isBuiltIn>true</isBuiltIn>
          <name>sample string 2</name>
        </UserGroup>
        <UserGroup>
          <id>sample string 1</id>
          <isBuiltIn>true</isBuiltIn>
          <name>sample string 2</name>
        </UserGroup>
      </userGroups>
      <webSite xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">sample string 11</webSite>
      <youthsGroupCalendarUrl xmlns="http://schemas.datacontract.org/2004/07/JasentietoData">sample string 8</youthsGroupCalendarUrl>
      <d2p1:Status>sample string 1</d2p1:Status>
    </d2p1:OrganizationUnitViewModel>
  </organizationUnits>
</OrganizationUnitListResponse>