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    

Displaying Items for Sale

For Weedmaps Catalog API, you can control the quantity and price of an item for sale by using the Catalog Item resource.

A catalog_item resource is what ties everything together. It connects the product_variant to a catalog, assigning its price and availability in the process.

To create our first catalog_item, we will use the API Reference Catalog Item POST to generate the cURL command. Required fields in the payload are prince_in_cents, and a catalog and product_variant in the relationship. While available and online_orderable are required fields, they default to false and true respectively so we do not need to include them in the payload. However, your catalog_item needs to have available set to true for it to be displayed.

Your generated cURL command should look similar to our example below.

curl --globoff \
    --request POST \
  --url 'https://api-g.weedmaps.com/catalog/v1/catalog_items?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": {
        "attributes": {
        "available": true,
        "online_orderable": true,
        "price_in_cents":4200
      },
      "relationships": {
        "catalog": {
            "data":{
            "type": "catalogs",
            "id":"f8382b94-7f0a-45bb-90b2-d3d70825a9e9"
          }
        },
        "product_variant": {
            "data": {
            "type": "product_variants",
            "id":"76a159be-1fd6-4726-90fa-ec814ec68d3a"
          }
        }
      },
      "type": "catalog_items"
    }
  }'
{
  "data" : {
    "attributes" : {
      "available" : true,
      "discontinued_at" : null,
      "external_id" : null,
      "inserted_at" : "2020-04-30T19:58:29.941257",
      "online_orderable" : true,
      "price_in_cents" : 4200,
      "updated_at" : "2020-04-30T19:58:29.941257"
    },
    "id" : "133b22d3-e2b4-4bf5-9de9-cf791f3c89a3",
    "links" : {
      "self" : "http://catalog-service.weedmaps.com/api/v1/catalog_items/133b22d3-e2b4-4bf5-9de9-cf791f3c89a3?scope_by[organization_id]=da78484e-4c16-4a85-b78e-18664c323623"
    },
    "relationships" : {
      "catalog" : {
        "data" : {
          "id" : "f8382b94-7f0a-45bb-90b2-d3d70825a9e9",
          "type" : "catalogs"
        },
        "links" : {
          "related" : "https://api-g.weedmaps.com/catalog/v1/catalogs/f8382b94-7f0a-45bb-90b2-d3d70825a9e9",
          "self" : "https://api-g.weedmaps.com/catalog/v1/catalog_items/133b22d3-e2b4-4bf5-9de9-cf791f3c89a3/relationships/catalog"
        }
      },
      "product_variant" : {
        "data" : {
          "id" : "76a159be-1fd6-4726-90fa-ec814ec68d3a",
          "type" : "product_variants"
        },
        "links" : {
          "related" : "https://api-g.weedmaps.com/catalog/v1/product_variants/76a159be-1fd6-4726-90fa-ec814ec68d3a",
          "self" : "https://api-g.weedmaps.com/catalog/v1/catalog_items/133b22d3-e2b4-4bf5-9de9-cf791f3c89a3/relationships/product_variant"
        }
      }
    },
    "type" : "catalog_items"
  },
  "included" : [],
  "links" : {
    "self" : "http://catalog-service.weedmaps.com/api/v1/catalog_items/133b22d3-e2b4-4bf5-9de9-cf791f3c89a3?scope_by[organization_id]=da78484e-4c16-4a85-b78e-18664c323623"
  }
}

📘

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

👍

Congratulations!

Your product is now displayed and available for sale on your test listing page!

Updated 4 months ago

Displaying Items for Sale


For Weedmaps Catalog API, you can control the quantity and price of an item for sale by using the Catalog Item resource.

Suggested Edits are limited on API Reference Pages

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