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

# Update inventory stock

> Records a manual stock movement for a product — `in` adds stock, `out` removes it. Use `warehouse_id` -1 for the default warehouse and `record_date` to backdate the movement. Sales and purchase documents also move stock automatically.



## OpenAPI

````yaml post /v2/inventory/stock
openapi: 3.0.1
info:
  title: SwipeAPI
  version: '2.0'
  description: >-
    The Swipe Partner API — invoicing, payments, and GST compliance for your
    application. Create GST invoices and other documents, manage customers,
    vendors, products and inventory, record payments, and generate e-invoices
    and e-way bills.


    - Docs & guides: https://developers.getswipe.in

    - Quickstart: https://developers.getswipe.in/quickstart

    - Rate limit: 1 request/second per API key

    - All dates are DD-MM-YYYY
servers:
  - url: https://app.getswipe.in/api/partner
security:
  - bearerAuth: []
paths:
  /v2/inventory/stock:
    post:
      tags:
        - Inventory V2
      summary: Update inventory stock
      description: >-
        Records a manual stock movement for a product — `in` adds stock, `out`
        removes it. Use `warehouse_id` -1 for the default warehouse and
        `record_date` to backdate the movement. Sales and purchase documents
        also move stock automatically.
      operationId: post_inventory
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InventoryV2'
        required: true
      responses:
        '200':
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventoryV2Response'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventoryV2Response'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventoryV2Response'
components:
  schemas:
    InventoryV2:
      required:
        - action
        - product_id
        - quantity
        - warehouse_id
      properties:
        product_id:
          type: string
          description: Product ID
          example: '123456'
        quantity:
          type: number
          description: Opening Quantity
          example: 1
        warehouse_id:
          type: integer
          description: Warehouse ID
          example: -1
        remarks:
          type: string
          description: Remarks
          example: Remarks
        record_date:
          type: string
          description: Record Date (DD-MM-YYYY)
          example: 06-05-2025
        action:
          type: string
          description: Stock in or stock out
          example: in
          enum:
            - in
            - out
      type: object
    InventoryV2Response:
      properties:
        success:
          type: boolean
          description: Success
          example: false
        errors:
          type: object
          description: Error details
        error_code:
          type: string
          description: Error Code
          example: ''
        message:
          type: string
          description: Message
          example: ''
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is an API key from the [API
        Integration](https://app.getswipe.in/user?tab=api_integration) section
        of your dashboard. Keys are scoped to the company they are generated in
        — for testing, [add a separate test
        company](https://community.getswipe.in/t/how-to-add-new-company-on-web/1191)
        and generate the key there, so requests never touch your real books.

````