Skip to Content
MinexonMinexon

market.edit

Updates the title, description and price of the player’s own listing.

POST/api/v1/{locale}/market/{slug}/edit

API scope market.edit

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
qstringOptionalSearch text.
serverstringOptionalServer key. Defaults to all.
categorystringOptionalCategory key. Defaults to all.
sortstringOptionalnewest, price_asc or price_desc.
scopestringOptionalall, the player’s own mine listings or purchased listings.
pageintegerOptionalPositive page number.

Request body

FieldTypeRequirementDescription
_revisionintegerRequiredThe listing.revision value.
titlestringRequiredTitle. At least 3 visible characters and at most 80 characters.
descriptionstringRequiredDescription. At least 5 visible characters and at most 400 characters.
pricestringRequiredPrice 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

FieldTypeRequirementDescription
nextstringRequiredURL of the next player page.
noticesarrayConditionalOperation notice codes, when present.
errorstringConditionalError code.
errorsstring[]ConditionalField 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
FieldTypeRequirementDescription
localestringRequiredResponse locale.
errorstring or nullConditionalAction error. Can be empty on success.
errorsarray or objectConditionalField or form validation errors.
noticestring or nullConditionalAction notice.
slugstringConditionalRecord slug.
listingJSON valueConditionalValue determined by screen and configuration.
siteCurrencyJSON valueConditionalValue determined by screen and configuration.
siteWalletJSON valueConditionalValue determined by screen and configuration.

Flow and error cases

Validation errors return HTTP 422 with the listing view containing data.error.

Shared error and authentication contract