swap
Exchange two items' positions.
Both items must exist. Unlike `move`, neither destination needs to be free — that is the point.
Request
POST /api/v1/sessions/{accountKey}/actions/swap
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
src_uid | string | yes | First item. |
dst_uid | string | yes | Second item. |
src_inv | integer | yes | First item's container. |
src_slot | integer | yes | First item's slot. |
dst_inv | integer | yes | Second item's container. |
dst_slot | integer | yes | Second item's slot. |
Example request
{
"src_uid": "630211546215118851", "src_inv": 3, "src_slot": 5,
"dst_uid": "630211546215118853", "dst_inv": 3, "dst_slot": 6
}
Response
{ "ok": true }
Example response
{ "ok": true }
Errors
| Code | When |
|---|---|
missing_field | Either uid was absent or unparseable. |
action_failed | The send failed. |
plan_limit | Not on the free plan. |
See also
DarkerAPI is an independent project. It is not affiliated with, endorsed by or associated with IRONMACE Co., Ltd. or Valve Corporation. “Dark and Darker” and related marks belong to their respective owners.