Node.js
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.resellerProducts.list();
<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->resellerProducts->list();
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.resellerProducts.list()
curl --request GET \
--url https://api.shoply.gg/v1/stores/{storeId}/resellers/products \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/resellers/products"
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/products")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/resellers/products")
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": [
{
"variantId": "17e8cb5f-acf9-4f64-bf6b-274b0c6b3183",
"productId": "7626c760-c6cd-4b38-8344-cfbba0148a80",
"productName": "Northwind Pro",
"variantName": "1 month",
"image": null,
"delivery": "license_keys",
"stock": 4,
"price": 6.5,
"minQty": 1,
"dailyCap": 100,
"maxDiscount": null,
"enabled": true
}
],
"meta": {
"panel": {
"enabled": true,
"currency": "USD",
"minTopup": 25
},
"tiers": [
{
"id": "53272267-b8de-4f7f-9c0e-00f69122b91e",
"name": "Gold",
"discount": 12.5,
"resellers": 0,
"spent30": 0
}
],
"badges": {
"7626c760-c6cd-4b38-8344-cfbba0148a80": [
{
"label": "Available",
"color": "green",
"kind": "status"
}
]
}
}
}{
"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
List what the panel sells
Every option of the store’s products the panel sells, a row an option: its Reseller Price (price), the fewest bought at once (minQty), the most one reseller may buy of it in a day (dailyCap), the most a tier or a reseller’s own discount may take off it (maxDiscount), whether it is on sale (enabled) and its stock. meta.badges is each product’s status and labels on the panel, by its ID, and meta.tiers the tiers.
Needs the resellers.read permission (Read Resellers).
GET
/
stores
/
{storeId}
/
resellers
/
products
Node.js
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.resellerProducts.list();
<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->resellerProducts->list();
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.resellerProducts.list()
curl --request GET \
--url https://api.shoply.gg/v1/stores/{storeId}/resellers/products \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/resellers/products"
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/products")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/resellers/products")
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": [
{
"variantId": "17e8cb5f-acf9-4f64-bf6b-274b0c6b3183",
"productId": "7626c760-c6cd-4b38-8344-cfbba0148a80",
"productName": "Northwind Pro",
"variantName": "1 month",
"image": null,
"delivery": "license_keys",
"stock": 4,
"price": 6.5,
"minQty": 1,
"dailyCap": 100,
"maxDiscount": null,
"enabled": true
}
],
"meta": {
"panel": {
"enabled": true,
"currency": "USD",
"minTopup": 25
},
"tiers": [
{
"id": "53272267-b8de-4f7f-9c0e-00f69122b91e",
"name": "Gold",
"discount": 12.5,
"resellers": 0,
"spent30": 0
}
],
"badges": {
"7626c760-c6cd-4b38-8344-cfbba0148a80": [
{
"label": "Available",
"color": "green",
"kind": "status"
}
]
}
}
}{
"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": {}
}
