GuidesAPI EndpointsChangelog
Log In
Guides

Cannabinoids

Operations and Schemas

Cannabinoids are a group of chemical compounds that both cannabis plants and the human body produce.

📘

Want to learn how to Link Cannabinoids to a Menu Item?

Operations

You can explore available Cannabinoids with this operation:

MethodDescriptionTry It!
GETRetrieve all CannabinoidsRetrieve Cannabinoids

You can utilize the many filters parameters on these operation for search and discovery.



Schemas

From Retrieve Cannabinoids

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Cannabinoid List",
    "type": "object",
    "properties": {
        "data": {
            "type": "array",
            "items": {
                "type": "object",
                "required": [
                    "id",
                    "slug",
                    "symbol",
                    "name",
                    "updated_at"
                ],
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "Unique identifier for the cannabinoid"
                    },
                    "slug": {
                        "type": "string",
                        "description": "URL-friendly slug"
                    },
                    "symbol": {
                        "type": "string",
                        "description": "Chemical symbol"
                    },
                    "name": {
                        "type": "string",
                        "description": "Full chemical name"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "UTC timestamp of last update"
                    }
                },
                "additionalProperties": false
            }
        }
    },
    "required": [
        "data"
    ],
    "additionalProperties": false
}
{
    "data": [
        {
            "id": 36,
            "slug": "thc",
            "symbol": "THC",
            "name": "Tetrahydrocannabinol",
            "updated_at": "2018-08-29T23:02:15Z"
        }
    ]
}

Linked to a Menu Item

Each Cannabinoid linked to a Menu Item is returned with a Measurement.

A Measurement can be represented in percentage and/or in milligrams, both require a minimum and maximum float range attribute.

{
  "percentage": {
    "min": "float",
    "max": "float"
  },
  "milligrams": {
    "min": "float",
    "max": "float"
  }
}

Examples

{
    "cannabinoids": [
        {
            "id": 36,
            "slug": "thc",
            "symbol": "THC",
            "name": "Tetrahydrocannabinol",
            "milligrams":{
                "min": 1.2,
                "max": 2.2
            },
            "percent":{
                "min": 7.2,
                "max": 12.5
            }
            "updated_at": "2018-08-29T23:02:15Z"
        }
    ]
}

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Cannabinoid Measurments List",
    "type": "object",
    "properties": {
        "cannabinoids": {
            "type": "array",
            "items": {
                "type": "object",
                "required": [
                    "id",
                    "slug",
                    "symbol",
                    "name",
                    "updated_at",
                    "milligrams",
                    "percent"
                ],
                "properties": {
                    "id": {
                        "type": "integer",
                        "description": "Unique identifier for the cannabinoid"
                    },
                    "slug": {
                        "type": "string",
                        "description": "URL-friendly slug"
                    },
                    "symbol": {
                        "type": "string",
                        "description": "Chemical symbol"
                    },
                    "name": {
                        "type": "string",
                        "description": "Full chemical name"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "UTC timestamp of last update"
                    },
                    "milligrams": {
                        "type": "object",
                        "required": [
                            "min",
                            "max"
                        ],
                        "properties": {
                            "min": {
                                "type": "number",
                                "description": "Minimum milligram content"
                            },
                            "max": {
                                "type": "number",
                                "description": "Maximum milligram content"
                            }
                        },
                        "additionalProperties": false
                    },
                    "percent": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "description": "Percentage content (may be null if not applicable)"
                    }
                },
                "additionalProperties": false
            }
        }
    },
    "required": [
        "cannabinoids"
    ],
    "additionalProperties": false
}

What’s Next

Learn more about Categories