New doc are now available at:
https://docs.playboundless.com/modding/http-shopping.html
Original docs are below:
Below are the details for accessing the HTTP Shopping API via the Creative mode.
Please use Creative mode for building your application.
Please do not attempt to run these APIs against Testing or Live until we have fully released the feature.
How to query the per world base API URLs:
- Request the world server listing via:
curl http://127.0.0.1:8950/list-gameservers
- From the JSON response extract the
apiURL
per world. This is the base route URL for all API calls to the world.
How to query the HTTP Shopping API:
-
GET
request route is:/api/shopping/:type/:itemId
-
:type
ofS
for buy-from shop-stands, -
:type
ofB
for sell-to request-baskets, -
:itemId
for the item requested.
-
- Validation regex:
"^/api/shopping/(B|S)/([0-9]+)$"
- The request should include a header with your API key:
Boundless-API-Key
. There are different keys for the Testing and Live servers. - The response is a little-endian binary object.
- To help with testing the item of
ITEM_ROUGH_OORTSTONE
is32805
How to decode the binary response:
[
u8 : size of beacon-name string
u8 : size of guild-tag string
char[]: beacon-name string (not null terminated)
char[]: guild-tag string (not null terminated)
u32 : item count
u32 : shop activity
i64 : price
i16 : location-x
i16 : location-z
u8 : location-y
] for each result until end of response [ implicit count ]