IOM - External API (1.0.0)

Download OpenAPI specification:Download

IOM - External API

Address

External - Address

getAllCountryCodes

Retrieve a list of all possible country codes allowed for addresses

Responses

Response samples

Content type
application/json
{
  • "resultCode": 300,
  • "returnObject": null
}

API key

External - API key

isApiKeyCorrect

Simple request to test if the api key is valid.

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": true
}

Company

External - Company

getCompanies

Retrieve a list of all companies on the system.

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": [
    ]
}

getCompanyById

Retrieve a company by its id.

query Parameters
id
required
integer <int64>

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": {
    }
}

getCompanies

Retrieve all companies

Responses

Response samples

Content type
application/json
{
  • "resultCode": 300,
  • "returnObject": null
}

createCompany

creates a company

Request Body schema: application/x-www-form-urlencoded
required
partnerId
required
integer

Must correspond to a valid franchise partner id

name
required
string

Must be non-empty

color
string

Must be a valid non-empty hex rgb color code. E.g. #a32311

zip
string
city
string
street
string
country
string

Must be a valid country code, retrievable by address/country request

Responses

Response samples

Content type
application/json
{
  • "resultCode": 400,
  • "returnObject": null
}

getCompaniesWithNewPathConvention

get company with id

path Parameters
id
required
integer >= 1

the company id

Responses

Response samples

Content type
application/json
{
  • "resultCode": 400,
  • "returnObject": null
}

updateCompany

Update a given company

path Parameters
id
required
integer >= 1

the company id

Request Body schema: application/x-www-form-urlencoded
required
name
required
string

Must be non-empty

color
string

Must be a valid non-empty hex rgb color code. E.g. #a32311

zip
string
city
string
street
string
country
string

Must be a valid country code, retrievable by address/country request

Responses

Response samples

Content type
application/json
{
  • "resultCode": 400,
  • "returnObject": null
}

updateCompanyImage

Updates the image of a company

path Parameters
id
integer >= 1

the company id

Request Body schema: multipart/form-data
file
string <binary>

should be a png or jpg file, if no object is provided the old image will be deleted

Responses

Response samples

Content type
application/json
{
  • "resultCode": 400,
  • "returnObject": null
}

Franchise Partner

External - Franchise Partner

getAllFranchisePartners

Retrieve a list of all franchisepartners in the system

Responses

Response samples

Content type
application/json
{
  • "resultCode": 300,
  • "returnObject": null
}

Group

External - Group

createGroup

Create a new participant group.

Request Body schema: application/x-www-form-urlencoded
required
name
required
string
companyId
required
integer <int64>

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": {
    }
}

getAllGroups

Retrieve a list of all participant groups.

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": [
    ]
}

getGroupById

Retrieve a participant group by its id.

query Parameters
id
required
integer <int64>
Example: id=1

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": {
    }
}

addParticipantToGroup

Add a participant to a group.

Request Body schema: application/x-www-form-urlencoded
required
groupId
required
integer <int64>
participantId
required
integer <int64>
addToAllTrainings
boolean

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": null
}

removeParticipantFromGroup

Remove a participant from a group.

Request Body schema: application/x-www-form-urlencoded
required
groupId
required
integer <int64>
participantId
required
integer <int64>
removeFromAllTrainings
boolean

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": null
}

Statistics

External - Statistics

getStatisticsForTraining

Retrieve the statistics for a specific training, including per user statistics for all of its participants.

query Parameters
trainingId
required
integer <int64>
Example: trainingId=1

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": {
    }
}

getStatisticsForUser

Retrieve all available trainings statistics for a specific training participant.

query Parameters
participantId
required
integer <int64>
Example: participantId=1
state
string
Enum: "IN_CREATION" "CREATED" "IN_REVIEW" "REJECTED" "APPROVED" "ARCHIVED"
Example: state=APPROVED

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": [
    ]
}

Trainer

External - Trainer

getAllTrainers

Retrieve a list of all trainings belonging to the given trainer.

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": [
    ]
}

Training

External - Training

getTrainings

Retrieve a list of all trainings.

query Parameters
state
string
Enum: "IN_CREATION" "CREATED" "IN_REVIEW" "REJECTED" "APPROVED" "ARCHIVED"

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": [
    ]
}

getTrainingById

Retrieve a specific training by id.

query Parameters
id
required
integer <int64>
Example: id=1

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": {
    }
}

addGroupToTraining

Add a participant group to a training → all participants of the group are added to the training.

Request Body schema: application/x-www-form-urlencoded
required
trainingId
required
integer <int64>
groupId
required
integer <int64>

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": null
}

addParticipantToTraining

Add a participant to a training.

Request Body schema: application/x-www-form-urlencoded
required
trainingId
required
integer <int64>
participantId
required
integer <int64>

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": 0
}

removeGroupFromTraining

Remove a group from a training.

Request Body schema: application/x-www-form-urlencoded
required
trainingId
required
integer <int64>
groupId
required
integer <int64>
removeAllGroupMembers
boolean
Default: false

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": null
}

removeParticipantFromTraining

Remove a participant from a training.

Request Body schema: application/x-www-form-urlencoded
required
trainingId
required
integer <int64>
participantId
required
integer <int64>

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": 0
}

getTrainingsForTrainer

Retrieve a list of all trainings belonging to the given trainer.

query Parameters
activeOnly
boolean
trainerId
required
integer <int64>
Example: trainerId=1

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": {
    }
}

setTrainerLabel

Change the label of the trainer that is shown on certificates. If not set, current value will be cleared.

Request Body schema: application/x-www-form-urlencoded
required
trainingId
required
integer <int64>
trainerLabel
string

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": null
}

Training participant

External - Training participant

deleteParticipant

Delete a TrainingParticipant.

One of participantId or externalId must be set to identify the user, if both are set, externalId will be ignored.

query Parameters
participantId
integer <int64>
Example: participantId=1
externalId
string
Example: externalId=1

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": null
}

autoLoginUrlFor

Retrieve the login URL for a specific participant. This URL behaves differently depending on which platform it is opened. Either the installed app is opened and the login parameters are passed to it, or the user is forwarded to the platform specific store entry, or the web client is opened.

One of participantId or externalId must be set to identify the user, if both are set, externalId will be ignored.

query Parameters
participantId
integer <int64>
Example: participantId=1
externalId
string
Example: externalId=1

Responses

Response samples

Content type
application/json
{}

createParticipant

Create a new training participant.

Request Body schema: application/x-www-form-urlencoded
required
email
required
string

E-mail of participant

firstName
required
string

First name of participant

lastName
required
string

Last name of participant

salutation
string
Enum: "MISTER" "MISS" "NEUTRAL"
titlePrefix
string

Academic title preceding name

titleSuffix
string

Academic title following name

externalId
string

External id to connect with third party services

birthdate
integer <int64>

Birth date in milliseconds since January 1, 1970 00:00:00

additionalInfo
string

Additional info which should be attached to the participant.

language
string

Preferred user language in ISO2 format.

password
string

Password to set for user (at least 6 characters long, no whitespace)

Responses

Response samples

Content type
application/json
{
  • "resultCode": 403,
  • "returnObject": {
    }
}

updateExternalId

Update the external id of a TrainingParticipant.

One of id or currentExternalId must be set to identify the user to update. If both are set, externalId will be ignored.

Request Body schema: application/x-www-form-urlencoded
required
id
integer <int64>
currentExternalId
string
newExternalId
required
string

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": null
}

update

Update an existing training participant.

One of id or externalId must be set to identify the user to update. If both are set, externalId will be ignored.

Request Body schema: application/x-www-form-urlencoded
required
id
integer <int64>
externalId
string
email
string

E-mail of participant. If not set, current value remains

firstName
string

First name of participant. If not set, current value remains.

lastName
string

Last name of participant. If not set, current value remains

salutation
string
Enum: "MISTER" "MISS" "NEUTRAL"

One of MISTER, MISS, NEUTRAL. If not set, current value will be cleared.

titlePrefix
string

Academic title preceding name. If not set, current value will be cleared.

titleSuffix
string

Academic title following name. If not set, current value will be cleared.

password
string

Password to set for user (at least 6 characters long, no whitespace). If not set, current value remains.

additionalInfo
string

Additional info which should be attached to the participant. If not set, current value will be cleared.

birthdate
integer <int64>

Birth date in milliseconds since January 1, 1970 00:00:00. If not set, current value will be cleared

language
string

Preferred user language in ISO2 format. If not set, current value will be cleared.

Responses

Response samples

Content type
application/json
{
  • "resultCode": 403,
  • "returnObject": {
    }
}

getTrainingParticipantById

Retrieve a training participant by its id.

query Parameters
id
required
integer <int64>
Example: id=1

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": {
    }
}

getLoginTokenForTrainingParticipant

Retrieve the login token for the specified training participant.

query Parameters
id
required
integer <int64>

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": "420394e0-8ff754812d87"
}

getTrainingParticipantByExternalId

Retrieve a training participant by its external id.

query Parameters
externalId
required
string

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": {
    }
}

getAllTrainingParticipants

Retrieve a list of all training participants.

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": [
    ]
}

getTrainingParticipantByEmail

Retrieve a training participant by its email address.

query Parameters
email
required
string

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": {
    }
}

checkGdpr

Check if the GDPR acceptance is present.

query Parameters
participantId
required
integer <int64>
Example: participantId=1
bundleId
string
Example: bundleId=1263455225
packageName
string
Example: packageName=com.iom.microtraining.test3
webClientLink
string
Example: webClientLink=https://test3.micro-training.com/

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": true
}

setGdpr

Update the GDPR acceptance.

Request Body schema: application/x-www-form-urlencoded
required
participantId
required
integer <int64>
gdprAccepted
required
boolean
bundleId
string
packageName
string
webClientLink
string

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": null
}

resetGdpr

Reset the GDPR acceptance for all training participants.

query Parameters
bundleId
string
Example: bundleId=1263455225
packageName
string
Example: packageName=com.iom.microtraining.test3
webClientLink
string
Example: webClientLink=https://test3.micro-training.com/

Responses

Response samples

Content type
application/json
{
  • "resultCode": 0,
  • "returnObject": null
}