Operations API

ProBeya provides a comprehensive suite of operational excellence modules that digitalize the behavioral routines and management infrastructure pharma transformation programs depend on. All procedures are scoped to the caller’s organization via orgProcedure for multi-tenant isolation.

Quick Start: Recording a Gemba Observation and Creating a CAPA

# 1. Log an observation during a gemba walk
curl -X POST https://acme.probeya.com/api/v1/gemba/clx9gw001/observations \
  -H "Authorization: Bearer probeya_sk_live_7f3a..." \
  -H "Content-Type: application/json" \
  -d '{
    "areaId": "sterile-filling",
    "checkpoint": "Gowning room entrance",
    "type": "concern",
    "description": "Differential pressure gauge reading 12 Pa — below 15 Pa minimum. Risk of particulate ingress.",
    "photos": []
  }'

# 2. Create an action directly from the observation
curl -X POST https://acme.probeya.com/api/v1/gemba/observations/clx9go050/action \
  -H "Authorization: Bearer probeya_sk_live_7f3a..." \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Investigate differential pressure drop in gowning room B2",
    "priority": "critical",
    "category": "quality",
    "responsibleId": "clx9us003",
    "dueDate": "2026-04-15"
  }'

Kaizen (Continuous Improvement)

Empowers all team members to submit incremental improvement ideas, tracked through a Kanban-style lifecycle with impact quantification and structured evaluation.

Router: kaizen

Statuses: submitted > under_review > approved > in_progress > implemented | rejected

Categories: safety, quality, cost, delivery, people, environment, productivity, other

Procedures

ProcedureTypeDescription
kaizen.submitMutationSubmit a new improvement idea
kaizen.reviewMutationApprove or reject an idea (with reviewer tracking)
kaizen.implementMutationMark as implemented (with actual impact data)
kaizen.updateMutationUpdate an existing idea
kaizen.deleteMutationDelete a Kaizen idea
kaizen.evaluateMutationSubmit a structured evaluation (scores + recommendation)
kaizen.recordResultsMutationRecord before/after KPI values and actual savings
kaizen.getByIdQueryGet a single idea with full details
kaizen.listQueryList ideas with filters (board, status, category)
kaizen.getStatsQueryAggregate statistics (counts, impact totals, top categories)

Example: Submitting a Kaizen Idea

curl -X POST https://acme.probeya.com/api/v1/kaizen \
  -H "Authorization: Bearer probeya_sk_live_7f3a..." \
  -H "Content-Type: application/json" \
  -d '{
    "boardId": "clx9bd001",
    "title": "Reduce changeover time on Filling Line 1 by pre-staging components",
    "description": "Currently changeover takes 4h. By pre-staging gaskets, filters, and tools on a dedicated cart, estimated savings of 90 min per changeover (3x/week = 4.5h/week recovered).",
    "category": "delivery",
    "estimatedImpact": {
      "type": "time_savings",
      "value": 4.5,
      "unit": "hours/week"
    }
  }'

Response:

{
  "data": {
    "id": "clx9ki010",
    "title": "Reduce changeover time on Filling Line 1 by pre-staging components",
    "status": "submitted",
    "category": "delivery",
    "boardId": "clx9bd001",
    "submittedById": "clx9us005",
    "estimatedImpact": {
      "type": "time_savings",
      "value": 4.5,
      "unit": "hours/week"
    },
    "createdAt": "2026-04-13T09:00:00.000Z"
  }
}

Gemba Walks (Go-and-See)

Structured observation routes for leadership walk-throughs. Gemba walks capture observations at checkpoints and can generate actions directly from findings.

Router: gemba

Observation types: positive (good practice), concern (safety/quality issue), improvement (opportunity)

Procedures

ProcedureTypeDescription
gemba.createWalkMutationCreate a walk route template with areas and checkpoints
gemba.listWalksQueryList walk routes for a board
gemba.getWalkByIdQueryGet a walk with all its observations
gemba.addObservationMutationLog an observation during a walk
gemba.listObservationsQueryList observations for a walk
gemba.createActionFromObservationMutationCreate an action linked to an observation

Example: Creating a Walk Route

const walk = await trpc.gemba.createWalk.mutate({
  boardId: "clx9bd001",
  name: "Weekly Quality Walk — Sterile Manufacturing",
  areas: [
    {
      id: "gowning",
      areaName: "Gowning Room",
      checkpoints: [
        "Differential pressure gauges within spec (>15 Pa)",
        "Gowning procedure posters up to date",
        "Particle counter calibration sticker current",
      ],
    },
    {
      id: "filling",
      areaName: "Filling Suite A",
      checkpoints: [
        "Environmental monitoring plates placed correctly",
        "Equipment logbook entries complete",
        "No open deviations on the area board",
      ],
    },
    {
      id: "packaging",
      areaName: "Secondary Packaging",
      checkpoints: [
        "Line clearance verified",
        "Batch labels match production order",
        "Reject bin locked and tagged",
      ],
    },
  ],
});

Response:

{
  "data": {
    "id": "clx9gw002",
    "name": "Weekly Quality Walk — Sterile Manufacturing",
    "boardId": "clx9bd001",
    "areas": [
      { "id": "gowning", "areaName": "Gowning Room", "checkpoints": ["..."] },
      { "id": "filling", "areaName": "Filling Suite A", "checkpoints": ["..."] },
      { "id": "packaging", "areaName": "Secondary Packaging", "checkpoints": ["..."] }
    ],
    "createdAt": "2026-04-13T07:00:00.000Z"
  }
}

PDCA (Plan-Do-Check-Act)

Structured Deming cycle management for continuous improvement projects. Phases progress linearly with no skipping or reversal.

Router: pdca

Phase order: plan > do > check > act > completed

Procedures

ProcedureTypeDescription
pdca.createMutationCreate a new PDCA cycle (starts in plan phase)
pdca.updateMutationUpdate an existing cycle
pdca.deleteMutationDelete a PDCA cycle
pdca.getByIdQueryGet a single cycle with full details
pdca.listQueryList cycles with optional phase and board filters
pdca.advancePhaseMutationMove to the next phase
pdca.linkActionsMutationAssociate action item IDs with this cycle

Example: Full PDCA Cycle

// Plan: Define the improvement
const cycle = await trpc.pdca.create.mutate({
  boardId: "clx9bd001",
  title: "Reduce batch failure rate on Line 2 from 3.2% to <1%",
  planDescription: "Root cause analysis identified temperature control as primary factor. Plan: install redundant RTD sensor and tighten PID parameters.",
});

// Do: Implement changes, record results
await trpc.pdca.update.mutate({
  id: cycle.id,
  doDescription: "Installed redundant RTD sensor on 2026-04-10. PID parameters adjusted: P=2.1, I=0.4, D=0.08. 5 test batches produced.",
});
await trpc.pdca.advancePhase.mutate({ id: cycle.id });

// Check: Verify results
await trpc.pdca.update.mutate({
  id: cycle.id,
  checkDescription: "Test batches: 0/5 failures. Temperature excursions reduced from 12/week to 0. Statistical confidence 95%.",
});
await trpc.pdca.advancePhase.mutate({ id: cycle.id });

// Act: Standardize the change
await trpc.pdca.update.mutate({
  id: cycle.id,
  actDescription: "SOP-MFG-042 updated with new PID parameters. Training completed for all operators. Change control CC-2026-0089 approved.",
});
await trpc.pdca.advancePhase.mutate({ id: cycle.id });
// Status is now "completed"

DCM (Daily Capacity Management)

Visual time-grid boards for daily resource and task planning. Resources are assigned tasks within configurable time slots for capacity optimization.

Router: dcm

Procedures

ProcedureTypeDescription
dcm.createBoardMutationCreate a new DCM board
dcm.getBoardQueryGet a DCM board with resources and tasks
dcm.updateBoardMutationUpdate board settings
dcm.deleteBoardMutationDelete a DCM board
dcm.listBoardsQueryList DCM boards for a parent board
dcm.addResourceMutationAdd a resource to the board
dcm.updateResourceMutationUpdate resource details
dcm.removeResourceMutationRemove a resource
dcm.addTaskMutationAdd a task to a time slot
dcm.moveTaskMutationMove a task to a different slot/resource
dcm.updateTaskMutationUpdate task details
dcm.removeTaskMutationRemove a task
dcm.listCatalogTasksQueryList task catalog entries
dcm.createCatalogTaskMutationCreate a reusable task template
dcm.updateCatalogTaskMutationUpdate a catalog task
dcm.getUtilizationQueryGet resource utilization analytics

Shift Handovers

Structured shift-to-shift communication documents with auto-compilation, health scoring (0-100), and analytics. Critical for 24/7 pharma manufacturing operations.

Router: shiftHandovers

Shift types: morning, afternoon, night

Statuses: draft > submitted > acknowledged

Procedures

ProcedureTypeDescription
shiftHandovers.createMutationCreate a handover document (status: draft)
shiftHandovers.updateMutationUpdate a handover (draft only)
shiftHandovers.submitMutationLock editing and submit handover
shiftHandovers.acknowledgeMutationIncoming shift acknowledges receipt
shiftHandovers.listQueryList handovers for a board
shiftHandovers.getLatestQueryGet the most recent handover
shiftHandovers.refreshCompilationMutationRe-run auto-compilation for a draft
shiftHandovers.getHealthScoreTrendQueryWeekly avg health score (12 weeks)
shiftHandovers.getWorstPerformingShiftsQueryBottom 5 shifts by health score
shiftHandovers.getCarryForwardTopItemsQueryMost frequent carry-forward items
shiftHandovers.getAcknowledgmentTimeDistributionQueryAck time histogram
shiftHandovers.getCompletionRateQueryWeekly submission/ack rates

Example: Shift Handover Workflow

// Outgoing shift lead creates the handover
const handover = await trpc.shiftHandovers.create.mutate({
  boardId: "clx9bd001",
  shiftType: "morning",
  shiftDate: "2026-04-13",
  items: [
    {
      category: "production",
      priority: "high",
      description: "Batch BX-4473 filling in progress — expected completion 16:00. Monitor temperature sensor 3 (drifting).",
    },
    {
      category: "equipment",
      priority: "medium",
      description: "CIP skid #2 cleaned and ready. Calibration due Thursday.",
    },
    {
      category: "safety",
      priority: "low",
      description: "No incidents. Emergency shower test passed at 07:30.",
    },
  ],
});

// Submit the handover (locks editing)
await trpc.shiftHandovers.submit.mutate({ id: handover.id });

// Incoming shift lead acknowledges
await trpc.shiftHandovers.acknowledge.mutate({ id: handover.id });

Health score engine: Evaluates handover quality (0-100) based on completeness, timeliness, and content depth. Low-scoring shifts are surfaced in the analytics dashboard.


Mood / Pulse Check

Anonymous or named team sentiment check-ins for AIC/TIER meetings.

Router: mood

Mood levels: 1 (very low) through 5 (excellent)

ProcedureTypeDescription
mood.submitMutationRecord a mood entry (1-5 scale)
mood.getTrendQueryGet mood trend over a date range
mood.getDailySummaryQueryGet mood summary for a specific date

Privacy: Anonymous submissions use SHA-256 hashing (userId + boardId + date) for deduplication without identification. The hash prevents duplicate votes while ensuring individual responses cannot be traced back to users.

await trpc.mood.submit.mutate({
  boardId: "clx9bd001",
  value: 4,
  date: "2026-04-13",
  anonymous: true,
});

Problem Solving

Root cause analysis sheets supporting 5 Whys, Ishikawa (fishbone), and WWWHWWH methodologies.

Router: problemSolving

Sheet types: five_whys, ishikawa, wwwhwwh

Statuses: draft > completed > reviewed

Procedures

ProcedureTypeDescription
problemSolving.createMutationCreate a new problem-solving sheet
problemSolving.updateMutationUpdate an existing sheet
problemSolving.deleteMutationDelete a sheet
problemSolving.getByIdQueryGet a sheet with full details
problemSolving.listQueryList sheets (by board, action, or type)
problemSolving.submitMutationMark as completed (ready for review)
problemSolving.reviewMutationFormal sign-off by a reviewer

Example: 5 Whys Analysis

const sheet = await trpc.problemSolving.create.mutate({
  boardId: "clx9bd001",
  actionId: "clx9ac002", // Links to the CAPA action
  type: "five_whys",
  problemStatement: "Batch BX-4471 pH reading 7.8 — exceeds upper spec limit of 7.4",
  data: {
    whys: [
      { why: "Why was pH out of spec?", answer: "Buffer preparation concentration was incorrect" },
      { why: "Why was buffer concentration incorrect?", answer: "Operator used wrong grade of NaOH" },
      { why: "Why was wrong grade used?", answer: "Two grades stored in same cabinet, similar labels" },
      { why: "Why are they stored together?", answer: "No segregation policy for reagent grades" },
      { why: "Why no segregation policy?", answer: "SOP-WH-012 does not address grade separation" },
    ],
    rootCause: "SOP-WH-012 lacks reagent grade segregation requirements",
    correctiveAction: "Update SOP-WH-012 to require grade-specific shelving with color-coded labels",
  },
});

// Submit for review
await trpc.problemSolving.submit.mutate({ id: sheet.id });

// QA reviewer signs off
await trpc.problemSolving.review.mutate({
  id: sheet.id,
  reviewerComment: "Root cause identified and corrective action adequate. Verify implementation by 2026-04-20.",
});

All problem-solving sheets support linking to actions for full traceability from root cause to corrective action to CAPA closure.


Rate Limiting

All operations endpoints share the same rate limits:

PlanRequests/min
Free60
Starter120
Pro300
Enterprise600