Players on a team are organized into rosters corresponding to certain weeks, in NFL, or certain dates, in MLB, NBA, and NHL. Each player on a roster will be assigned a position if they're in the starting lineup, or will be on the bench. You can only receive credit for stats accumulated by players in your starting lineup.
You can use this API to edit your lineup by
PUTting up new positions for the players on a roster. You can also add/drop players from your roster by
POSTing new transactions to the league's transactions collection.
Any sub-resource under a roster is extracted using a URI like:
For NFL, you can specify a week parameter to retrieve a specific week -- otherwise it will default to the current roster
For MLB, NHL, or NBA, you can specify a date parameter to retrieve a specific date -- otherwise it will default to today's roster.
PUT, you may modify a subset of players on the roster for a particular day, specifically in terms of changing their position
or whether they're in the starting lineup. The URL for
PUTting to a Roster resource is:
You may move as many players as you like in your input XML -- any players whose position you do not change will stay in the same position they were previously. If you try to move players in an invalid way, you will receive an error and no changes will be made.
Your input XML should look like:
MLB, NBA, or NHL: