| Property | Details |
|---|---|
| URL: | https://www2.swcombine.com/ws/v2.0/faction/{uid}/credits[/] |
| Method: | GET |
| Description: | Gets the representation of the specified faction's credits |
| Pattern Description: |
uid (Mandatory): name or UID of faction whose credits these are |
| Rate Limited: | Yes |
| Query String: | N/A |
| Parameters: | N/A |
| Requires Authentication: | Yes |
| Permissions: |
faction_credits_read: See how many credits your faction owns |
| Returns: |
200 OK: Returns the representation for the specified faction's credits 400 Bad Request: One or more of the provided parameters was invalid 401 Unauthorized: The client does not have the required permission to access this resource 404 Not Found: The specified faction does not exist or you do not have authorisation to access faction credits |
| Examples: |
GET /ws/v2.0/faction/20:1001/credits/
JSON{
"version": "2.0",
"timestamp": 1767225600,
"resource": "faction_credits",
"request": "/ws/v2.0/faction/20:1001/credits/",
"swcapi": {
"credits": 8675309
}
}
XML<?xml version="1.0" encoding="UTF-8"?> <swcapi xmlns="https://www.swcombine.com/ws/swcapi-ns/" version="2.0" timestamp="1767225600" resource="faction_credits" request="/ws/v2.0/faction/20:1001/credits/"> <credits>8675309</credits> </swcapi> |
| Property | Details |
|---|---|
| URL: | https://www2.swcombine.com/ws/v2.0/faction/{uid}/credits[/] |
| Method: | POST |
| Description: | Transfers credits to the specified recipients |
| Pattern Description: |
uid (Mandatory): name or UID of faction whose credits these are |
| Rate Limited: | Yes |
| Query String: | N/A |
| Parameters: |
recipient (string): The name of the character or faction to send credits to amount (number): The amount of credits to send budget (string, optional): The UID of the budget to use reason (string, optional): The reason for the transfer. The name of the API client will be appended regardless of a reason being provided or not |
| Requires Authentication: | Yes |
| Permissions: |
faction_credits_write: Transfer credits on behalf of your faction |
| Returns: |
200 OK: Returns success/failure for each transaction 400 Bad Request: One or more of the provided parameters was invalid 401 Unauthorized: The client does not have the required permission to access this resource 404 Not Found: The specified faction does not exist or you do not have authorisation to transfer faction credits |
| Examples: |
POST /ws/v2.0/faction/20:1001/credits/
Request parametersrecipient=Dax Orin amount=100 reason=Payment for supplies JSON{
"version": "2.0",
"timestamp": 1767225600,
"resource": "faction_credits_result",
"request": "/ws/v2.0/faction/20:1001/credits/",
"swcapi": {
"transactions": {
"transaction": [
{
"recipient": {
"attributes": {
"uid": "1:1001",
"href": "https://www.swcombine.com/ws/v2.0/character/dax%20orin/"
},
"value": "Dax Orin"
},
"sender": {
"attributes": {
"uid": "20:1001",
"href": "https://www.swcombine.com/ws/v2.0/faction/corellian%20engineering/"
},
"value": "Corellian Engineering"
},
"amount": 100,
"reason": "Payment for supplies<br/>Transaction submitted via Web Service Client: My Application",
"budget": {},
"succeeded": true
}
]
}
}
}
XML<?xml version="1.0" encoding="UTF-8"?>
<swcapi xmlns="https://www.swcombine.com/ws/swcapi-ns/" version="2.0" timestamp="1767225600" resource="faction_credits_result" request="/ws/v2.0/faction/20:1001/credits/">
<transactions count="1">
<transaction>
<recipient uid="1:1001" href="https://www.swcombine.com/ws/v2.0/character/dax%20orin/">Dax Orin</recipient>
<sender uid="20:1001" href="https://www.swcombine.com/ws/v2.0/faction/corellian%20engineering/">Corellian Engineering</sender>
<amount>100</amount>
<reason>Payment for supplies<br/>Transaction submitted via Web Service Client: My Application</reason>
<budget/>
<succeeded>true</succeeded>
</transaction>
</transactions>
</swcapi>
|