> For the complete documentation index, see [llms.txt](https://docs.samita.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.samita.io/samita-wholesale-b2b/api-integration/apis-for-quick-order-form.md).

# APIs for Quick Order Form

Create, update, list, and delete Quick Order Forms, Quick Buy Collections, and Quick Buy Variant tables using the Public API.

This page covers the Public API for the Quick Order Form feature family. One endpoint handles all three related record types, distinguished by a `type` field:

* `quick_order_page` — a standalone Quick Order Form page.
* `quick_buy_collection` — the Quick Buy feature on collection/product-card pages.
* `quick_buy_variant` — the Variant Table on a product page.

All 4 operations share the same base URL, headers, and authentication described in [Public APIs](/samita-wholesale-b2b/api-integration/public-apis.md).

## Create a record

### Endpoint

```
POST https://wholesale.samita.io/api/v1/quick-order-forms
```

### Request Headers

| Header                  | Description                                     | Required |
| ----------------------- | ----------------------------------------------- | -------- |
| **`X-SAMITA-API-KEY`**  | API key provided in the Wholesale app           | Yes      |
| **`X-SAMITA-SHOP-URL`** | Shopify shop domain in format xxx.myshopify.com | Yes      |
| **`CONTENT-TYPE`**      | Must be `application/json`                      | Yes      |

This API requires the **Create** permission on the API key, for the specific `type` you're creating.

### Common fields (all types)

| Field    | Type            | Required | Description                                                         |
| -------- | --------------- | -------- | ------------------------------------------------------------------- |
| `title`  | string, max 255 | Yes      | The record's name in the app.                                       |
| `status` | boolean         | Yes      | Whether it's active.                                                |
| `type`   | string          | Yes      | `quick_order_page`, `quick_buy_collection`, or `quick_buy_variant`. |

The remaining required fields depend on `type`:

{% tabs %}
{% tab title="quick\_order\_page" %}

| Field                          | Type              | Notes                                                                     |
| ------------------------------ | ----------------- | ------------------------------------------------------------------------- |
| `apply_product`                | object (required) | `type`: `products` or `collections`.                                      |
| `apply_product.product_ids`    | array             | Required when `type` is `products`.                                       |
| `apply_product.collection_ids` | array             | Required when `type` is `collections`.                                    |
| `display_on_page`              | string (required) | The handle of the Shopify page this form is shown on.                     |
| `pagination`                   | object (required) | `type`: `pagination` or `load_more_button`; `per_page`: number from 1–50. |
| `columns`                      | object (required) | `product_stock`: boolean — show/hide the stock column.                    |

Example:

```json
{
  "title": "Wholesale Order Form",
  "status": true,
  "type": "quick_order_page",
  "apply_product": {
    "type": "collections",
    "collection_ids": [123456789]
  },
  "display_on_page": "wholesale-order-form",
  "pagination": {
    "type": "pagination",
    "per_page": 20
  },
  "columns": {
    "product_stock": true
  }
}
```

{% endtab %}

{% tab title="quick\_buy\_collection" %}

| Field              | Type              | Notes                                                                                                                         |
| ------------------ | ----------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `apply_product`    | object (required) | `type`: `all`, `products`, `collections`, or `product-tags`, with matching `product_ids` / `collection_ids` / `product_tags`. |
| `exclude_product`  | object (required) | `type`: `none`, `products`, or `collections`, with matching IDs.                                                              |
| `apply_customer`   | object (required) | `type`: `all`, `logged`, `non-logged`, or `customer-tags`, with `tags` when applicable.                                       |
| `exclude_customer` | object (required) | `type`: `none` or `customer-tags`, with `tags` when applicable.                                                               |
| `display_on_pages` | array (required)  | Any of `index`, `collection`, `search`, `another_page`.                                                                       |
| `columns`          | object (required) | Booleans: `stock_status`, `quantity`, `variant`, `volume_discount`, `add_to_cart`.                                            |

Example:

```json
{
  "title": "Quick Buy on Collections",
  "status": true,
  "type": "quick_buy_collection",
  "apply_product": { "type": "all", "product_ids": [], "product_tags": [], "collection_ids": [] },
  "exclude_product": { "type": "none", "product_ids": [], "collection_ids": [] },
  "apply_customer": { "type": "customer-tags", "tags": ["wholesale"] },
  "exclude_customer": { "type": "none", "tags": [] },
  "display_on_pages": ["collection", "index"],
  "columns": {
    "stock_status": true,
    "quantity": true,
    "variant": true,
    "volume_discount": true,
    "add_to_cart": true
  }
}
```

{% endtab %}

{% tab title="quick\_buy\_variant" %}

| Field              | Type              | Notes                                          |
| ------------------ | ----------------- | ---------------------------------------------- |
| `apply_product`    | object (required) | Same shape as `quick_buy_collection`.          |
| `exclude_product`  | object (required) | Same shape as `quick_buy_collection`.          |
| `apply_customer`   | object (required) | Same shape as `quick_buy_collection`.          |
| `exclude_customer` | object (required) | Same shape as `quick_buy_collection`.          |
| `template`         | string (required) | `default` or `matrix-column`.                  |
| `columns`          | object (required) | `stock`: boolean — show/hide the stock column. |

Example:

```json
{
  "title": "Variant Table",
  "status": true,
  "type": "quick_buy_variant",
  "apply_product": { "type": "all", "product_ids": [], "product_tags": [], "collection_ids": [] },
  "exclude_product": { "type": "none", "product_ids": [], "collection_ids": [] },
  "apply_customer": { "type": "logged", "tags": [] },
  "exclude_customer": { "type": "none", "tags": [] },
  "template": "default",
  "columns": {
    "stock": true
  }
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
The `apply_product`/`exclude_product`/`apply_customer`/`exclude_customer` objects control the same targeting rules you'd set in the app UI. Style, column ordering, and other display settings use sensible defaults on create — to change them, update the record afterward or edit it in the app.
{% endhint %}

### Response

**200 – Success** returns the created record. See the example under **Get a record** below.

## Update a record

```
PUT https://wholesale.samita.io/api/v1/quick-order-forms/{id}
```

Same headers as Create. Only send the fields you want to change — `title`, `status`, `configs`, and `product_configs` are all optional; unspecified fields keep their current value. This API requires the **Update** permission.

## Get a record

```
GET https://wholesale.samita.io/api/v1/quick-order-forms/{id}
```

Same headers as Create, no request body. This API requires the **View** permission.

**200 – Success example** (`type: quick_order_page`):

```json
{
  "id": 1,
  "title": "Wholesale Order Form",
  "status": true,
  "type": "quick_order_page",
  "apply_product": {
    "type": "collections",
    "product_ids": [],
    "collection_ids": [123456789]
  },
  "display_on_page": "wholesale-order-form",
  "pagination": {
    "type": "pagination",
    "per_page": 20
  },
  "columns": {
    "product": true,
    "product_stock": true,
    "quantity": true,
    "action": true
  },
  "created_at": "2026-01-15T10:00:00",
  "updated_at": "2026-01-15T10:00:00"
}
```

## Delete a record

```
DELETE https://wholesale.samita.io/api/v1/quick-order-forms/{id}
```

Same headers as Create. Pass an **`ids`** parameter — a comma-separated list of record IDs to delete (as a query string parameter or a JSON body field), e.g. `ids=1,2,3`. This API requires the **Delete** permission.

**200 – Success:**

```json
{
  "success": true
}
```

## Error responses

All 4 endpoints share the same error responses as the rest of the Public API — see [Public APIs](/samita-wholesale-b2b/api-integration/public-apis.md) for **401 Unauthorized**, **403 Forbidden**, and **429 Too Many Requests**.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.samita.io/samita-wholesale-b2b/api-integration/apis-for-quick-order-form.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
