Product presets
6 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.
ShopFast's product presets (with this store's edits) and the store's own presets
GET
/v1/store/product-presetsOr name the store: GET /v1/stores/{storeId}/product-presets
Response ListProductPresetsResponse
presetsProductPreset[]required
Example
curl "https://api.shopfa.st/v1/store/product-presets" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/product-presets', {
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/product-presets",
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/product-presets", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)Try it with your key
Save a preset of your own
POST
/v1/store/product-presetsOr name the store: POST /v1/stores/{storeId}/product-presets
Body
namestringrequireddescriptionstringrequiredicon"key" | "shield" | "user" | "code" | "discord" | "download" | "calendar" | "box" | "bolt" | "star"requiredtype"file" | "license_key" | "serial" | "subscription" | "discord_role" | "service" | "bundle"requiredtitleTemplatestringrequiredshortDescriptionstringrequireddescriptionMdstringrequiredtagsstring[]requiredoptionsobject[]requirednamestringrequiredpriceMinorintegerrequiredcompareAtMinorinteger | nulldescriptionstringdeliveryNotestring
priceMinorintegerrequiredplatforms"windows" | "mac" | "linux" | "steam" | "epic" | "battlenet" | "riot" | "ea" | "ubisoft" | "xbox" | "playstation" | "switch" | "android" | "ios" | "web" | "other"[]requiredregionstring | nullrequiredstatus"undetected" | "updated" | "testing" | "updating" | "detected" | "down" | nullrequiredinstantDeliverybooleanrequiredkeyInstructionsstringrequiredpostPurchaseMessagestringrequiredmaxPerOrderinteger | nullrequiredneedsGamebooleanrequireddownloadLimitinteger | nullrequiredstockinteger | nullrequiredturnaroundDaysinteger | nullrequireddiscordRoleNamestringrequired
Response ProductPreset
namestringrequireddescriptionstringrequirediconPresetIconrequiredtypeProductTyperequiredtitleTemplatestringrequiredshortDescriptionstringrequireddescriptionMdstringrequiredtagsstring[]requiredoptionsPresetOption[]requiredpriceMinorMinorUnitsrequired
18 more fields
platformsGamePlatform[]requiredregionstring | nullrequiredstatusProductLiveStatus | nullrequiredinstantDeliverybooleanrequiredkeyInstructionsstringrequiredpostPurchaseMessagestringrequiredmaxPerOrderinteger | nullrequiredneedsGamebooleanrequireddownloadLimitinteger | nullrequiredstockinteger | nullrequiredturnaroundDaysinteger | nullrequireddiscordRoleNamestringrequiredkeyPresetKeyrequiredbuiltinbooleanrequirededitedbooleanrequiredisDefaultbooleanrequiredproductCountintegerrequiredupdatedAtTimestamp | nullrequired
Example
curl -X POST "https://api.shopfa.st/v1/store/product-presets" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"description": "string",
"icon": "key",
"type": "file",
"titleTemplate": "string",
"shortDescription": "string",
"descriptionMd": "string",
"tags": [
"string"
],
"options": [
{
"name": "string",
"priceMinor": 0
}
],
"priceMinor": 0,
"platforms": [
"windows"
],
"region": "string",
"status": "undetected",
"instantDelivery": false,
"keyInstructions": "string",
"postPurchaseMessage": "string",
"maxPerOrder": 1,
"needsGame": false,
"downloadLimit": 1,
"stock": 0,
"turnaroundDays": 1,
"discordRoleName": "string"
}'const res = await fetch('https://api.shopfa.st/v1/store/product-presets', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "string",
"description": "string",
"icon": "key",
"type": "file",
"titleTemplate": "string",
"shortDescription": "string",
"descriptionMd": "string",
"tags": [
"string"
],
"options": [
{
"name": "string",
"priceMinor": 0
}
],
"priceMinor": 0,
"platforms": [
"windows"
],
"region": "string",
"status": "undetected",
"instantDelivery": false,
"keyInstructions": "string",
"postPurchaseMessage": "string",
"maxPerOrder": 1,
"needsGame": false,
"downloadLimit": 1,
"stock": 0,
"turnaroundDays": 1,
"discordRoleName": "string"
}),
});
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/product-presets",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"name": "string",
"description": "string",
"icon": "key",
"type": "file",
"titleTemplate": "string",
"shortDescription": "string",
"descriptionMd": "string",
"tags": [
"string"
],
"options": [
{
"name": "string",
"priceMinor": 0
}
],
"priceMinor": 0,
"platforms": [
"windows"
],
"region": "string",
"status": "undetected",
"instantDelivery": False,
"keyInstructions": "string",
"postPurchaseMessage": "string",
"maxPerOrder": 1,
"needsGame": False,
"downloadLimit": 1,
"stock": 0,
"turnaroundDays": 1,
"discordRoleName": "string"
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/product-presets", strings.NewReader(`{
"name": "string",
"description": "string",
"icon": "key",
"type": "file",
"titleTemplate": "string",
"shortDescription": "string",
"descriptionMd": "string",
"tags": [
"string"
],
"options": [
{
"name": "string",
"priceMinor": 0
}
],
"priceMinor": 0,
"platforms": [
"windows"
],
"region": "string",
"status": "undetected",
"instantDelivery": false,
"keyInstructions": "string",
"postPurchaseMessage": "string",
"maxPerOrder": 1,
"needsGame": false,
"downloadLimit": 1,
"stock": 0,
"turnaroundDays": 1,
"discordRoleName": "string"
}`))
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
Edit a preset (a built-in one becomes your store's copy)
PUT
/v1/store/product-presets/{presetKey}Or name the store: PUT /v1/stores/{storeId}/product-presets/{presetKey}
Parameters
presetKeystringpathrequired
Body
namestringrequireddescriptionstringrequiredicon"key" | "shield" | "user" | "code" | "discord" | "download" | "calendar" | "box" | "bolt" | "star"requiredtype"file" | "license_key" | "serial" | "subscription" | "discord_role" | "service" | "bundle"requiredtitleTemplatestringrequiredshortDescriptionstringrequireddescriptionMdstringrequiredtagsstring[]requiredoptionsobject[]requirednamestringrequiredpriceMinorintegerrequiredcompareAtMinorinteger | nulldescriptionstringdeliveryNotestring
priceMinorintegerrequiredplatforms"windows" | "mac" | "linux" | "steam" | "epic" | "battlenet" | "riot" | "ea" | "ubisoft" | "xbox" | "playstation" | "switch" | "android" | "ios" | "web" | "other"[]requiredregionstring | nullrequiredstatus"undetected" | "updated" | "testing" | "updating" | "detected" | "down" | nullrequiredinstantDeliverybooleanrequiredkeyInstructionsstringrequiredpostPurchaseMessagestringrequiredmaxPerOrderinteger | nullrequiredneedsGamebooleanrequireddownloadLimitinteger | nullrequiredstockinteger | nullrequiredturnaroundDaysinteger | nullrequireddiscordRoleNamestringrequired
Response ProductPreset
namestringrequireddescriptionstringrequirediconPresetIconrequiredtypeProductTyperequiredtitleTemplatestringrequiredshortDescriptionstringrequireddescriptionMdstringrequiredtagsstring[]requiredoptionsPresetOption[]requiredpriceMinorMinorUnitsrequired
18 more fields
platformsGamePlatform[]requiredregionstring | nullrequiredstatusProductLiveStatus | nullrequiredinstantDeliverybooleanrequiredkeyInstructionsstringrequiredpostPurchaseMessagestringrequiredmaxPerOrderinteger | nullrequiredneedsGamebooleanrequireddownloadLimitinteger | nullrequiredstockinteger | nullrequiredturnaroundDaysinteger | nullrequireddiscordRoleNamestringrequiredkeyPresetKeyrequiredbuiltinbooleanrequirededitedbooleanrequiredisDefaultbooleanrequiredproductCountintegerrequiredupdatedAtTimestamp | nullrequired
Example
curl -X PUT "https://api.shopfa.st/v1/store/product-presets/string" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"description": "string",
"icon": "key",
"type": "file",
"titleTemplate": "string",
"shortDescription": "string",
"descriptionMd": "string",
"tags": [
"string"
],
"options": [
{
"name": "string",
"priceMinor": 0
}
],
"priceMinor": 0,
"platforms": [
"windows"
],
"region": "string",
"status": "undetected",
"instantDelivery": false,
"keyInstructions": "string",
"postPurchaseMessage": "string",
"maxPerOrder": 1,
"needsGame": false,
"downloadLimit": 1,
"stock": 0,
"turnaroundDays": 1,
"discordRoleName": "string"
}'const res = await fetch('https://api.shopfa.st/v1/store/product-presets/string', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "string",
"description": "string",
"icon": "key",
"type": "file",
"titleTemplate": "string",
"shortDescription": "string",
"descriptionMd": "string",
"tags": [
"string"
],
"options": [
{
"name": "string",
"priceMinor": 0
}
],
"priceMinor": 0,
"platforms": [
"windows"
],
"region": "string",
"status": "undetected",
"instantDelivery": false,
"keyInstructions": "string",
"postPurchaseMessage": "string",
"maxPerOrder": 1,
"needsGame": false,
"downloadLimit": 1,
"stock": 0,
"turnaroundDays": 1,
"discordRoleName": "string"
}),
});
if (!res.ok) throw new Error((await res.json()).detail);
const data = await res.json();import os, requests
res = requests.request(
"PUT",
"https://api.shopfa.st/v1/store/product-presets/string",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"name": "string",
"description": "string",
"icon": "key",
"type": "file",
"titleTemplate": "string",
"shortDescription": "string",
"descriptionMd": "string",
"tags": [
"string"
],
"options": [
{
"name": "string",
"priceMinor": 0
}
],
"priceMinor": 0,
"platforms": [
"windows"
],
"region": "string",
"status": "undetected",
"instantDelivery": False,
"keyInstructions": "string",
"postPurchaseMessage": "string",
"maxPerOrder": 1,
"needsGame": False,
"downloadLimit": 1,
"stock": 0,
"turnaroundDays": 1,
"discordRoleName": "string"
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("PUT", "https://api.shopfa.st/v1/store/product-presets/string", strings.NewReader(`{
"name": "string",
"description": "string",
"icon": "key",
"type": "file",
"titleTemplate": "string",
"shortDescription": "string",
"descriptionMd": "string",
"tags": [
"string"
],
"options": [
{
"name": "string",
"priceMinor": 0
}
],
"priceMinor": 0,
"platforms": [
"windows"
],
"region": "string",
"status": "undetected",
"instantDelivery": false,
"keyInstructions": "string",
"postPurchaseMessage": "string",
"maxPerOrder": 1,
"needsGame": false,
"downloadLimit": 1,
"stock": 0,
"turnaroundDays": 1,
"discordRoleName": "string"
}`))
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
Delete your preset, or bring a built-in one back to ShopFast's version
DELETE
/v1/store/product-presets/{presetKey}Or name the store: DELETE /v1/stores/{storeId}/product-presets/{presetKey}
Parameters
presetKeystringpathrequired
Response Ok
okbooleanrequired
Example
curl -X DELETE "https://api.shopfa.st/v1/store/product-presets/string" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/product-presets/string', {
method: 'DELETE',
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(
"DELETE",
"https://api.shopfa.st/v1/store/product-presets/string",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("DELETE", "https://api.shopfa.st/v1/store/product-presets/string", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)Try it with your key
Make it the preset "New product" opens with (or stop)
POST
/v1/store/product-presets/{presetKey}/defaultOr name the store: POST /v1/stores/{storeId}/product-presets/{presetKey}/default
Parameters
presetKeystringpathrequired
Body
isDefaultbooleanrequired
Response SetDefaultProductPresetResponse
presetsProductPreset[]required
Example
curl -X POST "https://api.shopfa.st/v1/store/product-presets/string/default" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"isDefault": false
}'const res = await fetch('https://api.shopfa.st/v1/store/product-presets/string/default', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"isDefault": false
}),
});
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/product-presets/string/default",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"isDefault": False
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/product-presets/string/default", strings.NewReader(`{
"isDefault": false
}`))
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 one product per game from a preset (5 games × 4 durations in one go)
POST
/v1/store/product-presets/{presetKey}/bulkOr name the store: POST /v1/stores/{storeId}/product-presets/{presetKey}/bulk
Parameters
presetKeystringpathrequired
Body
gamesobject[]requiredgamestringrequirednamestringplatforms"windows" | "mac" | "linux" | "steam" | "epic" | "battlenet" | "riot" | "ea" | "ubisoft" | "xbox" | "playstation" | "switch" | "android" | "ios" | "web" | "other"[] | null
pricesinteger | null[]status"active" | "draft"
Response BulkPresetResult
createdobject[]requiredidstringrequirednamestringrequiredslugstringrequiredoptionsintegerrequired
Example
curl -X POST "https://api.shopfa.st/v1/store/product-presets/string/bulk" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"games": [
{
"game": "string"
}
],
"prices": [],
"status": "draft"
}'const res = await fetch('https://api.shopfa.st/v1/store/product-presets/string/bulk', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"games": [
{
"game": "string"
}
],
"prices": [],
"status": "draft"
}),
});
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/product-presets/string/bulk",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"games": [
{
"game": "string"
}
],
"prices": [],
"status": "draft"
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/product-presets/string/bulk", strings.NewReader(`{
"games": [
{
"game": "string"
}
],
"prices": [],
"status": "draft"
}`))
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)