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

# Create stock

> Creates a new stock entry for a specific product or warehouse. This endpoint allows defining stock quantity, associated product, warehouse location, and optional metadata such as batch number or expiration date. Once created, the stock entry becomes available for inventory tracking and updates.



## OpenAPI

````yaml POST /2023-11/admin/stocks
openapi: 3.0.3
info:
  title: Genuka V2 - API
  version: 1.0.0
  contact: {}
servers:
  - url: https://api-staging.genuka.com
  - url: https://api.genuka.com
security:
  - bearerAuth: []
tags:
  - name: Public Routes
  - name: Pages
  - name: Collections
  - name: Shops
  - name: Products
  - name: Articles
  - name: Discounts
  - name: Blogs
  - name: Company
  - name: Review
    description: |-
      ``` json
      {
      "title": "",
      "quantity": "",
      "product_variant": "",
      "date": "",
      "company_id": "",
      "shops": []
      }

       ```
  - name: Private Routes
  - name: Authentication
  - name: Apps
  - name: Accounting
  - name: Addresses
  - name: Customer
  - name: Analytics
  - name: Articles1
  - name: Availabilities
  - name: API Keys
  - name: Orders
  - name: Bills
  - name: Blogs1
  - name: Calendar Events
  - name: Collections1
  - name: Company1
  - name: Customers
  - name: Deliveries
    description: |-
      ``` json
      {
      "title": "",
      "quantity": "",
      "product_variant": "",
      "date": "",
      "company_id": "",
      "shops": []
      }

       ```
  - name: Discount
  - name: Domains
    description: |-
      ``` json
      {
      "domain": "",
      "company_id": ""
      }

       ```
  - name: Analytics1
  - name: Orders1
  - name: Payments
  - name: Pages1
  - name: Production
  - name: Bill of Materials
  - name: Payments1
  - name: Payments Methods
  - name: Workflows
  - name: New Folder
  - name: Wallet
  - name: Marketing
  - name: Campaigns
  - name: Templates
  - name: Products1
  - name: Product Variants
  - name: Analytics12
  - name: Services
    description: >-
      Services are "Products" that have a duration in minutes, a buffer time and
      a list of users able to provide the service.
  - name: SupplierProducts
  - name: Shops1
    description: >-
      Shops are sort of subsidiary of companies. A Company can have many Shops.
      Each shop can have 0 or more .  
        
      But all of them are properties of a Company.
  - name: Warehouses
    description: >-
      Warehouses are places where stocks are placed.


      Shop which are physical or virtual point of sales can be attached to one
      or many warehouses to take their products.
  - name: Stocks
    description: |-
      ``` json
      {
      "title": "",
      "quantity": "",
      "product_variant": "",
      "date": "",
      "company_id": "",
      "shops": []
      }

       ```
  - name: Review1
    description: |-
      ``` json
      {
      "title": "",
      "quantity": "",
      "product_variant": "",
      "date": "",
      "company_id": "",
      "shops": []
      }

       ```
  - name: ReviewCriterion
    description: |-
      ``` json
      {
      "title": "",
      "quantity": "",
      "product_variant": "",
      "date": "",
      "company_id": "",
      "shops": []
      }

       ```
  - name: StockMovements
    description: |-
      ``` json
      {
      "title": "",
      "quantity": "",
      "product_variant": "",
      "date": "",
      "company_id": "",
      "shops": []
      }

       ```
  - name: Suppliers
  - name: Treasury Accounts
    description: Comptes de trésorerie
  - name: Users
  - name: Wrapped
  - name: Returns
  - name: Webhooks
  - name: Customer Routes
  - name: Authentication1
  - name: Addresses1
  - name: Orders12
  - name: Payments12
  - name: Review12
    description: |-
      ``` json
      {
      "title": "",
      "quantity": "",
      "product_variant": "",
      "date": "",
      "company_id": "",
      "shops": []
      }

       ```
  - name: Developer Routes
  - name: Authentication12
  - name: Apps1
  - name: Apps Shortcut
  - name: Products12
    description: Developer can access a company product through its app
paths:
  /2023-11/admin/stocks:
    post:
      tags:
        - Private Routes
        - Stocks
      summary: Create
      description: Create
      operationId: create17
      parameters:
        - name: x-company
          in: header
          schema:
            type: string
            example: '{{companyId}}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                product_variant_id:
                  type: string
                  example: 01k77apj286gns7ap98hn5ejhc
                quantity:
                  type: number
                  example: 15
                quantity_alert:
                  type: number
                  example: 5
                stocks_warehouse:
                  type: array
                  items:
                    type: object
                    properties:
                      is_new:
                        type: boolean
                        example: true
                      quantity:
                        type: number
                        example: 50
                      warehouse_id:
                        type: string
                        example: 01k1amyq271bm81tncbepdxa2j
                  example:
                    - is_new: true
                      quantity: 50
                      warehouse_id: 01k1amyq271bm81tncbepdxa2j
                title:
                  type: string
                  example: Action Short / Navy
            examples:
              Create:
                value:
                  product_variant_id: 01k77apj286gns7ap98hn5ejhc
                  quantity: 15
                  quantity_alert: 5
                  stocks_warehouse:
                    - is_new: true
                      quantity: 50
                      warehouse_id: 01k1amyq271bm81tncbepdxa2j
                  title: Action Short / Navy
      responses:
        '201':
          description: '201'
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-cache, private
            Connection:
              schema:
                type: string
                example: keep-alive
            Date:
              schema:
                type: string
                example: Fri, 10 Oct 2025 15:12:53 GMT
            Server:
              schema:
                type: string
                example: nginx/1.18.0 (Ubuntu)
            Transfer-Encoding:
              schema:
                type: string
                example: chunked
            Vary:
              schema:
                type: string
                example: Origin
            X-RateLimit-Limit:
              schema:
                type: string
                example: '6000'
            X-RateLimit-Remaining:
              schema:
                type: string
                example: '5998'
          content:
            application/json:
              schema:
                type: object
                properties:
                  company_id:
                    type: string
                    example: 01hqydxwtxdj3kmzp3bz7jk73g
                  created_at:
                    type: string
                    example: '2025-10-10T15:12:53.000000Z'
                  id:
                    type: string
                    example: 01k77ax6n3vcmxbyt0env1zkar
                  media:
                    type: array
                    items: {}
                    example: []
                  medias:
                    type: array
                    items: {}
                    example: []
                  price:
                    nullable: true
                    example: null
                  product_variant:
                    type: object
                    properties:
                      barcode:
                        nullable: true
                        example: null
                      base_title:
                        type: string
                        example: Default Title
                      buffer_minutes:
                        type: number
                        example: 0
                      compare_at_price:
                        nullable: true
                        example: null
                      composite_stocks:
                        type: array
                        items: {}
                        example: []
                      created_at:
                        type: string
                        example: '2025-10-10T15:09:15.000000Z'
                      deleted_at:
                        nullable: true
                        example: null
                      deposit:
                        nullable: true
                        example: null
                      duration_minutes:
                        type: number
                        example: 0
                      estimated_quantity:
                        type: number
                        example: 50
                      estimated_quantity_by_warehouse:
                        type: object
                        properties:
                          01k1amyq271bm81tncbepdxa2j:
                            type: number
                            example: 50
                      follow_stock:
                        type: number
                        example: 1
                      id:
                        type: string
                        example: 01k77apj286gns7ap98hn5ejhc
                      image_id:
                        nullable: true
                        example: null
                      metadata:
                        nullable: true
                        example: null
                      min_order_quantity:
                        type: number
                        example: 1
                      options:
                        type: array
                        items:
                          type: string
                          example: 01heb9kba8d8fgh58vpp72yw86
                        example:
                          - 01heb9kba8d8fgh58vpp72yw86
                      position:
                        type: number
                        example: 1
                      price:
                        type: number
                        example: 6500
                      product_id:
                        type: string
                        example: 01k77apj1gvqheyjjqx5pzfkrn
                      professionals:
                        type: array
                        items: {}
                        example: []
                      service:
                        type: object
                        properties:
                          buffer_minutes:
                            type: number
                            example: 0
                          created_at:
                            type: string
                            example: '2025-10-10T15:09:15.000000Z'
                          deleted_at:
                            nullable: true
                            example: null
                          deposit:
                            nullable: true
                            example: null
                          duration_minutes:
                            type: number
                            example: 0
                          id:
                            type: string
                            example: 01k77apj2vjttkanj2v90572dx
                          metadata:
                            nullable: true
                            example: null
                          product_variant_id:
                            type: string
                            example: 01k77apj286gns7ap98hn5ejhc
                          professionals:
                            type: array
                            items: {}
                            example: []
                          updated_at:
                            type: string
                            example: '2025-10-10T15:09:15.000000Z'
                      service_id:
                        type: string
                        example: 01k77apj2vjttkanj2v90572dx
                      sku:
                        type: string
                        example: le paquet
                      supplierproduct:
                        nullable: true
                        example: null
                      taxable:
                        type: number
                        example: 1
                      title:
                        type: string
                        example: Default Title
                      updated_at:
                        type: string
                        example: '2025-10-10T15:12:53.000000Z'
                      whatsapp_product_id:
                        nullable: true
                        example: null
                  product_variant_compositions:
                    type: array
                    items: {}
                    example: []
                  product_variant_id:
                    type: string
                    example: 01k77apj286gns7ap98hn5ejhc
                  quantity:
                    type: number
                    example: 50
                  quantity_alert:
                    type: number
                    example: 5
                  stocks_warehouse:
                    type: array
                    items:
                      type: object
                      properties:
                        batch_number:
                          nullable: true
                          example: null
                        created_at:
                          type: string
                          example: '2025-10-10T15:12:53.000000Z'
                        expiration_date:
                          nullable: true
                          example: null
                        id:
                          type: string
                          example: '1742'
                        metadata:
                          nullable: true
                          example: null
                        production_date:
                          nullable: true
                          example: null
                        quantity:
                          type: number
                          example: 50
                        stock_id:
                          type: string
                          example: 01k77ax6n3vcmxbyt0env1zkar
                        updated_at:
                          type: string
                          example: '2025-10-10T15:12:53.000000Z'
                        warehouse_id:
                          type: string
                          example: 01k1amyq271bm81tncbepdxa2j
                    example:
                      - batch_number: null
                        created_at: '2025-10-10T15:12:53.000000Z'
                        expiration_date: null
                        id: '1742'
                        metadata: null
                        production_date: null
                        quantity: 50
                        stock_id: 01k77ax6n3vcmxbyt0env1zkar
                        updated_at: '2025-10-10T15:12:53.000000Z'
                        warehouse_id: 01k1amyq271bm81tncbepdxa2j
                  title:
                    type: string
                    example: Action Short / Navy
                  updated_at:
                    type: string
                    example: '2025-10-10T15:12:53.000000Z'
              examples:
                '201':
                  value:
                    company_id: 01hqydxwtxdj3kmzp3bz7jk73g
                    created_at: '2025-10-10T15:12:53.000000Z'
                    id: 01k77ax6n3vcmxbyt0env1zkar
                    media: []
                    medias: []
                    price: null
                    product_variant:
                      barcode: null
                      base_title: Default Title
                      buffer_minutes: 0
                      compare_at_price: null
                      composite_stocks: []
                      created_at: '2025-10-10T15:09:15.000000Z'
                      deleted_at: null
                      deposit: null
                      duration_minutes: 0
                      estimated_quantity: 50
                      estimated_quantity_by_warehouse:
                        01k1amyq271bm81tncbepdxa2j: 50
                      follow_stock: 1
                      id: 01k77apj286gns7ap98hn5ejhc
                      image_id: null
                      metadata: null
                      min_order_quantity: 1
                      options:
                        - 01heb9kba8d8fgh58vpp72yw86
                      position: 1
                      price: 6500
                      product_id: 01k77apj1gvqheyjjqx5pzfkrn
                      professionals: []
                      service:
                        buffer_minutes: 0
                        created_at: '2025-10-10T15:09:15.000000Z'
                        deleted_at: null
                        deposit: null
                        duration_minutes: 0
                        id: 01k77apj2vjttkanj2v90572dx
                        metadata: null
                        product_variant_id: 01k77apj286gns7ap98hn5ejhc
                        professionals: []
                        updated_at: '2025-10-10T15:09:15.000000Z'
                      service_id: 01k77apj2vjttkanj2v90572dx
                      sku: le paquet
                      supplierproduct: null
                      taxable: 1
                      title: Default Title
                      updated_at: '2025-10-10T15:12:53.000000Z'
                      whatsapp_product_id: null
                    product_variant_compositions: []
                    product_variant_id: 01k77apj286gns7ap98hn5ejhc
                    quantity: 50
                    quantity_alert: 5
                    stocks_warehouse:
                      - batch_number: null
                        created_at: '2025-10-10T15:12:53.000000Z'
                        expiration_date: null
                        id: '1742'
                        metadata: null
                        production_date: null
                        quantity: 50
                        stock_id: 01k77ax6n3vcmxbyt0env1zkar
                        updated_at: '2025-10-10T15:12:53.000000Z'
                        warehouse_id: 01k1amyq271bm81tncbepdxa2j
                    title: Action Short / Navy
                    updated_at: '2025-10-10T15:12:53.000000Z'
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````