Weight Versus Unit Menu Items
There are two different types of menu items you can create: weight-based and unit-based. You can think of this as working with menu items that have variants (weight) and those that don't (unit).
Weight-Based Menu Items
The most common type of weight-based menu item is flower. In this case, you may have multiple weight breakpoints you sell of that flower: 1g, 3.5g, 0.5 oz, and so on. It helps to then think of each of those breakpoints as a variant of the overall flower menu item. Same menu item, different options.
You would then create a weight-based menu item with the following request. Note the usage of the variants
attribute.
curl \
--request POST \
--url 'https://api-g.weedmaps.com/wm/v1/menu_items' \
--header 'accept: application/json' \
--header 'authorization: Bearer [ACCESS TOKEN HERE]' \
--header 'content-type: application/json' \
--data '{
"type": "menu_item",
"attributes": {
"name": "Pineapple Express",
"body": "The dopest dope you will ever smoke.",
"genetics": "hybrid",
"image_url": null,
"published": true,
"online_orderable": true,
"variants": [
{
"price": {
"amount": "17.06",
"currency": "USD"
},
"weight": {
"value": 1.0,
"unit": "g"
}
},
{
"price": {
"amount": "45.99",
"currency": "USD"
},
"weight": {
"value": 3.5,
"unit": "g"
}
},
{
"price": {
"amount": "374.22",
"currency": "USD"
},
"weight": {
"value": 1.0,
"unit": "oz"
}
}
]
},
"relationships": {
"menu": {
"data": {
"type": "menu",
"id": WMID_HERE
}
},
"categories": {
"data": [
{
"type": "category",
"id": "a780af3d-bdfe-41ce-a782-20f2519fd7be"
}
]
}
}
}'
Unit-Based Menu Items
You'll want to use unit-based menu items when you sell a single option of an item. This might be the case if you're selling a package of edibles or a vape pen.
The main difference between a weight-based and unit-based menu item is that you're no longer providing a variants
array, but rather providing a price
hash with a corresponding amount
and currency
.
curl \
--request POST \
--url 'https://api-g.weedmaps.com/wm/v1/menu_items' \
--header 'accept: application/json' \
--header 'authorization: Bearer [ACCESS TOKEN HERE]' \
--header 'content-type: application/json' \
--data '{
"type": "menu_item",
"attributes": {
"name": "Super Duper Gummies",
"body": "I am a gummy bear.",
"genetics": "hybrid",
"image_url": null,
"published": true,
"online_orderable": true,
"price": {
"amount": "29.96",
"currency": "USD"
},
},
"relationships": {
"menu": {
"data": {
"type": "menu",
"id": WMID_HERE
}
},
"categories": {
"data": [
{
"type": "category",
"id": "a780af3d-bdfe-41ce-a782-20f2519fd7be"
}
]
}
}
}'
Variants That Aren't Weight Based
Sometime you have a unit-based product that does have multiple variants/options to choose from. An example being a vape pen in multiple colors.
As of February 2021, the Menu API only handles variants that are weight-based. If you want to display a vape pen in multiple colors, you'd then need to create a unit-based menu item for each color. Each pen would then have its own page in the Weedmaps UI.
Updated over 1 year ago