# Create invoiceline Creates a new Invoiceline record. Invoiceline resource in the Animal Health Data Store Endpoint: POST /site/{siteId}/ahds/v1/invoiceline Version: 1.0 Security: bearer ## Path parameters: - `siteId` (number, required) Site identifier ## Request fields (application/json): - `animalId` (string,null) Identifier of the animal associated with this invoice line, if any. Example: "123e4567-e89b-12d3-a456-426614174000" - `batch` (string,null) Batch or lot identifier for inventory-tracked products, if applicable. - `consultId` (string,null) Identifier of the consultation associated with this invoice line, if any. Example: "123e4567-e89b-12d3-a456-426614174000" - `currency` (string, required) ISO 4217 currency code for all monetary amounts on this line. - `discountAmount` (string, required) Absolute discount amount (excluding tax) applied to this line, as a decimal string. Example: "100.00" - `extensions` (object) Vendor- or practice-specific extensions. - `groupId` (string,null) Identifier for a grouping of invoice lines (e.g., package or section). Example: "123e4567-e89b-12d3-a456-426614174000" - `invoiceId` (string, required) Identifier of the parent invoice. Example: "123e4567-e89b-12d3-a456-426614174000" - `invoicelineId` (string, required) Canonical identifier for this invoice line. Example: "123e4567-e89b-12d3-a456-426614174000" - `isActive` (boolean, required) Whether this invoice line is active. - `ledgerAccountId` (string,null) Identifier of the ledger or GL account associated with this line. Example: "123e4567-e89b-12d3-a456-426614174000" - `lineTaxTotal` (string, required) Total tax amount for this line, as a decimal string. Example: "100.00" - `lineTotal` (string, required) Extended line total (excluding tax) after discount, as a decimal string. Example: "100.00" - `lineType` (string) Type of invoice line (e.g., product, service, discount). Enum: "product", "service", "discount", "surcharge", "other" - `locationId` (string,null) Identifier of the practice location where this line item was generated. Example: "123e4567-e89b-12d3-a456-426614174000" - `name` (string, required) Human-readable description of the invoice line, typically the product or service name. - `ownershipId` (string,null) Identifier representing the ownership or billing entity associated with this line. Example: "123e4567-e89b-12d3-a456-426614174000" - `productId` (string, required) Reference to the billed product or service. Example: "123e4567-e89b-12d3-a456-426614174000" - `quantity` (string, required) Quantity of the product or service as a decimal string. Example: "100.00" - `salesPersonId` (string,null) Identifier of the staff member credited as salesperson for this line. Example: "123e4567-e89b-12d3-a456-426614174000" - `serviceDate` (string,null) Service or supply date associated with this line, if distinct from the invoice date. Example: "2025-01-01" - `standardUnitPrice` (string, required) Standard or list unit price (excluding tax) before discount, as a decimal string. Example: "100.00" - `standardUnitTaxAmount` (string, required) Standard tax amount per unit before discount, as a decimal string. Example: "100.00" - `status` (string, required) Lifecycle status of the invoice line. Enum: "draft", "posted", "void", "credited" - `taxCode` (string, required) Practice-specific tax code applied to this line. - `taxPercent` (number, required) Tax rate percentage applied to this line (e.g., 15 for 15%). - `unitPrice` (string, required) Net unit price (excluding tax) after discount, as a decimal string. Example: "100.00" - `unitTaxAmount` (string, required) Tax amount per unit, as a decimal string. Example: "100.00" ## Response 201 fields (application/json): - `animalId` (string,null, required) Identifier of the animal associated with this invoice line, if any. Example: "123e4567-e89b-12d3-a456-426614174000" - `batch` (string,null, required) Batch or lot identifier for inventory-tracked products, if applicable. - `consultId` (string,null, required) Identifier of the consultation associated with this invoice line, if any. Example: "123e4567-e89b-12d3-a456-426614174000" - `createdAt` (string, required) Timestamp when the invoice line was created. Example: "2025-01-01T00:00:00.000Z" - `currency` (string, required) ISO 4217 currency code for all monetary amounts on this line. - `discountAmount` (string, required) Absolute discount amount (excluding tax) applied to this line, as a decimal string. Example: "100.00" - `extensions` (object, required) Vendor- or practice-specific extensions. - `groupId` (string,null, required) Identifier for a grouping of invoice lines (e.g., package or section). Example: "123e4567-e89b-12d3-a456-426614174000" - `invoiceId` (string, required) Identifier of the parent invoice. Example: "123e4567-e89b-12d3-a456-426614174000" - `invoicelineId` (string, required) Canonical identifier for this invoice line. Example: "123e4567-e89b-12d3-a456-426614174000" - `isActive` (boolean, required) Whether this invoice line is active. - `ledgerAccountId` (string,null, required) Identifier of the ledger or GL account associated with this line. Example: "123e4567-e89b-12d3-a456-426614174000" - `lineTaxTotal` (string, required) Total tax amount for this line, as a decimal string. Example: "100.00" - `lineTotal` (string, required) Extended line total (excluding tax) after discount, as a decimal string. Example: "100.00" - `lineType` (string, required) Type of invoice line (e.g., product, service, discount). Enum: "product", "service", "discount", "surcharge", "other" - `locationId` (string,null, required) Identifier of the practice location where this line item was generated. Example: "123e4567-e89b-12d3-a456-426614174000" - `name` (string, required) Human-readable description of the invoice line, typically the product or service name. - `ownershipId` (string,null, required) Identifier representing the ownership or billing entity associated with this line. Example: "123e4567-e89b-12d3-a456-426614174000" - `productId` (string, required) Reference to the billed product or service. Example: "123e4567-e89b-12d3-a456-426614174000" - `quantity` (string, required) Quantity of the product or service as a decimal string. Example: "100.00" - `salesPersonId` (string,null, required) Identifier of the staff member credited as salesperson for this line. Example: "123e4567-e89b-12d3-a456-426614174000" - `serviceDate` (string,null, required) Service or supply date associated with this line, if distinct from the invoice date. Example: "2025-01-01T00:00:00Z" - `standardUnitPrice` (string, required) Standard or list unit price (excluding tax) before discount, as a decimal string. Example: "100.00" - `standardUnitTaxAmount` (string, required) Standard tax amount per unit before discount, as a decimal string. Example: "100.00" - `status` (string, required) Lifecycle status of the invoice line. Enum: "draft", "posted", "void", "credited" - `taxCode` (string, required) Practice-specific tax code applied to this line. - `taxPercent` (number, required) Tax rate percentage applied to this line (e.g., 15 for 15%). - `unitPrice` (string, required) Net unit price (excluding tax) after discount, as a decimal string. Example: "100.00" - `unitTaxAmount` (string, required) Tax amount per unit, as a decimal string. Example: "100.00" - `updatedAt` (string, required) Timestamp when the invoice line was last modified. Example: "2025-01-01T00:00:00.000Z" ## Response 400 fields ## Response 401 fields ## Response 409 fields