Skip to content

AHDS Store API (1.0)

Animal Health Data Store - V1 API Documentation

Overview
Languages
Servers
Mock server

https://docs.heydonto.com/_mock/apis/animal-health/openapi/

Local Development

http://localhost:8083/

Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations

Request

Creates a new Stock Transaction record. Stock Transaction resource in the Animal Health Data Store

Security
bearer
Path
siteIdnumberrequired

Site identifier

Bodyapplication/jsonrequired
extensionsobject

Vendor- or practice-specific extensions.

isActivebooleanrequired

Whether this stock transaction is active in the source system.

productIdstringrequired

Identifier of the product whose stock is affected.

Example: "123e4567-e89b-12d3-a456-426614174000"
quantityobjectrequired
quantity.​valuenumberrequired

Numeric value

quantity.​unitstringrequired

Unit of measure

quantity.​systemstring

Unit system URI

separationIdstring

Identifier for the stock separation/batch/location if applicable.

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

Indicates whether this transaction should alter on-hand stock levels.

statusstring

Status of the stock transaction.

Enum"pending""completed""cancelled""reversed""unknown"
stockTransactionIdstringrequired

Canonical identifier for this stock transaction.

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

Entity this stock transaction is for (e.g., invoice, order, procedure).

transactedAtstringrequired

Effective date and time of the stock transaction.

Example: "2025-01-01T00:00:00.000Z"
curl -i -X POST \
  'https://docs.heydonto.com/_mock/apis/animal-health/openapi/site/{siteId}/ahds/v1/stock-transaction' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "extensions": {},
    "isActive": true,
    "productId": "123e4567-e89b-12d3-a456-426614174000",
    "quantity": {
      "value": 0,
      "unit": "string",
      "system": "string"
    },
    "separationId": "123e4567-e89b-12d3-a456-426614174000",
    "shouldAlterStock": true,
    "status": "pending",
    "stockTransactionId": "123e4567-e89b-12d3-a456-426614174000",
    "subject": {},
    "transactedAt": "2025-01-01T00:00:00.000Z"
  }'

Responses

Stock Transaction created successfully

Bodyapplication/json
createdAtstring(date-time)required

Timestamp when the stock transaction record was created.

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

Vendor- or practice-specific extensions.

isActivebooleanrequired

Whether this stock transaction is active in the source system.

productIdstringrequired

Identifier of the product whose stock is affected.

Example: "123e4567-e89b-12d3-a456-426614174000"
quantityobjectrequired
quantity.​valuenumberrequired

Numeric value

quantity.​unitstringrequired

Unit of measure

quantity.​systemstring

Unit system URI

separationIdstringrequired

Identifier for the stock separation/batch/location if applicable.

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

Indicates whether this transaction should alter on-hand stock levels.

statusstringrequired

Status of the stock transaction.

Enum"pending""completed""cancelled""reversed""unknown"
stockTransactionIdstringrequired

Canonical identifier for this stock transaction.

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

Entity this stock transaction is for (e.g., invoice, order, procedure).

updatedAtstring(date-time)required

Timestamp when the stock transaction record was last updated.

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

Effective date and time of the stock transaction.

Example: "2025-01-01T00:00:00.000Z"
Response
application/json
{ "createdAt": "2025-01-01T00:00:00.000Z", "extensions": {}, "isActive": true, "productId": "123e4567-e89b-12d3-a456-426614174000", "quantity": { "value": 0, "unit": "string", "system": "string" }, "separationId": "123e4567-e89b-12d3-a456-426614174000", "shouldAlterStock": true, "status": "pending", "stockTransactionId": "123e4567-e89b-12d3-a456-426614174000", "subject": {}, "updatedAt": "2025-01-01T00:00:00.000Z", "transactedAt": "2025-01-01T00:00:00.000Z" }

Request

Returns a paginated list of Stock Transactions for the specified site. Supports filtering and sorting.

Security
bearer
Path
siteIdnumberrequired

Site identifier

Query
pagenumber>= 0

Page number (0-indexed)

Default 0
pageSizenumber[ 1 .. 100 ]

Number of items per page

Default 10
sortBystring

Field to sort by

Enum"createdAt""updatedAt""transactedAt"
sortOrderstring

Sort order

Default "asc"
Enum"asc""desc"
isActiveboolean

Whether this stock transaction is active in the source system.

productIdstring

Identifier of the product whose stock is affected.

Example: productId=123e4567-e89b-12d3-a456-426614174000
separationIdstring

Identifier for the stock separation/batch/location if applicable.

Example: separationId=123e4567-e89b-12d3-a456-426614174000
shouldAlterStockboolean

Indicates whether this transaction should alter on-hand stock levels.

statusstring

Status of the stock transaction.

Enum"pending""completed""cancelled""reversed""unknown"
curl -i -X GET \
  'https://docs.heydonto.com/_mock/apis/animal-health/openapi/site/{siteId}/ahds/v1/stock-transaction?page=0&pageSize=10&sortBy=createdAt&sortOrder=asc&isActive=true&productId=123e4567-e89b-12d3-a456-426614174000&separationId=123e4567-e89b-12d3-a456-426614174000&shouldAlterStock=true&status=pending' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Paginated list of Stock Transactions

Request

Returns a single Stock Transaction by its unique identifier.

Security
bearer
Path
siteIdnumberrequired

Site identifier

stockTransactionIdstringrequired

Stock Transaction unique identifier (UUID)

curl -i -X GET \
  'https://docs.heydonto.com/_mock/apis/animal-health/openapi/site/{siteId}/ahds/v1/stock-transaction/{stockTransactionId}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Stock Transaction found

Bodyapplication/json
createdAtstring(date-time)required

Timestamp when the stock transaction record was created.

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

Vendor- or practice-specific extensions.

isActivebooleanrequired

Whether this stock transaction is active in the source system.

productIdstringrequired

Identifier of the product whose stock is affected.

Example: "123e4567-e89b-12d3-a456-426614174000"
quantityobjectrequired
quantity.​valuenumberrequired

Numeric value

quantity.​unitstringrequired

Unit of measure

quantity.​systemstring

Unit system URI

separationIdstringrequired

Identifier for the stock separation/batch/location if applicable.

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

Indicates whether this transaction should alter on-hand stock levels.

statusstringrequired

Status of the stock transaction.

Enum"pending""completed""cancelled""reversed""unknown"
stockTransactionIdstringrequired

Canonical identifier for this stock transaction.

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

Entity this stock transaction is for (e.g., invoice, order, procedure).

updatedAtstring(date-time)required

Timestamp when the stock transaction record was last updated.

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

Effective date and time of the stock transaction.

Example: "2025-01-01T00:00:00.000Z"
Response
application/json
{ "createdAt": "2025-01-01T00:00:00.000Z", "extensions": {}, "isActive": true, "productId": "123e4567-e89b-12d3-a456-426614174000", "quantity": { "value": 0, "unit": "string", "system": "string" }, "separationId": "123e4567-e89b-12d3-a456-426614174000", "shouldAlterStock": true, "status": "pending", "stockTransactionId": "123e4567-e89b-12d3-a456-426614174000", "subject": {}, "updatedAt": "2025-01-01T00:00:00.000Z", "transactedAt": "2025-01-01T00:00:00.000Z" }

Request

Partially updates an existing Stock Transaction. Only provided fields will be updated.

Security
bearer
Path
siteIdnumberrequired

Site identifier

stockTransactionIdstringrequired

Stock Transaction unique identifier (UUID)

Bodyapplication/jsonrequired
extensionsobject

Vendor- or practice-specific extensions.

isActiveboolean

Whether this stock transaction is active in the source system.

productIdstring

Identifier of the product whose stock is affected.

Example: "123e4567-e89b-12d3-a456-426614174000"
quantityobject
separationIdstring

Identifier for the stock separation/batch/location if applicable.

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

Indicates whether this transaction should alter on-hand stock levels.

statusstring

Status of the stock transaction.

Enum"pending""completed""cancelled""reversed""unknown"
subjectobject

Entity this stock transaction is for (e.g., invoice, order, procedure).

transactedAtstring

Effective date and time of the stock transaction.

Example: "2025-01-01T00:00:00.000Z"
curl -i -X PATCH \
  'https://docs.heydonto.com/_mock/apis/animal-health/openapi/site/{siteId}/ahds/v1/stock-transaction/{stockTransactionId}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "extensions": {},
    "isActive": true,
    "productId": "123e4567-e89b-12d3-a456-426614174000",
    "quantity": {
      "value": 0,
      "unit": "string",
      "system": "string"
    },
    "separationId": "123e4567-e89b-12d3-a456-426614174000",
    "shouldAlterStock": true,
    "status": "pending",
    "subject": {},
    "transactedAt": "2025-01-01T00:00:00.000Z"
  }'

Responses

Stock Transaction updated successfully

Bodyapplication/json
createdAtstring(date-time)required

Timestamp when the stock transaction record was created.

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

Vendor- or practice-specific extensions.

isActivebooleanrequired

Whether this stock transaction is active in the source system.

productIdstringrequired

Identifier of the product whose stock is affected.

Example: "123e4567-e89b-12d3-a456-426614174000"
quantityobjectrequired
quantity.​valuenumberrequired

Numeric value

quantity.​unitstringrequired

Unit of measure

quantity.​systemstring

Unit system URI

separationIdstringrequired

Identifier for the stock separation/batch/location if applicable.

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

Indicates whether this transaction should alter on-hand stock levels.

statusstringrequired

Status of the stock transaction.

Enum"pending""completed""cancelled""reversed""unknown"
stockTransactionIdstringrequired

Canonical identifier for this stock transaction.

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

Entity this stock transaction is for (e.g., invoice, order, procedure).

updatedAtstring(date-time)required

Timestamp when the stock transaction record was last updated.

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

Effective date and time of the stock transaction.

Example: "2025-01-01T00:00:00.000Z"
Response
application/json
{ "createdAt": "2025-01-01T00:00:00.000Z", "extensions": {}, "isActive": true, "productId": "123e4567-e89b-12d3-a456-426614174000", "quantity": { "value": 0, "unit": "string", "system": "string" }, "separationId": "123e4567-e89b-12d3-a456-426614174000", "shouldAlterStock": true, "status": "pending", "stockTransactionId": "123e4567-e89b-12d3-a456-426614174000", "subject": {}, "updatedAt": "2025-01-01T00:00:00.000Z", "transactedAt": "2025-01-01T00:00:00.000Z" }

Request

Fully replaces an existing Stock Transaction. All fields must be provided.

Security
bearer
Path
siteIdnumberrequired

Site identifier

stockTransactionIdstringrequired

Stock Transaction unique identifier (UUID)

Bodyapplication/jsonrequired
extensionsobjectrequired

Vendor- or practice-specific extensions.

isActivebooleanrequired

Whether this stock transaction is active in the source system.

productIdstringrequired

Identifier of the product whose stock is affected.

Example: "123e4567-e89b-12d3-a456-426614174000"
quantityobjectrequired
quantity.​valuenumberrequired

Numeric value

quantity.​unitstringrequired

Unit of measure

quantity.​systemstring

Unit system URI

separationIdstringrequired

Identifier for the stock separation/batch/location if applicable.

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

Indicates whether this transaction should alter on-hand stock levels.

statusstringrequired

Status of the stock transaction.

Enum"pending""completed""cancelled""reversed""unknown"
subjectobjectrequired

Entity this stock transaction is for (e.g., invoice, order, procedure).

transactedAtstringrequired

Effective date and time of the stock transaction.

Example: "2025-01-01T00:00:00.000Z"
curl -i -X PUT \
  'https://docs.heydonto.com/_mock/apis/animal-health/openapi/site/{siteId}/ahds/v1/stock-transaction/{stockTransactionId}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "extensions": {},
    "isActive": true,
    "productId": "123e4567-e89b-12d3-a456-426614174000",
    "quantity": {
      "value": 0,
      "unit": "string",
      "system": "string"
    },
    "separationId": "123e4567-e89b-12d3-a456-426614174000",
    "shouldAlterStock": true,
    "status": "pending",
    "subject": {},
    "transactedAt": "2025-01-01T00:00:00.000Z"
  }'

Responses

Stock Transaction replaced successfully

Bodyapplication/json
createdAtstring(date-time)required

Timestamp when the stock transaction record was created.

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

Vendor- or practice-specific extensions.

isActivebooleanrequired

Whether this stock transaction is active in the source system.

productIdstringrequired

Identifier of the product whose stock is affected.

Example: "123e4567-e89b-12d3-a456-426614174000"
quantityobjectrequired
quantity.​valuenumberrequired

Numeric value

quantity.​unitstringrequired

Unit of measure

quantity.​systemstring

Unit system URI

separationIdstringrequired

Identifier for the stock separation/batch/location if applicable.

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

Indicates whether this transaction should alter on-hand stock levels.

statusstringrequired

Status of the stock transaction.

Enum"pending""completed""cancelled""reversed""unknown"
stockTransactionIdstringrequired

Canonical identifier for this stock transaction.

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

Entity this stock transaction is for (e.g., invoice, order, procedure).

updatedAtstring(date-time)required

Timestamp when the stock transaction record was last updated.

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

Effective date and time of the stock transaction.

Example: "2025-01-01T00:00:00.000Z"
Response
application/json
{ "createdAt": "2025-01-01T00:00:00.000Z", "extensions": {}, "isActive": true, "productId": "123e4567-e89b-12d3-a456-426614174000", "quantity": { "value": 0, "unit": "string", "system": "string" }, "separationId": "123e4567-e89b-12d3-a456-426614174000", "shouldAlterStock": true, "status": "pending", "stockTransactionId": "123e4567-e89b-12d3-a456-426614174000", "subject": {}, "updatedAt": "2025-01-01T00:00:00.000Z", "transactedAt": "2025-01-01T00:00:00.000Z" }

Request

Permanently deletes a Stock Transaction record.

Security
bearer
Path
siteIdnumberrequired

Site identifier

stockTransactionIdstringrequired

Stock Transaction unique identifier (UUID)

curl -i -X DELETE \
  'https://docs.heydonto.com/_mock/apis/animal-health/openapi/site/{siteId}/ahds/v1/stock-transaction/{stockTransactionId}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Stock Transaction deleted successfully

Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations