With the Transaction API, you can obtain information about transactions (adds, drops, trades, and league settings changes)
performed on a league. A transaction is identified in the context of a particular league, although you can request a particular
Transaction Resource as the base of your URI by using the global transaction_key.
You can also PUT to the API to perform operations like editing waiver priorities or FAAB bids, or modifying the state of pending trades. You
can also cancel pending transactions by DELETEing them.
Keep in mind, if you don't have the transaction_key for a waiver claim or pending trade, the only way to discover these transactions is to filter the league Transactions collection by a particular type (waiver or pending_trade) and by a particular team_key. Pending transactions will not show up if you simply ask for all of the transactions in the league, because they can only
be seen by certain teams.
http://fantasysports.yahooapis.com/fantasy/v2/transaction/{transaction_key}
Any sub-resource under a transaction is extracted using a URI like:
http://fantasysports.yahooapis.com/fantasy/v2/transaction/{transaction_key}/{sub_resource}
Multiple sub-resources can be extracted from transaction in the same URI using a format like:
http://fantasysports.yahooapis.com/fantasy/v2/transaction/{transaction_key};out={sub_resource_1},{sub_resource_2}
Completed transactions: {game_key}.l.{league_id}.tr.{transaction_id}
Example: pnfl.l.431.tr.26 or 223.l.431.tr.26
Waiver claims: {game_key}.l.{league_id}.w.c.{claim_id}
Example: 257.l.193.w.c.2_6390
Pending trades: {game_key}.l.{league_id}.pt.{pending_trade_id}
Example: 257.l.193.pt.1
Default sub-resources:
metadata, players
| Name | Description | URI | Sample |
|---|---|---|---|
|
|
Includes transaction key, id, type, timestamp, status, players (not displayed for all transaction types) |
|
An add/drop transaction:
|
players
|
Players that are part of the transaction. The Player Resources will include a transaction data element by default. |
|
|
http://fantasysports.yahooapis.com/fantasy/v2/transaction/257.l.193.tr.2 - Completed add/drop transaction
http://fantasysports.yahooapis.com/fantasy/v2/transaction/257.l.193.w.c.2_6390 - Waiver claim transaction
http://fantasysports.yahooapis.com/fantasy/v2/transaction/257.l.193.pt.1 - Pending trade transaction
Using PUT, you may edit the waiver priority or FAAB bid for any of your pending waiver claims. You can also accept or reject trades
that have been proposed to you, and allow or vote against trades if your league settings allow it. The URL for PUTting to a Transaction resource is:
http://fantasysports.yahooapis.com/fantasy/v2/transaction/{transaction_key}
You can only PUT to Transactions of the types waiver or pending_trade.
Once you have the transaction_key for a waiver claim, which you can get by asking the transactions collection for all waivers for a certain team, you can edit
the waiver priority or FAAB bid. The input XML should look like:
Once you have the transaction_key for a pending trade that has been proposed to you, which you can get by asking the transactions collection for all pending
trades for your team, you can choose to accept it. The input XML should look like:
To reject a pending trade proposed to you, the input XML should look like:
If there are accepted trades in your league waiting to be processed, which you can get by asking the transactions collection for all pending trades for your team, and you're the commissioner of a league that has the commissioner approve trades, you can choose to allow or disallow the trade. The input XML should look like:
Or
If there are accepted trades in your league waiting to be processed, which you can get by asking the transactions collection for all pending trades for your team, and you're a manager in a league that allows managers to vote against trades, you can choose to vote against the trade. The input XML should look like:
Using DELETE, you may cancel any pending waiver claim or proposed trade. The URL for DELETEing a transaction resource is:
http://fantasysports.yahooapis.com/fantasy/v2/transaction/{transaction_key}
You can only DELETE transactions of the types waiver or pending_trade if the pending trade has not yet been accepted.