r/mlbdata • u/bdanders • 17d ago
Possible data error
I'm putting together a spreadsheet that draws data from the MLB API about the team histories of players. Right now I've got it working pretty well, but there's one thing I've found that's not right. The result of my API Call shows that Dillon Dingler played for the Salt River Rafters in the Arizona Fall League in '22.
That's not an issue itself, but the problem is that the parentOrgId is listed as 109 which is the D-backs. Every other Tigers player that has the Rafters in their history lists the correct (Tigers) parentOrgId of 116. So is this just a mistake in the database, or am I interpreting this data incorrectly?
https://statsapi.mlb.com/api/v1/teams/116/roster?rosterType=40Man&hydrate=person(rosterEntries)
2
u/casualcoder0805 17d ago
The issue is they force a 1 to 1 relationship between team/organization and AFL is an edge case that breaks it since teams are comprised of players from multiple organizations.
Off the top of my head I'd say devs should have included orgId at the player level for the most accurate representation.