Widget

Widget compliance check

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.

post/v1/widget/check

Request

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

Request body

api_keystring required

API key for widget authentication

substancestring required

Substance to check

product_typestring required

Product type to check

statestring

Two-letter state code (provide this or ip)

ipstring

IP address for geo-lookup (provide this or state)

Example request

{
  "api_key": "hda_live_sk_...",
  "substance": "delta-9-thc",
  "product_type": "edibles",
  "state": "CO",
  "ip": "24.130.45.67"
}

Response

Compliance check result

successboolean required
metaobject

Example response

{
  "success": true,
  "data": {
    "jurisdiction": "CO"
  },
  "errors": [
    {
      "code": "INVALID_STATE_CODE",
      "message": "Invalid state code: XX"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.