Variant Value

Information

The variant_values resource type is the specific description or characteristic of a variant_value. In other words, the variant_value is the description given to the grouping of a particular quantity or quality.

For example, a customer/patient browsing for flower wants to select a specific amount to purchase. The actual weight quantities — or weight breakpoint values — such as a gram, eighth, or an ounce are examples of variant_values. An organization is able to define its own custom variant_values which can be displayed alongside the variant_values defined by Weedmaps.

Below are variant_value examples:

  • Big Green Brand > Delicious Hybrid Flower > Weight Breakpoint > 1/8
  • Big Green Brand > 420 Shirt > Size > Large

API Requests

The request types and routes available for this resource as well as details on how to structure your requests are below. See API Reference - VariantValue for examples on how the requests might look in various languages and to test the requests in the browser.

RequestRouteDescription
POST/catalog/v1/variant_valuesCreate a new variant_value
GET/catalog/v1/variant_valuesRequest the information for all variant_values
GET/catalog/v1/variant_values/:idRequest the information for a particular variant_value
DELETE/catalog/v1/variant_values/:idDelete an existing variant_value

POST

To create a VariantValue, send a payload with the below structure to
/catalog/v1/variant_values?scope_by[organization_id]=ORGANIZATION_ID.

{
  "data": {
    "type": "variant_values",
    "attributes": {
      "value": "Large"
    },
    "relationships": {
      "variant_attribute": {
        "data": {
          "type": "variant_attributes",
          "id": "VARIANT_ATTRIBUTE_ID"
          }
      },
      "organization": {
        "data": {
          "type": "organizations",
          "id": "ORGANIZATION_ID"
          }
      }
    }
  }
}

Path

scope_by[organization_id] string
Required. Organization UUID.

Attributes

id string
Optional. UUID for the resource.


value string
Required. The specific value of the VariantValue.


type string
Required. Must be variant_values.

Relationships

VariantAttribute

variant_attribute_id string
Required. Related VariantAttribute UUID.


type string
Required. Must be variant_attributes.

Organization

organization_id string
Required. Related organization UUID.


type string
Required. Must be organizations.

GET Index

To fetch all VariantValues, send a request to
/catalog/v1/variant_values?scope_by[organization_id]=ORGANIZATION_ID. By default, we only return the first 10 results from the request. You can adjust the number of returned results with page[size], or adjust the returned page with page[page].

Path

scope_by[organization_id] string
Required. Organization UUID.


page[size] int32
Optional. Number of elements per page.


page[page] int32
Optional. Number of the page.


filter[value] string
Optional. Filters by VariantValue value.


filter[variant_attribute_id] string
Required. Filters by VariantAttribute UUID.

GET Show

To fetch a VariantValue, send a request to
/catalog/v1/variant_values/VARIANT_VALUE_ID?scope_by[organization_id]=ORGANIZATION_ID.

Path

scope_by[organization_id] string
Required. Organization UUID.


variant_value_id string
Required. VariantValue UUID you want to fetch.

DELETE

To delete a VariantValue, send a request to
/catalog/v1/variant_values/VARIANT_VALUE_ID?scope_by[organization_id]=ORGANIZATION_ID.

Path

scope_by[organization_id] string
Required. Organization UUID.


variant_value_id string
Required. VariantValue UUID you want to delete.