curl --request POST \
--url https://api-staging.getmeadow.com/api/v1/products \
--header 'Content-Type: application/json' \
--header 'X-Client-Key: <api-key>' \
--header 'X-Consumer-Key: <api-key>' \
--data '
{
"name": "Blue Dream",
"unit": "gram",
"strainType": "hybrid-sativa",
"category": "Flower",
"subCategories": [
"Top Shelf"
],
"brandName": "Awesome Cannabis",
"photos": [
"https://meadow.imgix.net/2024/10/1aef02cf-9150-481e-9625-760693b4186b.jpeg",
"https://meadow.imgix.net/2022/11/67de83f8-1d72-4713-991a-87c3b29d4e93.jpeg"
],
"options": [
{
"name": "Eighth",
"amount": 3.5,
"price": 4500,
"content": "3.5"
}
]
}
'import requests
url = "https://api-staging.getmeadow.com/api/v1/products"
payload = {
"name": "Blue Dream",
"unit": "gram",
"strainType": "hybrid-sativa",
"category": "Flower",
"subCategories": ["Top Shelf"],
"brandName": "Awesome Cannabis",
"photos": ["https://meadow.imgix.net/2024/10/1aef02cf-9150-481e-9625-760693b4186b.jpeg", "https://meadow.imgix.net/2022/11/67de83f8-1d72-4713-991a-87c3b29d4e93.jpeg"],
"options": [
{
"name": "Eighth",
"amount": 3.5,
"price": 4500,
"content": "3.5"
}
]
}
headers = {
"X-Consumer-Key": "<api-key>",
"X-Client-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Consumer-Key': '<api-key>',
'X-Client-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Blue Dream',
unit: 'gram',
strainType: 'hybrid-sativa',
category: 'Flower',
subCategories: ['Top Shelf'],
brandName: 'Awesome Cannabis',
photos: [
'https://meadow.imgix.net/2024/10/1aef02cf-9150-481e-9625-760693b4186b.jpeg',
'https://meadow.imgix.net/2022/11/67de83f8-1d72-4713-991a-87c3b29d4e93.jpeg'
],
options: [{name: 'Eighth', amount: 3.5, price: 4500, content: '3.5'}]
})
};
fetch('https://api-staging.getmeadow.com/api/v1/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-staging.getmeadow.com/api/v1/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Blue Dream',
'unit' => 'gram',
'strainType' => 'hybrid-sativa',
'category' => 'Flower',
'subCategories' => [
'Top Shelf'
],
'brandName' => 'Awesome Cannabis',
'photos' => [
'https://meadow.imgix.net/2024/10/1aef02cf-9150-481e-9625-760693b4186b.jpeg',
'https://meadow.imgix.net/2022/11/67de83f8-1d72-4713-991a-87c3b29d4e93.jpeg'
],
'options' => [
[
'name' => 'Eighth',
'amount' => 3.5,
'price' => 4500,
'content' => '3.5'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Client-Key: <api-key>",
"X-Consumer-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-staging.getmeadow.com/api/v1/products"
payload := strings.NewReader("{\n \"name\": \"Blue Dream\",\n \"unit\": \"gram\",\n \"strainType\": \"hybrid-sativa\",\n \"category\": \"Flower\",\n \"subCategories\": [\n \"Top Shelf\"\n ],\n \"brandName\": \"Awesome Cannabis\",\n \"photos\": [\n \"https://meadow.imgix.net/2024/10/1aef02cf-9150-481e-9625-760693b4186b.jpeg\",\n \"https://meadow.imgix.net/2022/11/67de83f8-1d72-4713-991a-87c3b29d4e93.jpeg\"\n ],\n \"options\": [\n {\n \"name\": \"Eighth\",\n \"amount\": 3.5,\n \"price\": 4500,\n \"content\": \"3.5\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Consumer-Key", "<api-key>")
req.Header.Add("X-Client-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-staging.getmeadow.com/api/v1/products")
.header("X-Consumer-Key", "<api-key>")
.header("X-Client-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Blue Dream\",\n \"unit\": \"gram\",\n \"strainType\": \"hybrid-sativa\",\n \"category\": \"Flower\",\n \"subCategories\": [\n \"Top Shelf\"\n ],\n \"brandName\": \"Awesome Cannabis\",\n \"photos\": [\n \"https://meadow.imgix.net/2024/10/1aef02cf-9150-481e-9625-760693b4186b.jpeg\",\n \"https://meadow.imgix.net/2022/11/67de83f8-1d72-4713-991a-87c3b29d4e93.jpeg\"\n ],\n \"options\": [\n {\n \"name\": \"Eighth\",\n \"amount\": 3.5,\n \"price\": 4500,\n \"content\": \"3.5\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.getmeadow.com/api/v1/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Consumer-Key"] = '<api-key>'
request["X-Client-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Blue Dream\",\n \"unit\": \"gram\",\n \"strainType\": \"hybrid-sativa\",\n \"category\": \"Flower\",\n \"subCategories\": [\n \"Top Shelf\"\n ],\n \"brandName\": \"Awesome Cannabis\",\n \"photos\": [\n \"https://meadow.imgix.net/2024/10/1aef02cf-9150-481e-9625-760693b4186b.jpeg\",\n \"https://meadow.imgix.net/2022/11/67de83f8-1d72-4713-991a-87c3b29d4e93.jpeg\"\n ],\n \"options\": [\n {\n \"name\": \"Eighth\",\n \"amount\": 3.5,\n \"price\": 4500,\n \"content\": \"3.5\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 11867,
"organizationId": 25,
"brand": {
"id": 2238,
"name": "Awesome Cannabis",
"createdAt": "2024-12-12T03:08:58.012Z",
"updatedAt": "2024-12-12T03:08:58.012Z",
"description": null
},
"subCategories": [
{
"id": 30325,
"organizationId": 25,
"name": "Top Shelf",
"createdAt": "2024-12-12T03:01:11.823Z",
"updatedAt": "2024-12-12T03:01:11.823Z"
}
],
"inventoryType": "option",
"createdAt": "2024-12-12T04:08:00.429Z",
"updatedAt": "2024-12-12T04:08:00.429Z",
"isActive": false,
"isFeatured": false,
"photos": [
"https://meadow.imgix.net/2024/10/1aef02cf-9150-481e-9625-760693b4186b.jpeg",
"https://meadow.imgix.net/2022/11/67de83f8-1d72-4713-991a-87c3b29d4e93.jpeg"
],
"name": "Blue Dream",
"strainType": "hybrid-sativa",
"isCompliant": true,
"unit": "gram",
"primaryCategory": {
"id": 286,
"name": "Flower",
"createdAt": "2023-12-16T02:51:28.738Z",
"updatedAt": "2023-12-16T02:51:28.738Z",
"cannabisType": "non-concentrated"
},
"options": [
{
"id": 15472,
"name": "Eighth",
"amount": 3.5,
"price": 4500,
"salesPrice": null,
"createdAt": "2024-12-12T04:08:00.433Z",
"updatedAt": "2024-12-12T04:08:00.433Z",
"upc": null,
"content": "3.5"
}
],
"thcAmount": "12",
"thcAmountEach": "12",
"thcAmountRangeLow": null,
"thcAmountRangeHigh": null,
"thcUnit": "mg",
"cbdAmount": null,
"cbdAmountEach": null,
"cbdAmountRangeLow": null,
"cbdAmountRangeHigh": null,
"cbdUnit": null
}
}{
"error": {
"message": "A description of the error code",
"code": "CODE_OF_ERROR_WILL_BE_HERE"
}
}Create a product
curl --request POST \
--url https://api-staging.getmeadow.com/api/v1/products \
--header 'Content-Type: application/json' \
--header 'X-Client-Key: <api-key>' \
--header 'X-Consumer-Key: <api-key>' \
--data '
{
"name": "Blue Dream",
"unit": "gram",
"strainType": "hybrid-sativa",
"category": "Flower",
"subCategories": [
"Top Shelf"
],
"brandName": "Awesome Cannabis",
"photos": [
"https://meadow.imgix.net/2024/10/1aef02cf-9150-481e-9625-760693b4186b.jpeg",
"https://meadow.imgix.net/2022/11/67de83f8-1d72-4713-991a-87c3b29d4e93.jpeg"
],
"options": [
{
"name": "Eighth",
"amount": 3.5,
"price": 4500,
"content": "3.5"
}
]
}
'import requests
url = "https://api-staging.getmeadow.com/api/v1/products"
payload = {
"name": "Blue Dream",
"unit": "gram",
"strainType": "hybrid-sativa",
"category": "Flower",
"subCategories": ["Top Shelf"],
"brandName": "Awesome Cannabis",
"photos": ["https://meadow.imgix.net/2024/10/1aef02cf-9150-481e-9625-760693b4186b.jpeg", "https://meadow.imgix.net/2022/11/67de83f8-1d72-4713-991a-87c3b29d4e93.jpeg"],
"options": [
{
"name": "Eighth",
"amount": 3.5,
"price": 4500,
"content": "3.5"
}
]
}
headers = {
"X-Consumer-Key": "<api-key>",
"X-Client-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Consumer-Key': '<api-key>',
'X-Client-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Blue Dream',
unit: 'gram',
strainType: 'hybrid-sativa',
category: 'Flower',
subCategories: ['Top Shelf'],
brandName: 'Awesome Cannabis',
photos: [
'https://meadow.imgix.net/2024/10/1aef02cf-9150-481e-9625-760693b4186b.jpeg',
'https://meadow.imgix.net/2022/11/67de83f8-1d72-4713-991a-87c3b29d4e93.jpeg'
],
options: [{name: 'Eighth', amount: 3.5, price: 4500, content: '3.5'}]
})
};
fetch('https://api-staging.getmeadow.com/api/v1/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-staging.getmeadow.com/api/v1/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Blue Dream',
'unit' => 'gram',
'strainType' => 'hybrid-sativa',
'category' => 'Flower',
'subCategories' => [
'Top Shelf'
],
'brandName' => 'Awesome Cannabis',
'photos' => [
'https://meadow.imgix.net/2024/10/1aef02cf-9150-481e-9625-760693b4186b.jpeg',
'https://meadow.imgix.net/2022/11/67de83f8-1d72-4713-991a-87c3b29d4e93.jpeg'
],
'options' => [
[
'name' => 'Eighth',
'amount' => 3.5,
'price' => 4500,
'content' => '3.5'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Client-Key: <api-key>",
"X-Consumer-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-staging.getmeadow.com/api/v1/products"
payload := strings.NewReader("{\n \"name\": \"Blue Dream\",\n \"unit\": \"gram\",\n \"strainType\": \"hybrid-sativa\",\n \"category\": \"Flower\",\n \"subCategories\": [\n \"Top Shelf\"\n ],\n \"brandName\": \"Awesome Cannabis\",\n \"photos\": [\n \"https://meadow.imgix.net/2024/10/1aef02cf-9150-481e-9625-760693b4186b.jpeg\",\n \"https://meadow.imgix.net/2022/11/67de83f8-1d72-4713-991a-87c3b29d4e93.jpeg\"\n ],\n \"options\": [\n {\n \"name\": \"Eighth\",\n \"amount\": 3.5,\n \"price\": 4500,\n \"content\": \"3.5\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Consumer-Key", "<api-key>")
req.Header.Add("X-Client-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-staging.getmeadow.com/api/v1/products")
.header("X-Consumer-Key", "<api-key>")
.header("X-Client-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Blue Dream\",\n \"unit\": \"gram\",\n \"strainType\": \"hybrid-sativa\",\n \"category\": \"Flower\",\n \"subCategories\": [\n \"Top Shelf\"\n ],\n \"brandName\": \"Awesome Cannabis\",\n \"photos\": [\n \"https://meadow.imgix.net/2024/10/1aef02cf-9150-481e-9625-760693b4186b.jpeg\",\n \"https://meadow.imgix.net/2022/11/67de83f8-1d72-4713-991a-87c3b29d4e93.jpeg\"\n ],\n \"options\": [\n {\n \"name\": \"Eighth\",\n \"amount\": 3.5,\n \"price\": 4500,\n \"content\": \"3.5\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.getmeadow.com/api/v1/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Consumer-Key"] = '<api-key>'
request["X-Client-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Blue Dream\",\n \"unit\": \"gram\",\n \"strainType\": \"hybrid-sativa\",\n \"category\": \"Flower\",\n \"subCategories\": [\n \"Top Shelf\"\n ],\n \"brandName\": \"Awesome Cannabis\",\n \"photos\": [\n \"https://meadow.imgix.net/2024/10/1aef02cf-9150-481e-9625-760693b4186b.jpeg\",\n \"https://meadow.imgix.net/2022/11/67de83f8-1d72-4713-991a-87c3b29d4e93.jpeg\"\n ],\n \"options\": [\n {\n \"name\": \"Eighth\",\n \"amount\": 3.5,\n \"price\": 4500,\n \"content\": \"3.5\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 11867,
"organizationId": 25,
"brand": {
"id": 2238,
"name": "Awesome Cannabis",
"createdAt": "2024-12-12T03:08:58.012Z",
"updatedAt": "2024-12-12T03:08:58.012Z",
"description": null
},
"subCategories": [
{
"id": 30325,
"organizationId": 25,
"name": "Top Shelf",
"createdAt": "2024-12-12T03:01:11.823Z",
"updatedAt": "2024-12-12T03:01:11.823Z"
}
],
"inventoryType": "option",
"createdAt": "2024-12-12T04:08:00.429Z",
"updatedAt": "2024-12-12T04:08:00.429Z",
"isActive": false,
"isFeatured": false,
"photos": [
"https://meadow.imgix.net/2024/10/1aef02cf-9150-481e-9625-760693b4186b.jpeg",
"https://meadow.imgix.net/2022/11/67de83f8-1d72-4713-991a-87c3b29d4e93.jpeg"
],
"name": "Blue Dream",
"strainType": "hybrid-sativa",
"isCompliant": true,
"unit": "gram",
"primaryCategory": {
"id": 286,
"name": "Flower",
"createdAt": "2023-12-16T02:51:28.738Z",
"updatedAt": "2023-12-16T02:51:28.738Z",
"cannabisType": "non-concentrated"
},
"options": [
{
"id": 15472,
"name": "Eighth",
"amount": 3.5,
"price": 4500,
"salesPrice": null,
"createdAt": "2024-12-12T04:08:00.433Z",
"updatedAt": "2024-12-12T04:08:00.433Z",
"upc": null,
"content": "3.5"
}
],
"thcAmount": "12",
"thcAmountEach": "12",
"thcAmountRangeLow": null,
"thcAmountRangeHigh": null,
"thcUnit": "mg",
"cbdAmount": null,
"cbdAmountEach": null,
"cbdAmountRangeLow": null,
"cbdAmountRangeHigh": null,
"cbdUnit": null
}
}{
"error": {
"message": "A description of the error code",
"code": "CODE_OF_ERROR_WILL_BE_HERE"
}
}Authorizations
The key assigned to your company and provided via Meadow
The key generated and provided by our mutual client
Body
The name of the product, excluding any brand names.
Set to gram when this product is in a category which is weighed out (i.e. "Flowers"), otherwise set to item
gram, item The strain type of the cannabis product, none otherwise.
sativa, indica, hybrid, hybrid-sativa, hybrid-indica, cbd, mixed, none A category name from the List categories endpoint. Please note that different client organizations may customize category names, for example renaming "Flowers" to "Flower."
A list of sub category names from the List sub-categories endpoint, or a new sub category name. Pass an empty array [] to have no sub categories.
URLs for the image to associate with this product. Meadow will download with a background job. Max photo size is 15MB.
The purchaseable options of this product
Hide child attributes
Hide child attributes
The amount of the underlying unit of this product. When inventoryType is set to product, this will be how much inventory is taken out for each quantity of this option purchased. When inventoryType is set to option, this value is only used to describe the product on the menu. For example, 3.5 for an Eighth or 1 for a single vape cartridge.
The price of this option in cents.
The optional name for this option. When name is not specified, it will show up on the menu as "1 item" or "3.5 grams" using the amount of the option and the unit of the product.
The discounted sales price of this option in cents if one exists.
The amount of cannabis content this option has based on the cannabisType field from the product category. Based on the cannabisType this value should be sent as a numeric string based on the following unit:
non-concentrated- grams (g)concentrated- milligrams (mg)mi-infused-solids- ounces (oz)mi-infused-fluids- fluid ounces (fl oz)edibles- milligrams (mg)immature-plant- plants (i.e. # of plants)
When the category's cannabisType is set to none, you do not need to send a value. For all other types, the values must be greater than 0.
A UPC code for this option
A description for the product shown on menus. (Supports markdown)
The brand of the product. Meadow will match this to an existing brand or create a new brand if it does not exist.
The total amount of THC present in this product
The amount of THC per each unit of the product (i.e. 10mg per pre-roll in a pack of 15 pre-rolls)
The low value of a range if this product has a range of THC value.
The high value of a range if this product has a range of THC value.
The unit for the THC values submitted. Must be specified if any of the THC amount fields are provided.
%, mg The total amount of CBD present in this product
The amount of CBD per each unit of the product (i.e. 10mg per pre-roll in a pack of 15 pre-rolls)
The low value of a range if this product has a range of CBD value.
The high value of a range if this product has a range of CBD value.
The unit for the CBD values submitted. Must be specified if any of the CBD amount fields are provided.
%, mg Response
Create product response
The ID of the new product
The client organization's ID
The name of the product
The description of the product
Either gram or item
Whether this product is shown on the menu. Client organizations must update this via Meadow.
Whether this product is shown as featured. Client organizations must update this via Meadow.
The category of this product
Hide child attributes
Hide child attributes
Photo URLs submitted in the request
The purchaseable options for this product
Hide child attributes
Hide child attributes
The ID of this option
The name of this option
The price of this option in cents
The sales price of this option in cents
The cannabis content of this option
The UPC for this option
The total amount of THC present in this product
The amount of THC per each unit of the product (i.e. 10mg per pre-roll in a pack of 15 pre-rolls)
The low value of a range if this product has a range of THC value.
The high value of a range if this product has a range of THC value.
The unit for the THC values submitted.
%, mg The total amount of CBD present in this product
The amount of CBD per each unit of the product (i.e. 10mg per pre-roll in a pack of 15 pre-rolls)
The low value of a range if this product has a range of CBD value.
The high value of a range if this product has a range of CBD value.
The unit for the CBD values submitted.
%, mg 
