JSON Schema

The route data type for the result is eventDisciplineDataImport.

eventDisciplineDataImport

The import data format consists of an array of objects, where each object contains a list of items.
Most of the items are optional, depending on the type of information that needs to be transferred.

It is for example possible to include only club information, if all you want to do is import a list of clubs.
Or only category information, if you want to import categories.

However, to import an item which depends on other information, this needs to be included as well. E.g. if you want to import a club member, you also need to provide the club information.
There is a separate paragraph for each sub item which can be used, where we will state clearly the dependencies that you need to take into account.

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "http://scoreexpress.io/schema/v1/eventDisciplineDataImport.schema.json",
  "title": "Event Discipline Data Import",
  "description": "default schema for importing all data related to an event discipline from third party systems, such as federations competition management",
  "type": "object",
  "properties": {
    "items": {
      "description": "list of participants with related data",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "club": {
            "$ref": "http://scoreexpress.io/schema/clubImport.schema.json"
          },
          "member": {
            "$ref": "http://scoreexpress.io/schema/memberImport.schema.json"
          },
          "group": {
            "$ref": "http://scoreexpress.io/schema/groupImport.schema.json"
          },
          "team": {
            "$ref": "http://scoreexpress.io/schema/teamImport.schema.json"
          },
          "category": {
            "$ref": "http://scoreexpress.io/schema/categoryImport.schema.json"
          },
          "participation": {
            "$ref": "http://scoreexpress.io/schema/participationImport.schema.json"
          },
          "teamParticipation": {
            "$ref": "http://scoreexpress.io/schema/participationImport.schema.json"
          },
          "session": {
            "$ref": "http://scoreexpress.io/schema/sessionImport.schema.json"
          },
          "order": {
            "$ref": "http://scoreexpress.io/schema/orderImport.schema.json"
          }
        }
      }
    }
  }
}

clubImport schema

Add this object to the items to import the club information.

Dependencies: none

Fields:

  • name: name of the club. Should be unique, is used to match the club with clubs already in the event database,
  • externalId: ID of the club in the source system, optional,
  • country: optional, 3 character code of the country of the club (e.g. ‘BEL’). See https://en.wikipedia.org/wiki/List_of_IOC_country_codes for the list of country codes,
  • region: optional, can only be used in combination with the country code, TODO: add list of region codes.
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "http://scoreexpress.io/schema/v1/clubImport.schema.json",
  "title": "Club Import",
  "description": "default schema for importing clubs from third party systems, such as federations competition management",
  "type": "object",
  "properties": {
    "name": {
      "description": "name of the club of the judge",
      "type": "string"
    },
    "externalId": {
      "description": "id of the club in the source system, optional",
      "type": "string"
    },
    "country": {
      "description": "3 character IOC code of the country (of the club), optional",
      "type": "string",
      "minLength": 3,
      "maxLength": 3
    },
    "region": {
      "description": "region of the club in the country, list of region codes per country to be consulted, optional",
      "type": "string"
    }
  },
  "required": ["name"]
}

memberImport schema

Add this object to the items to import club member information. This can/should include members who are participating in the competition, as well as judges who are licensed to judge in the discipline.

Dependencies: club

Fields:

  • lastname: last/surname of the club member,
  • firstname: first name of the club member,
  • gender: ‘male’ or ‘female’,
  • dob: date of birth, format ‘YYYY-MM-DD’, optional,
  • externalId: ID of the member in the source system, optional,
  • * judge:* boolean indicator for the members who can act as a judge, optional, default: false.
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "http://scoreexpress.io/schema/v1/memberImport.schema.json",
  "title": "Member Import",
  "description": "default schema for importing club members from third party systems, such as federations competition management",
  "type": "object",
  "properties": {
    "lastname": {
      "description": "(sur)name of the judge",
      "type": "string"
    },
    "firstname": {
      "description": "first name of the judge",
      "type": "string"
    },
    "gender": {
      "description": "gender of the judge ('male' or 'female')",
      "type": "string",
      "pattern": "^male$|^female$"
    },
    "dob": {
      "description": "date of birth of the judge, optional",
      "type": "string",
      "pattern": "\\d\\d\\d\\d-\\d\\d-\\d\\d",
      "format": "date"
    },
    "externalId": {
      "description": "ID of the person in the source system",
      "type": "string"
    },
    "judge": {
      "description": "indicates which members can act as judge, optional, default: false",
      "type": "boolean"
    }
  },
  "required": ["lastname", "firstname", "gender"]
}

groupImport schema

Add this object to add a group to the club and include the member in the group. The group information needs to be repeated for each group member.

Dependencies: club, member

Fields:

  • name: name of the group. Should be unique within the club, is used to match the group with groups already in the event database,
  • externalId: ID of the group in the source system, optional.
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "http://scoreexpress.io/schema/v1/groupImport.schema.json",
  "title": "Group Import",
  "description": "default schema for importing groups from third party systems, such as federations competition management",
  "type": "object",
  "properties": {
    "name": {
      "description": "name of the group",
      "type": "string"
    },
    "externalId": {
      "description": "id of the group in the source system",
      "type": "string"
    }
  },
  "required": ["name"]
}

teamImport schema

Add this object to add a team to the club and include the member in the team. The team information needs to be repeated for each team member.

Dependencies: club, member

Fields:

  • name: name of the team. Should be unique within the club, is used to match the team with teams already in the event database,
  • externalId: ID of the team in the source system, optional.
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "http://scoreexpress.io/schema/v1/teamImport.schema.json",
  "title": "Team Import",
  "description": "default schema for importing Teams from third party systems, such as federations competition management",
  "type": "object",
  "properties": {
    "name": {
      "description": "name of the team",
      "type": "string"
    },
    "externalId": {
      "description": "id of the team in the source system",
      "type": "string"
    }
  },
  "required": ["name"]
}

categoryImport schema

Use this section to add category information.

Dependencies: none

Fields:

  • name: the name of the category
  • template: the code of the settings template corresponding to the category
  • externalId: ID of the category in the source system, optional
  • competitionId: External ID of the competition the category belongs to in the external system.
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "http://scoreexpress.io/schema/v1/categoryImport.schema.json",
  "title": "Judge Import",
  "description": "default schema for importing categories from third party systems, such as federations competition management",
  "type": "object",
  "properties": {
    "name": {
      "description": "name of the category",
      "type": "string"
    },
    "template": {
      "description": "ID of the template with initial settings for the category",
      "type": "string"
    },
    "externalId": {
      "description": "ID of the category in the source system, optional",
      "type": "string"
    },
    "competitionId": {
      "description": "ID of the event discipline that the category belongs to, relevant if different disciplines of the source system are combined in one discipline in ScoreExpress",
      "type": "string"
    }
  },
  "required": ["name"]
}

participationImport schema

This schema is use for both the participation and the teamParticipation sections in the import items.

Use the participation section both for individual participation and group participations and teamParticipation section for team participations.
Individual and team participations should be combined.

Dependencies: member, category, (group, team)

Fields:

  • bib: number of the participation. The system does not enforce uniqueness, however it is advised that you use unique bib numbers,
  • reserve: boolean inidcator for reserve participants, optional, default: false,
  • guest: boolean inidcator for guest (invited) participants, optional, default: false,
  • subdivision: sub division to which the participant should be assigned,
  • externalId: ID of the participation in the source system, optional.

sessionImport schema

Use this section to add sessions to the event discipline.
The session is identified by the combination of the name and date value.
If the import item has a category, some configuration properties might be taken from the import template associated with the category.

Dependencies: none

Fields:

  • name: name of the session,
  • date: date of the session, format: ‘YYYY-MM-DD’.

orderImport schema

Use this section to add the participant to the starting order of the session.
For most disciplines the participants are assigned to one of the blocks (squads) in the session. For these participant the block is determined by the combination of the set and rotation values.
In some disciplines (notably rhythmic gymnastics and acrobatic gymnastics) the starting order is set per exercise. For these disciplines the exercise code needs to be added to the list. If participants have multiple exercises, the item in the list needs to be repeated with different exercises.

Dependencies: session, participation

Field:

  • set: designates the set/panel where the participant/exercise will start, optional, default: 1,
  • rotation: the rotation in which the participant/exercise should be added, optional, default: 1,
  • block_index: determines the order of participants/exercises in within a block.
  • exercise: name of the exercise to add to the order, only applies in disciplines where the schedule is made on exercise level (e.g. Acrogym and RG).

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment