Players

Object Types

Fields declared “GenderType” in the documentation can have values:

  • “m”: Male
  • “f”: Female
  • “o”: Other

Fields declared “CountryCode” are uppercase ISO 3166-1 alpha-2 codes.

Tik::Model::Player

    {
      "_type": "Tik::Model::Player",
      
      // (ObjectId) The ID of the player
      "_id": "",
      
      // (string) external ID for mapping
      "ext_id": "",
      
      // (string, required) name of the player
      "name": "",
      
      // (ObjectId, required) ID of the organization that becomes the new owner of the player
      "owner_id": "",
      
      // (Sportstype, required) identifier of the sportstype
      "sportstype": "",
      
      // (ObjectId) Team the player belongs to
      "team_id": "",
      
      // (string) Short name to display in constrained environments
      "short_name": "",
      
      // (CountryCode) Nationality of the player as iso 2-letter code
      "country": "",
      
      // (string) Shirt number (or text)
      "number": "",
      
      // (Timestamp) The date the player joned the team
      "team_member_since": 0,
      
      // (string) Position of the player
      "position": "",
      
      // (Timestamp) The date of birth of the player
      "birthdate": 0,
      
      // (GenderType) gender
      "gender": "",
      
      // (int) height in cm
      "height": 0,
      
      // (int) weight in g
      "weight": 0,
      
      // (string) Description of the player
      "about": "",
      
      // (string) Facebook Name of the player
      "facebook": "",
      
      // (string) Twitter Name of the player
      "twitter": "",
      
      // (string) Instagram Name of the player
      "instagram": "",
       
      // (ImageRef) Reference to a player photo
      "image": "",
      
      // (bool) true if the player is not currently part of the roster
      "inactive": false
    }

Notes for displaying players

Points to note when rendering player data, e.g. players embedded in liveblog events:

  • weight is in grams (e.g. 77000 = 77 kg), height in centimeters
  • country is an uppercase ISO 3166-1 alpha-2 code (e.g. "ES"), not a display name
  • position is a key, not a label — see position values below
  • image can be an HTTPS URL or an imageservice:// URI — use the Image Service to display and resize the latter
  • all fields are optional — players embedded in imported games often fill only a subset and are identified by local_id (and their team by team_local_id) instead of _id

position values

position is stored as a free-form string, but the Tickaroo web embed only renders the following keys as localized labels. Other values do not display cleanly in the official embed (they appear as a raw translation key), so stick to this list when the liveblog is rendered by Tickaroo:

active, back_row_forwards, bench, centre, defense, fieldplayer, flanker, fly_half, forward, front_row_forwards, full_back, half_back, half_backs, hooker, inactive, keeper, libero, lineup, midfield, no8, offense, pitcher, prop, scrum_half, second_row_forwards, starting_pitcher, three_quarters, wing

Create a Player

Request: POST /api/v5/write/player/create.json

Query Parameters: (none)

Post Document:

    {
      "_type": "Tik::Model::Player",

      // (string) external ID for mapping
      "ext_id": "",
      
      // (string, required) name of the player
      "name": "",
      
      // (ObjectId, required) ID of the organization that becomes the new owner of the player
      "owner_id": "",
      
      // (Sportstype, required) identifier of the sportstype
      "sportstype": "",
      
      // (ObjectId) Team the player belongs to
      "team_id": "",
      
      // (string) Short name to display in constrained environments
      "short_name": "",
      
      // (CountryCode) Nationality of the player as iso 2-letter code
      "country": "",
      
      // (string) Shirt number (or text)
      "number": "",
      
      // (Timestamp) The date the player joned the team
      "team_member_since": 0,
      
      // (string) Position of the player
      "position": "",
      
      // (Timestamp) The date of birth of the player
      "birthdate": 0,
      
      // (GenderType) gender
      "gender": "",
      
      // (int) height in cm
      "height": 0,
      
      // (int) weight in g
      "weight": 0,
      
      // (string) Description of the player
      "about": "",
      
      // (string) Facebook Name of the player
      "facebook": "",
      
      // (string) Twitter Name of the player
      "twitter": "",
      
      // (string) Instagram Name of the player
      "instagram": "",
       
      // (ImageRef) Reference to a player photo
      "image": ""
    }

Success Response: Tik::Model::Player Object

Update a Player

Not all fields can be updated!

Request: POST /api/v5/write/player/update.json

Query Parameters: (none)

Post Document:

    {
      "_type": "Tik::Model::Player",
      
      // (ObjectId) The ID of the player to update
      "_id": "",
      
      // (string) external ID for mapping
      "ext_id": "",
      
      // (string, required) name of the player
      "name": "",
      
      // (string) Short name to display in constrained environments
      "short_name": "",
      
      // (CountryCode) Nationality of the player as iso 2-letter code
      "country": "",
      
      // (string) Shirt number (or text)
      "number": "",
      
      // (Timestamp) The date the player joned the team
      "team_member_since": 0,
      
      // (string) Position of the player
      "position": "",
      
      // (Timestamp) The date of birth of the player
      "birthdate": 0,
      
      // (GenderType) gender
      "gender": "",
      
      // (int) height in cm
      "height": 0,
      
      // (int) weight in g
      "weight": 0,
      
      // (string) Description of the player
      "about": "",
      
      // (string) Facebook Name of the player
      "facebook": "",
      
      // (string) Twitter Name of the player
      "twitter": "",
      
      // (string) Instagram Name of the player
      "instagram": "",
       
      // (ImageRef) Reference to a player photo
      "image": ""
    }

Success Response: Tik::Model::Player Object

Read a Player

Request: GET /api/v5/write/player/show.json

Query Parameters:

  • _id: (ObjectId, required) The ID of the player

Success Response: Tik::Model::Player Object

Search Players

Request: GET /api/v5/write/player/index.json

Query Parameters:

  • q: (string) Full-text search query
  • owner_id: (ObjectId) Your organization id
  • sportstype: (Sportstype, optional) Filters players by sportstype
  • team_id: (ObjectId, optional) Filters players by team
  • archive_id: (ObjectId, optional) Filters players by archive

  • include_inactive: (boolean, optional, default: false) Include inactive players in result list

  • limit: (int, optional, default: 30) The number of players to return
  • page: (int, optional, default: 1) For pagination

Success Response: Tik::Model::Collection containing Tik::Model::Player Objects