Skip to content

Inventory

Inventory in the Shepherd API is split across several related endpoints rather than a single resource. The top-level model is: a clinic has one or more inventory locations (a treatment room cabinet, the main pharmacy, etc.); each location holds product records with on-hand quantities, reorder thresholds, and per-location settings; products themselves have vendor associations, units of measure, and a status flag indicating whether they are active. Every movement (receive, dispense, transfer, adjustment) is recorded in the transaction journal.

Most integrations only need a subset: pharmacy partners read product settings and the journal; an ordering integration reads vendors, products, and locations; a clinic-wide dashboard reads location-product stock levels.

EndpointPurpose
POST /pav2/open-api-inventory-locationsList inventory locations defined for a clinic.
POST /pav2/open-api-inventory-product-location-productsList products with stock levels at a given location.
POST /pav2/open-api-inventory-product-settingsPer-product inventory configuration (reorder points, etc.).
POST /pav2/open-api-inventory-vendorsVendors a clinic purchases inventory from.
POST /pav2/open-api-uom-unitsUnits of measure (each, ml, tablet, gram, etc.).
POST /pav2/open-api-inventory-statusStatus values used to flag inventory items (active, archived).
POST /pav2/open-api-inventory/transaction-journalsAudit trail of every inventory movement.

All of the above follow the standard request shape: POST, JSON body, the three auth headers, and the same pagination, sort, and date-filter conventions documented in Conventions.

Authoritative schemas live in the live Swagger UI. The fields below are a representative subset for orientation.

FieldTypeNotes
idUUIDServer-assigned identifier.
clinicIdUUIDClinic that owns the location.
namestringHuman-readable name (e.g. “Treatment Room”).
abrvstringShort code for the location.
descriptionstringFree-text description.
isActivebooleanWhether the location is in use.
dateCreatedISO 8601Server-assigned creation timestamp (UTC).
dateUpdatedISO 8601Last server-side mutation (UTC).
isDeletedbooleanSoft-delete flag. Note this is isDeleted.
POST /pav2/open-api-inventory-locations

Returns the inventory locations configured for the clinic identified by X-Clinic-Id. Most clinics have a handful of locations; this list changes rarely, so most integrations cache it client-side.

Terminal window
curl -X POST https://open-api.shepherd.vet/pav2/open-api-inventory-locations \
-H "Content-Type: application/json" \
-H "X-Integration-Public-Key: $SHEPHERD_PUBLIC_KEY" \
-H "X-Integration-Private-Key: $SHEPHERD_PRIVATE_KEY" \
-H "X-Clinic-Id: $SHEPHERD_CLINIC_ID" \
-d '{"page":1,"rpp":100}'
{
"item": [
{
"id": "5fc11c2e-18b4-4a91-a5c9-abc123456789",
"clinicId": "9890662f-52db-4a41-a5c1-b2e300d400b4",
"name": "Main Pharmacy",
"abrv": "PHARM",
"description": "Main dispensing pharmacy",
"isActive": true,
"dateCreated": "2025-08-14T09:02:11Z",
"dateUpdated": "2025-12-01T11:18:44Z",
"isDeleted": false
}
],
"totalRecords": 4,
"page": 1,
"recordsPerPage": 100,
"sort": null,
"searchQuery": null,
"embed": null,
"links": []
}

All of these follow the same request shape as the locations example above. Send a JSON body with page, rpp, and any filters you need, plus the three auth headers.

POST /pav2/open-api-inventory-product-location-products returns per-location product records carrying on-hand quantity, reorder thresholds, and pricing overrides. Filter by location id to fetch the inventory snapshot for a single cabinet or fridge.

POST /pav2/open-api-inventory-product-settings exposes the inventory-specific configuration attached to a catalog product: minimum/maximum thresholds, default vendor, default unit of measure, and reorder behaviour.

POST /pav2/open-api-inventory-vendors lists vendors the clinic purchases inventory from. Use this to populate vendor pickers in ordering integrations.

POST /pav2/open-api-uom-units returns the units of measure available in the clinic (each, ml, tablet, gram, lb, etc.). Like the lookups endpoints, the response is small and stable; cache it client-side.

POST /pav2/open-api-inventory-status lists the status codes used to flag inventory records (active, archived, discontinued, etc.). Use this to render status filters or surface meaningful labels.

POST /pav2/open-api-inventory/transaction-journals is the append-only audit trail of every inventory movement: receive, dispense, transfer, count adjustment. Filter by dateCreatedFrom and dateCreatedTo to pull the day’s activity for reconciliation.

  • Conventions for pagination, embedding, sorting, and date filters.
  • Products for the underlying catalog that inventory tracks stock against.
  • Errors for the two JSON error body shapes.