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

# Create Stock Lot



## OpenAPI

````yaml /api/openapi-cutmake.json post /stock/lots
openapi: 3.1.0
info:
  title: VM App API
  version: 0.1.0
servers:
  - url: https://vinmake-erp.onrender.com
security: []
paths:
  /stock/lots:
    post:
      tags:
        - Stock
      summary: Create Stock Lot
      operationId: create_stock_lot_stock_lots_post
      parameters:
        - name: X-Org-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Org-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StockLotWrite'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StockLotResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    StockLotWrite:
      properties:
        documentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Documentid
        stockDomain:
          anyOf:
            - type: string
            - type: 'null'
          title: Stockdomain
        stockState:
          anyOf:
            - type: string
            - type: 'null'
          title: Stockstate
        itemType:
          anyOf:
            - type: string
            - type: 'null'
          title: Itemtype
        materialId:
          anyOf:
            - type: string
            - type: 'null'
          title: Materialid
        materialSkuId:
          anyOf:
            - type: string
            - type: 'null'
          title: Materialskuid
        styleId:
          anyOf:
            - type: string
            - type: 'null'
          title: Styleid
        styleSkuId:
          anyOf:
            - type: string
            - type: 'null'
          title: Styleskuid
        productionOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Productionorderid
        sourcePurchaseOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcepurchaseorderid
        sourcePurchaseOrderLineItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcepurchaseorderlineitemid
        sourceShipmentLineItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourceshipmentlineitemid
        sourceDeliveryLineItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcedeliverylineitemid
        sourceInboundReceiptLineItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourceinboundreceiptlineitemid
        sourceCutJobId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcecutjobid
        sourceSewingSegmentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcesewingsegmentid
        sourceGarmentQcReportId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcegarmentqcreportid
        currentLocationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Currentlocationid
        supplierId:
          anyOf:
            - type: string
            - type: 'null'
          title: Supplierid
        batchNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Batchnumber
        lotNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Lotnumber
        rollNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Rollnumber
        rollCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Rollcode
        dyeLot:
          anyOf:
            - type: string
            - type: 'null'
          title: Dyelot
        cartonNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Cartonnumber
        qrCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Qrcode
        barcode:
          anyOf:
            - type: string
            - type: 'null'
          title: Barcode
        qtyInitial:
          anyOf:
            - type: number
            - type: 'null'
          title: Qtyinitial
        qtyCurrent:
          anyOf:
            - type: number
            - type: 'null'
          title: Qtycurrent
        uom:
          anyOf:
            - type: string
            - type: 'null'
          title: Uom
        qualityStatus:
          anyOf:
            - type: string
            - type: 'null'
          title: Qualitystatus
        receivedAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Receivedat
        manufacturedAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Manufacturedat
        expiresAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Expiresat
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
      type: object
      title: StockLotWrite
    StockLotResponse:
      properties:
        id:
          type: string
          title: Id
        documentId:
          type: string
          title: Documentid
        stockDomain:
          type: string
          title: Stockdomain
        stockState:
          type: string
          title: Stockstate
        itemType:
          type: string
          title: Itemtype
        materialId:
          anyOf:
            - type: string
            - type: 'null'
          title: Materialid
        materialName:
          anyOf:
            - type: string
            - type: 'null'
          title: Materialname
        materialSkuId:
          anyOf:
            - type: string
            - type: 'null'
          title: Materialskuid
        styleId:
          anyOf:
            - type: string
            - type: 'null'
          title: Styleid
        styleName:
          anyOf:
            - type: string
            - type: 'null'
          title: Stylename
        styleSkuId:
          anyOf:
            - type: string
            - type: 'null'
          title: Styleskuid
        productionOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Productionorderid
        sourcePurchaseOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcepurchaseorderid
        sourcePurchaseOrderLineItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcepurchaseorderlineitemid
        sourceShipmentLineItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourceshipmentlineitemid
        sourceDeliveryLineItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcedeliverylineitemid
        sourceInboundReceiptLineItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourceinboundreceiptlineitemid
        sourceCutJobId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcecutjobid
        sourceSewingSegmentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcesewingsegmentid
        sourceGarmentQcReportId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcegarmentqcreportid
        currentLocationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Currentlocationid
        currentLocationName:
          anyOf:
            - type: string
            - type: 'null'
          title: Currentlocationname
        supplierId:
          anyOf:
            - type: string
            - type: 'null'
          title: Supplierid
        supplierName:
          anyOf:
            - type: string
            - type: 'null'
          title: Suppliername
        batchNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Batchnumber
        lotNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Lotnumber
        rollNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Rollnumber
        rollCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Rollcode
        dyeLot:
          anyOf:
            - type: string
            - type: 'null'
          title: Dyelot
        cartonNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Cartonnumber
        qrCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Qrcode
        barcode:
          anyOf:
            - type: string
            - type: 'null'
          title: Barcode
        qtyInitial:
          type: number
          title: Qtyinitial
        qtyCurrent:
          type: number
          title: Qtycurrent
        uom:
          type: string
          title: Uom
        qualityStatus:
          type: string
          title: Qualitystatus
        receivedAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Receivedat
        manufacturedAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Manufacturedat
        expiresAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Expiresat
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
        createdAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Createdat
        updatedAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Updatedat
      type: object
      required:
        - id
        - documentId
        - stockDomain
        - stockState
        - itemType
        - qtyInitial
        - qtyCurrent
        - uom
        - qualityStatus
      title: StockLotResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /auth/login

````