Skip to Content
MinexonMinexon

inventory.use

Starts game-server delivery of an inventory product.

POST/api/v1/{locale}/inventory/{slug}/use

API scope inventory.use

Request

Send Authorization: Bearer <key> with each request.

Requires a signed-in player and applicable permission.

Path parameters

FieldTypeRequirementDescription
localetr or enRequiredRequest locale.
slugstringRequiredURL slug of the resource.

Query parameters

FieldTypeRequirementDescription
statusstringOptionalall, available, queued, delivered or review.

Request body

FieldTypeRequirementDescription
_operationstringRequiredThe item response’s operationKey. Preserve it when retrying the same operation.
_revisionintegerRequiredThe item response’s item.revision value.
quantityintegerRequiredPositive number of units to process.

Run samples from your application server. See Quickstart for variables and sessions.

curl --fail-with-body --request POST \
  -H "Authorization: Bearer $MINEXON_API_KEY" \
  -b "$MINEXON_COOKIE_JAR" -c "$MINEXON_COOKIE_JAR" \
  -H 'Content-Type: application/json' \
  --data '{
  "_operation": "<operationKey from GET>",
  "_revision": 1,
  "quantity": 1
}' \
  "${MINEXON_BASE_URL}/api/v1/en/inventory/example/use"

Response

HTTP 200 · application/json

FieldTypeRequirementDescription
nextstringRequiredURL of the next player page.
noticesarrayConditionalOperation notice codes, when present.
errorstringConditionalError code.
errorsstring[]ConditionalField or operation error codes.
{
  "next": "/en/account/inventory/example"
}

When the form is shown again, the response can contain data instead of next. Check the HTTP status and the error fields together.

Form response fields
FieldTypeRequirementDescription
localestringRequiredResponse locale.
errorstring or nullConditionalAction error. Can be empty on success.
errorsarray or objectConditionalField or form validation errors.
noticestring or nullConditionalAction notice.
itemobjectConditionalCurrent entry.
selectedJSON valueConditionalCategory or filter selected on this screen.
slugstringConditionalRecord slug.
canGiftJSON valueConditionalValue determined by screen and configuration.
operationJSON valueConditionalValue determined by screen and configuration.
operationKeystringConditionalIdentifier for the inventory operation; pass as _operation in the corresponding POST.

Flow and error cases

Rejected operations can return HTTP 422 with the item view, data.error and a fresh data.operationKey.

Shared error and authentication contract