Skip to content

Create a new selling plan

LegacyAPI v1 is the older API. It still works and is supported, but new integrations should use API v2. Migrating from v1 to v2

POST
/external/preorders
curl --request POST \
--url https://app.stoqapp.com/api/v1/external/preorders \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <X-Auth-Token>' \
--data '{ "selling_plan": { "name": "Summer Preorder", "internal_name": "summer-2026", "enabled": true, "billing_type": "time_after_checkout", "billing_checkout_charge_type": "percentage", "billing_checkout_charge_percentage": 20, "delivery_type": "asap", "pricing_type": "no_discount", "preorder_button_text": "Preorder now", "preorder_badge_enabled": true, "preorder_badge_text": "Preorder", "product_variants_source": "custom" } }'

Create a new preorder selling plan. The selling_plan object defines billing, delivery, discount, button, badge, and fulfillment behavior; only the fields you set are applied and the rest fall back to defaults. Returns the created selling plan, including its STOQ ID, on success.

X-Auth-Token
required
string

API key for authentication

Media typeapplication/json
object
selling_plan

Input schema for creating or updating selling plans

object
name

Display name of the selling plan

string
internal_name

Internal name for the selling plan

string
enabled

Whether the selling plan is enabled

boolean
billing_type

Type of billing for the selling plan

string
Allowed values: exact_time no_remaining_balance time_after_checkout
billing_at

Exact billing time if billing_type is exact_time

string format: date-time
billing_after_n_intervals

Number of intervals after checkout to bill

integer
billing_after_interval_type

Type of interval for billing

string
Allowed values: day
billing_checkout_charge_amount

Fixed amount to charge at checkout

number
billing_checkout_charge_percentage

Percentage to charge at checkout

number
billing_checkout_charge_type

Type of checkout charge

string
Allowed values: percentage price
billing_title

Title for billing section

string
billing_description

Description for billing section

string
delivery_type

Type of delivery for the selling plan

string
Allowed values: anchor asap exact_time unknown
delivery_at

Exact delivery time if delivery_type is exact_time

string format: date-time
delivery_after_n_intervals

Number of intervals after checkout for delivery

integer
delivery_after_interval_type

Type of interval for delivery

string
Allowed values: day
inventory_reserve_type

When to reserve inventory

string
Allowed values: on_sale on_fulfillment
inventory_provider

Inventory provider

string
Allowed values: stoq shopify
pricing_type

Type of pricing discount

string
Allowed values: percentage price fixed_amount no_discount
pricing_amount

Fixed discount amount

number
pricing_percentage

Percentage discount

number
quantity_limit_text

Text to display for quantity limits

string
preorder_button_text

Text for the preorder button

string
preorder_button_text_color

Text color for the preorder button

string
preorder_button_background_color

Background color for the preorder button

string
preorder_button_colors_enabled

Whether custom colors are enabled for the preorder button

boolean
preorder_discounted_price_enabled

Whether to show discounted price on the preorder button

boolean
preorder_button_description

Description text for the preorder button

string
preorder_button_description_background_color

Background color for the preorder button description

string
preorder_button_description_border_radius

Border radius for the preorder button description

string
preorder_button_description_quantity_limit_suffix

Suffix text for quantity limit in button description

string
preorder_button_description_shipping_text_prefix

Prefix text for shipping information in button description

string
preorder_button_description_show_quantity_limit

Whether to show quantity limit in button description

boolean
preorder_button_description_show_shipping

Whether to show shipping information in button description

boolean
preorder_button_description_text_color

Text color for the preorder button description

string
preorder_badge_enabled

Whether preorder badge is enabled

boolean
preorder_badge_text

Text for the preorder badge

string
preorder_badge_text_color

Text color for the preorder badge

string
preorder_badge_background_color

Background color for the preorder badge

string
preorder_shipping_text

Shipping text specific to preorders

string
shipping_text

Shipping information text

string
shipping_line_item_property_enabled

Whether to enable shipping line item properties

boolean
shipping_applies_to_all_products

Whether shipping settings apply to all products

boolean
discount_text

Discount information text

string
preorder_tags

Tags to apply to preorder items

string
product_variants_source

Source of product variants for this selling plan

string
Allowed values: all collection custom
product_variants_source_id

ID of the source (e.g., collection ID)

integer
markets_enabled

Whether market-specific settings are enabled for this selling plan

boolean
shopify_market_ids

List of Shopify market IDs where this selling plan is available. Required if markets_enabled is true.

Array<integer>
auto_collect_payment

Whether to automatically collect payment when the order is ready to fulfill

boolean
use_shopify_selling_plan

Whether to use Shopify’s native selling plan functionality for this preorder offer. When true, this enables advanced selling plan features in Shopify.

boolean
enable_billing_widget

Whether to display the payment/billing widget on the product page

boolean
split_fulfillments_enabled

Whether to enable split fulfillments for preorders. When enabled, preorder items can be shipped separately from regular items in the same order.

boolean
split_orders_enabled

Whether to move preorder items into a separate Shopify order after checkout (“Move preorder items to a separate order”). In-stock items stay on the original order. Only one of split_orders_enabled, split_fulfillments_enabled and hold_fulfillments_enabled can be on: turning this on turns the others off. It also turns off use_shopify_selling_plan, so deposits and partial payments aren’t available.

boolean
split_orders_per_variant

Only applies when split_orders_enabled is on. false (default): all preorder items from this offer in a checkout move to one new order. true: each preorder variant from this offer moves to its own new order, so products sharing one offer still ship separately.

boolean
require_preorder_acknowledgement

Whether customers must accept terms and conditions before adding a preorder item to their cart.

boolean
preorder_acknowledgement_text

The terms and conditions text that customers must acknowledge when require_preorder_acknowledgement is enabled.

string
allow_mixed_cart

Whether to allow customers to mix preorder items with regular items in the same cart. When false, customers must purchase preorders separately.

boolean
mixed_cart_error_message

Error message displayed to customers when they attempt to mix preorder and regular items in their cart (when allow_mixed_cart is false).

string
preorder_min_quantity

Minimum quantity required per order for preorder items. When set, customers must purchase at least this many units.

integer
preorder_max_quantity

Maximum quantity allowed per order for preorder items. When set, customers cannot purchase more than this many units.

integer
payment_line_item_property_enabled

Whether to add payment information as a line item property (e.g., “Payment - Pay in full”).

boolean
custom_line_item_property_text

Custom text to add as a line item property for preorder items. Useful for adding custom order notes or metadata.

string
auto_collect_payment_on_fulfillment

Whether to automatically collect remaining payment when the order is fulfilled (for partial payment preorders).

boolean
hold_fulfillments_enabled

Whether to automatically hold fulfillments for preorder items. When enabled, fulfillments will be held until manually released.

boolean
hold_fulfillments_reason_note

The reason note displayed when fulfillments are held (when hold_fulfillments_enabled is true).

string
disable_button_until_acknowledged

Whether to disable the add to cart button until the customer acknowledges the preorder terms (when require_preorder_acknowledgement is true).

boolean

Example

{
"selling_plan": {
"name": "Summer Preorder",
"internal_name": "summer-2026",
"enabled": true,
"billing_type": "time_after_checkout",
"billing_checkout_charge_type": "percentage",
"billing_checkout_charge_percentage": 20,
"delivery_type": "asap",
"pricing_type": "no_discount",
"preorder_button_text": "Preorder now",
"preorder_badge_enabled": true,
"preorder_badge_text": "Preorder",
"product_variants_source": "custom"
}
}

Selling plan created successfully

Media typeapplication/json
object
id

Unique identifier for the selling plan

string
name

Display name of the selling plan

string
internal_name

Internal name for the selling plan

string
enabled

Whether the selling plan is enabled

boolean
billing_type

Type of billing for the selling plan

string
Allowed values: exact_time no_remaining_balance time_after_checkout
billing_at

Exact billing time if billing_type is exact_time

string format: date-time
nullable
billing_after_n_intervals

Number of intervals after checkout to bill

integer
nullable
billing_after_interval_type

Type of interval for billing

string
Allowed values: day
billing_checkout_charge_amount

Fixed amount to charge at checkout

number
nullable
billing_checkout_charge_percentage

Percentage to charge at checkout

number
nullable
billing_checkout_charge_type

Type of checkout charge

string
Allowed values: percentage price
billing_title

Title for billing section

string
billing_description

Description for billing section

string
delivery_type

Type of delivery for the selling plan

string
Allowed values: anchor asap exact_time unknown
delivery_at

Exact delivery time if delivery_type is exact_time

string format: date-time
nullable
delivery_after_n_intervals

Number of intervals after checkout for delivery

integer
nullable
delivery_after_interval_type

Type of interval for delivery

string
Allowed values: day
inventory_reserve_type

When to reserve inventory

string
Allowed values: on_sale on_fulfillment
inventory_provider

Inventory provider

string
Allowed values: stoq shopify
pricing_type

Type of pricing discount

string
Allowed values: percentage price fixed_amount no_discount
pricing_amount

Fixed discount amount

number
nullable
pricing_percentage

Percentage discount

number
nullable
quantity_limit_text

Text to display for quantity limits

string
preorder_button_text

Text for the preorder button

string
preorder_button_text_color

Text color for the preorder button

string
preorder_button_background_color

Background color for the preorder button

string
preorder_button_colors_enabled

Whether custom colors are enabled for the preorder button

boolean
preorder_discounted_price_enabled

Whether to show discounted price on the preorder button

boolean
preorder_button_description

Description text for the preorder button

string
preorder_button_description_background_color

Background color for the preorder button description

string
preorder_button_description_border_radius

Border radius for the preorder button description

string
preorder_button_description_quantity_limit_suffix

Suffix text for quantity limit in button description

string
preorder_button_description_shipping_text_prefix

Prefix text for shipping information in button description

string
preorder_button_description_show_quantity_limit

Whether to show quantity limit in button description

boolean
preorder_button_description_show_shipping

Whether to show shipping information in button description

boolean
preorder_button_description_text_color

Text color for the preorder button description

string
preorder_badge_enabled

Whether preorder badge is enabled

boolean
preorder_badge_text

Text for the preorder badge

string
preorder_badge_text_color

Text color for the preorder badge

string
preorder_badge_background_color

Background color for the preorder badge

string
preorder_shipping_text

Shipping text specific to preorders

string
shipping_text

Shipping information text

string
shipping_line_item_property_enabled

Whether to enable shipping line item properties

boolean
shipping_applies_to_all_products

Whether shipping settings apply to all products

boolean
discount_text

Discount information text

string
preorder_tags

Tags to apply to preorder items

string
product_variants_source

Source of product variants for this selling plan

string
Allowed values: all collection custom
product_variants_source_id

ID of the source (e.g., collection ID)

integer
nullable
selling_plan_product_variants_count

Number of product variants associated with this selling plan

integer
shopify_selling_plan_id

Shopify selling plan ID

integer
nullable
shopify_selling_plan_group_id

Shopify selling plan group ID

integer
nullable
use_shopify_selling_plan

Whether to use Shopify’s native selling plan functionality for this preorder offer. When true, this enables advanced selling plan features in Shopify.

boolean
enable_billing_widget

Whether to display the payment/billing widget on the product page

boolean
split_fulfillments_enabled

Whether to enable split fulfillments for preorders. When enabled, preorders will be separted into its own fulfillment order.

boolean
split_orders_enabled

Whether to move preorder items into a separate Shopify order after checkout (“Move preorder items to a separate order”). In-stock items stay on the original order. Only one of split_orders_enabled, split_fulfillments_enabled and hold_fulfillments_enabled can be on: turning this on turns the others off. It also turns off use_shopify_selling_plan, so deposits and partial payments aren’t available.

boolean
split_orders_per_variant

Only applies when split_orders_enabled is on. false (default): all preorder items from this offer in a checkout move to one new order. true: each preorder variant from this offer moves to its own new order, so products sharing one offer still ship separately.

boolean
require_preorder_acknowledgement

Whether customers must accept terms and conditions before adding a preorder item to their cart.

boolean
preorder_acknowledgement_text

The terms and conditions text that customers must acknowledge when require_preorder_acknowledgement is enabled.

string
allow_mixed_cart

Whether to allow customers to mix preorder items with regular items in the same cart. When false, customers must purchase preorders separately.

boolean
mixed_cart_error_message

Error message displayed to customers when they attempt to mix preorder and regular items in their cart (when allow_mixed_cart is false).

string
preorder_min_quantity

Minimum quantity required per order for preorder items. When set, customers must purchase at least this many units.

integer
nullable
preorder_max_quantity

Maximum quantity allowed per order for preorder items. When set, customers cannot purchase more than this many units.

integer
nullable
payment_line_item_property_enabled

Whether to add payment information as a line item property (e.g., “Payment - Pay in full”).

boolean
custom_line_item_property_text

Custom text to add as a line item property for preorder items. Useful for adding custom order notes or metadata.

string
nullable
auto_collect_payment_on_fulfillment

Whether to automatically collect remaining payment when the order is fulfilled (for partial payment preorders).

boolean
hold_fulfillments_enabled

Whether to automatically hold fulfillments for preorder items. When enabled, fulfillments will be held until manually released.

boolean
hold_fulfillments_reason_note

The reason note displayed when fulfillments are held (when hold_fulfillments_enabled is true).

string
disable_button_until_acknowledged

Whether to disable the add to cart button until the customer acknowledges the preorder terms (when require_preorder_acknowledgement is true).

boolean
shop_id

Shop ID this selling plan belongs to

integer
market_id

Market ID for multi-market stores

integer
nullable
created_at

Timestamp when the selling plan was created

string format: date-time
updated_at

Timestamp when the selling plan was last updated

string format: date-time
discarded_at

Timestamp when the selling plan was soft deleted

string format: date-time
nullable
ongoing_job

Whether there is an ongoing job for this selling plan

boolean
shopify_variant_ids

List of Shopify variant IDs associated with this selling plan

Array<integer>

Example

{
"id": "79b44c6c-ebc7-41d4-8a1b-573d7c693454",
"name": "Summer Preorder",
"internal_name": "summer-2026",
"enabled": true,
"billing_type": "time_after_checkout",
"billing_checkout_charge_type": "percentage",
"billing_checkout_charge_percentage": 20,
"delivery_type": "asap",
"pricing_type": "no_discount",
"preorder_button_text": "Preorder now",
"preorder_badge_enabled": true,
"preorder_badge_text": "Preorder",
"selling_plan_product_variants_count": 0,
"shopify_selling_plan_id": null,
"shopify_selling_plan_group_id": null,
"shop_id": 43,
"created_at": "2026-06-20T10:00:00Z",
"updated_at": "2026-06-24T08:30:00Z",
"ongoing_job": false,
"shopify_variant_ids": []
}

Unauthorized

Validation errors

Media typeapplication/json
object
errors
object

Example generated

{
"errors": {}
}
Was this page helpful?

Still stuck? Ask Quinn or chat with support