# Replace invoice Fully replaces an existing Invoice. All fields must be provided. Endpoint: PUT /site/{siteId}/ahds/v1/invoice/{invoiceId} Version: 1.0 Security: bearer ## Path parameters: - `siteId` (number, required) Site identifier - `invoiceId` (string, required) Invoice unique identifier (UUID) ## Request fields (application/json): - `animalId` (string, required) Animal associated with the invoice. Example: "123e4567-e89b-12d3-a456-426614174000" - `approvedAt` (string, required) Timestamp when the invoice was approved. Example: "2025-01-01T00:00:00.000Z" - `approvedByUserId` (string, required) User who approved the invoice. Example: "123e4567-e89b-12d3-a456-426614174000" - `consultId` (string, required) Consultation associated with the invoice. Example: "123e4567-e89b-12d3-a456-426614174000" - `contactId` (string, required) Client/contact associated with the invoice. Example: "123e4567-e89b-12d3-a456-426614174000" - `createdByUserId` (string, required) User who created the invoice. Example: "123e4567-e89b-12d3-a456-426614174000" - `currency` (string, required) ISO 4217 currency code for monetary amounts. - `customerReferenceNumber` (string, required) Customer-provided reference number. - `dueDate` (string, required) Invoice due date. Example: "2025-01-01" - `extensions` (object, required) Vendor- or practice-specific extensions. - `financials` (object, required) Financial linkage information for the invoice. - `invoiceCode` (string, required) Human-readable invoice code or number. - `invoiceDate` (string, required) Invoice issue date. Example: "2025-01-01" - `isActive` (boolean, required) Whether the invoice is active. - `isTaxIncluded` (boolean, required) Whether line item prices include tax. - `lineItems` (array, required) Line items that make up the invoice. - `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" - `ownershipId` (string, required) Owning organization or business unit. Example: "123e4567-e89b-12d3-a456-426614174000" - `paymentTermsId` (string, required) Payment terms associated with the invoice. Example: "123e4567-e89b-12d3-a456-426614174000" - `subtotalAmount` (string, required) Subtotal amount excluding tax, as a decimal string. Example: "100.00" - `taxAmount` (string, required) Total tax amount, as a decimal string. Example: "100.00" - `updatedByUserId` (string, required) User who last modified the invoice. Example: "123e4567-e89b-12d3-a456-426614174000" ## Response 200 fields (application/json): - `animalId` (string, required) Animal associated with the invoice. Example: "123e4567-e89b-12d3-a456-426614174000" - `approvedAt` (string, required) Timestamp when the invoice was approved. Example: "2025-01-01T00:00:00.000Z" - `approvedByUserId` (string, required) User who approved the invoice. Example: "123e4567-e89b-12d3-a456-426614174000" - `consultId` (string, required) Consultation associated with the invoice. Example: "123e4567-e89b-12d3-a456-426614174000" - `contactId` (string, required) Client/contact associated with the invoice. Example: "123e4567-e89b-12d3-a456-426614174000" - `createdAt` (string, required) Timestamp when the invoice was created. Example: "2025-01-01T00:00:00.000Z" - `createdByUserId` (string, required) User who created the invoice. Example: "123e4567-e89b-12d3-a456-426614174000" - `currency` (string, required) ISO 4217 currency code for monetary amounts. - `customerReferenceNumber` (string, required) Customer-provided reference number. - `dueDate` (string, required) Invoice due date. Example: "2025-01-01T00:00:00Z" - `extensions` (object, required) Vendor- or practice-specific extensions. - `financials` (object, required) Financial linkage information for the invoice. - `invoiceCode` (string, required) Human-readable invoice code or number. - `invoiceDate` (string, required) Invoice issue date. Example: "2025-01-01T00:00:00Z" - `invoiceId` (string, required) Canonical identifier for the invoice. Example: "123e4567-e89b-12d3-a456-426614174000" - `isActive` (boolean, required) Whether the invoice is active. - `isTaxIncluded` (boolean, required) Whether line item prices include tax. - `lineItems` (array, required) Line items that make up the invoice. - `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" - `ownershipId` (string, required) Owning organization or business unit. Example: "123e4567-e89b-12d3-a456-426614174000" - `paymentTermsId` (string, required) Payment terms associated with the invoice. Example: "123e4567-e89b-12d3-a456-426614174000" - `subtotalAmount` (string, required) Subtotal amount excluding tax, as a decimal string. Example: "100.00" - `taxAmount` (string, required) Total tax amount, as a decimal string. Example: "100.00" - `updatedAt` (string, required) Timestamp when the invoice was last modified. Example: "2025-01-01T00:00:00.000Z" - `updatedByUserId` (string, required) User who last modified the invoice. Example: "123e4567-e89b-12d3-a456-426614174000" ## Response 400 fields ## Response 401 fields ## Response 404 fields