---
title: "Get markets"
description: "Read market scoping for a preorder offer."
url: https://docs.stoqapp.com/v2-reference/preorders-offers/get-markets/
api: "API v2 reference"
method: GET
path: "/preorders/offers/{id}/markets"
---

# Get markets

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

Read market scoping for a preorder offer.

**Note:** `scope` `all` (the default) applies the offer in every Shopify market, with `shopify_market_ids` empty. `selected` applies it only to shoppers in the listed markets. A market-scoped offer can't also sell in sequential batches. When attaching variants, [`POST /preorders/offers/:id/products/add_variants`](https://docs.stoqapp.com/v2-reference/preorders-offers/add-variants/) with `skip_variants_in_market_offers: true` leaves out variants a market-scoped offer already has. Edit with [`PATCH /preorders/offers/:id/markets`](https://docs.stoqapp.com/v2-reference/preorders-offers/update-markets/).

## Path parameters

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

## Returns

- `scope` (string): all applies the offer in every market; selected only in shopify_market_ids. One of: `all`, `selected`.
- `shopify_market_ids` (array of strings): Markets the offer applies in when scope is selected, as gid://shopify/Market/&lt;id&gt;. Empty when scope is all.

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

## Example request

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

## 200

Success: the requested resource.

```json
{
  "scope": "all",
  "shopify_market_ids": [
    "string"
  ]
}
```

## 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
    }
  ]
}
```

