URL: /api/v2/nation-bank-recs/{APIKey}/
For assistance with the API, please join the Discord Server and ask in the channel #api
URL | Details |
---|---|
/api/v2/nation-bank-recs/{APIKey}/&nation_id=6 | Return bank records where Alex is the sender or receiver |
/api/v2/nation-bank-recs/{APIKey}/&nation_id=6&format=1 | Return bank records where Alex is the sender or receiver in pretty format |
/api/v2/nation-bank-recs/{APIKey}/&nation_id=6&s_only=true | Return bank records where Alex is the sender |
/api/v2/nation-bank-recs/{APIKey}/&nation_id=6&r_only=true | Return bank records where Alex is the receiver |
/api/v2/nation-bank-recs/{APIKey}/&nation_id=6&banker_id=47239 | Return bank records where Alex is the sender or receiver and Dreadnought (id=47239) is the banker |
/api/v2/nation-bank-recs/{APIKey}/&nation_id=6&s_type=2 | Return bank records where Alex is the receiver and the sender is an alliance |
/api/v2/nation-bank-recs/{APIKey}/&nation_id=6&min_tx_date=20200323 | Return bank records where Alex is the sender or receiver and the transaction occurred on or after March 23, 2020 |
Key | Required | Details |
---|---|---|
format | Optional | If value set to 1, returns JSON formatted nicely. |
nation_id | Required | Specifies the nation ID(s) for which nation bank records are returned. Can be comma separated. |
s_only | Optional | If true, limits results by removing records where nation_id is the receiver in the bank record. |
r_only | Optional | If true, limits results by removing records where nation_id is the sender in the bank record. |
min_tx_id | Optional | Accepts a numeric value. Limits results by removing records where the tx_id is less than the value. |
max_tx_id | Optional | Accepts a numeric value. Limits results by removing records where the tx_id is greater than the value. |
min_tx_date | Optional | Accepts a date in the following format 'yyyymmdd'. If valid, limits results to records on or after this date. |
max_tx_date | Optional | Accepts a date in the following format 'yyyymmdd'. If valid, limits results to records on or before this date. |
s_type | Optional | If valid, limits results to specified sender type. With inputted value 1, will only return transactions where the sender was a nation. With inputted value 2, will only return transactions where the sender was an alliance. |
r_type | Optional | If valid, limits results to specified recipient type. With inputted value 1, will only return transactions where the recipient was a nation. With inputted value 2, will only return transactions where the recipient was an alliance. |
banker_id | Optional | Accepts a nation ID. If valid, limits results to transactions where the banker (nation that initiated the transaction) matches the inputted value. |
Field | Type | Details |
---|---|---|
tx_id | Integer | Unique identifier for each bank record |
tx_datetime | DateTime | |
sender_id | Integer | Sending nation or alliance ID |
sender_type | Integer |
Data Mapping:
|
receiver_id | Integer | Recipient nation or alliance ID |
receiver_type | Integer |
Data Mapping:
|
banker_nation_id | Integer | Nation ID of the user that initiated the transaction |
note | String | Note (if any) included with the transaction by the banker |
money | Double | |
coal | Double | |
oil | Double | |
uranium | Double | |
iron | Double | |
bauxite | Double | |
lead | Double | |
gasoline | Double | |
munitions | Double | |
steel | Double | |
aluminum | Double | |
food | Double |
Error | Details |
---|---|
The API key sent for this request is invalid. | API key was not valid. |
You are making API requests too quickly. Your API key is limited to X requests per second. | API key is rate limited to X requests per second and this request would cause the limit to be exceeded so it is rejected. |
You have reached your limit for API requests today. Your API key is limited to Z requests per day. | API key is rate limited to Z requests per day, and this request would cause the limit to be exceeded so it is rejected. This daily limit is reset at midnight UTC. |
No nation ID was received. | The parameter nation_id was not sent or not valid. |
No results to display. | The request was valid, but returned no results. |
Sample URL: https://test.politicsandwar.com/api/v2/nation-bank-recs/XXXXXXXXXXXXXX/&format=1&nation_id=6,3629
Sample Output: pastebin.com/yD1juLcP