# Update herd

Partially updates an existing Herd. Only provided fields will be updated.

Endpoint: PATCH /site/{siteId}/ahds/v1/herd/{herdId}
Version: 1.0
Security: bearer

## Security:

  - `bearer` (unknown)
    http bearer JWT

## Path parameters:

  - `siteId` (number, required)
    Site identifier

  - `herdId` (string, required)
    Herd unique identifier (UUID)

## Request fields (application/json):

  - `name` (string)
    Human-readable name or identifier for the herd.
    Example: 123e4567-e89b-12d3-a456-426614174000

  - `herdType` (object)
    Type of herd (cattle, sheep, swine, poultry).

  - `herdType.code` (string, required)
    Code value
    Example: 12345

  - `herdType.system` (string, required)
    Code system URI
    Example: http://example.com/codesystem

  - `herdType.display` (string)
    Human-readable display
    Example: Example Display Name

  - `ownerId` (string)
    Reference to the contact who owns this herd.
    Example: 123e4567-e89b-12d3-a456-426614174000

  - `locationId` (string)
    Reference to the primary location where the herd is kept.
    Example: 123e4567-e89b-12d3-a456-426614174000

  - `estimatedCount` (number)
    Estimated number of animals in the herd.
    Example: 1.23

  - `isActive` (boolean)
    Whether the herd is currently active.
    Example: true

  - `extensions` (object)
    Vendor- or practice-specific extensions.

## Response 200:

  - `200` (unknown)
    Herd updated successfully

## Response 200 fields (application/json):

  - `herdId` (string, required)
    Canonical unique identifier for the herd.
    Example: 123e4567-e89b-12d3-a456-426614174000

  - `name` (string, required)
    Human-readable name or identifier for the herd.
    Example: 123e4567-e89b-12d3-a456-426614174000

  - `herdType` (object, required)
    Type of herd (cattle, sheep, swine, poultry).

  - `herdType.code` (string, required)
    Code value
    Example: 12345

  - `herdType.system` (string, required)
    Code system URI
    Example: http://example.com/codesystem

  - `herdType.display` (string)
    Human-readable display
    Example: Example Display Name

  - `ownerId` (string, required)
    Reference to the contact who owns this herd.
    Example: 123e4567-e89b-12d3-a456-426614174000

  - `locationId` (string, required)
    Reference to the primary location where the herd is kept.
    Example: 123e4567-e89b-12d3-a456-426614174000

  - `estimatedCount` (number, required)
    Estimated number of animals in the herd.
    Example: 1.23

  - `isActive` (boolean, required)
    Whether the herd is currently active.
    Example: true

  - `createdAt` (string, required)
    Timestamp when the herd record was created.
    Example: 2025-01-01T00:00:00.000Z

  - `updatedAt` (string, required)
    Timestamp when the herd record was last updated.
    Example: 2025-01-01T00:00:00.000Z

  - `extensions` (object, required)
    Vendor- or practice-specific extensions.

## Response 400:

  - `400` (unknown)
    Invalid request body

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 404:

  - `404` (unknown)
    Herd not found

