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
    }

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
  • sportstype: (Sportstype, optional) Filters tournaments by sportstype
  • team_id: (ObjectId, optional) Filters tournaments by team
  • archive_id: (ObjectId, optional) Filters tournaments by archive
  • owner_id: (ObjectId, optional) Filters tournaments by owner

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

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

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