market.edit
Updates the title, description and price of the player’s own listing.
POST
/api/v1/{locale}/market/{slug}/editAPI scope market.edit
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 |
|---|---|---|---|
q | string | Optional | Search text. |
server | string | Optional | Server key. Defaults to all. |
category | string | Optional | Category key. Defaults to all. |
sort | string | Optional | newest, price_asc or price_desc. |
scope | string | Optional | all, the player’s own mine listings or purchased listings. |
page | integer | Optional | Positive page number. |
Request body
| Field | Type | Requirement | Description |
|---|---|---|---|
_revision | integer | Required | The listing.revision value. |
title | string | Required | Title. At least 3 visible characters and at most 80 characters. |
description | string | Required | Description. At least 5 visible characters and at most 400 characters. |
price | string | Required | Price in major currency units. Up to two decimal places. |
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 '{
"_revision": 1,
"title": "Welcome to the server",
"description": "<description>",
"price": "<price>"
}' \
"${MINEXON_BASE_URL}/api/v1/en/market/example/edit?q=example&page=1"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": "<next URL returned by CMS>"
}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. |
slug | string | Conditional | Record slug. |
listing | JSON value | Conditional | Value determined by screen and configuration. |
siteCurrency | JSON value | Conditional | Value determined by screen and configuration. |
siteWallet | JSON value | Conditional | Value determined by screen and configuration. |
Flow and error cases
Validation errors return HTTP 422 with the listing view containing data.error.