> ## 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 Movement



## OpenAPI

````yaml /api/openapi-cutmake.json post /api/v1/stock/movements
openapi: 3.1.0
info:
  title: VM App API
  version: 0.1.0
servers:
  - url: https://vinmake-erp.onrender.com
security: []
paths:
  /api/v1/stock/movements:
    post:
      tags:
        - Stock
      summary: Create Stock Movement
      operationId: create_stock_movement_api_v1_stock_movements_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/StockMovementCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StockLedgerEntryResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    StockMovementCreate:
      properties:
        movementGroupId:
          anyOf:
            - type: string
            - type: 'null'
          title: Movementgroupid
        stockLotId:
          type: string
          title: Stocklotid
        stockLocationId:
          type: string
          title: Stocklocationid
        movementType:
          type: string
          title: Movementtype
        qtyDelta:
          type: number
          title: Qtydelta
        uom:
          anyOf:
            - type: string
            - type: 'null'
          title: Uom
        unitCost:
          anyOf:
            - type: number
            - type: 'null'
          title: Unitcost
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        sourceDocumentType:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcedocumenttype
        sourceDocumentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcedocumentid
        sourceLineId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcelineid
        productionOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Productionorderid
        purchaseOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Purchaseorderid
        purchaseOrderLineItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Purchaseorderlineitemid
        inboundReceiptLineItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Inboundreceiptlineitemid
        shipmentLineItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Shipmentlineitemid
        cutJobId:
          anyOf:
            - type: string
            - type: 'null'
          title: Cutjobid
        sewingSegmentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sewingsegmentid
        garmentQcReportId:
          anyOf:
            - type: string
            - type: 'null'
          title: Garmentqcreportid
        createdByWorkerId:
          anyOf:
            - type: string
            - type: 'null'
          title: Createdbyworkerid
        createdById:
          anyOf:
            - type: string
            - type: 'null'
          title: Createdbyid
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
      type: object
      required:
        - stockLotId
        - stockLocationId
        - movementType
        - qtyDelta
      title: StockMovementCreate
    StockLedgerEntryResponse:
      properties:
        id:
          type: string
          title: Id
        movementGroupId:
          type: string
          title: Movementgroupid
        stockLotId:
          type: string
          title: Stocklotid
        stockLotDocumentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Stocklotdocumentid
        stockLocationId:
          anyOf:
            - type: string
            - type: 'null'
          title: Stocklocationid
        stockLocationName:
          anyOf:
            - type: string
            - type: 'null'
          title: Stocklocationname
        movementType:
          type: string
          title: Movementtype
        qtyDelta:
          type: number
          title: Qtydelta
        uom:
          type: string
          title: Uom
        balanceAfter:
          anyOf:
            - type: number
            - type: 'null'
          title: Balanceafter
        unitCost:
          anyOf:
            - type: number
            - type: 'null'
          title: Unitcost
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        sourceDocumentType:
          type: string
          title: Sourcedocumenttype
        sourceDocumentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcedocumentid
        sourceLineId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcelineid
        productionOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Productionorderid
        purchaseOrderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Purchaseorderid
        purchaseOrderLineItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Purchaseorderlineitemid
        inboundReceiptLineItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Inboundreceiptlineitemid
        shipmentLineItemId:
          anyOf:
            - type: string
            - type: 'null'
          title: Shipmentlineitemid
        cutJobId:
          anyOf:
            - type: string
            - type: 'null'
          title: Cutjobid
        sewingSegmentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sewingsegmentid
        garmentQcReportId:
          anyOf:
            - type: string
            - type: 'null'
          title: Garmentqcreportid
        createdByWorkerId:
          anyOf:
            - type: string
            - type: 'null'
          title: Createdbyworkerid
        createdById:
          anyOf:
            - type: string
            - type: 'null'
          title: Createdbyid
        createdAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Createdat
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
      type: object
      required:
        - id
        - movementGroupId
        - stockLotId
        - movementType
        - qtyDelta
        - uom
        - sourceDocumentType
      title: StockLedgerEntryResponse
    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

````