POST ({itemID})

Indicates that all or a portion of a consumable inventory item has been used and decrements the quantity of the consumable by the requested amount. The domain for these URIs is inventory.xboxlive.com.

Remarks

  • If the quantity the caller asked to consume exceeds the remaining supply of the item, the call will be rejected.
  • The quantity the caller asked to consume must be a positive integer above 0. Calls with a consumption value of 0 or lower will be rejected.
  • If the caller provides an empty Transaction ID, the request will be rejected.
  • If available the title claim will be logged so that it will be possible to determine which title is reporting the consumption.
  • Additional POSTs with the same transactionId will be ignored for some time period.

Note:
The x-xbl-contract-version header for this API is "4".

URI parameters

Parameter Type Description
itemID string the ID unique to each user for a singular inventory item

Request body

Sample request

{
  "transactionId": String
  "removeQuantity": Int
}

The remove quantity field allows the caller to indicate the quantity of consumable they wish to remove from the consumable's remaining quantity. The Transaction ID field provides the caller with a means to retry using consumable content operations while limiting the risk of counting the same usage twice.

Response body

The response to the POST, assuming it passes authentication and is assigned the appropriate authorization context is a an acknolodgement of receipt with the same transactionId passed to the service in the POST request, the consumable item's URL, and the item's new quantity value.

Sample response

{
  "transactionId": String
  "url": String
  "newQuantity": Int
}

See also

Parent

/users/me/consumables/{itemID}

Further Information

EDS Common Headers

EDS Parameters

EDS Query Refiners

Marketplace URIs

Additional Reference