# Create stock adjustment Creates a new Stock Adjustment record. Stock Adjustment resource in the Animal Health Data Store Endpoint: POST /site/{siteId}/ahds/v1/stock-adjustment Version: 1.0 Security: bearer ## Path parameters: - `siteId` (number, required) Site identifier ## Request fields (application/json): - `comments` (string) Free-text comments associated with the stock adjustment. - `extensions` (object) Vendor- or practice-specific extensions. - `lineItems` (array, required) Line items that make up this stock adjustment. - `lineItems.createdAt` (string) Timestamp when the line item was created. Example: "2025-01-01T00:00:00.000Z" - `lineItems.discountAmount` (string) Discount applied to this line item, as a decimal string. Example: "100.00" - `lineItems.groupId` (string) Grouping identifier for related line items. Example: "123e4567-e89b-12d3-a456-426614174000" - `lineItems.invoiceLineItemId` (string, required) Identifier for the invoice line item. Example: "123e4567-e89b-12d3-a456-426614174000" - `lineItems.isActive` (boolean) Whether the line item is active. - `lineItems.ledgerAccountId` (string) Ledger account associated with this line item. Example: "123e4567-e89b-12d3-a456-426614174000" - `lineItems.lineTaxAmount` (string, required) Total tax amount for this line. Example: "100.00" - `lineItems.lineTotalAmount` (string, required) Total amount for this line excluding tax. Example: "100.00" - `lineItems.lineType` (string) Type/category of the line item. - `lineItems.locationId` (string) Location associated with this line item. Example: "123e4567-e89b-12d3-a456-426614174000" - `lineItems.name` (string, required) Display name/description of the line item. - `lineItems.ownershipId` (string) Owning organization or business unit for this line item. Example: "123e4567-e89b-12d3-a456-426614174000" - `lineItems.productId` (string) Product or service associated with this line item. Example: "123e4567-e89b-12d3-a456-426614174000" - `lineItems.quantity` (number, required) Quantity of the product or service. - `lineItems.salesPersonId` (string) Salesperson associated with this line item. Example: "123e4567-e89b-12d3-a456-426614174000" - `lineItems.standardUnitPriceAmount` (string) Standard (list) unit price excluding tax. Example: "100.00" - `lineItems.standardUnitTaxAmount` (string) Standard (list) tax per unit. Example: "100.00" - `lineItems.status` (string) Status of the line item. - `lineItems.taxCode` (string) Tax code applied to this line item. - `lineItems.taxPercent` (number) Tax percentage applied to this line item. - `lineItems.unitPriceAmount` (string, required) Unit price excluding tax, as a decimal string. Example: "100.00" - `lineItems.unitTaxAmount` (string) Tax per unit, as a decimal string. Example: "100.00" - `lineItems.updatedAt` (string) Timestamp when the line item was last modified. Example: "2025-01-01T00:00:00.000Z" - `occurredAt` (string, required) When the stock adjustment occurred (RFC 3339). Example: "2025-01-01T00:00:00.000Z" - `ownershipId` (string, required) Identifier of the ownership or separation context this stock adjustment belongs to. Example: "123e4567-e89b-12d3-a456-426614174000" - `stockAdjustmentId` (string, required) Canonical identifier for the stock adjustment. Example: "123e4567-e89b-12d3-a456-426614174000" ## Response 201 fields (application/json): - `comments` (string, required) Free-text comments associated with the stock adjustment. - `createdAt` (string, required) Timestamp when this stock adjustment record was created. Example: "2025-01-01T00:00:00.000Z" - `extensions` (object, required) Vendor- or practice-specific extensions. - `lineItems` (array, required) Line items that make up this stock adjustment. - `lineItems.createdAt` (string) Timestamp when the line item was created. Example: "2025-01-01T00:00:00.000Z" - `lineItems.discountAmount` (string) Discount applied to this line item, as a decimal string. Example: "100.00" - `lineItems.groupId` (string) Grouping identifier for related line items. Example: "123e4567-e89b-12d3-a456-426614174000" - `lineItems.invoiceLineItemId` (string, required) Identifier for the invoice line item. Example: "123e4567-e89b-12d3-a456-426614174000" - `lineItems.isActive` (boolean) Whether the line item is active. - `lineItems.ledgerAccountId` (string) Ledger account associated with this line item. Example: "123e4567-e89b-12d3-a456-426614174000" - `lineItems.lineTaxAmount` (string, required) Total tax amount for this line. Example: "100.00" - `lineItems.lineTotalAmount` (string, required) Total amount for this line excluding tax. Example: "100.00" - `lineItems.lineType` (string) Type/category of the line item. - `lineItems.locationId` (string) Location associated with this line item. Example: "123e4567-e89b-12d3-a456-426614174000" - `lineItems.name` (string, required) Display name/description of the line item. - `lineItems.ownershipId` (string) Owning organization or business unit for this line item. Example: "123e4567-e89b-12d3-a456-426614174000" - `lineItems.productId` (string) Product or service associated with this line item. Example: "123e4567-e89b-12d3-a456-426614174000" - `lineItems.quantity` (number, required) Quantity of the product or service. - `lineItems.salesPersonId` (string) Salesperson associated with this line item. Example: "123e4567-e89b-12d3-a456-426614174000" - `lineItems.standardUnitPriceAmount` (string) Standard (list) unit price excluding tax. Example: "100.00" - `lineItems.standardUnitTaxAmount` (string) Standard (list) tax per unit. Example: "100.00" - `lineItems.status` (string) Status of the line item. - `lineItems.taxCode` (string) Tax code applied to this line item. - `lineItems.taxPercent` (number) Tax percentage applied to this line item. - `lineItems.unitPriceAmount` (string, required) Unit price excluding tax, as a decimal string. Example: "100.00" - `lineItems.unitTaxAmount` (string) Tax per unit, as a decimal string. Example: "100.00" - `lineItems.updatedAt` (string) Timestamp when the line item was last modified. Example: "2025-01-01T00:00:00.000Z" - `occurredAt` (string, required) When the stock adjustment occurred (RFC 3339). Example: "2025-01-01T00:00:00.000Z" - `ownershipId` (string, required) Identifier of the ownership or separation context this stock adjustment belongs to. Example: "123e4567-e89b-12d3-a456-426614174000" - `stockAdjustmentId` (string, required) Canonical identifier for the stock adjustment. Example: "123e4567-e89b-12d3-a456-426614174000" - `updatedAt` (string, required) Timestamp when this stock adjustment record was last updated. Example: "2025-01-01T00:00:00.000Z" ## Response 400 fields ## Response 401 fields ## Response 409 fields