Node.js
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.resellers.settings();<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->resellers->settings();
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.resellers.settings()
curl --request GET \
--url https://api.shoply.gg/v1/stores/{storeId}/resellers/settings \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/resellers/settings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.shoply.gg/v1/stores/{storeId}/resellers/settings")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/resellers/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": null,
"code": null,
"data": {
"enabled": true,
"currency": "USD",
"minTopup": 25
},
"meta": {
"address": "https://northwind.myshoply.gg/resellers",
"joinAddress": "https://northwind.myshoply.gg/resellers/join/",
"shoplyAddress": "https://northwind.myshoply.gg/resellers",
"balanceHeld": 0,
"invites": [],
"tiers": [],
"limits": {
"invites": 2,
"invitesLive": 0
},
"bounds": {
"minTopup": 5,
"maxTopup": 100000
},
"currencies": [
{
"code": "AED",
"name": "UAE dirham"
},
{
"code": "ARS",
"name": "Argentine peso"
}
]
}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}Resellers
Get the panel's settings
Whether the panel is on, its currency and its smallest top-up. meta has its addresses (address, its own domain once it is live; shoplyAddress, always its store’s myshoply.gg one; joinAddress, what an invite link starts with), the invite links and tiers, balanceHeld, the bounds a smallest top-up is held to, and the currencies it can be in.
Needs the resellers.read permission (Read Resellers).
GET
/
stores
/
{storeId}
/
resellers
/
settings
Node.js
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.resellers.settings();<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->resellers->settings();
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.resellers.settings()
curl --request GET \
--url https://api.shoply.gg/v1/stores/{storeId}/resellers/settings \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/resellers/settings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.shoply.gg/v1/stores/{storeId}/resellers/settings")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/resellers/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": null,
"code": null,
"data": {
"enabled": true,
"currency": "USD",
"minTopup": 25
},
"meta": {
"address": "https://northwind.myshoply.gg/resellers",
"joinAddress": "https://northwind.myshoply.gg/resellers/join/",
"shoplyAddress": "https://northwind.myshoply.gg/resellers",
"balanceHeld": 0,
"invites": [],
"tiers": [],
"limits": {
"invites": 2,
"invitesLive": 0
},
"bounds": {
"minTopup": 5,
"maxTopup": 100000
},
"currencies": [
{
"code": "AED",
"name": "UAE dirham"
},
{
"code": "ARS",
"name": "Argentine peso"
}
]
}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}
