PotMarket

PotMarket API & MCP server

Everything a business can do on PotMarket — list brands and products, build and send pre-orders, accept orders — is available to your own software through a REST API, and to AI assistants through a Model Context Protocol (MCP) server.

Authentication

Create a key under Dashboard → Settings → API keys. A key acts as your business and sees your price list. Send it as a bearer token on every request:

curl https://potmarket.co/api/v1/me \
  -H "Authorization: Bearer pm_xxxxxxxxxxxx_your-secret"

Responses are JSON: { "data": … } on success, { "error": "…" } with a 4xx/5xx status otherwise. All prices are USD per unit.

REST endpoints

GET/api/v1/me

The business this API key belongs to, including license and verification status.

GET/api/v1/brands

Brands from verified wholesalers. Pass mine=true to list only your own brands (including unverified).

Fields: querymine

GET/api/v1/brands/:brandId/products

Products for one brand, priced for your account type (retail price list for stores, wholesale list for wholesalers).

Fields: brandId*

GET/api/v1/products

Search products across every verified brand by name, strain, brand or category.

Fields: querycategory

POST/api/v1/brands

Wholesalers: create a new brand page under your account.

Fields: name*taglinedescription

POST/api/v1/brands/:brandId/products

Wholesalers: add a product to one of your brands. Photos are added from the website.

Fields: brandId*name*categoryunitSizedescriptionstrainstrainTypethccbdskucasePackinStockforRetailpriceforWholesalewholesalePrice

PATCH/api/v1/products/:productId

Wholesalers: change any fields of one of your products — e.g. price or inStock. Omitted fields are left as they are.

Fields: productId*namecategoryunitSizedescriptionstrainstrainTypethccbdskucasePackinStockforRetailpriceforWholesalewholesalePrice

GET/api/v1/stores

Wholesalers with the pre-order plan or the AI sales rep: verified retail stores you can send pre-orders to.

Fields: query

GET/api/v1/orders

Your orders (as seller or buyer), newest first. Optionally filter by status.

Fields: status

GET/api/v1/orders/:orderId

One order with its line items, total, status and activity history.

Fields: orderId*

POST/api/v1/orders

Create an order with another business. A wholesaler naming a retail store creates a pre-order (send=true emails it to the store with Accept / Make Changes buttons); this needs the pre-order plan or the AI sales rep. A store — or a wholesaler buying on the wholesale floor — naming a wholesaler creates a purchase order (send=true submits it to the seller). With send=false it stays a draft.

Fields: counterpartyId*items*notessend

PATCH/api/v1/orders/:orderId

Replace the line items on an order that is currently yours to edit (your draft, a pre-order sent to you, or an order submitted to you).

Fields: orderId*items*

POST/api/v1/orders/:orderId/accept

Accept an order that is waiting on you: a store accepts a pre-order it was sent, or a wholesaler confirms an order a buyer submitted. This locks the order and hands it to the wholesaler's ordering platform.

Fields: orderId*

POST/api/v1/orders/:orderId/cancel

Cancel an order that hasn't been accepted yet.

Fields: orderId*

GET/api/v1/sellers/:sellerId/catalog

Everything a wholesaler currently has available to you, with your prices (after any product, category or brand discount) and their order-amount discounts — the list an order with them can draw from.

Fields: sellerId*

* required. GET fields go in the query string; POST/PATCH fields in a JSON body.

Example: send a pre-order to a store

curl -X POST https://potmarket.co/api/v1/orders \
  -H "Authorization: Bearer $POTMARKET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "counterpartyId": "<store id from /stores>",
    "items": [{ "productId": "<product id>", "qty": 24 }],
    "notes": "Delivery Thursday",
    "send": true
  }'

MCP server

Point any MCP client that supports remote (Streamable HTTP) servers at the URL below, using the same API key. Each REST operation above is available as a tool with the same name (15 tools).

URL:     https://potmarket.co/api/mcp
Header:  Authorization: Bearer pm_xxxxxxxxxxxx_your-secret

Claude Code

claude mcp add --transport http potmarket https://potmarket.co/api/mcp \
  --header "Authorization: Bearer $POTMARKET_KEY"

Generic JSON config

{
  "mcpServers": {
    "potmarket": {
      "type": "http",
      "url": "https://potmarket.co/api/mcp",
      "headers": {
        "Authorization": "Bearer pm_xxxxxxxxxxxx_your-secret"
      }
    }
  }
}
Wholesale Cannabis API & MCP Server | PotMarket