Categorization and Tagging

This section has two primary goals. The first is to ensure that products are visible on Weedmaps by applying category tags. The second goal is to use discovery tags so that customers/patients can search, filter, and find products more easily. Listings can optimize their menus with Weedmaps Taxonomy, which provides a way for them to categorize and tag their products.

Tags are added to menu items to make them more searchable to customers. Weedmaps does auto-tagging on menu items based on the product name, though that may not always associate the tags you necessarily want.

There are two main types of tags you'll encounter for menu items: category tags and discovery tags. We refer to these as categories and tags respectively. Categories classify menu items based on their form: infused preroll, nug run shatter, cookies, and so on. Tags describe all other characteristics of said item: sweet, uplifting, sativa-dominant, and so forth.

In the Weedmaps UI, listings get a flat representation of all available categories, along with their parent and group. Categories are commonly presented as a select list, or a collection of radio buttons, as shown below.

653653

Associating to Menu Items

There are two steps you need to take in order to associate a given tag or category to a menu item. The first of which is to locate the tag you're attempting to associate. If we were trying to find the "Uplifted" tag for our menu item, our request would look something like the following:

curl \
  --request GET \
  --url 'https://api-g.weedmaps.com/wm/v1/tag_groups?include_tags=true' \
  --header 'accept: application/json' \
  --header 'authorization: Bearer [ACCESS TOKEN HERE]'
{
  "data": [
    {
      "id": "3af5e12c-e227-425b-9e49-b18831160da1",
      "type": "tag_group",
      "name": "Conditions",
      "relationships": {
        "tags": [
          {
            "id": "f060ef25-91da-4f3f-8206-9324de429e5c",
            "type": "tag",
            "name": "ADD/ADHD"
          },
          {
            "id": "97839c30-76ff-4507-9a02-b89d0e476578",
            "type": "tag",
            "name": "Alzheimer's"
          },
          {
            "id": "fc44b605-cbc2-4dbb-b5c7-aee31a0c2223",
            "type": "tag",
            "name": "Anorexia"
          },
          {
            "id": "ff114972-0e51-446b-9fd0-9e83328b95f1",
            "type": "tag",
            "name": "Anxiety"
          },
          {
            "id": "06821bcc-5ae9-46ec-bed8-2155c1fa9f2f",
            "type": "tag",
            "name": "Arthritis"
          },
          {
            "id": "45985c36-779d-427e-96b5-4a2e96104770",
            "type": "tag",
            "name": "Asthma"
          },
          {
            "id": "aca874a5-bd37-43d7-9cb2-694db8af70a3",
            "type": "tag",
            "name": "Bipolar Disorder"
          },
          {
            "id": "44f8fc1b-6da7-4147-bd0e-76851939c23b",
            "type": "tag",
            "name": "Cachexia"
          },
          {
            "id": "e04e4992-b06f-40f5-be8a-2f23346584b9",
            "type": "tag",
            "name": "Cancer"
          },
          {
            "id": "38ed1dcd-9903-4ab4-a188-6a0513d93d51",
            "type": "tag",
            "name": "Crohn's Disease"
          },
          {
            "id": "93b6c70b-1148-4927-96c8-7faebff32d98",
            "type": "tag",
            "name": "Epilepsy"
          },
          {
            "id": "3881a622-7ef5-4dfd-a2b6-e057fe224206",
            "type": "tag",
            "name": "Fibromyalgia"
          },
          {
            "id": "c390016e-2079-4372-a199-d336fe466a4d",
            "type": "tag",
            "name": "Gastrointestinal Disorder"
          },
          {
            "id": "e1b3860b-0642-4ec1-b9ac-61005c8f93b3",
            "type": "tag",
            "name": "Glaucoma"
          },
          {
            "id": "52e01d7e-eb3e-422c-9c53-cbdc7112380f",
            "type": "tag",
            "name": "HIV/AIDS"
          },
          {
            "id": "d22ad44b-6e62-4a53-a8aa-66e4621e46a3",
            "type": "tag",
            "name": "Hypertension"
          },
          {
            "id": "7d64fe69-1c86-47fb-84a3-4324e9044718",
            "type": "tag",
            "name": "Migraines"
          },
          {
            "id": "97b9229a-6a5e-4398-815b-84c30d24b979",
            "type": "tag",
            "name": "Multiple Sclerosis"
          },
          {
            "id": "98cdd096-b1fb-4c13-8568-b55360a70644",
            "type": "tag",
            "name": "Muscular Dystrophy"
          },
          {
            "id": "29e60eb6-3e99-46cc-9bb9-5d0f5f255357",
            "type": "tag",
            "name": "Parkinson's"
          },
          {
            "id": "90dc7790-3efd-4349-9cb9-1b95b46e4e44",
            "type": "tag",
            "name": "Phantom Limb Pain"
          },
          {
            "id": "847238f7-bf50-437b-9848-d8dd7f778230",
            "type": "tag",
            "name": "PMS"
          },
          {
            "id": "36a1c837-9570-4867-b879-80a222c92586",
            "type": "tag",
            "name": "PTSD"
          },
          {
            "id": "82efe384-04cd-4871-b0b2-a2a9fbbf3142",
            "type": "tag",
            "name": "Spinal Cord Injury"
          },
          {
            "id": "3b683250-c359-485a-a2d1-551fbcfc675a",
            "type": "tag",
            "name": "Tinnitus"
          },
          {
            "id": "05ead1c6-4af9-4203-8236-7cc56a847a10",
            "type": "tag",
            "name": "Tourette's Syndrome"
          }
        ]
      }
    },
    {
      "id": "3b385e1c-7b39-4cc5-8d0f-a4a7412ef57e",
      "type": "tag_group",
      "name": "Effects",
      "relationships": {
        "tags": [
          {
            "id": "d81a933b-fce8-4b97-b393-13c95de15a7e",
            "type": "tag",
            "name": "Aroused"
          },
          {
            "id": "19f7ac7b-ffb0-4009-b2d0-a493efaa7dd5",
            "type": "tag",
            "name": "Creative"
          },
          {
            "id": "134d74f7-944e-4bd6-9108-e8f87d03ec90",
            "type": "tag",
            "name": "Energetic"
          },
          {
            "id": "7be809dd-648e-4f9c-af7f-ffc70a079066",
            "type": "tag",
            "name": "Euphoric"
          },
          {
            "id": "19823980-34c1-4689-92e3-5ef7866c1b76",
            "type": "tag",
            "name": "Focused"
          },
          {
            "id": "8769e57c-6dac-42a8-9a67-36cca36cc0dc",
            "type": "tag",
            "name": "Giggly"
          },
          {
            "id": "26cb0214-8165-42eb-8941-9718b9a5680e",
            "type": "tag",
            "name": "Happy"
          },
          {
            "id": "532eb8d6-ccfa-4ca8-95f4-4b9386ee9575",
            "type": "tag",
            "name": "Hungry"
          },
          {
            "id": "69b03eea-8b05-4d77-83b3-d796b7b0525e",
            "type": "tag",
            "name": "Relaxed"
          },
          {
            "id": "79b2d842-1197-448e-b74a-41fd13c2cb27",
            "type": "tag",
            "name": "Sleepy"
          },
          {
            "id": "77df41f0-f1c7-4a11-8553-260074e5c8e5",
            "type": "tag",
            "name": "Talkative"
          },
          {
            "id": "d4aab54e-1407-4b4c-bc1a-13b6c01dbe62",
            "type": "tag",
            "name": "Tingly"
          },
          {
            "id": "59421d5b-91e7-45ac-843a-551975f0ac6f",
            "type": "tag",
            "name": "Uplifted"
          }
        ]
      }
    },
    {
      "id": "a4ee47ca-df5f-4970-95cd-ecda79748a56",
      "type": "tag_group",
      "name": "Symptoms",
      "relationships": {
        "tags": [
          {
            "id": "899779af-3cfd-4c0b-a541-8b39622336d0",
            "type": "tag",
            "name": "Cramping"
          },
          {
            "id": "5633df1d-be10-4b3a-b0e4-2281981b48c7",
            "type": "tag",
            "name": "Depression"
          },
          {
            "id": "74f249a4-3b75-4f2c-97d0-364075dc72d0",
            "type": "tag",
            "name": "Eye Pressure"
          },
          {
            "id": "76e4fa07-9bfc-4e5b-b97c-ddfaccba25eb",
            "type": "tag",
            "name": "Fatigue"
          },
          {
            "id": "b0573030-92a8-4ead-b1f1-be4230aef8a4",
            "type": "tag",
            "name": "Headache"
          },
          {
            "id": "1e63c902-e716-415e-9c6d-6d832f83c79b",
            "type": "tag",
            "name": "Inflammation"
          },
          {
            "id": "33f5b141-146d-41ed-846c-0c58f1f0ea2b",
            "type": "tag",
            "name": "Insomnia"
          },
          {
            "id": "da5942e0-4b3b-46e7-b269-18a7967f7636",
            "type": "tag",
            "name": "Lack Of Appetite"
          },
          {
            "id": "14094944-0449-4b00-bc18-2122135f8cc2",
            "type": "tag",
            "name": "Menstrual Pain"
          },
          {
            "id": "61ebfa12-c372-49cc-88ed-3ef190df1c5e",
            "type": "tag",
            "name": "Muscle Spasm"
          },
          {
            "id": "2e561b72-f3c1-426f-9388-c649e12890d5",
            "type": "tag",
            "name": "Nausea"
          },
          {
            "id": "df8501b2-35cb-45bf-90b3-f027e3075f9f",
            "type": "tag",
            "name": "Pain"
          },
          {
            "id": "7ed0308e-c9bf-45c8-8d24-202dc87326ef",
            "type": "tag",
            "name": "Seizure"
          },
          {
            "id": "4a653911-138c-4589-a249-c9b1c2f56901",
            "type": "tag",
            "name": "Spasticity"
          },
          {
            "id": "c436ee20-9ef5-467d-9608-24a8bfef9f5e",
            "type": "tag",
            "name": "Stress"
          }
        ]
      }
    }
  ]
}

Once you have the tag or tags you would like to associate to a menu item, you can pass them in the "relationships" portion of the request body.

🚧

The Entire Category/Tag Tree Must Be Provided

In this example, "Uplifted" is part of the "Effects" tag. If you're providing a sub-category/tag for a menu item, you must also provide its parent category/tag.

The fastest way to determine if a category has a parent is to look at the parent_id in the API response for said category. If it is present, that category has a parent; otherwise, it is the parent.

When it comes to tags, the response is already returned in the proper grouping. You should then locate the tag within the appropriate group and provide any relevant parent.

curl \
  --request PATCH \
  --url 'https://api-g.weedmaps.com/wm/v1/menu_items/1234' \
  --header 'accept: application/json' \
  --header 'authorization: Bearer [ACCESS TOKEN HERE]' \
  --header 'content-type: application/json' \
  --data '{
    "id": 1234,
    "type": "menu_item",
    "relationships": {
      "tags": {
        "data": [
          {
            "type": "tag",
            "id": "3b385e1c-7b39-4cc5-8d0f-a4a7412ef57e"
          },
          {
            "type": "tag",
            "id": "59421d5b-91e7-45ac-843a-551975f0ac6f"
          },
        ]
      }
    }
  }'

Admittedly, it can be difficult for your system to find what it's looking for, as it needs to filter through each group's associations and perform the tag match manually. There has to be a better way, right?

Caching of Categories and Tags

The returned tags shown in the previous example is just a small subset of what's available. As available categories and tags are the same for all listings and change infrequently, we recommend caching the results of this request for a reasonable amount of time, where it makes sense to do so for your application.