---
title: "API v1 (legacy)"
description: "STOQ API v1: every resource and endpoint, with request and response examples."
url: https://docs.stoqapp.com/v1/
api: "API v1 (legacy)"
---

# API v1 (legacy)

<h2>Back in Stock</h2>
Before diving into the API reference, it's important to understand the key term we use - Intent

Intents are essentially &quot;waitlist requests&quot; or &quot;subscriptions&quot; that customers create when they want to be notified with a back in stock alert.

- **Core Purpose**:

- When a product is out of stock, customers can sign up to be notified when it becomes available again
- Each intent represents a single customer's request to be notified about a specific product variant.
- Intent is unique to a customer, product variant &amp; market.

- **What data is present in an Intent?**

- **Customer Information**: Each intent contains customer details like email, phone, and name
- **Product Information**: Shopify product and product variant IDs
- **Notification Preference**: Specifies how the customer wants to be notified (email or SMS)
- **Quantity**: How many units the customer is interested in when the product is back in stock

- **Lifecycle of an Intent**:

- Created when a customer signs up for notifications
- Can be notified when the product becomes available
- Can be blocked from sending notifications
- Can be unsubscribed by the customer
- Tracks notification history and opt-in status

- **Compliance &amp; Privacy**:

- Includes GDPR opt-in confirmation tracking
- Tracks marketing preferences
- Maintains unsubscribe status

<h2>Preorders</h2>
Before diving into the API reference, it's important to understand the key term we use - Selling Plans

<h4>What are Selling Plans?</h4>
Selling Plans in the context of preorders are configurations that define how a preorder product is sold, billed, and delivered to customers.

<h4>Core Purpose:</h4>

- Enable merchants to sell products before they're in stock or available for immediate shipping
- Define payment schedules, delivery timelines, and inventory management for preordered items
- Provide customization options for how preorders appear and function in the storefront

<h4>What data is present in a Selling Plan?</h4>

- **Basic Information**: Name, internal reference name, enabled status
- **Billing Configuration**: When and how much to charge (at checkout or later), charge types (percentage or fixed amount)
- **Delivery Settings**: When products will be delivered (exact date or interval after purchase)
- **Inventory Management**: How inventory is reserved and which system manages it
- **Pricing Options**: Discount amounts or percentages for preordered items
- **UI Customization**: Button text, badge styling, shipping information text

<h4>Variant Association:</h4>

- Selling plans can be associated with product variants in three ways:

- All products in the store
- Products in a specific collection
- Custom selection of individual variants

- Each variant can have custom settings like shipping text and maximum preorder quantity

<h4>Multi-Market Support:</h4>

- Selling plans can be configured for specific markets in multi-market stores
- Different markets may have different preorder terms or availability

Base URL: `https://app.stoqapp.com/api/v1`. Authenticate with the `X-Auth-Token` header.

## Resources

- [Back in Stock](https://docs.stoqapp.com/v1/back-in-stock.md) (8 endpoints)
- [Preorders](https://docs.stoqapp.com/v1/preorders.md) (11 endpoints)
