Skip to main content
POST
Subtract Inventory Items

Authorizations

X-EntityToken
string
header
required

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

Body

application/json

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

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

DeleteEmptyStacks
boolean
required

Indicates whether stacks reduced to an amount of 0 during the request should be deleted from the inventory. (Default=false)

Amount
number

The amount to subtract 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 subtract from 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.

Response

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
Example:
Last modified on October 1, 2026