How to obtain a player's team_id via API?

💻 Environment/Context

  • Team Id
  • API
  • Players
  • Teams

 

In order for you to get the API key, the Settings > Can view API permission should be enabled on your account.

If you're unable to follow any of the steps below, kindly reach out to your admin or refer to the Account Type Permissions Overview article for more information.

 

 

 

❓ Issue/Question

  • How do I get a player's team_id using the ScorePlay public API?

 

👌 Resolution/Answer

 

  • Get the player's team_id(s):
    • GET https://media.scoreplay.io/v1/players/{id}
    • Using the player_id (ID) from the player search step. Unlike the list endpoint, this one also populates the player's Teams array; each entry is a team object with its own ID, this is the team_id you need.
    • If the player is linked to more than one team entry (e.g., one per season), make sure to pick the team_id for the correct season.

 

  • Alternative: look up a team directly by name instead:
    • GET https://media.scoreplay.io/v1/teams
    • Returns all teams for your company (each with its own ID and company_id).

 

🔖 Notes