跳轉到主要內容
POST
Add Inventory Items

授權

X-EntityToken
string
header
必填

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

主體

application/json

Given an entity type, entity identifier and container details, will add the specified inventory items.

Given an entity type, entity identifier and container details, will add the specified inventory items.

Amount
number

The amount to add for the current item.

CollectionId
string

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

CustomTags
object

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

DurationInSeconds
number

The duration to add to the current item expiration date.

Entity
object

The entity to perform this action on.

ETag
string

ETags are used for concurrency checking when updating resources. More information about using ETags can be found here: https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/etags

IdempotencyId
string

The Idempotency ID for this request. Idempotency IDs can be used to prevent operation replay in the medium term but will be garbage collected eventually.

Item
object

The inventory item the request applies to.

NewStackValues
object

The values to apply to a stack newly created by this request.

回應

code
integer

The Http status code. If X-ReportErrorAsSuccess header is set to true, this will report the actual http error code.

status
string

The Http status code as a string.

data
object
範例:
最後修改於 2026年10月6日