Product Variant (SKU)

Information

A product_variant is any variation, version, or "class" of a "primary" product (Master or Custom). The general concept of this resource type breaks down as follows:
[Brand] > [Product] > [Variant Attribute] > [Variant Value]

  • Weight-based pricing for products (Flower, Concentrates) is denoted by the attribute sold_by_weight: true.
  • Unit-based pricing for products (Vape Pens, Edibles) is denoted by the attribute sold_by_weight: false.

Below are product_variant examples:

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

Master Product Variant

Weedmaps provides the opportunity for organizations that own brands to provide curated product content. Weedmaps may also curate content for a product that is common in the industry. A curated product is called a "Master" product. Each variant of a Master product is considered a "Master" product_variant. A Master product_variant is discoverable by any integration and can help reduce the burden of data upload when used as a reference. Referencing a Master product_variant may also help improve search results. For more information on linking your information to a Master product_variant, see the Catalog Item page.

Custom Product Variant

Although a Master product_variant provides a great way to get curated content through referencing instead of data upload, not every product_variant will already exist in our system. When a dispensary or other retail seller needs to add product content that doesn't already exist, a custom (non-Master) product_variant can be created and are designated by the attribute is_master: false. Resources referencing a custom product_variant must be created on behalf of the same organization for which the custom product was created.

API Requests

Master Product Variant

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

RequestRouteDescription
GET/catalog/v1/product_variantsRequest the information for all Master product_variants
GET/catalog/v1/product_variants/:idRequest the information for a particular Master product_variant

📘

A previous version of this information referenced "Verified" products_variants. Backward compatibility is maintained as a Master product_variant is a superset of what is still considered a Verified product_variant. Switching API usage from "Verified" to "Master" is strongly recommended but not required.

Master GET Index

To fetch all Master ProductVariants, send a request to
/catalog/v1/product_variants?scope_by[organization_id]=ORGANIZATION_ID&filter[is_master]=true. 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[is_master] string
Optional. Filters by is_master value. Set to true to return only Master ProductVariants.


filter[discontinued] string
Optional. Filters by whether a ProductVariants is discontinued or not. Set to true or false.


filter[product_id] string
Optional. Filters by product_id.


filter[organization_id] string
Optional. Filters by organization_id.


include string
Optional. Related resources to include in response. Currently only product, catalog_items, variant_attributes, and variant_values supported.

Master GET Show

To fetch a Master ProductVariant, send a request to
/catalog/v1/product_variants/PRODUCT_VARIANT_ID?scope_by[organization_id]=ORGANIZATION_ID.

Path

scope_by[organization_id] string
Required. Organization UUID.


product_variant_id string
Required. Master ProductVariant UUID you want to fetch.

Custom Product Variant

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

RequestRouteDescription
POST/catalog/v1/product_variantsCreate a new Custom product_variant (see Note 1 below)
GET/catalog/v1/product_variantsRequest the information for all Custom product_variants (see Note 2 and Note 3 below)
GET/catalog/v1/product_variants/:idRequest the information for a particular Custom product_variant
PATCH/catalog/v1/product_variants/:idUpdate the information for an existing Custom product_variant
DELETE/catalog/v1/product_variants/:idDiscontinue an existing Custom product_variant (see Note 4 below)

🚧

A product_variant can only be associated with a product of the same type. A Custom product_variant can only be associated with a Custom product and a Master product_variant can only be associated with a Master product.

📘

To request to see all the Custom product_variants for a particular catalog, use the GET request below. https://api-g.weedmaps.com/products?scope_by[organization_id]={ORGANIZATION_ID}&filter[product_variants][catalog_items][catalog_id]={CATALOG_ID}

🚧

If you do not include filter[is_master]=false, your request will return both your product_variants and all Master product_variants.

🚧

The DELETE endpoint is deprecated and will not be supported after Aug. 10, 2020.

Sending in a DELETE request for a ProductVariant will no longer delete the ProductVariant. Instead, it will set its discontinued_at field to the current timestamp. You can "un-delete" a ProductVariant by sending a PATCH request and setting discontinued_at to nil.

After August 10, 2020, you will need to send a PATCH request to set a discontinued_at timestamp to designate a ProductVariant resource as no longer active. See below example.

Custom POST

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

{
  "data": {
    "type": "product_variants",
    "attributes": {
      "msrp_in_cents": 1000,
      "sku": "I420AAY"
    },
    "relationships": {
      "product": {
        "data": {
          "type": "product",
          "id": "PRODUCT_ID"
          }
      }
    }
  }
}

Path

scope_by[organization_id] string
Required. Organization UUID.

Attributes

id string
Optional. UUID for the resource.


msrp_in_cents int32
Required. The MSRP in cents.


sku string
Required. A standard SKU code.


last_sellable_at string
Optional. When this ProductVariant is last sellable (ISO-8601).


sold_by_weight boolean
Optional. Defaults to false. Designates whether it is sold by weight.


type string
Required. Must be product_variants.

Relationships

Product

product_id string
Required. Related Product UUID.


type string
Required. Must be products.

Custom GET Index

To fetch all Custom ProductsVariants, send a request to
/catalog/v1/product_variants?scope_by[organization_id]=ORGANIZATION_ID&filter[is_master]=false. 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[is_master] string
Optional. Filters by is_master value. Set to false to return only Custom ProductVariants.


filter[discontinued] string
Optional. Filters by whether a ProductVariant is discontinued or not. Set to true or false.


filter[product_id] string
Optional. Filters by product_id.


filter[organization_id] string
Optional. Filters by organization_id.


include string
Optional. Related resources to include in response. Currently only product, catalog_items, variant_attributes, and variant_values supported.

Custom GET Show

To fetch a Custom ProductVariant, send a request to
/catalog/v1/product_variants/PRODUCT_VARIANT_ID?scope_by[organization_id]=ORGANIZATION_ID.

Path

scope_by[organization_id] string
Required. Organization UUID.


product_variant_id string
Required. Custom ProductVariant UUID you want to fetch.

Custom PATCH

To update a Custom ProductVariant, send a payload with the below structure to
/catalog/v1/product_variants/PRODUCT_VARIANT_ID?scope_by[organization_id]=ORGANIZATION_ID.

{
  "data": {
    "type": "product_variants",
    "attributes": {
      "msrp_in_cents": 2000
    },
    "relationships": {
      "product": {
        "data": {
          "type": "product",
          "id": "PRODUCT_ID"
          }
      }
    }
  }
}

Path

scope_by[organization_id] string
Required. Organization UUID.


product_variant_id string
Required. ProductVariant UUID you want to update.

Attributes

msrp_in_cents int32
Optional. The MSRP in cents.


sku string
Optional. A standard SKU code.


discontinued_at string
Optional. When the ProductVariant will be discontinued. Timestamp must be set to now or in the future (ISO-8601).


last_sellable_at string
Optional. When the ProductVariant is last sellable (ISO-8601).


sold_by_weight boolean
Optional. Defaults to false. Designates whether the ProductVariant is sold by weight.


type string
Required. Must be product_variants.

Relationships

Product

product_id string
Required. Related Product UUID.


type string
Required. Must be products.

Custom DELETE

To delete a ProductVariant, send a request to
/catalog/v1/product_variants/PRODUCT_VARIANT_ID?scope_by[organization_id]=ORGANIZATION_ID.

Path

scope_by[organization_id] string
Required. Organization UUID.


product_variant_id string
Required. ProductVariant UUID you want to delete.