Catalog API

The PIM Developer Hub

Welcome to the PIM developer hub. You'll find comprehensive guides and documentation to help you start working with PIM as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Making Products Discoverable

For Weedmaps Catalog API, you can assign Products to categories and filter groups.

Overview

This section has two primary goals. The first is to ensure Products are visible on Weedmaps by applying Category Tags. The second goal is to use Discovery Tags so that users can search, filter, and find Products more easily. Listings can optimize their Menus with Weedmaps Taxonomy, which provides a way for them to categorize and tag their Products.

Tags

A tag is a word or phrase used to categorize or describe a Product. There are two types of tags: Category and Discovery.

  • Category tags — Classify Products based on their form (infused preroll, nug run shatter, cookies, and so on). Category tags are denoted by the attribute is_category: true.
  • Discovery tags — Describe all other characteristics of a Product (sweet, uplifting, sativa-dominant, and so forth). Discovery tags are denoted by the attribute is_category: false.

The Taxonomy Overview has a complete breakdown of Category and Discovery tags.

Making Your Product Line Visible

In order to make your Product line visible, you must associate one or more Category Tags to your Products. We will do this in three steps.

  1. Fetch a Category Tag
  2. Fetch a Discover Tag
  3. Associate Tags to a Product

Step 1: Fetch a Category Tag

To fetch a Category tag, we will use the API Reference Tag GET to generate the cURL command. We will include filter[is_category]=true to only return Category tags. We will also include filter[name]=flower to return all Category tags with flower in the name.

Running your cURL command in the terminal will fetch all Category tags with flower in the name — in our case, there is Flower and Infused Flower.

curl --globoff \
  --request GET \
  --url 'https://api-g.weedmaps.com/catalog/v1/tags?filter[name]=flower&filter[is_category]=true' \
  --header 'accept: application/vnd.api+json' \
  --header 'authorization: Bearer [ACCESS TOKEN HERE]'
{
  "data" : [
    {
      "attributes" : {
        "alias" : null,
        "deprecated_at" : null,
        "inserted_at" : "2019-02-19T18:19:07.000000",
        "is_category" : true,
        "name" : "Flower",
        "updated_at" : "2019-02-19T18:19:07.000000"
      },
      "id" : "a78926ca-39e7-49c0-881b-cf0641427f14",
      "links" : {
        "self" : "https://api-g.weedmaps.com/catalog/v1/tags/a78926ca-39e7-49c0-881b-cf0641427f14"
      },
      "relationships" : {},
      "type" : "tags"
    },
    {
      "attributes" : {
        "alias" : null,
        "deprecated_at" : null,
        "inserted_at" : "2019-02-19T18:19:07.000000",
        "is_category" : true,
        "name" : "Infused Flower",
        "updated_at" : "2019-02-19T18:19:07.000000"
      },
      "id" : "7e4f2b3b-8dbc-4287-9fed-02b8dbdd5a51",
      "links" : {
        "self" : "https://api-g.weedmaps.com/catalog/v1/tags/7e4f2b3b-8dbc-4287-9fed-02b8dbdd5a51"
      },
      "relationships" : {},
      "type" : "tags"
    }
  ],
  "included" : [],
  "links" : {
    "self" : "https://api-g.weedmaps.com/catalog/v1/tags"
  },
  "meta" : {
    "page-number" : 1,
    "page-size" : 10,
    "page_number" : 1,
    "page_size" : 10,
    "total-entries" : 2,
    "total-pages" : 1,
    "total_entries" : 2,
    "total_pages" : 1
  }
}

📘

Be sure to save the Flower tag ID from your response as it will be needed later in the guide.

Step 2: Fetch a Discovery Tag

To fetch a Discovery tag, we will use the API Reference Tag GET to generate the cURL command. We will include filter[is_category]=false to only return Discovery tags. We will also include filter[name]=sativa to return all Discovery tags with sativa in the name.

Running your cURL command in the terminal will fetch all Discovery tags with sativa in the name — in our case, there is Sativa, Sativa-Dominant, and Vape Pens Sativa.

curl --globoff \
  --request GET \
  --url 'https://api-g.weedmaps.com/catalog/v1/tags?filter[name]=sativa&filter[is_category]=false' \
  --header 'accept: application/vnd.api+json' \
  --header 'authorization: Bearer [ACCESS TOKEN HERE]'
{
  "data" : [
    {
      "attributes" : {
        "alias" : null,
        "deprecated_at" : null,
        "inserted_at" : "2019-02-19T18:19:08.000000",
        "is_category" : false,
        "name" : "Sativa",
        "updated_at" : "2019-02-19T18:19:08.000000"
      },
      "id" : "1ceaf502-9e76-403e-88eb-8895eaebf2df",
      "links" : {
        "self" : "https://api-g.weedmaps.com/catalog/v1/tags/1ceaf502-9e76-403e-88eb-8895eaebf2df"
      },
      "relationships" : {},
      "type" : "tags"
    },
    {
      "attributes" : {
        "alias" : null,
        "deprecated_at" : null,
        "inserted_at" : "2019-02-19T18:19:00.000000",
        "is_category" : false,
        "name" : "Sativa-Dominant",
        "updated_at" : "2019-02-19T18:19:00.000000"
      },
      "id" : "b8d9fefe-f989-4033-a218-79934887414c",
      "links" : {
        "self" : "https://api-g.weedmaps.com/catalog/v1/tags/b8d9fefe-f989-4033-a218-79934887414c"
      },
      "relationships" : {},
      "type" : "tags"
    },
    {
      "attributes" : {
        "alias" : null,
        "deprecated_at" : null,
        "inserted_at" : "2019-06-05T19:20:38.444765",
        "is_category" : false,
        "name" : "Vape Pens Sativa",
        "updated_at" : "2019-06-05T19:20:38.444765"
      },
      "id" : "da88e0fe-5311-441b-b7ae-845040ee3b42",
      "links" : {
        "self" : "https://api-g.weedmaps.com/catalog/v1/tags/da88e0fe-5311-441b-b7ae-845040ee3b42"
      },
      "relationships" : {},
      "type" : "tags"
    }
  ],
  "included" : [],
  "links" : {
    "self" : "https://api-g.weedmaps.com/catalog/v1/tags"
  },
  "meta" : {
    "page-number" : 1,
    "page-size" : 10,
    "page_number" : 1,
    "page_size" : 10,
    "total-entries" : 3,
    "total-pages" : 1,
    "total_entries" : 3,
    "total_pages" : 1
  }
}

📘

Be sure to save the Sativa tag ID from your response as it will be needed later in the guide.

Step 3: Associate Tags to a Product

To associate a tag to a product, we will use the API Reference Product Tag POST to generate the cURL command. Required fields in the payload are tag ID and the type for each tag you want to associate. You can associate as many tags as you would like to a product. We will use the previously saved tag IDs for Flower and Sativa.

Running your cURL command in the terminal will associate the tags to the product you specify.

curl --globoff \
  --request POST \
  --url 'https://api-g.weedmaps.com/catalog/v1/products/76154f4e-4899-43e6-838d-74653f816053/relationships/tags?scope_by[organization_id]=da78484e-4c16-4a85-b78e-18664c323623' \
  --header 'accept: application/vnd.api+json' \
  --header 'authorization: Bearer [ACCESS TOKEN HERE]' \
  --header 'content-type: application/vnd.api+json' \
  --data '{
    "data": [
        {
        "type": "tags",
        "id": "a78926ca-39e7-49c0-881b-cf0641427f14"
      },
      {
        "type": "tags",
        "id": "1ceaf502-9e76-403e-88eb-8895eaebf2df"
      }
    ]
  }'
{
  "data" : [
    {
      "id" : "a78926ca-39e7-49c0-881b-cf0641427f14",
      "type" : "tags"
    },
    {
      "id" : "1ceaf502-9e76-403e-88eb-8895eaebf2df",
      "type" : "tags"
    }
  ]
}

📘

Associating Sub-Tags

There are scenarios where you want to associate a sub-tag to a given product, like using the Sauce tag under Concentrates. When a product is tagged with a child Category tag, it also populates the parent Category tag. In this example, associating Sauce populates its parent tag, Concentrates.

As much as possible, avoid associating tags from only the topmost level: This helps to ensure your client's Menus aren't too broad and cumbersome to browse.

🚧

The tags included in the response are the tags that were properly associated with the product. If you send a tag ID that does not exist, we ignore it. This means your response could be an empty array if all of the tag IDs in your request do not exist.

👍

Congratulations!

You have successfully made your Product discoverable by associating Tags with it. You will need to move on to Displaying Items for Sale before your Product is available to be sold.

Updated about a year ago

Making Products Discoverable


For Weedmaps Catalog API, you can assign Products to categories and filter groups.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.