Skip to content

Get developer settings

API v2 is in public beta: endpoints and fields can change before general availability. See the changelog

GET/preorders/settings/developer

Costs 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_enabledboolean
    Example: true
  • cssnull
  • product_pageobject
    Show 4 child attributesHide child attributes
    • formstring
      Example: string
    • add_to_cart_buttonnull
    • add_to_cart_textstring
      Example: string
    • original_pricenull
  • insertion_pointsobject
    Show 7 child attributesHide child attributes
    • disclaimerobject
      Show 2 child attributesHide child attributes
      • selectornull
      • insert_typestring
        Example: string
    • payment_optionsobject
      Show 2 child attributesHide child attributes
      • selectornull
      • insert_typestring
        Example: string
    • termsobject
      Show 2 child attributesHide child attributes
      • selectornull
      • insert_typestring
        Example: string
    • badgeobject
      Show 2 child attributesHide child attributes
      • selectorstring, nullable
        Example: string
      • insert_typestring
        Example: string
    • discounted_priceobject
      Show 2 child attributesHide child attributes
      • selectornull
      • insert_typestring
        Example: string
    • countdown_timerobject
      Show 2 child attributesHide child attributes
      • selectornull
      • insert_typestring
        Example: string
    • progress_barobject
      Show 2 child attributesHide child attributes
      • selectornull
      • insert_typestring
        Example: string
  • collectionobject
    Show 4 child attributesHide child attributes
    • formstring
      Example: string
    • add_to_cart_buttonstring
      Example: string
    • badgenull
    • badge_insert_typestring
      Example: string
  • homeobject
    Show 3 child attributesHide child attributes
    • formstring
      Example: string
    • add_to_cart_buttonstring
      Example: string
    • badgenull
  • searchobject
    Show 3 child attributesHide child attributes
    • formstring
      Example: string
    • add_to_cart_buttonstring
      Example: string
    • badgenull

Errors

404
not_found

The path is valid but nothing with that id exists in this store.

422
validation_failed

The 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.

GET/preorders/settings/developer
curl "https://app.stoqapp.com/api/v2/external/preorders/settings/developer" \
  -H "X-Auth-Token: $STOQ_API_KEY"
Response
{
  "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
  }
}