> ## Documentation Index
> Fetch the complete documentation index at: https://docs.joinmarkt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List stock keys

> License keys still available for this product.

**Scope:** `product:stock:read`



## OpenAPI

````yaml GET /api/merchant/v1/stores/{storeId}/products/{productId}/stock
openapi: 3.1.0
info:
  title: Join Markt Merchant API
  version: 1.0.0
  description: >-
    Manage your Join Markt store from your own code: products, orders,
    customers, coupons, themes and more.


    Create an API key in **Dashboard → Developers → API keys**, then send it as
    `Authorization: Bearer mk_live_…`. Each key only works on the stores and
    scopes you chose for it.


    Limits: 120 requests per minute per key. Every response is JSON.
  contact:
    name: Join Markt Support
    url: https://joinmarkt.com/contact
servers:
  - url: https://dash.joinmarkt.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Store
    description: Store profile and settings.
  - name: Products
    description: Create, update and delete products, and manage license-key stock.
  - name: Categories
    description: Group products into categories.
  - name: Groups
    description: Bundle several products under one storefront card.
  - name: Orders
    description: Read orders, add notes and mark manual deliveries done.
  - name: Invoices
    description: Read invoices issued for orders.
  - name: Customers
    description: Read customers and adjust their store balance.
  - name: Coupons
    description: Create and manage discount codes.
  - name: Reviews
    description: Read buyer reviews and reply to them.
  - name: Tickets
    description: Support tickets from buyers.
  - name: Analytics
    description: Revenue and traffic numbers.
  - name: Balance & payouts
    description: Seller balance and payout requests.
  - name: Payments
    description: Payment method settings. Secrets are never returned.
  - name: Storefront
    description: Storefront appearance and integrations.
  - name: Themes
    description: Apply catalog themes and edit theme projects.
  - name: Domain
    description: Connect a custom domain.
  - name: Security
    description: Blacklist and anti-fraud settings.
  - name: Notifications
    description: Recent store notifications.
  - name: Discord
    description: Discord bot settings.
  - name: Import
    description: Import products and customers from another platform.
  - name: Webhooks
    description: Get events sent to your own server.
paths:
  /api/merchant/v1/stores/{storeId}/products/{productId}/stock:
    get:
      tags:
        - Products
      summary: List stock keys
      description: |-
        License keys still available for this product.

        **Scope:** `product:stock:read`
      operationId: getProductsByProductIdStock
      parameters:
        - $ref: '#/components/parameters/storeId'
        - in: path
          name: productId
          description: >-
            Product id. Accepts the internal id or the public id (for example
            `PRD-…`).
          schema:
            type: string
          required: true
        - in: query
          name: variantName
          description: Variant name. Omit for the main product.
          schema:
            type: string
      responses:
        '200':
          description: The keys and their count.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
              example:
                productId: cmvuo0akz000avdese3w5d1ik
                variantName: null
                count: 120
                keys:
                  - id: cmvuos6yd0091vdnkekw1axsr
                    key: XXXX-XXXX-XXXX-XXXX
                    variantName: null
                    isUsed: false
                  - id: cmvuos6yd0092vdnknr4ddgwa
                    key: XXXX-XXXX-XXXX-XXXX
                    variantName: null
                    isUsed: false
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >-
            curl -X GET
            "https://dash.joinmarkt.com/api/merchant/v1/stores/STORE_ID/products/{productId}/stock"
            \
              -H "Authorization: Bearer $JOIN_MARKT_API_KEY"
        - lang: javascript
          label: JavaScript
          source: >-
            const res = await
            fetch("https://dash.joinmarkt.com/api/merchant/v1/stores/STORE_ID/products/{productId}/stock",
            {
              method: "GET",
              headers: {
                Authorization: `Bearer ${process.env.JOIN_MARKT_API_KEY}`,
              },
            })

            const data = await res.json()
        - lang: python
          label: Python
          source: |-
            import os, requests

            res = requests.get(
                "https://dash.joinmarkt.com/api/merchant/v1/stores/STORE_ID/products/{productId}/stock",
                headers={"Authorization": f"Bearer {os.environ['JOIN_MARKT_API_KEY']}"},
            )
            data = res.json()
components:
  parameters:
    storeId:
      name: storeId
      in: path
      required: true
      description: >-
        Your store id. Find it in Dashboard → Developers, or in `GET /stores`
        with MCP.
      schema:
        type: string
  responses:
    BadRequest:
      description: The request body or a parameter is not valid. `error` names the field.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: The API key is missing, wrong, expired or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The key is valid but has no access to this store, or lacks the scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Nothing with this id exists in this store.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: More than 120 requests in a minute. Wait and try again.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: What went wrong, in plain words.
          examples:
            - Product not found
        code:
          type: string
          description: Stable error code.
          examples:
            - NOT_FOUND
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: mk_live_…
      description: Your Merchant API key. Create one in Dashboard → Developers → API keys.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.