Skip to content

Replace herd

Request

Fully replaces an existing Herd. All fields must be provided.

Security
bearer
Path
siteIdnumberrequired

Site identifier

herdIdstringrequired

Herd unique identifier (UUID)

Bodyapplication/jsonrequired
namestringrequired

Human-readable name or identifier for the herd.

Example:"123e4567-e89b-12d3-a456-426614174000"
herdTypeobject(CodeableConceptDto)required

Type of herd (cattle, sheep, swine, poultry).

ownerIdstringrequired

Reference to the contact who owns this herd.

Example:"123e4567-e89b-12d3-a456-426614174000"
locationIdstringrequired

Reference to the primary location where the herd is kept.

Example:"123e4567-e89b-12d3-a456-426614174000"
estimatedCountnumberrequired

Estimated number of animals in the herd.

Example:1.23
isActivebooleanrequired

Whether the herd is currently active.

Example:true
extensionsobjectrequired

Vendor- or practice-specific extensions.

curl -i -X PUT \
  'https://docs.axiomera.com/_mock/apis/animal-health/openapi/site/{siteId}/ahds/v1/herd/{herdId}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "123e4567-e89b-12d3-a456-426614174000",
    "herdType": {
      "code": "12345",
      "system": "http://example.com/codesystem",
      "display": "Example Display Name"
    },
    "ownerId": "123e4567-e89b-12d3-a456-426614174000",
    "locationId": "123e4567-e89b-12d3-a456-426614174000",
    "estimatedCount": 1.23,
    "isActive": true,
    "extensions": {}
  }'

Responses

Herd replaced successfully

Bodyapplication/json
herdIdstringrequired

Canonical unique identifier for the herd.

Example:"123e4567-e89b-12d3-a456-426614174000"
namestringrequired

Human-readable name or identifier for the herd.

Example:"123e4567-e89b-12d3-a456-426614174000"
herdTypeobject(CodeableConceptDto)required

Type of herd (cattle, sheep, swine, poultry).

ownerIdstringrequired

Reference to the contact who owns this herd.

Example:"123e4567-e89b-12d3-a456-426614174000"
locationIdstringrequired

Reference to the primary location where the herd is kept.

Example:"123e4567-e89b-12d3-a456-426614174000"
estimatedCountnumberrequired

Estimated number of animals in the herd.

Example:1.23
isActivebooleanrequired

Whether the herd is currently active.

Example:true
createdAtstring, (date-time)required

Timestamp when the herd record was created.

Example:"2025-01-01T00:00:00.000Z"
updatedAtstring, (date-time)required

Timestamp when the herd record was last updated.

Example:"2025-01-01T00:00:00.000Z"
extensionsobjectrequired

Vendor- or practice-specific extensions.

Response
{ "herdId": "123e4567-e89b-12d3-a456-426614174000", "name": "123e4567-e89b-12d3-a456-426614174000", "herdType": { "code": "12345", "system": "http://example.com/codesystem", "display": "Example Display Name" }, "ownerId": "123e4567-e89b-12d3-a456-426614174000", "locationId": "123e4567-e89b-12d3-a456-426614174000", "estimatedCount": 1.23, "isActive": true, "createdAt": "2025-01-01T00:00:00.000Z", "updatedAt": "2025-01-01T00:00:00.000Z", "extensions": {} }