inventory.gift
Transfers an inventory product to another player.
POST
/api/v1/{locale}/inventory/{slug}/giftAPI scope inventory.gift
Request
Send Authorization: Bearer <key> with each request.
Requires a signed-in player and applicable permission.
Path parameters
| Field | Type | Requirement | Description |
|---|---|---|---|
locale | tr or en | Required | Request locale. |
slug | string | Required | URL slug of the resource. |
Query parameters
| Field | Type | Requirement | Description |
|---|---|---|---|
status | string | Optional | all, available, queued, delivered or review. |
Request body
| Field | Type | Requirement | Description |
|---|---|---|---|
_operation | string | Required | The item response’s operationKey. Preserve it when retrying the same operation. |
_revision | integer | Required | The item response’s item.revision value. |
quantity | integer | Required | Positive number of units to process. |
recipient | string | Required | Recipient’s player username. |
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,
"recipient": "AnotherPlayer"
}' \
"${MINEXON_BASE_URL}/api/v1/en/inventory/example/gift"Response
HTTP 200 · application/json
| Field | Type | Requirement | Description |
|---|---|---|---|
next | string | Required | URL of the next player page. |
notices | array | Conditional | Operation notice codes, when present. |
error | string | Conditional | Error code. |
errors | string[] | Conditional | Field 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
| Field | Type | Requirement | Description |
|---|---|---|---|
locale | string | Required | Response locale. |
error | string or null | Conditional | Action error. Can be empty on success. |
errors | array or object | Conditional | Field or form validation errors. |
notice | string or null | Conditional | Action notice. |
item | object | Conditional | Current entry. |
selected | JSON value | Conditional | Category or filter selected on this screen. |
slug | string | Conditional | Record slug. |
canGift | JSON value | Conditional | Value determined by screen and configuration. |
operation | JSON value | Conditional | Value determined by screen and configuration. |
operationKey | string | Conditional | Identifier 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.