Leafly Menu Integration API

Near-real-time menu synchronization API for dispensaries and their POS / system-of-record providers. A retailer's system pushes menu items - name, type, brand, description, strain, cannabinoid values, per-variant inventory and pricing, images, and pickup availability - to Leafly so the public Leafly menu stays current. GET /menu reads the current menu, POST /menu/items runs a full synchronization, PUT /menu/items upserts items, DELETE /menu/items removes items, and GET /status reports integration health. V2 authenticates with OAuth2 client credentials (V1 used an API key); every call is scoped by a Leafly-issued menu_integration_key. V2 of this Menu API is a prerequisite for the Leafly Order API.

OpenAPI Specification

leafly-menu-integration-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Leafly Menu Integration API
  version: '2.0'
  description: >-
    Near-real-time menu integration API for keeping a dispensary's Leafly menu
    in sync with its system of record (POS). When menu items are edited or
    inventory levels change, the system of record makes HTTP requests to the
    menu integration URL with a JSON payload of menu items. Every call is scoped
    by a Leafly-issued menu_integration_key path parameter. V2 authenticates
    with OAuth2 client credentials.

    This OpenAPI document was authored by API Evangelist from Leafly's public
    ReDoc documentation (https://docs.leafly.io/menu-integration-docs/v2.html)
    for cataloging purposes. It reflects the documented endpoints and the item
    schema; it is not the vendor's own distributed specification.
  contact:
    name: Leafly API Support
    email: api-support@leafly.com
    url: https://docs.leafly.io/menu-integration-docs/v2.html
servers:
- url: https://api.leafly.com/v2/menu_integration
  description: Production
- url: https://api-sandbox.leafly.io/v2/menu_integration
  description: Sandbox
security:
- OAuth2ClientCredentials: []
paths:
  /{menu_integration_key}/menu:
    get:
      summary: Get Menu
      description: Retrieve the current menu Leafly holds for the integration.
      operationId: getMenu
      parameters:
      - $ref: '#/components/parameters/MenuIntegrationKey'
      responses:
        '200':
          description: The current menu.
  /{menu_integration_key}/menu/items:
    post:
      summary: Synchronize Menu
      description: >-
        Full menu synchronization by id - submit the complete set of items. Full
        syncs are recommended once per day (or, in an alternate profile, several
        times per hour).
      operationId: syncMenuItems
      parameters:
      - $ref: '#/components/parameters/MenuIntegrationKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MenuItems'
      responses:
        '200':
          description: Menu accepted for synchronization.
    put:
      summary: Upsert Menu Items
      description: Create or update individual items or batches of items.
      operationId: upsertMenuItems
      parameters:
      - $ref: '#/components/parameters/MenuIntegrationKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MenuItems'
      responses:
        '200':
          description: Items upserted.
    delete:
      summary: Delete Menu Items
      description: Remove items from the Leafly menu.
      operationId: deleteMenuItems
      parameters:
      - $ref: '#/components/parameters/MenuIntegrationKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MenuItems'
      responses:
        '200':
          description: Items deleted.
  /{menu_integration_key}/status:
    get:
      summary: Get menu integration status
      description: Report the health and status of the menu integration.
      operationId: getStatus
      parameters:
      - $ref: '#/components/parameters/MenuIntegrationKey'
      responses:
        '200':
          description: Integration status.
components:
  securitySchemes:
    OAuth2ClientCredentials:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.leafly.com/oauth/token
          scopes: {}
  parameters:
    MenuIntegrationKey:
      name: menu_integration_key
      in: path
      required: true
      description: Leafly-issued key that scopes the request to a single dispensary integration.
      schema:
        type: string
  schemas:
    MenuItems:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/MenuItem'
    MenuItem:
      type: object
      description: >-
        A single menu item. Strain and cannabinoid values should be set to null
        when absent; variants carry the inventory and pricing.
      properties:
        id:
          type: string
          description: Stable identifier for the item in the system of record; must be used consistently.
        type:
          type: string
        name:
          type: string
        strain:
          type:
          - string
          - 'null'
        brand:
          type: string
        description:
          type: string
        availableForPickup:
          type: boolean
        imageUrl:
          type:
          - string
          - 'null'