On this page
API reference
Setup and administration
Store settings, read setup status and identify routes that need your marketplace admin token.
GET /setup#
Open the operator’s setup form and configuration checks. The page can preload a builder settings code from its URL fragment.
Path and query parameters#
| Name | Type | Required | Meaning | Default | Limits |
|---|---|---|---|---|---|
collection |
address | No | Collection hint for preparation or indexing review. | — | — |
Response fields#
| Field | Type | Meaning |
|---|---|---|
body |
HTML | Setup form, checks and operator guidance. |
Cache. Cache-Control: private, no-store.
Limit. None specific.
Errors#
| Status | Code | Meaning |
|---|---|---|
| 405 | method_not_allowed |
Use GET. |
Example request#
curl https://marketplace.example/setupExample response#
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Cache-Control: private, no-storeGET /setup/status#
Read the five setup checks. This route is public and the checks contain status sentences.
There are no path or query parameters.
Response fields#
| Field | Type | Meaning |
|---|---|---|
checking |
boolean | Whether a check is running or a fresh result is pending. |
checks |
object | Keys settings, key, rpc, storage and book. Each has state (pass, fail, missing, unread) and sentence. |
version |
string | Template version. |
message |
string, optional | A deployment status note. |
Cache. Cache-Control: private, no-store.
Limit. Chain reads, 60 per minute per visitor.
Errors#
| Status | Code | Meaning |
|---|---|---|
| 405 | method_not_allowed |
Use GET. |
| 429 | status_busy |
Wait the 60 seconds in Retry-After. |
| 503 | not_ready |
Settings storage or deployment identity is unavailable. |
Example request#
curl https://marketplace.example/setup/statusconst response = await fetch("https://marketplace.example/setup/status");
const result = await response.json();Example response#
{
"checking": false,
"checks": {
"settings": {
"state": "pass",
"sentence": "Marketplace settings in use."
},
"key": {
"state": "pass",
"sentence": "OpenSea is switched off. No API key is needed."
},
"rpc": {
"state": "pass",
"sentence": "The shared public RPC answers and can simulate a sale."
},
"storage": {
"state": "pass",
"sentence": "Storage ready."
},
"book": {
"state": "pass",
"sentence": "First book read complete."
}
},
"version": "0.1.0"
}POST /setup/claim#
Store a builder code on the marketplace’s own deployment. Use the exact same-origin Origin header and a JSON body. To replace stored settings, set the hosting variable MARKET_SETUP_UNLOCK to the unlock code shown on /setup, redeploy, then claim again. Without the matching unlock code, the claim returns HTTP 409 with already_configured.
There are no path or query parameters.
Request body#
| Name | Type | Required | Meaning | Default | Limits |
|---|---|---|---|---|---|
token |
string | Yes | The marketplace admin token. | — | — |
code |
string | Yes | The encoded settings code copied from the builder. | — | 65536 characters. Total JSON body at most 69632 bytes. |
{
"token": "<your admin token>",
"code": "<settings code from the builder>"
}Response fields#
| Field | Type | Meaning |
|---|---|---|
result, message |
strings | stored on success and a description. |
field |
string, optional | Setting or input identified by the error. |
Cache. Cache-Control: private, no-store.
Limit. Five failed attempts per visitor in ten minutes. Valid credentials refund their counted attempt. Follow Retry-After when limited.
Errors#
| Status | Code | Meaning |
|---|---|---|
| 403 | invalid_request |
Origin or media type is wrong. |
| 401 | wrong_token |
The supplied token does not match. |
| 405 | method_not_allowed |
Use POST. |
| 409 | hosting_variables |
Settings are already supplied by hosting variables. |
| 409 | already_configured |
Stored settings require a matching replacement unlock. |
| 422 | invalid_code |
The settings code failed validation. |
| 429 | too_many_tries |
The admin attempt window is full. |
| 503 | not_ready |
Admin token or settings storage is unavailable. |
| 503 | placement_pending |
Settings were stored and the placement record still needs to be written. Retry Store settings. |
Example request#
curl \
-X POST \
-H 'Origin: https://marketplace.example' \
-H 'Content-Type: application/json' \
--data '{"token":"<your admin token>","code":"<settings code from the builder>"}' \
https://marketplace.example/setup/claimconst response = await fetch("https://marketplace.example/setup/claim", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"token": "<your admin token>", "code": "<settings code from the builder>"})
});
const result = await response.json();Example response#
{
"result": "wrong_token",
"message": "That is not the admin token."
}Use the operator data console to import optional indexed data. It shares the admin attempt counter with setup and accepts the same token in a Bearer header.