Get developer settings
API v2 is in public beta: endpoints and fields can change before general availability. See the changelog
/preorders/settings/developerCosts 1 rate-limit point · Rate limits
The preorder developer settings: dev mode, the custom CSS, and the theme CSS selectors that place the Preorder button and each preorder element on product pages and on the home, collection and search product lists. Shop-wide, not per offer. The selectors are used only while dev mode is on. Dev mode and CSS are shared with back-in-stock.
Change them with PATCH /preorders/settings/developer. A null selector means none is set for that element, so the theme default applies. Each insert_type is beforebegin, afterbegin, beforeend or afterend. dev_mode_enabled and css are the same values as placement.merchant_managed_position and custom.css on GET /back_in_stock/settings/widget, so a change on either side shows on both.
Also searched asdeveloper settingsdev modepreorder selectorsplacement selectorsinsertion points
Returns
dev_mode_enabledbooleanExample:truecssnullproduct_pageobjectShow 4 child attributesHide child attributes
formstringExample:stringadd_to_cart_buttonnulladd_to_cart_textstringExample:stringoriginal_pricenull
insertion_pointsobjectShow 7 child attributesHide child attributes
disclaimerobjectShow 2 child attributesHide child attributes
selectornullinsert_typestringExample:string
payment_optionsobjectShow 2 child attributesHide child attributes
selectornullinsert_typestringExample:string
termsobjectShow 2 child attributesHide child attributes
selectornullinsert_typestringExample:string
badgeobjectShow 2 child attributesHide child attributes
selectorstring, nullableExample:stringinsert_typestringExample:string
discounted_priceobjectShow 2 child attributesHide child attributes
selectornullinsert_typestringExample:string
countdown_timerobjectShow 2 child attributesHide child attributes
selectornullinsert_typestringExample:string
progress_barobjectShow 2 child attributesHide child attributes
selectornullinsert_typestringExample:string
collectionobjectShow 4 child attributesHide child attributes
formstringExample:stringadd_to_cart_buttonstringExample:stringbadgenullbadge_insert_typestringExample:string
homeobjectShow 3 child attributesHide child attributes
formstringExample:stringadd_to_cart_buttonstringExample:stringbadgenull
searchobjectShow 3 child attributesHide child attributes
formstringExample:stringadd_to_cart_buttonstringExample:stringbadgenull
Errors
not_foundThe path is valid but nothing with that id exists in this store.
validation_failedThe request failed validation.
Any request can also fail with auth_invalid (401) or rate_limited (429).
Every error has the same shape: see Errors and the list of error codes.
curl "https://app.stoqapp.com/api/v2/external/preorders/settings/developer" \
-H "X-Auth-Token: $STOQ_API_KEY"const res = await fetch("https://app.stoqapp.com/api/v2/external/preorders/settings/developer", {
headers: {
"X-Auth-Token": process.env.STOQ_API_KEY,
},
});
const data = await res.json();import os
import requests
res = requests.get(
"https://app.stoqapp.com/api/v2/external/preorders/settings/developer",
headers={"X-Auth-Token": os.environ["STOQ_API_KEY"]},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.stoqapp.com/api/v2/external/preorders/settings/developer")
req = Net::HTTP::Get.new(uri, "X-Auth-Token" => ENV["STOQ_API_KEY"])
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body){
"dev_mode_enabled": true,
"css": null,
"product_page": {
"form": "string",
"add_to_cart_button": null,
"add_to_cart_text": "string",
"original_price": null
},
"insertion_points": {
"disclaimer": {
"selector": null,
"insert_type": "string"
},
"payment_options": {
"selector": null,
"insert_type": "string"
},
"terms": {
"selector": null,
"insert_type": "string"
},
"badge": {
"selector": "string",
"insert_type": "string"
},
"discounted_price": {
"selector": null,
"insert_type": "string"
},
"countdown_timer": {
"selector": null,
"insert_type": "string"
},
"progress_bar": {
"selector": null,
"insert_type": "string"
}
},
"collection": {
"form": "string",
"add_to_cart_button": "string",
"badge": null,
"badge_insert_type": "string"
},
"home": {
"form": "string",
"add_to_cart_button": "string",
"badge": null
},
"search": {
"form": "string",
"add_to_cart_button": "string",
"badge": null
}
}{
"errors": [
"Invalid API key"
],
"code": "auth_invalid",
"details": [
{
"code": "auth_invalid",
"message": "Invalid API key",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"name is required"
],
"code": "validation_failed",
"details": [
{
"code": "validation_failed",
"message": "name is required",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"Rate limit exceeded"
],
"code": "rate_limited",
"details": [
{
"code": "rate_limited",
"message": "Rate limit exceeded",
"path": null,
"value": null,
"expected": null
}
]
}