---
title: "Get limits"
description: "Read the limits & terms of a preorder offer: quantity limits and their display, order tags, the terms checkbox and mixed-cart rules."
url: https://docs.stoqapp.com/v2-reference/preorders-offers/get-limits/
api: "API v2 reference"
method: GET
path: "/preorders/offers/{id}/limits"
---

# Get limits

`GET https://app.stoqapp.com/api/v2/external/preorders/offers/{id}/limits`

Read the limits &amp; terms of a preorder offer: quantity limits and their display, order tags, the terms checkbox and mixed-cart rules.

**Note:** `default_per_variant` is copied onto every variant when it changes; the limit that applies is each variant's own (`max_count` and `quantity_limit` on [`GET /preorders/offers/:id/products/variants`](https://docs.stoqapp.com/v2-reference/preorders-offers/list-an-offers-variants/)), or the batch limits on a batch offer. `display_style` picks how remaining units show: `limit_text` is used with `disclaimer`, the `progress_bar` settings with `progress_bar`. `order_quantity` caps units per order, apart from the variant limit. `cart.allowed_items` `preorder_only` blocks mixed carts at checkout with `cart.error_message`. Edit with [`PATCH /preorders/offers/:id/limits`](https://docs.stoqapp.com/v2-reference/preorders-offers/update-limits/).

## Path parameters

- `id` (string, required): The offer's ID, from [`GET /preorders/offers`](https://docs.stoqapp.com/v2-reference/preorders-offers/list-offers/).

## Query parameters

- `locale` (string): Language for translated text, such as fr or pt-BR. Omit for the shop's default language.

## Returns

- `default_per_variant` (null): The same quantity limit for every variant, copied onto each one when set. Null when there is none.
- `display_style` (string): How shoppers see the limit: none, disclaimer (remaining units in the disclaimer line) or progress_bar. One of: `none`, `disclaimer`, `progress_bar`.
- `limit_text` (string): Text printed with the remaining-units count.
- `show_icons` (boolean): Whether the widget uses icons for quantity and shipping details.
- `progress_bar` (object): Look and text of the storefront progress bar toward the quantity limit.
  - `progress_text` (string): Progress bar text.
  - `fill_color` (string): Bar fill color, as hex.
  - `background_color` (string): Bar background color, as hex.
  - `box_background_color` (null): Color behind the bar, as hex. Null uses the disclaimer background.
  - `text_color` (string): Bar text color, as hex.
  - `border_radius` (integer): Bar corner radius in pixels.
  - `show_percentage` (boolean): Whether a percentage shows next to the bar.
- `order_tags` (array of strings): Tags Shopify puts on orders containing this offer.
- `terms` (object): The terms checkbox shoppers accept before preordering.
  - `require_acceptance` (boolean): Whether shoppers must accept the terms before preordering.
  - `terms_text` (string): Wording beside the terms checkbox.
  - `disable_button_until_accepted` (boolean): Whether the button stays disabled until the terms are accepted.
  - `record_acceptance` (boolean): Whether acceptance is recorded as a cart line property.
  - `acceptance_label` (string): Label of the cart line property that records acceptance.
- `cart` (object): Whether a cart can mix preorder and regular items, and the error shown when it cannot.
  - `allowed_items` (string): mixed lets a cart hold preorder and regular items; preorder_only blocks the mix at checkout. One of: `mixed`, `preorder_only`.
  - `error_message` (string): Error shown when a blocked mixed cart reaches checkout.
- `order_quantity` (object): Minimum and maximum quantity per order.
  - `minimum` (null): Minimum quantity per order. Null when there is none.
  - `maximum` (null): Maximum quantity per order. Null when there is none.

Rate limit: this call costs 1 point ([rate limits](https://docs.stoqapp.com/docs/rate-limits/)).

## Examples

### Get limits

```sh
curl "https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/limits" \
  -H "X-Auth-Token: $STOQ_API_KEY"
```

### Get limits filtered by locale

```sh
curl "https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/limits?locale=fr" \
  -H "X-Auth-Token: $STOQ_API_KEY"
```

## 200

Success: the requested resource.

```json
{
  "default_per_variant": null,
  "display_style": "none",
  "limit_text": "string",
  "show_icons": true,
  "progress_bar": {
    "progress_text": "string",
    "fill_color": "string",
    "background_color": "string",
    "box_background_color": null,
    "text_color": "string",
    "border_radius": 1,
    "show_percentage": true
  },
  "order_tags": [
    "string"
  ],
  "terms": {
    "require_acceptance": true,
    "terms_text": "string",
    "disable_button_until_accepted": true,
    "record_acceptance": true,
    "acceptance_label": "string"
  },
  "cart": {
    "allowed_items": "mixed",
    "error_message": "string"
  },
  "order_quantity": {
    "minimum": null,
    "maximum": null
  }
}
```

## 401

Missing or invalid `X-Auth-Token`.

```json
{
  "errors": [
    "Invalid API key"
  ],
  "code": "auth_invalid",
  "details": [
    {
      "code": "auth_invalid",
      "message": "Invalid API key",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

## 404

The resource does not exist for this shop, or the action path is not registered.

```json
{
  "errors": [
    "Offer not found"
  ],
  "code": "not_found",
  "details": [
    {
      "code": "not_found",
      "message": "Offer not found",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

## 422

The request failed validation.

```json
{
  "errors": [
    "name is required"
  ],
  "code": "validation_failed",
  "details": [
    {
      "code": "validation_failed",
      "message": "name is required",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

## 429

Rate limited: cost-weighted per token (read 1, write 2; 360 points / 60s). Check `Retry-After`.

```json
{
  "errors": [
    "Rate limit exceeded"
  ],
  "code": "rate_limited",
  "details": [
    {
      "code": "rate_limited",
      "message": "Rate limit exceeded",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

