Trading - Accept Trade
Accepts an open trade (one that has not yet been accepted or cancelled), if the locally signed-in player is in the allowed player list for the trade, or it is open to all players. If the call is successful, the offered and accepted items will be swapped between the two players' inventories.
POST https://titleId.playfabapi.com/Client/AcceptTrade
Request Header
Name | Required | Type | Description |
---|---|---|---|
X-Authorization | True |
string |
This API requires a client session ticket, available from any Client Login function. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
OfferingPlayerId | True |
string |
Player who opened the trade. |
TradeId | True |
string |
Trade identifier. |
AcceptedInventoryInstanceIds |
string[] |
Items from the accepting player's inventory in exchange for the offered items in the trade. In the case of a gift, this will be null. |
Responses
Name | Type | Description |
---|---|---|
200 OK | ||
400 Bad Request |
This is the outer wrapper for all responses with errors |
Security
X-Authorization
This API requires a client session ticket, available from any Client Login function.
Type:
apiKey
In:
header
Definitions
Name | Description |
---|---|
Accept |
|
Accept |
|
Api |
The basic wrapper around every failed API response |
Trade |
|
Trade |
AcceptTradeRequest
Name | Type | Description |
---|---|---|
AcceptedInventoryInstanceIds |
string[] |
Items from the accepting player's inventory in exchange for the offered items in the trade. In the case of a gift, this will be null. |
OfferingPlayerId |
string |
Player who opened the trade. |
TradeId |
string |
Trade identifier. |
AcceptTradeResponse
Name | Type | Description |
---|---|---|
Trade |
Details about trade which was just accepted. |
ApiErrorWrapper
The basic wrapper around every failed API response
Name | Type | Description |
---|---|---|
code |
integer |
Numerical HTTP code |
error |
string |
Playfab error code |
errorCode |
integer |
Numerical PlayFab error code |
errorDetails |
object |
Detailed description of individual issues with the request object |
errorMessage |
string |
Description for the PlayFab errorCode |
status |
string |
String HTTP code |
TradeInfo
Name | Type | Description |
---|---|---|
AcceptedInventoryInstanceIds |
string[] |
Item instances from the accepting player that are used to fulfill the trade. If null, no one has accepted the trade. |
AcceptedPlayerId |
string |
The PlayFab ID of the player who accepted the trade. If null, no one has accepted the trade. |
AllowedPlayerIds |
string[] |
An optional list of players allowed to complete this trade. If null, anybody can complete the trade. |
CancelledAt |
string |
If set, The UTC time when this trade was canceled. |
FilledAt |
string |
If set, The UTC time when this trade was fulfilled. |
InvalidatedAt |
string |
If set, The UTC time when this trade was made invalid. |
OfferedCatalogItemIds |
string[] |
The catalogItem Ids of the item instances being offered. |
OfferedInventoryInstanceIds |
string[] |
The itemInstance Ids that are being offered. |
OfferingPlayerId |
string |
The PlayFabId for the offering player. |
OpenedAt |
string |
The UTC time when this trade was created. |
RequestedCatalogItemIds |
string[] |
The catalogItem Ids requested in exchange. |
Status |
Describes the current state of this trade. |
|
TradeId |
string |
The identifier for this trade. |
TradeStatus
Name | Type | Description |
---|---|---|
Accepted |
string |
|
Accepting |
string |
|
Cancelled |
string |
|
Filled |
string |
|
Invalid |
string |
|
Open |
string |
|
Opening |
string |
Error Codes
Name | Code |
---|---|
TradeAcceptedCatalogItemInvalid | 1170 |
TradeAcceptedItemsMismatch | 1175 |
TradeAcceptingUserNotAllowed | 1156 |
TradeAllowedUsersInvalid | 1171 |
TradeAlreadyFilled | 1163 |
TradeCancelled | 1162 |
TradeDoesNotExist | 1161 |
TradeInventoryItemDoesNotExist | 1172 |
TradeInventoryItemExpired | 1165 |
TradeInventoryItemInvalidStatus | 1169 |
TradeInventoryItemIsAssignedToCharacter | 1157 |
TradeInventoryItemIsBundle | 1158 |
TradeInventoryItemIsConsumed | 1173 |
TradeInventoryItemIsNotTradable | 1181 |
TradeInventoryItemIsStackable | 1174 |
TradeStatusNotValidForAccepting | 1160 |
TradeWaitForStatusTimeout | 1164 |
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기