Auction Houses
Create Shop
Section titled “Create Shop”API Enpoint:
Section titled “API Enpoint:”POST http://localhost:7292/dstapi/DSTV1/SaveDecShopRequest Params:
{ "Name": "Shop Name", "DecShopURL": "tutorial-shop", "Description": "My shop's description...", "OwnerAddress": "Rabc123...", "DecShopHostingType": 0, "AutoUpdateNetworkDNS": true}Response:
Section titled “Response:”{ "Success": true, "Message": "Decentralized Auction Shop has been created with name Shop Name"}Code Example
Section titled “Code Example”const createShop = async () => { const payload = { Name: "Shop Name", DecShopURL: "tutorial-shop", Description: "My shop's description...", OwnerAddress: "xDnL4MCGtgHu85JJHdN1fkXinHzKaqVQ59", DecShopHostingType: 0, AutoUpdateNetworkDNS: true, };
const url = `${CLI_BASE_URL}/dstapi/DSTV1/SaveDecShop`; const request = await fetch(url, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(payload), });
const data = await request.json();
return data["Success"];};def create_shop(): payload = { "Name": "Shop Name", "DecShopURL": "tutorial-shop", "Description": "My shop's description...", "OwnerAddress": "xDnL4MCGtgHu85JJHdN1fkXinHzKaqVQ59", "DecShopHostingType": 0, "AutoUpdateNetworkDNS": True }
url = f"{CLI_BASE_URL}/dstapi/DSTV1/SaveDecShop" headers = {"Content-Type": "application/json"}
response = await requests.post(url, json=payload, headers=headers) data = await response.json()
return data["Success"]Publish Shop to Network
Section titled “Publish Shop to Network”API Enpoint:
Section titled “API Enpoint:”GET http://localhost:7292/dstapi/DSTV1/GetPublishDecShopResponse:
Section titled “Response:”{ "Success": true}Code Example
Section titled “Code Example”const publishShop = async () => { const url = `${CLI_BASE_URL}/dstapi/DSTV1/GetPublishDecShop`; const request = await fetch(url);
const data = await request.json();
console.log(data);
return data["Success"];}; def publish_shop(): url = f"{CLI_BASE_URL}/dstapi/DSTV1/GetPublishDecShop" response = await requests.get(url) data = await response.json()
print(data)
return data["Success"]Get My Shop
Section titled “Get My Shop”API Enpoint:
Section titled “API Enpoint:”GET http://localhost:7292/dstapi/DSTV1/GetDecShopResponse:
Section titled “Response:”{ "Success": true, "DecShop": { ... }}Code Example
Section titled “Code Example”const retrieveShop = async () => { const url = `${CLI_BASE_URL}/dstapi/DSTV1/GetDecShop`; const request = await fetch(url);
const data = await request.json();
if (data["Success"] == true) { return data["DecShop"]; }
return null;};def retrieve_shop(): url = f"{CLI_BASE_URL}/dstapi/DSTV1/GetDecShop" response = requests.get(url) data = response.json()
if data["Success"] == True: return data["DecShop"]
return NoneUpdate Shop
Section titled “Update Shop”API Enpoint:
Section titled “API Enpoint:”POST http://localhost:7292/dstapi/DSTV1/SaveDecShopRequest Params:
{ "Name": "Updated Shop Name", "DecShopURL": "tutorial-shop", "Description": "My updated shop's description...", "OwnerAddress": "xDnL4MCGtgHu85JJHdN1fkXinHzKaqVQ59", "DecShopHostingType": 0, "AutoUpdateNetworkDNS": true}Response:
Section titled “Response:”{ "Success": true, "DecShop": { ... }}Toggle Offline/Online
Section titled “Toggle Offline/Online”API Enpoint:
Section titled “API Enpoint:”GET http://localhost:7292/dstapi/DSTV1/GetSetShopStatusCode Example
Section titled “Code Example”const toggleShopOnline = async () => { const url = `${CLI_BASE_URL}/dstapi/DSTV1/GetSetShopStatus`; const request = await fetch(url);
const data = await request.json();
console.log(data);
if (data["Success"] == true) { return data["Message"].replace("Is Offline? ", "") == "True"; }
return null;}; def toggle_shop_online(): url = f"{CLI_BASE_URL}/dstapi/DSTV1/GetSetShopStatus" response = requests.get(url) data = response.json()
print(data)
if data["Success"] == True: return data["Message"].replace("Is Offline? ", "") == "True"
return NoneDelete Shop from Network
Section titled “Delete Shop from Network”API Enpoint:
Section titled “API Enpoint:”GET http://localhost:7292/dstapi/DSTV1/GetDeleteDecShopCode Example
Section titled “Code Example”const deleteNetworkShop = async () => { const url = `${CLI_BASE_URL}/dstapi/DSTV1/GetDeleteDecShop`; const request = await fetch(url);
const data = await request.json();
return data["Success"] == true;};def delete_network_shop(): url = f"{CLI_BASE_URL}/dstapi/DSTV1/GetDeleteDecShop" response = requests.get(url) data = response.json()
return data["Success"] == TrueDelete Shop Locally
Section titled “Delete Shop Locally”API Enpoint:
Section titled “API Enpoint:”GET http://localhost:7292/dstapi/DSTV1/GetDeleteLocalDecShopCode Example
Section titled “Code Example”const deleteShop = async () => { const url = `${CLI_BASE_URL}/dstapi/DSTV1/GetDeleteLocalDecShop`; const request = await fetch(url);
const data = await request.json();
return data["Success"] == true;};def delete_shop(): url = f"{CLI_BASE_URL}/dstapi/DSTV1/GetDeleteLocalDecShop" response = requests.get(url) data = response.json()
return data["Success"] == TrueRetrieve Network Shop
Section titled “Retrieve Network Shop”API Enpoint:
Section titled “API Enpoint:”GET http://localhost:7292/dstapi/DSTV1/GetNetworkDecShopInfo/{url}Code Example
Section titled “Code Example”const retrieveNetworkShop = async (shopUrl) => { const url = `${CLI_BASE_URL}/dstapi/DSTV1/GetNetworkDecShopInfo/${shopUrl}`; const request = await fetch(url);
const data = await request.json();
if (data["Success"] == true) { return data["DecShop"]; }
return null;};def retrieve_network_shop(shop_url): url = f"{CLI_BASE_URL}/dstapi/DSTV1/GetNetworkDecShopInfo/{shop_url}" response = requests.get(url) data = response.json()
if data["Success"] == True: return data["DecShop"]
return NoneURL Params:
Section titled “URL Params:”url: URL of the shop (ie. vfx://tutorial-shop)
Response:
Section titled “Response:”{ "Success": true, "DecShop": { ... }}