---
title: "Resolve shop entities"
description: "Resolve candidate names, SKUs, emails, order numbers, URLs, or IDs to typed shop records (offers, products, variants, collections, templates, orders, and customers)."
url: https://docs.stoqapp.com/v2-reference/account-entities/resolve-shop-entities/
api: "API v2 reference"
method: GET
path: "/account/entities/resolve"
---

# Resolve shop entities

`GET https://app.stoqapp.com/api/v2/external/account/entities/resolve`

Resolve candidate names, SKUs, emails, order numbers, URLs, or IDs to typed shop records (offers, products, variants, collections, templates, orders, and customers).

**Note:** Pass 1 to 12 candidate strings in candidates (array or comma-separated). Optionally scope variant matching with offer_id or shopify_product_id. Shopify records return typed GIDs under shopify_product_id, shopify_variant_id, or shopify_collection_id; STOQ records (offers, orders, customers, templates) return id. Each candidate reports exact or fuzzy match quality and whether matches are ambiguous.

## Query parameters

- `candidates` (array): 1 to 12 candidate strings (names, SKUs, emails, order numbers, URLs, or IDs) to resolve; a comma-separated string also works.
- `offer_id` (string): Optional preorder offer ID to narrow variant matches to variants attached to that offer.
- `shopify_product_id` (string): Optional Shopify product ID or GID to narrow variant matches to that product.

## Returns

- `candidates` (array of objects)
  - `text` (string): e.g. `string`
  - `matches` (array of objects)
    - `kind` (string): e.g. `string`
    - `id` (string): e.g. `string`
    - `name` (string): e.g. `string`
    - `match` (string): e.g. `string`
    - `extra` (object)
      - `shopify_product_id` (string)
      - `product_name` (string)
      - `variant_title` (string)
      - `sku` (string)
    - `app_path` (string): e.g. `string`
    - `shopify_variant_id` (string): e.g. `string`
    - `shopify_product_id` (string): e.g. `string`
  - `ambiguous` (boolean): e.g. `true`

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

## Examples

### Resolve shop entities

```sh
curl "https://app.stoqapp.com/api/v2/external/account/entities/resolve" \
  -H "X-Auth-Token: $STOQ_API_KEY"
```

### Resolve shop entities filtered by candidates and shopify_product_id

```sh
curl "https://app.stoqapp.com/api/v2/external/account/entities/resolve?candidates=2026-07-01T00%3A00%3A00Z&shopify_product_id=78000000001" \
  -H "X-Auth-Token: $STOQ_API_KEY"
```

## 200

Success: the requested resource.

```json
{
  "candidates": [
    {
      "text": "string",
      "matches": [
        {
          "kind": "string",
          "id": "string",
          "name": "string",
          "match": "string",
          "extra": {
            "shopify_product_id": null,
            "product_name": null,
            "variant_title": null,
            "sku": null
          },
          "app_path": "string",
          "shopify_variant_id": "string",
          "shopify_product_id": "string"
        }
      ],
      "ambiguous": true
    }
  ]
}
```

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

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

