Resellers
7 endpoints. Each needs an API key or OAuth token with the scope shown; the key already names its store, so paths start at /v1/store. Generated from the live contract; also in openapi.json.
Reseller accounts and applications
GET
/v1/store/resellersOr name the store: GET /v1/stores/{storeId}/resellers
Parameters
tab"approved" | "pending" | "suspended" | "rejected" | "all"queryqstring | nullquery
Response ListResellersResponse
itemsResellerRow[]requiredcountsResellerCountsrequired
Example
curl "https://api.shopfa.st/v1/store/resellers" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/resellers', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"GET",
"https://api.shopfa.st/v1/store/resellers",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("GET", "https://api.shopfa.st/v1/store/resellers", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)Try it with your key
Add an approved reseller (emailed their portal link)
POST
/v1/store/resellersOr name the store: POST /v1/stores/{storeId}/resellers
Body
namestringrequiredemailstringrequiredcompanystringwebsitestringtierIdrtr_…required
Response ResellerRow
idResellerIdrequirednamestringrequiredemailEmailrequiredcompanystringrequiredwebsitestringrequiredmessagestringrequiredstatusResellerStatusrequiredtierIdResellerTierId | nullrequiredtierNamestringrequiredordersintegerrequired
5 more fields
unitsintegerrequiredspentMinorMinorUnitsrequiredcurrencyCurrencyCoderequiredcreatedAtTimestamprequiredapprovedAtTimestamp | nullrequired
Example
curl -X POST "https://api.shopfa.st/v1/store/resellers" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"email": "[email protected]",
"company": "",
"website": "",
"tierId": "rtr_0123456789abcdefghjk"
}'const res = await fetch('https://api.shopfa.st/v1/store/resellers', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "string",
"email": "[email protected]",
"company": "",
"website": "",
"tierId": "rtr_0123456789abcdefghjk"
}),
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"POST",
"https://api.shopfa.st/v1/store/resellers",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"name": "string",
"email": "[email protected]",
"company": "",
"website": "",
"tierId": "rtr_0123456789abcdefghjk"
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/resellers", strings.NewReader(`{
"name": "string",
"email": "[email protected]",
"company": "",
"website": "",
"tierId": "rtr_0123456789abcdefghjk"
}`))
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)Try it with your key
Approve, reject, suspend or reinstate a reseller
POST
/v1/store/resellers/{resellerId}/reviewOr name the store: POST /v1/stores/{storeId}/resellers/{resellerId}/review
Parameters
resellerIdrsl_…pathrequired
Body
decision"approve" | "reject" | "suspend" | "reinstate"requiredtierIdrtr_… | null
Response ResellerRow
idResellerIdrequirednamestringrequiredemailEmailrequiredcompanystringrequiredwebsitestringrequiredmessagestringrequiredstatusResellerStatusrequiredtierIdResellerTierId | nullrequiredtierNamestringrequiredordersintegerrequired
5 more fields
unitsintegerrequiredspentMinorMinorUnitsrequiredcurrencyCurrencyCoderequiredcreatedAtTimestamprequiredapprovedAtTimestamp | nullrequired
Example
curl -X POST "https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/review" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"decision": "approve",
"tierId": null
}'const res = await fetch('https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/review', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"decision": "approve",
"tierId": null
}),
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"POST",
"https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/review",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"decision": "approve",
"tierId": None
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/review", strings.NewReader(`{
"decision": "approve",
"tierId": null
}`))
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)Try it with your key
Move a reseller to another tier
PATCH
/v1/store/resellers/{resellerId}Or name the store: PATCH /v1/stores/{storeId}/resellers/{resellerId}
Parameters
resellerIdrsl_…pathrequired
Body
tierIdrtr_…required
Response ResellerRow
idResellerIdrequirednamestringrequiredemailEmailrequiredcompanystringrequiredwebsitestringrequiredmessagestringrequiredstatusResellerStatusrequiredtierIdResellerTierId | nullrequiredtierNamestringrequiredordersintegerrequired
5 more fields
unitsintegerrequiredspentMinorMinorUnitsrequiredcurrencyCurrencyCoderequiredcreatedAtTimestamprequiredapprovedAtTimestamp | nullrequired
Example
curl -X PATCH "https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tierId": "rtr_0123456789abcdefghjk"
}'const res = await fetch('https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"tierId": "rtr_0123456789abcdefghjk"
}),
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"PATCH",
"https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"tierId": "rtr_0123456789abcdefghjk"
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("PATCH", "https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk", strings.NewReader(`{
"tierId": "rtr_0123456789abcdefghjk"
}`))
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)Try it with your key
Create a bulk order at the tier price and get its pay link
POST
/v1/store/resellers/{resellerId}/ordersOr name the store: POST /v1/stores/{storeId}/resellers/{resellerId}/orders
Parameters
resellerIdrsl_…pathrequired
Body
productIdprd_…requiredquantityintegerrequired
Response ResellerOrder
idResellerOrderIdrequiredresellerIdResellerIdrequiredresellerNamestringrequiredproductIdProductIdrequiredproductNamestringrequiredquantityintegerrequiredunitPriceMinorMinorUnitsrequiredlistUnitPriceMinorMinorUnitsrequiredtotalMinorMinorUnitsrequiredcurrencyCurrencyCoderequired
6 more fields
statusResellerOrderStatusrequiredpayUrlstringrequiredorderIdOrderId | nullrequiredorderNumberstringrequiredkeysDeliveredintegerrequiredcreatedAtTimestamprequired
Example
curl -X POST "https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/orders" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"productId": "prd_0123456789abcdefghjk",
"quantity": 1
}'const res = await fetch('https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/orders', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"productId": "prd_0123456789abcdefghjk",
"quantity": 1
}),
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"POST",
"https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/orders",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"productId": "prd_0123456789abcdefghjk",
"quantity": 1
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/orders", strings.NewReader(`{
"productId": "prd_0123456789abcdefghjk",
"quantity": 1
}`))
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)Try it with your key
A reseller's API keys, webhook, recent calls and webhook deliveries
GET
/v1/store/resellers/{resellerId}/apiOr name the store: GET /v1/stores/{storeId}/resellers/{resellerId}/api
Parameters
resellerIdrsl_…pathrequired
Response ResellerApiOverview
keysResellerApiKey[]requiredwebhookResellerWebhook | nullrequiredcallsResellerApiCall[]requireddeliveriesResellerWebhookDelivery[]requiredcalls24hintegerrequired
Example
curl "https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/api" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/api', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"GET",
"https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/api",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("GET", "https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/api", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)Try it with your key
Revoke a reseller's API key
POST
/v1/store/resellers/{resellerId}/api/keys/{keyId}/revokeOr name the store: POST /v1/stores/{storeId}/resellers/{resellerId}/api/keys/{keyId}/revoke
Parameters
resellerIdrsl_…pathrequiredkeyIdrak_…pathrequired
Response ResellerApiOverview
keysResellerApiKey[]requiredwebhookResellerWebhook | nullrequiredcallsResellerApiCall[]requireddeliveriesResellerWebhookDelivery[]requiredcalls24hintegerrequired
Example
curl -X POST "https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/api/keys/rak_0123456789abcdefghjk/revoke" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/api/keys/rak_0123456789abcdefghjk/revoke', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
},
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"POST",
"https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/api/keys/rak_0123456789abcdefghjk/revoke",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/api/keys/rak_0123456789abcdefghjk/revoke", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)