# Update external prescription Partially updates an existing External Prescription. Only provided fields will be updated. Endpoint: PATCH /site/{siteId}/ahds/v1/external-prescription/{externalPrescriptionId} Version: 1.0 Security: bearer ## Path parameters: - `siteId` (number, required) Site identifier - `externalPrescriptionId` (string, required) External Prescription unique identifier (UUID) ## Request fields (application/json): - `animalId` (string) Reference to the animal for which the prescription was written. Example: "123e4567-e89b-12d3-a456-426614174000" - `consultId` (string,null) Reference to the consult/visit associated with this prescription. Example: "123e4567-e89b-12d3-a456-426614174000" - `contactId` (string,null) Reference to the client/owner contact associated with this prescription. Example: "123e4567-e89b-12d3-a456-426614174000" - `extensions` (object) Vendor- or practice-specific extensions. - `externalReference` (string) External system reference or identifier for this prescription (e.g., pharmacy system ID). - `items` (array) List of externally prescribed items. - `items.class` (string) Classification of the diagnostic item (e.g., lab, imaging). - `items.code` (object) Coded representation of the diagnostic item. - `items.code.code` (string, required) Code value - `items.code.system` (string, required) Code system URI - `items.code.display` (string) Human-readable display - `items.createdAt` (string) Timestamp when this diagnostic item was created. Example: "2025-01-01T00:00:00.000Z" - `items.diagnosticDefinitionId` (string) Reference to the diagnostic definition/catalog entry. Example: "123e4567-e89b-12d3-a456-426614174000" - `items.diagnosticItemId` (string, required) Canonical identifier for this diagnostic item within the request. Example: "123e4567-e89b-12d3-a456-426614174000" - `items.isActive` (boolean) Whether this diagnostic item is currently active. - `items.name` (string) Human-readable name of the diagnostic item. - `items.productId` (string) Linked billable product, if applicable. Example: "123e4567-e89b-12d3-a456-426614174000" - `items.updatedAt` (string) Timestamp when this diagnostic item was last updated. Example: "2025-01-01T00:00:00.000Z" - `prescribingVetUserId` (string) Reference to the user (veterinarian) who prescribed the medication. Example: "123e4567-e89b-12d3-a456-426614174000" - `totalPrice` (object) Total price for all items on the prescription. - `prescribedAt` (string) Timestamp when the prescription was written (RFC 3339). Example: "2025-01-01T00:00:00.000Z" ## Response 200 fields (application/json): - `animalId` (string, required) Reference to the animal for which the prescription was written. Example: "123e4567-e89b-12d3-a456-426614174000" - `consultId` (string,null, required) Reference to the consult/visit associated with this prescription. Example: "123e4567-e89b-12d3-a456-426614174000" - `contactId` (string,null, required) Reference to the client/owner contact associated with this prescription. Example: "123e4567-e89b-12d3-a456-426614174000" - `createdAt` (string, required) Timestamp when the external prescription record was created. Example: "2025-01-01T00:00:00.000Z" - `extensions` (object, required) Vendor- or practice-specific extensions. - `externalPrescriptionId` (string, required) Canonical identifier for the external prescription. Example: "123e4567-e89b-12d3-a456-426614174000" - `externalReference` (string, required) External system reference or identifier for this prescription (e.g., pharmacy system ID). - `items` (array, required) List of externally prescribed items. - `items.class` (string) Classification of the diagnostic item (e.g., lab, imaging). - `items.code` (object) Coded representation of the diagnostic item. - `items.code.code` (string, required) Code value - `items.code.system` (string, required) Code system URI - `items.code.display` (string) Human-readable display - `items.createdAt` (string) Timestamp when this diagnostic item was created. Example: "2025-01-01T00:00:00.000Z" - `items.diagnosticDefinitionId` (string) Reference to the diagnostic definition/catalog entry. Example: "123e4567-e89b-12d3-a456-426614174000" - `items.diagnosticItemId` (string, required) Canonical identifier for this diagnostic item within the request. Example: "123e4567-e89b-12d3-a456-426614174000" - `items.isActive` (boolean) Whether this diagnostic item is currently active. - `items.name` (string) Human-readable name of the diagnostic item. - `items.productId` (string) Linked billable product, if applicable. Example: "123e4567-e89b-12d3-a456-426614174000" - `items.updatedAt` (string) Timestamp when this diagnostic item was last updated. Example: "2025-01-01T00:00:00.000Z" - `prescribingVetUserId` (string, required) Reference to the user (veterinarian) who prescribed the medication. Example: "123e4567-e89b-12d3-a456-426614174000" - `totalPrice` (object, required) Total price for all items on the prescription. - `updatedAt` (string, required) Timestamp when the external prescription record was last updated. Example: "2025-01-01T00:00:00.000Z" - `prescribedAt` (string, required) Timestamp when the prescription was written (RFC 3339). Example: "2025-01-01T00:00:00.000Z" ## Response 400 fields ## Response 401 fields ## Response 404 fields