POST exportservice/groupsinsport

Creates a list of groups within the provided SportIds.

See "Report creating methods" under "General description" for how to call this method.

Request Information

Request URL

https://api.idrottonline.se/exportservice/groupsinsport

URI Parameters

NameDescriptionTypeAdditional information
x-svenskidrott-api-version

The requested API version

string

Default value is 1.0

api-version

The requested API version

string

Default value is 1.0

Body Parameters

The request

ExportService.DataContracts.Request.CreateGroupsInSportRequest
NameDescriptionTypeAdditional information
SportIds

The groups in the result must have a connection to at least any of the provided SportIds.
Should contain Id for one main sport or one or more subsports.

Collection of integer

Required

Since

If set, the result will contain changes from this time and later only. If a group is added, changed, removed or any of the groups' or group members' following entities are changed

  • Address
  • Contacts
  • Licenses
  • Roles
  • RoleAttributes
then the service will treat the group as changed.

If not set, the result will contain the current information available.

Groups in organisations that no longer have any connection to any of the SportIds, will not be returned.

date

None.

OrganisationIds

The ids of the top level organisations to get groups for. If parameter IncludeUnderlyingOrganisations is set to true, then the response will also include groups for underlying organisations. I.e. if you provide an OrganisationId for an SF, you will also get groups from Regions, SDFs, SubSports (Gren/Klass) and Clubs, if parameter IncludeUnderlyingOrganisations is set to true.

Collection of integer

None.

IncludeUnderlyingOrganisations

Set to false to not include groups from underlying organisations in the result.

boolean

Default value: true

OrganisationTypeIds

Used to restrict the results to only include groups connected with organisations of a type in the provided OrganisationTypeIds.

Collection of integer

Default value: All

GroupIds

If GroupIds is specified, then only groups in GroupIds will be returned. These groups still needs to fulfill all other parameters.

Collection of integer

None.

GroupTypeIds

Used to restrict the results to only include groups of a type in the provided GroupTypeIds.

Collection of integer

Default value: All

ReturnLicenses

Set to true to include licenses in the response.

boolean

Default value: true

SearchLicenses

Set to true to search for changes in licenses. Only applicable when Since date is set.

boolean

Default value: true

ReturnGroupMemberContacts

Set to true to return group member contacts in the response.

boolean

Default value: true

SearchGroupMemberContacts

Set to true to search for changes in group member contacts. Only applicable when Since date is set.

boolean

Default value: true

Request Formats

application/json, text/json

Sample:
{
  "SportIds": [
    10
  ],
  "Since": "2025-07-03T13:29:24",
  "OrganisationIds": [
    1,
    2,
    3
  ],
  "IncludeUnderlyingOrganisations": true,
  "OrganisationTypeIds": [],
  "GroupIds": [
    123,
    124,
    125
  ],
  "GroupTypeIds": [
    1,
    2,
    3
  ],
  "ReturnLicenses": true,
  "SearchLicenses": true,
  "ReturnGroupMemberContacts": true,
  "SearchGroupMemberContacts": true
}

Response Information

Resource Description

A list of groups with associated properties

Collection of ExportService.DataContracts.Groups.Group
NameDescriptionTypeAdditional information
GroupId

The identifier of the group.

integer

None.

GroupTypeId

The identifier of the group's type.

integer

None.

Name

The name of the group.

string

None.

Description

The description of the group.

string

None.

OwnerOrgId

The identifier of the organisation who owns the group.

integer

None.

SportId

The identifier of the sport with which this group is connected.

integer

None.

IsDeleted

Indicates whether or not this group is deleted already.

boolean

None.

AgeRangeId

The identifier of the age-range to which this group is limited to.

integer

None.

GenderId

The identifier of the gender to which this group is limited to.

integer

None.

JerseyColor

The jersey color of this group.

string

None.

GroupMembers

The members in this group.

Collection of ExportService.DataContracts.Groups.GroupMember

None.

Licenses

The licenses issued to this group.

Collection of ExportService.DataContracts.License.License

None.

ChangeTracking

The change tracking of the group itself.

ExportService.DataContracts.ChangeTracking

None.

Consensus

The consensus.

ExportService.DataContracts.Consensus

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "GroupId": 456,
    "GroupTypeId": 1,
    "Name": "Grupp 1",
    "Description": "Description",
    "OwnerOrgId": 234,
    "SportId": 33,
    "IsDeleted": false,
    "AgeRangeId": 123,
    "GenderId": 1,
    "JerseyColor": "Röd",
    "GroupMembers": [
      {
        "PersonId": 123,
        "FirstName": "Karl",
        "LastName": "Karlsson",
        "AlternativeFirstName": "Kalle",
        "BirthDate": "2001-01-01",
        "GenderId": 1,
        "IsPersonalMember": false,
        "IsOrganisationMember": false,
        "IsActiveMember": true,
        "IsContact": true,
        "IsParent": false,
        "IsDeleted": false,
        "IsGroupAdmin": false,
        "GroupMemberAttributes": [
          {
            "Name": "Nummer (hemma)",
            "Value": "25",
            "IsDeleted": false,
            "ChangeTracking": {
              "FADateTime": "2012-10-10T10:10:00",
              "FAAppId": 0,
              "LCDateTime": "2015-10-11T20:20:00",
              "LCAppId": 0
            }
          }
        ],
        "Parents": [
          {
            "PersonId": 8796,
            "FirstName": "Förnamn",
            "LastName": "Efternamn",
            "IsDeleted": false,
            "ChangeTracking": {
              "FADateTime": "2012-10-10T10:10:00",
              "FAAppId": 0,
              "LCDateTime": "2015-10-11T20:20:00",
              "LCAppId": 0
            }
          }
        ],
        "Contacts": [
          {
            "PublishRule": {
              "PublishRuleTypeId": 2,
              "VisibleForOrganisationIds": null
            },
            "ContactId": 758,
            "ContactTypeId": 1,
            "ContactInfo": "email@email.se",
            "IsDeleted": false,
            "ChangeTracking": {
              "FADateTime": "2012-10-10T10:10:00",
              "FAAppId": 0,
              "LCDateTime": "2015-10-11T20:20:00",
              "LCAppId": 0
            }
          }
        ],
        "GroupMemberLicenses": null,
        "ChangeTracking": {
          "FADateTime": "2012-10-10T10:10:00",
          "FAAppId": 0,
          "LCDateTime": "2015-10-11T20:20:00",
          "LCAppId": 0
        }
      }
    ],
    "Licenses": [
      {
        "LicenseId": "00000000-0000-0000-0000-000000000000",
        "LicenseNumber": "123456456",
        "LicenseTypeId": "00000000-0000-0000-0000-000000000000",
        "LicenseTypeName": null,
        "PeriodId": "00000000-0000-0000-0000-000000000000",
        "PeriodStartTime": null,
        "PeriodEndTime": null,
        "PeriodType": 0,
        "IsPassive": false,
        "IsTerminated": true,
        "IsExpired": true,
        "IsPaid": true,
        "IsApproved": true,
        "IsDeleted": false,
        "LicenseCategorisations": null,
        "ApproveDate": "2015-06-08T00:00:00",
        "PaidFeeDate": null,
        "ApplyDate": "2015-06-06T00:00:00",
        "DeletedDate": null,
        "OrganisationId": 456,
        "LastChangedDate": null,
        "FreeText": null
      }
    ],
    "ChangeTracking": {
      "FADateTime": "2012-10-10T10:10:00",
      "FAAppId": 0,
      "LCDateTime": "2015-10-11T20:20:00",
      "LCAppId": 0
    },
    "Consensus": null
  }
]