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

# Update Stock Transfer

> Update a pending stock transfer.



## OpenAPI

````yaml patch /inventory/stock-transfers/{id}
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /inventory/stock-transfers/{id}:
    patch:
      tags:
        - Stock
      summary: Update Stock Transfer
      description: Update a pending stock transfer.
      operationId: update_stock_transfer_inventory_stock_transfers__id__patch
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: id
          in: path
          required: true
          schema:
            type: string
            title: Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateStockTransfer'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StockTransfer'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UpdateStockTransfer:
      properties:
        items:
          anyOf:
            - items:
                $ref: '#/components/schemas/StockTransferItemCreate'
              type: array
            - type: 'null'
          title: Items
          description: New list of items (replaces existing)
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
          description: Updated notes
      type: object
      title: UpdateStockTransfer
      description: Schema for updating a pending stock transfer.
    StockTransfer:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the transfer
        fromLocationId:
          type: string
          title: Fromlocationid
          description: ID of the source location
        toLocationId:
          type: string
          title: Tolocationid
          description: ID of the destination location
        status:
          $ref: '#/components/schemas/StockTransferStatus'
          description: Status of the transfer
          default: PENDING
        creatorId:
          type: string
          title: Creatorid
          description: ID of the user who created the transfer
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
          description: Optional notes
        completedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completeddate
          description: Date the transfer was completed
        createdDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createddate
          description: Date the transfer was created
        updatedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updateddate
          description: Date the transfer was last updated
        fromLocation:
          anyOf:
            - $ref: '#/components/schemas/StockTransferLocation'
            - type: 'null'
          description: Source location details
        toLocation:
          anyOf:
            - $ref: '#/components/schemas/StockTransferLocation'
            - type: 'null'
          description: Destination location details
        creator:
          anyOf:
            - $ref: '#/components/schemas/StockTransferUser'
            - type: 'null'
          description: User who created the transfer
        items:
          anyOf:
            - items:
                $ref: '#/components/schemas/StockTransferItem'
              type: array
            - type: 'null'
          title: Items
          description: Transfer items
      type: object
      required:
        - fromLocationId
        - toLocationId
        - creatorId
      title: StockTransfer
      description: Stock transfer response schema.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    StockTransferItemCreate:
      properties:
        sourceShipmentId:
          type: string
          title: Sourceshipmentid
          description: ID of the source shipment to transfer from
        quantityRequested:
          type: number
          exclusiveMinimum: 0
          title: Quantityrequested
          description: Quantity to transfer
      type: object
      required:
        - sourceShipmentId
        - quantityRequested
      title: StockTransferItemCreate
      description: Schema for creating a stock transfer item.
    StockTransferStatus:
      type: string
      enum:
        - PENDING
        - COMPLETED
        - CANCELLED
      title: StockTransferStatus
    StockTransferLocation:
      properties:
        id:
          type: string
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        isVirtual:
          type: boolean
          title: Isvirtual
          default: false
      type: object
      required:
        - id
      title: StockTransferLocation
      description: Location info for stock transfers.
    StockTransferUser:
      properties:
        id:
          type: string
          title: Id
        firstName:
          anyOf:
            - type: string
            - type: 'null'
          title: Firstname
        lastName:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastname
      type: object
      required:
        - id
      title: StockTransferUser
      description: User info for stock transfers.
    StockTransferItem:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the item
        stockTransferId:
          type: string
          title: Stocktransferid
          description: ID of the parent stock transfer
        sourceShipmentId:
          type: string
          title: Sourceshipmentid
          description: ID of the source shipment
        destinationShipmentId:
          anyOf:
            - type: string
            - type: 'null'
          title: Destinationshipmentid
          description: ID of the destination shipment (set on complete)
        quantityRequested:
          type: number
          title: Quantityrequested
          description: Quantity requested to transfer
        quantityShipped:
          anyOf:
            - type: number
            - type: 'null'
          title: Quantityshipped
          description: Quantity actually shipped (set on complete)
        quantityReceived:
          anyOf:
            - type: number
            - type: 'null'
          title: Quantityreceived
          description: Quantity received (set on complete)
        createdDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createddate
          description: Date the item was created
        updatedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updateddate
          description: Date the item was last updated
        sourceShipment:
          anyOf:
            - $ref: '#/components/schemas/StockTransferShipment'
            - type: 'null'
          description: Source shipment details
        destinationShipment:
          anyOf:
            - $ref: '#/components/schemas/StockTransferShipment'
            - type: 'null'
          description: Destination shipment details
      type: object
      required:
        - stockTransferId
        - sourceShipmentId
        - quantityRequested
      title: StockTransferItem
      description: Stock transfer item response schema.
    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
    StockTransferShipment:
      properties:
        id:
          type: string
          title: Id
        stockId:
          type: string
          title: Stockid
        lotNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Lotnumber
        expiryDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expirydate
        sku:
          anyOf:
            - type: string
            - type: 'null'
          title: Sku
        remainingQuantity:
          type: number
          title: Remainingquantity
        cost:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cost
        stock:
          anyOf:
            - $ref: '#/components/schemas/StockTransferStock'
            - type: 'null'
          description: Stock details
      type: object
      required:
        - id
        - stockId
        - remainingQuantity
      title: StockTransferShipment
      description: Shipment info for stock transfer items.
    StockTransferStock:
      properties:
        id:
          type: string
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit
      type: object
      required:
        - id
      title: StockTransferStock
      description: Stock info for shipments in stock transfers.

````