Skip to content

Create external prescription

Request

Creates a new External Prescription record. External Prescription resource in the Animal Health Data Store

Security
bearer
Path
siteIdnumberrequired

Site identifier

Bodyapplication/jsonrequired
animalIdstringrequired

Reference to the animal for which the prescription was written.

Example:"123e4567-e89b-12d3-a456-426614174000"
consultIdstring or null

Reference to the consult/visit associated with this prescription.

Example:"123e4567-e89b-12d3-a456-426614174000"
contactIdstring or null

Reference to the client/owner contact associated with this prescription.

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

Vendor- or practice-specific extensions.

externalPrescriptionIdstring

Canonical identifier for the external prescription.

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

External system reference or identifier for this prescription (e.g., pharmacy system ID).

Example:"123e4567-e89b-12d3-a456-426614174000"
itemsArray of objects(ItemDto)required

List of externally prescribed items.

prescribingVetUserIdstringrequired

Reference to the user (veterinarian) who prescribed the medication.

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

Total price for all items on the prescription.

prescribedAtstringrequired

Timestamp when the prescription was written (RFC 3339).

Example:"2025-01-01T00:00:00.000Z"
curl -i -X POST \
  'https://docs.axiomera.com/_mock/apis/animal-health/openapi/site/{siteId}/ahds/v1/external-prescription' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "animalId": "123e4567-e89b-12d3-a456-426614174000",
    "consultId": "123e4567-e89b-12d3-a456-426614174000",
    "contactId": "123e4567-e89b-12d3-a456-426614174000",
    "extensions": {},
    "externalPrescriptionId": "123e4567-e89b-12d3-a456-426614174000",
    "externalReference": "123e4567-e89b-12d3-a456-426614174000",
    "items": [
      {
        "class": "example",
        "code": {
          "code": "12345",
          "system": "http://example.com/codesystem",
          "display": "Example Display Name"
        },
        "createdAt": "2025-01-01T00:00:00.000Z",
        "diagnosticDefinitionId": "123e4567-e89b-12d3-a456-426614174000",
        "diagnosticItemId": "123e4567-e89b-12d3-a456-426614174000",
        "isActive": true,
        "name": "Example Name",
        "productId": "123e4567-e89b-12d3-a456-426614174000",
        "updatedAt": "2025-01-01T00:00:00.000Z"
      }
    ],
    "prescribingVetUserId": "123e4567-e89b-12d3-a456-426614174000",
    "totalPrice": {},
    "prescribedAt": "2025-01-01T00:00:00.000Z"
  }'

Responses

External Prescription created successfully

Bodyapplication/json
animalIdstringrequired

Reference to the animal for which the prescription was written.

Example:"123e4567-e89b-12d3-a456-426614174000"
consultIdstring or nullrequired

Reference to the consult/visit associated with this prescription.

Example:"123e4567-e89b-12d3-a456-426614174000"
contactIdstring or nullrequired

Reference to the client/owner contact associated with this prescription.

Example:"123e4567-e89b-12d3-a456-426614174000"
createdAtstring, (date-time)required

Timestamp when the external prescription record was created.

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

Vendor- or practice-specific extensions.

externalPrescriptionIdstringrequired

Canonical identifier for the external prescription.

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

External system reference or identifier for this prescription (e.g., pharmacy system ID).

Example:"123e4567-e89b-12d3-a456-426614174000"
itemsArray of objects(ItemDto)required

List of externally prescribed items.

prescribingVetUserIdstringrequired

Reference to the user (veterinarian) who prescribed the medication.

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

Total price for all items on the prescription.

updatedAtstring, (date-time)required

Timestamp when the external prescription record was last updated.

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

Timestamp when the prescription was written (RFC 3339).

Example:"2025-01-01T00:00:00.000Z"
Response
{ "animalId": "123e4567-e89b-12d3-a456-426614174000", "consultId": "123e4567-e89b-12d3-a456-426614174000", "contactId": "123e4567-e89b-12d3-a456-426614174000", "createdAt": "2025-01-01T00:00:00.000Z", "extensions": {}, "externalPrescriptionId": "123e4567-e89b-12d3-a456-426614174000", "externalReference": "123e4567-e89b-12d3-a456-426614174000", "items": [ { … } ], "prescribingVetUserId": "123e4567-e89b-12d3-a456-426614174000", "totalPrice": {}, "updatedAt": "2025-01-01T00:00:00.000Z", "prescribedAt": "2025-01-01T00:00:00.000Z" }