Skip to content

Create stock adjustment

Request

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

Security
bearer
Path
siteIdnumberrequired

Site identifier

Bodyapplication/jsonrequired
commentsstring

Free-text comments associated with the stock adjustment.

Example:"example"
extensionsobject

Vendor- or practice-specific extensions.

lineItemsArray of objects(LineItemDto)required

Line items that make up this stock adjustment.

occurredAtstringrequired

When the stock adjustment occurred (RFC 3339).

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

Identifier of the ownership or separation context this stock adjustment belongs to.

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

Canonical identifier for the stock adjustment.

Example:"123e4567-e89b-12d3-a456-426614174000"
curl -i -X POST \
  'https://docs.axiomera.com/_mock/apis/animal-health/openapi/site/{siteId}/ahds/v1/stock-adjustment' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "comments": "example",
    "extensions": {},
    "lineItems": [
      {
        "createdAt": "2025-01-01T00:00:00.000Z",
        "discountAmount": "100.00",
        "extensions": {},
        "groupId": "123e4567-e89b-12d3-a456-426614174000",
        "invoiceLineItemId": "123e4567-e89b-12d3-a456-426614174000",
        "isActive": true,
        "ledgerAccountId": "123e4567-e89b-12d3-a456-426614174000",
        "lineTaxAmount": "100.00",
        "lineTotalAmount": "100.00",
        "lineType": "example",
        "locationId": "123e4567-e89b-12d3-a456-426614174000",
        "name": "Example Name",
        "ownershipId": "123e4567-e89b-12d3-a456-426614174000",
        "productId": "123e4567-e89b-12d3-a456-426614174000",
        "quantity": 1.23,
        "salesPersonId": "123e4567-e89b-12d3-a456-426614174000",
        "standardUnitPriceAmount": "100.00",
        "standardUnitTaxAmount": "100.00",
        "status": "example",
        "taxCode": "CODE-001",
        "taxPercent": 1.23,
        "unitPriceAmount": "100.00",
        "unitTaxAmount": "100.00",
        "updatedAt": "2025-01-01T00:00:00.000Z"
      }
    ],
    "occurredAt": "2025-01-01T00:00:00.000Z",
    "ownershipId": "123e4567-e89b-12d3-a456-426614174000",
    "stockAdjustmentId": "123e4567-e89b-12d3-a456-426614174000"
  }'

Responses

Stock Adjustment created successfully

Bodyapplication/json
commentsstringrequired

Free-text comments associated with the stock adjustment.

Example:"example"
createdAtstring, (date-time)required

Timestamp when this stock adjustment record was created.

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

Vendor- or practice-specific extensions.

lineItemsArray of objects(LineItemDto)required

Line items that make up this stock adjustment.

occurredAtstring, (date-time)required

When the stock adjustment occurred (RFC 3339).

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

Identifier of the ownership or separation context this stock adjustment belongs to.

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

Canonical identifier for the stock adjustment.

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

Timestamp when this stock adjustment record was last updated.

Example:"2025-01-01T00:00:00.000Z"
Response
{ "comments": "example", "createdAt": "2025-01-01T00:00:00.000Z", "extensions": {}, "lineItems": [ { … } ], "occurredAt": "2025-01-01T00:00:00.000Z", "ownershipId": "123e4567-e89b-12d3-a456-426614174000", "stockAdjustmentId": "123e4567-e89b-12d3-a456-426614174000", "updatedAt": "2025-01-01T00:00:00.000Z" }