---
title: "Widget compliance check"
method: POST
path: "/v1/widget/check"
tags: ["Widget"]
---

# Widget compliance check

`POST /v1/widget/check`

## Request

- Base URL: `https://api.hempdata.io`
- URL: `https://api.hempdata.io/v1/widget/check`
- Auth: none required

Lightweight compliance check designed for embeddable widgets. Determines whether a product can be sold in a given state. Accepts either a state code or an IP address for geo-lookup.

## Request body

- WidgetCheckRequest
  - `api_key` string, required: API key for widget authentication
  - `substance` string, required: Substance to check
  - `product_type` string, required: Product type to check
  - `state` string: Two-letter state code (provide this or ip)
  - `ip` string: IP address for geo-lookup (provide this or state)

## Response `200`

Compliance check result

- ApiResponseWidgetCheck
  - `success` boolean, required
  - `data` WidgetCheckResult, required
    - `allowed` boolean, required: Whether the product can be sold in this jurisdiction
    - `jurisdiction` string, required
    - `legal_status` 'legal' | 'restricted' | 'prohibited' | 'gray_area' | 'pending_change', required
    - `block_sale` boolean, required
    - `age_restriction` integer, nullable
    - `warning_text` string, nullable: Required warning text to display, if any
    - `plain_english` string, nullable: Human-readable summary
    - `confidence_score` number, required
    - `last_verified` string, date-time, required
  - `meta` object
  - `errors` ApiError[], nullable
    - `code` string, required: Machine-readable error code
    - `message` string, required: Human-readable error message
    - `field` string, nullable: Field that caused the error, if applicable

## Other responses

- `400`: Invalid request

---

[API](https://skmtc.dev/hempdata/apis/hempdata-api.md) · [All operations](https://skmtc.dev/hempdata/apis/hempdata-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hempdata/apis/hempdata-api/revisions/2c2946badd40?raw)
