Docs
Ctrl+K Rechercher Alt+[Alt+] Guides
Obtenir une clé API

API

Store tracker

Read tracker usage over an API key; add or remove stores from a logged-in session.

OBTENIR/api/v1/store-tracker

Tracked store count and plan cap for the API key owner. Alias: /api/store-tracker.

Send Clé X-API on every request.
Demande
curl -sS \
  -H "X-API-Key: $WH_API_KEY" \
  "{origin}/api/v1/store-tracker"
const res = await fetch(`${ORIGIN}/api/v1/store-tracker`, {
  method: 'GET',
  headers: {
    'X-API-Key': process.env.WH_API_KEY,
  },
});
const data = await res.json();
import os, requests

res = requests.get(
    f"{ORIGIN}/api/v1/store-tracker",
    headers={"X-API-Key": os.environ["WH_API_KEY"]},
)
data = res.json()
Response
{
    "amount": 37,
    "max_allowed": 100
}
{
    "success": false,
    "error": "Unauthorized"
}
{
    "success": false,
    "error": "WinningHunter Basic plan or higher required"
}
{
    "success": false,
    "error": "Rate limit exceeded. Max 60 requests per minute."
}

Response is { "amount", "max_allowed" }no top-level success field.

Track / remove (session only)

Method Chemin Body Objectif
PUBLICATION /api/storetracker/add storeurl Track a store by URL/domain
PUBLICATION /api/salestracker/delete shopid Remove a tracked store
OBTENIR /api/storetracker/amount-stores-tracked Same shape as above (amount, max_allowed)

Related