Skip to content

Resolve shop entities

API v2 is in public beta: endpoints and fields can change before general availability. See the changelog

GET/account/entities/resolve

Costs 1 rate-limit point · Rate limits

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

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.

Also searched asresolve entitiesfind record idlookup product offer customer ordername to idresolve candidate

Query parameters

  • candidatesarray

    1 to 12 candidate strings (names, SKUs, emails, order numbers, URLs, or IDs) to resolve; a comma-separated string also works.

  • offer_idstring

    Optional preorder offer ID to narrow variant matches to variants attached to that offer.

  • shopify_product_idstring

    Optional Shopify product ID or GID to narrow variant matches to that product.

Returns

  • candidatesarray of objects
    Show 3 child attributesHide child attributes
    • textstring
      Example: string
    • matchesarray of objects
      Show 8 child attributesHide child attributes
      • kindstring
        Example: string
      • idstring
        Example: string
      • namestring
        Example: string
      • matchstring
        Example: string
      • extraobject
        Show 4 child attributesHide child attributes
        • shopify_product_idstring
        • product_namestring
        • variant_titlestring
        • skustring
      • app_pathstring
        Example: string
      • shopify_variant_idstring
        Example: string
      • shopify_product_idstring
        Example: string
    • ambiguousboolean
      Example: true

Errors

403
forbidden

The credential is valid, but the store's plan or settings do not allow this operation.

403
plan_required

The change uses a feature that is only available on a paid STOQ plan. Connecting a paid-only integration returns 403; a write that sets paid-only fields returns 422 and saves nothing.

404
not_found

The path is valid but nothing with that id exists in this store.

422
invalid_params

One or more fields failed the action's schema.

422
use_key_link

Through an assistant or MCP, a third-party API key would pass through a model, so STOQ refuses it and returns the dashboard link where the merchant enters it.

422
validation_failed

The request failed validation.

503
upstream_unavailable

A service the answer depends on did not respond in time.

Any request can also fail with auth_invalid (401) or rate_limited (429).

Every error has the same shape: see Errors and the list of error codes.

GET/account/entities/resolve
curl "https://app.stoqapp.com/api/v2/external/account/entities/resolve" \
  -H "X-Auth-Token: $STOQ_API_KEY"
Response
{
  "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
    }
  ]
}