# Replace stock transaction Fully replaces an existing Stock Transaction. All fields must be provided. Endpoint: PUT /site/{siteId}/ahds/v1/stock-transaction/{stockTransactionId} Version: 1.0 Security: bearer ## Path parameters: - `siteId` (number, required) Site identifier - `stockTransactionId` (string, required) Stock Transaction unique identifier (UUID) ## Request fields (application/json): - `extensions` (object, required) Vendor- or practice-specific extensions. - `isActive` (boolean, required) Whether this stock transaction is active in the source system. - `productId` (string, required) Identifier of the product whose stock is affected. Example: "123e4567-e89b-12d3-a456-426614174000" - `quantity` (object, required) Quantity of stock affected by this transaction. - `quantity.value` (number, required) Numeric value - `quantity.unit` (string, required) Unit of measure - `quantity.system` (string) Unit system URI - `separationId` (string, required) Identifier for the stock separation/batch/location if applicable. Example: "123e4567-e89b-12d3-a456-426614174000" - `shouldAlterStock` (boolean, required) Indicates whether this transaction should alter on-hand stock levels. - `status` (string, required) Status of the stock transaction. Enum: "pending", "completed", "cancelled", "reversed", "unknown" - `subject` (object, required) Entity this stock transaction is for (e.g., invoice, order, procedure). - `transactedAt` (string, required) Effective date and time of the stock transaction. Example: "2025-01-01T00:00:00.000Z" ## Response 200 fields (application/json): - `createdAt` (string, required) Timestamp when the stock transaction record was created. Example: "2025-01-01T00:00:00.000Z" - `extensions` (object, required) Vendor- or practice-specific extensions. - `isActive` (boolean, required) Whether this stock transaction is active in the source system. - `productId` (string, required) Identifier of the product whose stock is affected. Example: "123e4567-e89b-12d3-a456-426614174000" - `quantity` (object, required) Quantity of stock affected by this transaction. - `quantity.value` (number, required) Numeric value - `quantity.unit` (string, required) Unit of measure - `quantity.system` (string) Unit system URI - `separationId` (string, required) Identifier for the stock separation/batch/location if applicable. Example: "123e4567-e89b-12d3-a456-426614174000" - `shouldAlterStock` (boolean, required) Indicates whether this transaction should alter on-hand stock levels. - `status` (string, required) Status of the stock transaction. Enum: "pending", "completed", "cancelled", "reversed", "unknown" - `stockTransactionId` (string, required) Canonical identifier for this stock transaction. Example: "123e4567-e89b-12d3-a456-426614174000" - `subject` (object, required) Entity this stock transaction is for (e.g., invoice, order, procedure). - `updatedAt` (string, required) Timestamp when the stock transaction record was last updated. Example: "2025-01-01T00:00:00.000Z" - `transactedAt` (string, required) Effective date and time of the stock transaction. Example: "2025-01-01T00:00:00.000Z" ## Response 400 fields ## Response 401 fields ## Response 404 fields