Inventory - Get Transaction History

Get transaction history for a player. Up to 250 Events can be returned at once. You can use continuation tokens to paginate through results that return greater than the limit. Getting transaction history has a lower RPS limit than getting a Player's inventory with Player Entities having a limit of 30 requests in 300 seconds.

POST https://titleId.playfabapi.com/Inventory/GetTransactionHistory

Request Header

Name Required Type Description
X-EntityToken True

string

This API requires an Entity Session Token, available from the Entity GetEntityToken method.

Request Body

Name Required Type Description
Count True

number

Number of items to retrieve. This value is optional. The default value is 10

CollectionId

string

The id of the entity's collection to perform this action on. (Default="default")

ContinuationToken

string

An opaque token used to retrieve the next page of items, if any are available. Should be null on initial request.

CustomTags

object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

Entity

EntityKey

The entity to perform this action on.

Filter

string

An OData filter used to refine the TransactionHistory. Transaction properties 'timestamp', 'transactionid', 'apiname' and 'operationtype' can be used in the filter. Properties 'transactionid', 'apiname', and 'operationtype' cannot be used together in a single request. The 'timestamp' property can be combined with 'apiname' or 'operationtype' in a single request. For example: "timestamp ge 2023-06-20T23:30Z" or "transactionid eq '10'" or "(timestamp ge 2023-06-20T23:30Z) and (apiname eq 'AddInventoryItems')". By default, a 6 month timespan from the current date is used.

OrderBy

string

An OData orderby to order TransactionHistory results. The only supported values are 'timestamp asc' or 'timestamp desc'. Default orderby is 'timestamp asc'

Responses

Name Type Description
200 OK

GetTransactionHistoryResponse

400 Bad Request

ApiErrorWrapper

This is the outer wrapper for all responses with errors

Security

X-EntityToken

This API requires an Entity Session Token, available from the Entity GetEntityToken method.

Type: apiKey
In: header

Definitions

Name Description
ApiErrorWrapper

The basic wrapper around every failed API response

EntityKey

Combined entity type and ID structure which uniquely identifies a single entity.

GetTransactionHistoryRequest

Get transaction history for specified entity and collection.

GetTransactionHistoryResponse
Transaction
TransactionOperation
TransactionPurchaseDetails
TransactionRedeemDetails
TransactionTransferDetails

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

EntityKey

Combined entity type and ID structure which uniquely identifies a single entity.

Name Type Description
Id

string

Unique ID of the entity.

Type

string

Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types

GetTransactionHistoryRequest

Get transaction history for specified entity and collection.

Name Type Description
CollectionId

string

The id of the entity's collection to perform this action on. (Default="default")

ContinuationToken

string

An opaque token used to retrieve the next page of items, if any are available. Should be null on initial request.

Count

number

Number of items to retrieve. This value is optional. The default value is 10

CustomTags

object

The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

Entity

EntityKey

The entity to perform this action on.

Filter

string

An OData filter used to refine the TransactionHistory. Transaction properties 'timestamp', 'transactionid', 'apiname' and 'operationtype' can be used in the filter. Properties 'transactionid', 'apiname', and 'operationtype' cannot be used together in a single request. The 'timestamp' property can be combined with 'apiname' or 'operationtype' in a single request. For example: "timestamp ge 2023-06-20T23:30Z" or "transactionid eq '10'" or "(timestamp ge 2023-06-20T23:30Z) and (apiname eq 'AddInventoryItems')". By default, a 6 month timespan from the current date is used.

OrderBy

string

An OData orderby to order TransactionHistory results. The only supported values are 'timestamp asc' or 'timestamp desc'. Default orderby is 'timestamp asc'

GetTransactionHistoryResponse

Name Type Description
ContinuationToken

string

An opaque token used to retrieve the next page of items, if any are available. Should be null on initial request.

Transactions

Transaction[]

The requested inventory transactions.

Transaction

Name Type Description
ApiName

string

The API call that caused this transaction.

ItemType

string

The type of item that the the operation occurred on.

OperationType

string

The type of operation that was run.

Operations

TransactionOperation[]

The operations that occurred.

PurchaseDetails

TransactionPurchaseDetails

Additional details about the transaction. Null if it was not a purchase operation.

RedeemDetails

TransactionRedeemDetails

Additional details about the transaction. Null if it was not a redeem operation.

Timestamp

string

The time this transaction occurred in UTC.

TransactionId

string

The id of the transaction. This should be treated like an opaque token.

TransferDetails

TransactionTransferDetails

Additional details about the transaction. Null if it was not a transfer operation.

TransactionOperation

Name Type Description
Amount

number

The amount of items in this transaction.

DurationInSeconds

number

The duration modified in this transaction.

ItemFriendlyId

string

The friendly id of the items in this transaction.

ItemId

string

The item id of the items in this transaction.

ItemType

string

The type of item that the operation occurred on.

StackId

string

The stack id of the items in this transaction.

Type

string

The type of the operation that occurred.

TransactionPurchaseDetails

Name Type Description
StoreFriendlyId

string

The friendly id of the Store the item was purchased from or null.

StoreId

string

The id of the Store the item was purchased from or null.

TransactionRedeemDetails

Name Type Description
Marketplace

string

The marketplace that the offer is being redeemed from.

MarketplaceTransactionId

string

The transaction Id returned from the marketplace.

OfferId

string

The offer Id of the item being redeemed.

TransactionTransferDetails

Name Type Description
GivingCollectionId

string

The collection id the items were transferred from or null if it was the current collection.

GivingEntity

EntityKey

The entity the items were transferred from or null if it was the current entity.

ReceivingCollectionId

string

The collection id the items were transferred to or null if it was the current collection.

ReceivingEntity

EntityKey

The entity the items were transferred to or null if it was the current entity.

TransferId

string

The id of the transfer that occurred.