Lineup Changes v2.0
Summary
| Lineup Changes | |
| Resource | |
| Lineup Changes | Make lineup changes for a fantasy team. |
| Change Log | |
| January 15, 2013 | |
| HTTP Methods | |
| PUT | Make Lineup Change. |
| Exceptions | |
| Following list of exceptions will be returned. | |
| Warnings | |
| Following list of warnings will be returned. | |
| Example | |
| Activate/ | Sample does the following |
Lineup Changes
Description
Make lineup changes for a fantasy team. To get the current lineup, request the Rosters resource.
PUT
Make Lineup Change.
- Players specified under “active” will be Activated in the lineup permitting league’s lineup rules
- Players specified under “reserve” will be Benched in the lineup permitting league’s lineup rules
- Players specified under “injured” will be put on the Injured slots permitting league’s lineup rules
- Players specified under “minors” will be put on the Minor slots permitting league’s lineup rules
URL
http://api.cbssports.com
Parameters
| response_format | (optional) Specifies the format in which the requested resource should be returned. Valid values are XML and JSON. The default is XML. |
PUT Data
To be sent as payload=JSON
payload={"team":"<team_id>","minors":{"<player_id>":{"pos":"<position>"},"<player_id>":{"pos":"<position>"}}, "injured":{"<player_id>":{"pos":"<position>"},"<player_id>":{"pos":"<position>"}}, "active":{"<player_id>":{"pos":"<position>"},"<player_id>":{"pos":"<position>"}},"reserve":{"<player_id>":{"pos":"<position>"},"<player_id>":{"pos":"<position>"}},"point":"<point>", "period":"<period>"}where
- <team_id> = ID of the fantasy team whose lineup is being set
- <player_id> = Player ID
- <position> = Position at which a given player is being activated or benched
- <point> = (optional) Point from which the lineup moves will be effective. For Baseball, the point is in YYYYMMDD format and for Football, it is the week number (e.g. 1, 2, through 17). period and point have the same value for Football and future period/point values are not supported for Football. If no ‘point’ is specified, the transaction will be for the league’s ‘effective_point’
- <period> = (optional) Period number for which the lineup moves will be effective for leagues that use weekly lineup deadlines. ‘period’ can not be combined with ‘point’. If no ‘period’ is specified, the transaction will be for the league’s ‘effective_period’
- minors, injured, active, reserve keys are all optional
Following list of warnings will be returned.
- type: invalid_move, msg <player_name> is locked
- type: invalid_move, msg: League requires the player be on DL to be eligible at Injured slot on the roster
- type: invalid_move, msg: League requires the player to be in the minors to be eligible at Minors slot on the roster
- type: invalid_move, msg: <player_name> is not eligible at <position>
- type: invalid_lineup, msg: <message denoting why the lineup is invalid>
Activate/Bench Players
Sample does the following
- Activate Player with id 584808 and put him at 3B in the lineup
- Activate Player with id 22234 and put him at C in the lineup
- Bench Player with id 390828 and put him at 3B in the lineup
- Bench Player with id 293103 and put him at C in the lineup
- Moves will be effective 20110418
Sample URL
PUT http://api.cbssports.com/fantasy/league/transactions/lineup?version=2.0
PUT Data
payload={"team":"15","active":{"584808":{"pos":"3B"},"22234":{"pos":"C"}},"reserve":{"390828":{"pos":"3B"},"293103":{"pos":"C"}},"point":"20110418"}Response
- HTTP Status code 400 if invalid action with the body containing the list of exceptions
- HTTP Status code 200 if the lineup change was made with the body containing the list of warnings
