curl --request PUT \
--url https://api-staging.getmeadow.com/api/v1/products/{productId}/options \
--header 'Content-Type: application/json' \
--header 'X-Client-Key: <api-key>' \
--header 'X-Consumer-Key: <api-key>' \
--data '
{
"options": [
{
"id": 15472,
"name": "Eighth",
"amount": 3.5,
"price": 4700
},
{
"amount": 7,
"price": 8500,
"content": "7"
}
]
}
'import requests
url = "https://api-staging.getmeadow.com/api/v1/products/{productId}/options"
payload = { "options": [
{
"id": 15472,
"name": "Eighth",
"amount": 3.5,
"price": 4700
},
{
"amount": 7,
"price": 8500,
"content": "7"
}
] }
headers = {
"X-Consumer-Key": "<api-key>",
"X-Client-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Consumer-Key': '<api-key>',
'X-Client-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
options: [
{id: 15472, name: 'Eighth', amount: 3.5, price: 4700},
{amount: 7, price: 8500, content: '7'}
]
})
};
fetch('https://api-staging.getmeadow.com/api/v1/products/{productId}/options', 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/{productId}/options",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'options' => [
[
'id' => 15472,
'name' => 'Eighth',
'amount' => 3.5,
'price' => 4700
],
[
'amount' => 7,
'price' => 8500,
'content' => '7'
]
]
]),
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/{productId}/options"
payload := strings.NewReader("{\n \"options\": [\n {\n \"id\": 15472,\n \"name\": \"Eighth\",\n \"amount\": 3.5,\n \"price\": 4700\n },\n {\n \"amount\": 7,\n \"price\": 8500,\n \"content\": \"7\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api-staging.getmeadow.com/api/v1/products/{productId}/options")
.header("X-Consumer-Key", "<api-key>")
.header("X-Client-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"options\": [\n {\n \"id\": 15472,\n \"name\": \"Eighth\",\n \"amount\": 3.5,\n \"price\": 4700\n },\n {\n \"amount\": 7,\n \"price\": 8500,\n \"content\": \"7\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.getmeadow.com/api/v1/products/{productId}/options")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Consumer-Key"] = '<api-key>'
request["X-Client-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"options\": [\n {\n \"id\": 15472,\n \"name\": \"Eighth\",\n \"amount\": 3.5,\n \"price\": 4700\n },\n {\n \"amount\": 7,\n \"price\": 8500,\n \"content\": \"7\"\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-12T05:06:35.447Z",
"deletedAt": null,
"description": null,
"isActive": false,
"isFeatured": false,
"photos": [
"https://meadow.imgix.net/2022/11/67de83f8-1d72-4713-991a-87c3b29d4e93.jpeg",
"https://meadow.imgix.net/2024/10/1aef02cf-9150-481e-9625-760693b4186b.jpeg"
],
"name": "Blue Dream",
"strainType": "hybrid-sativa",
"isCompliant": false,
"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": 4700,
"salesPrice": null,
"createdAt": "2024-12-12T04:08:00.433Z",
"updatedAt": "2024-12-12T07:09:11.770Z",
"upc": null,
"content": "3.5"
},
{
"id": 15475,
"name": null,
"amount": 7,
"price": 8500,
"salesPrice": null,
"createdAt": "2024-12-12T07:12:48.923Z",
"updatedAt": "2024-12-12T07:12:48.923Z",
"upc": null,
"content": "7"
}
]
}
}{
"error": {
"message": "A description of the error code",
"code": "CODE_OF_ERROR_WILL_BE_HERE"
}
}Update product options
curl --request PUT \
--url https://api-staging.getmeadow.com/api/v1/products/{productId}/options \
--header 'Content-Type: application/json' \
--header 'X-Client-Key: <api-key>' \
--header 'X-Consumer-Key: <api-key>' \
--data '
{
"options": [
{
"id": 15472,
"name": "Eighth",
"amount": 3.5,
"price": 4700
},
{
"amount": 7,
"price": 8500,
"content": "7"
}
]
}
'import requests
url = "https://api-staging.getmeadow.com/api/v1/products/{productId}/options"
payload = { "options": [
{
"id": 15472,
"name": "Eighth",
"amount": 3.5,
"price": 4700
},
{
"amount": 7,
"price": 8500,
"content": "7"
}
] }
headers = {
"X-Consumer-Key": "<api-key>",
"X-Client-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Consumer-Key': '<api-key>',
'X-Client-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
options: [
{id: 15472, name: 'Eighth', amount: 3.5, price: 4700},
{amount: 7, price: 8500, content: '7'}
]
})
};
fetch('https://api-staging.getmeadow.com/api/v1/products/{productId}/options', 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/{productId}/options",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'options' => [
[
'id' => 15472,
'name' => 'Eighth',
'amount' => 3.5,
'price' => 4700
],
[
'amount' => 7,
'price' => 8500,
'content' => '7'
]
]
]),
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/{productId}/options"
payload := strings.NewReader("{\n \"options\": [\n {\n \"id\": 15472,\n \"name\": \"Eighth\",\n \"amount\": 3.5,\n \"price\": 4700\n },\n {\n \"amount\": 7,\n \"price\": 8500,\n \"content\": \"7\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api-staging.getmeadow.com/api/v1/products/{productId}/options")
.header("X-Consumer-Key", "<api-key>")
.header("X-Client-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"options\": [\n {\n \"id\": 15472,\n \"name\": \"Eighth\",\n \"amount\": 3.5,\n \"price\": 4700\n },\n {\n \"amount\": 7,\n \"price\": 8500,\n \"content\": \"7\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.getmeadow.com/api/v1/products/{productId}/options")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Consumer-Key"] = '<api-key>'
request["X-Client-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"options\": [\n {\n \"id\": 15472,\n \"name\": \"Eighth\",\n \"amount\": 3.5,\n \"price\": 4700\n },\n {\n \"amount\": 7,\n \"price\": 8500,\n \"content\": \"7\"\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-12T05:06:35.447Z",
"deletedAt": null,
"description": null,
"isActive": false,
"isFeatured": false,
"photos": [
"https://meadow.imgix.net/2022/11/67de83f8-1d72-4713-991a-87c3b29d4e93.jpeg",
"https://meadow.imgix.net/2024/10/1aef02cf-9150-481e-9625-760693b4186b.jpeg"
],
"name": "Blue Dream",
"strainType": "hybrid-sativa",
"isCompliant": false,
"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": 4700,
"salesPrice": null,
"createdAt": "2024-12-12T04:08:00.433Z",
"updatedAt": "2024-12-12T07:09:11.770Z",
"upc": null,
"content": "3.5"
},
{
"id": 15475,
"name": null,
"amount": 7,
"price": 8500,
"salesPrice": null,
"createdAt": "2024-12-12T07:12:48.923Z",
"updatedAt": "2024-12-12T07:12:48.923Z",
"upc": null,
"content": "7"
}
]
}
}{
"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
Path Parameters
ID of the product to update
Body
The purchaseable options of this product. This endpoint will update/delete/create ALL of the options for this product. For that reason, any existing options you would like to keep must have the id property submitted. Any existing options, which are not submitted with this endpoint will be deleted.
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 ID of an existing option
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
Response
Update 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 
