API Reference

List inventory items

Returns a paginated list of inventory items for the clinic associated with your API key. ### Clinic-Scoped Unlike patients and medical records, inventory is **clinic-specific** — each clinic maintains its own stock. The `clinic_fp` is inferred from your API key and never accepted as a parameter. ### Pricing & Currency - `unit_price_cents` is an integer in the smallest currency unit (e.g. kurus for TRY, cents for USD). Divide by 100 for display. - `currency` uses ISO 4217 codes. Clinics may operate in TRY, USD, EUR, or GBP. ### Virtual Items `is_virtual: true` marks items that don't track physical stock — consultation fees, procedures, service charges. Stock operations (reserve, decrement, return) fail silently on virtual items. ### Stock Allocation Strategy When items are consumed through sales or treatments, allocation follows: - **Medications & vaccines:** FEFO (First Expiry, First Out) — batches with nearest `expiry_date` used first - **Other categories:** FIFO (First In, First Out) — oldest batches first

GET
/api/v1/inventory

Authorization

JWT-auth
AuthorizationBearer <token>

API key issued from the Vetigen Developer Portal. Pass as Authorization: Bearer YOUR_API_KEY.

In: header

Query Parameters

page?integer

Page number (1-indexed).

Default1
Range1 <= value
page_size?integer

Items per page. Max 100.

Default20
Range1 <= value <= 100
category?string

Filter by category (e.g. MEDICATION, VACCINE, CONSUMABLE, SERVICE).

low_stock?boolean

When true, returns only items below their low_stock_threshold.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -H "Authorization: Bearer $VETIGEN_API_KEY" \  "https://api.vetigen.com/api/v1/inventory?category=MEDICATION&low_stock=true"
{
  "success": true,
  "data": {
    "items": [
      {
        "fp": "invitem_01JABC...",
        "name": "Cerenia 10mg/ml Injectable",
        "category": "MEDICATION",
        "sku": "VET-CER-10-20",
        "unit": "vial",
        "quantity_on_hand": 42,
        "low_stock_threshold": 10,
        "unit_price_cents": 18500,
        "currency": "TRY",
        "is_virtual": false
      }
    ],
    "total": 318,
    "page": 1,
    "page_size": 20,
    "has_more": true
  }
}
{
  "success": false,
  "error": {
    "code": "AUTH.UNAUTHORIZED",
    "message": "Authentication required.",
    "severity": "error"
  }
}
{
  "success": false,
  "error": {
    "code": "AUTH.FORBIDDEN",
    "message": "Insufficient permissions.",
    "severity": "error"
  }
}
{
  "success": false,
  "error": {
    "code": "AUTH.RATE_LIMITED",
    "message": "Rate limit exceeded. Retry in 42 seconds.",
    "severity": "warning"
  }
}
{
  "success": false,
  "error": {
    "code": "PATIENT.NOT_FOUND",
    "message": "Patient with fingerprint patient_01JABC does not exist.",
    "severity": "error",
    "details": {}
  }
}