{"openapi":"3.1.0","info":{"title":"Busroot HTTP APIs","version":"1.0.0"},"servers":[{"url":"https://demo.busroot.com/api","description":"Busroot Demo"}],"security":[{"ApiKeyAuth":[]}],"paths":{"/account":{"get":{"tags":["Account"],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"result":{"type":"object","properties":{"id":{"type":"string","description":"Unique account identifier (e.g., 'acme-manufacturing', 'global-ops')"},"domain":{"type":"string","description":"Email domain of the account's users (e.g., 'acme.com'). Users on this domain can log in without being added."},"stationCountLimit":{"type":["integer","null"],"minimum":0,"description":"Maximum number of stations allowed across all plants"},"electricalPricePerKwh":{"type":["number","null"],"minimum":0,"description":"Cost per kilowatt-hour for electrical consumption (e.g., 0.15)"},"electricalCo2PerKwh":{"type":["number","null"],"minimum":0,"description":"CO2 emissions per kilowatt-hour (e.g., 0.233)"},"currency":{"type":["string","null"],"description":"ISO 4217 currency code (e.g., 'USD', 'EUR', 'GBP')"},"maxProductionCountPerSchedule":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":9999999,"description":"Maximum production units a single schedule may record before recording stops. Null/absent means no limit."},"dashboardConfig":{"type":["object","null"],"additionalProperties":{},"description":"Custom dashboard configuration (key-value pairs)"},"redshiftPassword":{"type":["string","null"],"description":"Redshift database password (system managed)"},"uploadTransforms":{"type":["string","null"],"description":"Upload transformation configuration (system managed)"},"durationFormat":{"type":["string","null"],"enum":["months","days","hours","minutes",null],"description":"Duration display format (e.g., 'months', 'days', 'hours', 'minutes')"},"appUrls":{"type":["string","null"],"description":"Custom application URLs (system managed)"},"includeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Reason Codes: If set, only these reason codes are available at this level. Applied before excludeReasonCodes."},"excludeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Reason Codes: These reason codes are removed at this level. Applied after includeReasonCodes."},"includeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task Codes: Legacy, no longer applied. Superseded by includeTaskListCodes."},"excludeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task Codes: Legacy, no longer applied. Superseded by excludeTaskListCodes."},"includeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task List Codes: The Task lists available at this level. Unlike reasons, no level setting this means no Task lists are available — lists must be included explicitly before their Tasks appear on a station."},"excludeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task List Codes: These Task list codes are removed at this level. Applied after includeTaskListCodes."},"createdAt":{"type":["string","null"],"description":"Account creation timestamp (ISO 8601, system managed)"},"updatedAt":{"type":["string","null"],"description":"Last update timestamp (ISO 8601, system managed)"},"archivedAt":{"type":["string","null"],"description":"Archive timestamp (ISO 8601, system managed). When set, the account is archived and hidden from active lists."},"enableTasks":{"type":["string","null"],"enum":["on","off",null],"description":"Enable Tasks: Enable the Tasks feature for this account (OI-managed paid feature)."},"enableCycleTimeAnalysis":{"type":["string","null"],"enum":["on","off",null],"description":"Enable Cycle Time Analysis: Show the Cycle Time Analysis menu item for this account (OI-managed)."},"enableLostProductionCost":{"type":["string","null"],"enum":["on","off",null],"description":"Enable Lost Production Cost: Enable tracking of lost production costs."},"enableAutoEndOnQuantityComplete":{"type":["string","null"],"enum":["on","off",null],"description":"Auto-End on Quantity Complete: Automatically end schedules when their target quantity is reached (account default)."},"enableDragBetweenStationsOnGantt":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Drag Between Stations on Gantt: Allow schedules to be reassigned to a different station by dragging on the Gantt chart."},"enableProductionCorrection":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Production Correction: Allow operators to correct production counting errors during a running schedule from the tablet."},"enableHistoricalCorrection":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Historical Production Correction: Correct production counts on schedules that have already ended. Available to admins from the action menu on the schedule list and Gantt chart. This is separate from the tablet's live correction feature."},"enableManualProduction":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Manual Production: Allow operators to manually enter production quantities."},"enableQuickScheduleStart":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Ad Hoc Schedules: Allow operators to start ad-hoc schedules from the tablet."},"enableScheduleCutShort":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Cutting Schedules Short: Allow operators to end a schedule before its planned end."},"enableRejectProduction":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Rejecting Production: Allow operators to reject (scrap) produced units."},"enableEditPartsPerCycle":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Editing Parts Per Cycle: Allow operators to override the parts-per-cycle value on a schedule."},"enableScheduleStationFlexibility":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Schedule Station Flexibility: Allow schedules to run on any station within the group."},"enableManualDowntime":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Manual Downtime: Allow operators and API users to manually trigger downtime on a station, blocking production while active."},"enableAlwaysConnected":{"type":["string","null"],"enum":["on","off",null],"description":"Always Connected: Force this station to always show as connected, regardless of device signals. Useful for stations with no physical device. Inherits from parent level if not set."},"cursors":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"timestamp":{"type":"number"},"value":{"type":"string"},"valueAgo":{"type":"string"}},"required":["type","timestamp","value","valueAgo"]}},"redshiftConfig":{"type":"object","properties":{"host":{"type":"string"},"port":{"type":"number"},"username":{"type":"string"}},"required":["host","port","username"]},"manifest":{"type":"object","properties":{"version":{"type":"string","const":"v1","description":"Schema version. Currently 'v1'"},"account":{"type":"object","properties":{"id":{"type":"string","description":"Unique account identifier (e.g., 'acme-manufacturing', 'global-ops')"},"domain":{"type":"string","description":"Email domain of the account's users (e.g., 'acme.com'). Users on this domain can log in without being added."},"stationCountLimit":{"type":["integer","null"],"minimum":0,"description":"Maximum number of stations allowed across all plants"},"electricalPricePerKwh":{"type":["number","null"],"minimum":0,"description":"Cost per kilowatt-hour for electrical consumption (e.g., 0.15)"},"electricalCo2PerKwh":{"type":["number","null"],"minimum":0,"description":"CO2 emissions per kilowatt-hour (e.g., 0.233)"},"currency":{"type":["string","null"],"description":"ISO 4217 currency code (e.g., 'USD', 'EUR', 'GBP')"},"maxProductionCountPerSchedule":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":9999999,"description":"Maximum production units a single schedule may record before recording stops. Null/absent means no limit."},"dashboardConfig":{"type":["object","null"],"additionalProperties":{},"description":"Custom dashboard configuration (key-value pairs)"},"redshiftPassword":{"type":["string","null"],"description":"Redshift database password (system managed)"},"uploadTransforms":{"type":["string","null"],"description":"Upload transformation configuration (system managed)"},"durationFormat":{"type":["string","null"],"enum":["months","days","hours","minutes",null],"description":"Duration display format (e.g., 'months', 'days', 'hours', 'minutes')"},"appUrls":{"type":["string","null"],"description":"Custom application URLs (system managed)"},"includeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Reason Codes: If set, only these reason codes are available at this level. Applied before excludeReasonCodes."},"excludeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Reason Codes: These reason codes are removed at this level. Applied after includeReasonCodes."},"includeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task Codes: Legacy, no longer applied. Superseded by includeTaskListCodes."},"excludeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task Codes: Legacy, no longer applied. Superseded by excludeTaskListCodes."},"includeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task List Codes: The Task lists available at this level. Unlike reasons, no level setting this means no Task lists are available — lists must be included explicitly before their Tasks appear on a station."},"excludeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task List Codes: These Task list codes are removed at this level. Applied after includeTaskListCodes."},"createdAt":{"type":["string","null"],"description":"Account creation timestamp (ISO 8601, system managed)"},"updatedAt":{"type":["string","null"],"description":"Last update timestamp (ISO 8601, system managed)"},"archivedAt":{"type":["string","null"],"description":"Archive timestamp (ISO 8601, system managed). When set, the account is archived and hidden from active lists."},"enableTasks":{"type":["string","null"],"enum":["on","off",null],"description":"Enable Tasks: Enable the Tasks feature for this account (OI-managed paid feature)."},"enableCycleTimeAnalysis":{"type":["string","null"],"enum":["on","off",null],"description":"Enable Cycle Time Analysis: Show the Cycle Time Analysis menu item for this account (OI-managed)."},"enableLostProductionCost":{"type":["string","null"],"enum":["on","off",null],"description":"Enable Lost Production Cost: Enable tracking of lost production costs."},"enableAutoEndOnQuantityComplete":{"type":["string","null"],"enum":["on","off",null],"description":"Auto-End on Quantity Complete: Automatically end schedules when their target quantity is reached (account default)."},"enableDragBetweenStationsOnGantt":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Drag Between Stations on Gantt: Allow schedules to be reassigned to a different station by dragging on the Gantt chart."},"enableProductionCorrection":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Production Correction: Allow operators to correct production counting errors during a running schedule from the tablet."},"enableHistoricalCorrection":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Historical Production Correction: Correct production counts on schedules that have already ended. Available to admins from the action menu on the schedule list and Gantt chart. This is separate from the tablet's live correction feature."},"enableManualProduction":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Manual Production: Allow operators to manually enter production quantities."},"enableQuickScheduleStart":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Ad Hoc Schedules: Allow operators to start ad-hoc schedules from the tablet."},"enableScheduleCutShort":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Cutting Schedules Short: Allow operators to end a schedule before its planned end."},"enableRejectProduction":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Rejecting Production: Allow operators to reject (scrap) produced units."},"enableEditPartsPerCycle":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Editing Parts Per Cycle: Allow operators to override the parts-per-cycle value on a schedule."},"enableScheduleStationFlexibility":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Schedule Station Flexibility: Allow schedules to run on any station within the group."},"enableManualDowntime":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Manual Downtime: Allow operators and API users to manually trigger downtime on a station, blocking production while active."},"enableAlwaysConnected":{"type":["string","null"],"enum":["on","off",null],"description":"Always Connected: Force this station to always show as connected, regardless of device signals. Useful for stations with no physical device. Inherits from parent level if not set."},"shiftPatterns":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","maxLength":64,"description":"Unique shift pattern identifier"},"title":{"type":"string","description":"Shift Pattern Title: The name of this shift pattern (e.g., 'default', '5-day', '24/7'). Used to reference the pattern from station groups and stations. Must be unique within the account."},"shifts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Shift Name: The name of this shift. Multiple shifts can share the same name for grouping purposes (e.g., 'Day Shift' for split periods like 09:00-12:00 and 13:00-17:00). Does not need to be unique."},"startHour":{"type":"number","minimum":0,"exclusiveMaximum":24,"description":"Start Hour: The start hour in the day of this shift as a decimal (0-24). Example: 14.5 represents 14:30 (2:30 PM), 9 represents 09:00, 17.25 represents 17:15"},"duration":{"type":"number","exclusiveMinimum":0,"maximum":24,"description":"Duration: Duration of the shift in hours as a decimal. Example: 8 for 8 hours, 4.5 for 4 hours 30 minutes"},"weekDay":{"type":"string","pattern":"^[1-7]$","description":"Week Day: The day of the week this shift starts on as a number string: 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday, 7 = Sunday"}},"required":["name","startHour","duration","weekDay"],"additionalProperties":false},"minItems":1,"description":"Array of shifts that make up this pattern (minimum 1). Shifts define the working periods throughout the week."}},"required":["code","title","shifts"],"additionalProperties":false},"description":"Array of shift patterns defining working schedules (optional). Shift patterns can be referenced by ID from station groups and stations."},"reasons":{"type":"array","items":{"$ref":"#/components/schemas/ManifestReason"},"description":"Array of reason codes for categorizing non-productive time (optional). Reasons can be hierarchical with nested child reasons. Used for both planned non-production schedules (e.g., maintenance, breaks) and categorizing downtime detected by Busroot."},"tasks":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Unique Task code used to reference this procedure (e.g., 'TASK-001', 'STARTUP-CHECK'). Must be unique within the account."},"title":{"type":"string","description":"Human-readable title of the Task (e.g., 'Machine Startup Checklist', 'Quality Inspection Procedure')"},"description":{"type":"string","description":"Detailed description of the Task and its purpose"},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"schedule","description":"Once per production schedule: pending from when the schedule starts, missed if it ends first."}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"cron"},"pattern":{"type":"string","minLength":1,"description":"Standard 5-field cron pattern (minute hour day-of-month month day-of-week), evaluated in the station's plant timezone"},"availableBeforeDeadlineMinutes":{"type":"integer","exclusiveMinimum":0,"description":"How many minutes before the deadline (the cron fire) this Task becomes available to complete on the tablet. Required for cron Tasks; must be shorter than the smallest gap between consecutive cron fires."}},"required":["type","pattern"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"on_demand","description":"On Demand: no deadline; the operator starts the list from the tablet whenever it is needed."}},"required":["type"],"additionalProperties":false}],"description":"What makes this Task pending. 'schedule' = once per production schedule; 'cron' = at every fire of a cron pattern (Timer); 'on_demand' = whenever the operator starts the list from the tablet; never missed for time."},"requireNotes":{"type":"boolean","description":"When enabled, operators must enter notes before this Task can be confirmed as complete."},"taskListCodes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"description":"Code of the Task list this Task belongs to"},"order":{"type":"number","description":"Display order of this Task within this list: greater than 0 and at most 100. Decimals are allowed, so a Task can be inserted between two others."}},"required":["code"],"additionalProperties":false},"description":"The Task lists this Task belongs to, with its display order within each. A Task can belong to several lists and is completed independently in each."}},"required":["code","title"],"additionalProperties":false},"description":"Array of Tasks (optional). Tasks can be linked to stations or SKUs via taskCodes arrays."},"taskLists":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"description":"Unique Task list code used to reference this list (e.g., 'DAILY-CHECKS'). Must be unique within the account."},"name":{"type":"string","description":"Human-readable name of the Task list (e.g., 'Daily Checks')"},"description":{"type":"string","description":"Detailed description of what this Task list groups together"},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"schedule","description":"Once per production schedule: pending from when the schedule starts, missed if it ends first."}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"cron"},"pattern":{"type":"string","minLength":1,"description":"Standard 5-field cron pattern (minute hour day-of-month month day-of-week), evaluated in the station's plant timezone"},"availableBeforeDeadlineMinutes":{"type":"integer","exclusiveMinimum":0,"description":"How many minutes before the deadline (the cron fire) this Task becomes available to complete on the tablet. Required for cron Tasks; must be shorter than the smallest gap between consecutive cron fires."}},"required":["type","pattern"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"on_demand","description":"On Demand: no deadline; the operator starts the list from the tablet whenever it is needed."}},"required":["type"],"additionalProperties":false}],"description":"What makes every Task in this list pending. Set on the list, not the Task — all Tasks in a list share it."}},"required":["code","name"],"additionalProperties":false},"description":"Array of Task lists (optional). A purely organisational grouping of Tasks, referenced by Tasks via taskListCodes."},"skus":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Code: Unique SKU code used to reference this product (e.g., 'WIDGET-001', 'PART-A'). Must be unique within the account."},"name":{"type":"string","description":"Name: Human-readable name describing this SKU. Example: 'Widget Type A', 'Component Assembly'"},"specifications":{"type":["string","null"],"description":"Specifications: Detailed specifications or technical description of the SKU"},"instructionsUrl":{"type":["string","null"],"description":"Instructions URL: URL to manufacturing instructions or work instructions for this SKU"},"cycleTime":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":43200000,"description":"Cycle Time: Standard cycle time in milliseconds for producing this SKU. Used for discrete operations with defined cycles. Exactly one of cycleTime, unitsPerMinute, or unitsPerHour must be set. Example: 30000 (30 seconds), 600000 (10 minutes)"},"unitsPerMinute":{"type":["number","null"],"exclusiveMinimum":0,"description":"Units Per Minute: Standard production rate in units per minute. Used for moderate-speed processes. Exactly one of cycleTime, unitsPerMinute, or unitsPerHour must be set. Example: 2, 4, 10"},"unitsPerHour":{"type":["number","null"],"exclusiveMinimum":0,"description":"Units Per Hour: Standard production rate in units per hour. Used for high-speed continuous manufacturing. Exactly one of cycleTime, unitsPerMinute, or unitsPerHour must be set. Example: 1200, 2400, 6000"},"minimumCycleTime":{"type":["integer","null"],"minimum":0,"maximum":43200000,"description":"Minimum Cycle Time: Absolute minimum cycle time in milliseconds. Used to filter erroneous or duplicate production signals. Example: 5000 (5 seconds), 10000 (10 seconds)"},"partsPerCycle":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Parts Per Cycle: Number of units produced in a single cycle. Used when production complete signals are received. Example: 1, 2, 10"},"lineSpeedTarget":{"type":["number","null"],"exclusiveMinimum":0,"maximum":99999,"description":"Line Speed Target: Target line speed for this SKU. Example: 100, 120, 50"},"downtimeDurationThresholdMultiplier":{"type":["number","null"],"exclusiveMinimum":0,"description":"Downtime Duration Threshold Multiplier: Multiple of cycle time used as downtime threshold when production-based downtime detection is enabled. Example: 2.0 means downtime triggers after 2x cycle time"},"value":{"type":["number","null"],"minimum":0,"description":"Value: Nominal value for 1 unit of this SKU in account currency. Used in calculating lost production cost. Example: 5.50, 12.00, 0.75"},"allowUseInQuickSchedule":{"type":["boolean","null"],"description":"Allow Use In Quick Schedule: Determines if this SKU can be selected when creating ad-hoc schedules from tablets"},"stationCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Station Codes: Array of station codes allowed to produce this SKU. If specified, only these stations can be scheduled with this SKU. Example: ['STA-01', 'STA-02']"},"stationGroupCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Station Group Codes: Array of station group codes allowed to produce this SKU. If specified, only stations in these groups can be scheduled with this SKU. Example: ['LINE-01', 'LINE-02']"},"taskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Task Codes: Array of Task codes linked to this SKU. References Tasks defined at the account level. Example: ['TASK-001', 'QC-CHECK']"}},"required":["code","name"],"additionalProperties":false,"description":"A record for an SKU (aka part or component) that is referenced when scheduling production."},"description":"Array of SKUs (products/parts) that can be manufactured (optional). SKUs define production characteristics and can be referenced when scheduling."},"plants":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z0-9\\-]*$","minLength":3,"maxLength":55,"description":"Plant Code: The unique code for this plant."},"name":{"type":"string","description":"Human-readable plant name (e.g., 'Main Production Facility', 'East Coast Plant')"},"timezone":{"type":"string","description":"IANA timezone database name (e.g., 'America/New_York', 'Europe/London', 'Asia/Tokyo'). See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones"},"dayStartHour":{"type":"integer","minimum":0,"exclusiveMaximum":24,"description":"Hour when the production day starts in 24-hour format (0-23). Example: 6 = 6:00 AM, 0 = midnight"},"weekStartDay":{"type":"integer","minimum":0,"maximum":6,"default":0,"description":"Day the production week starts. 0 = Monday (default, ISO standard), 1 = Tuesday, 2 = Wednesday, 3 = Thursday, 4 = Friday, 5 = Saturday, 6 = Sunday"},"includeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Reason Codes: If set, only these reason codes are available at this level. Applied before excludeReasonCodes."},"excludeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Reason Codes: These reason codes are removed at this level. Applied after includeReasonCodes."},"includeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task Codes: Legacy, no longer applied. Superseded by includeTaskListCodes."},"excludeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task Codes: Legacy, no longer applied. Superseded by excludeTaskListCodes."},"includeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task List Codes: The Task lists available at this level. Unlike reasons, no level setting this means no Task lists are available — lists must be included explicitly before their Tasks appear on a station."},"excludeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task List Codes: These Task list codes are removed at this level. Applied after includeTaskListCodes."},"totalEnergyStationCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Total Energy Station Codes: When set, this plant's energy (kWh, cost, CO2) is the sum of these stations' energy instead of the additive sum over member stations."},"stationGroups":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Unique group identifier within the plant (e.g., 'LINE-01', 'ASM-A', 'PACKAGING')"},"name":{"type":"string","description":"Human-readable group name (e.g., 'Assembly Line 1', 'Packaging Line A')"},"shiftPatternCode":{"type":["string","null"],"description":"Shift Pattern: The ID of the shift pattern this group follows"},"includeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Reason Codes: If set, only these reason codes are available at this level. Applied before excludeReasonCodes."},"excludeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Reason Codes: These reason codes are removed at this level. Applied after includeReasonCodes."},"includeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task Codes: Legacy, no longer applied. Superseded by includeTaskListCodes."},"excludeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task Codes: Legacy, no longer applied. Superseded by excludeTaskListCodes."},"includeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task List Codes: The Task lists available at this level. Unlike reasons, no level setting this means no Task lists are available — lists must be included explicitly before their Tasks appear on a station."},"excludeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task List Codes: These Task list codes are removed at this level. Applied after includeTaskListCodes."},"totalEnergyStationCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Total Energy Station Codes: When set, this group's energy (kWh, cost, CO2) is the sum of these stations' energy instead of the additive sum over member stations."},"createdAt":{"type":["string","null"],"description":"Group creation timestamp (ISO 8601, system managed)"},"updatedAt":{"type":["string","null"],"description":"Last update timestamp (ISO 8601, system managed)"},"enableProductionCorrection":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Production Correction: Allow operators to correct production counting errors during a running schedule from the tablet."},"enableManualProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Production: Allow operators to manually enter production quantities."},"enableQuickScheduleStart":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Ad Hoc Schedules: Allow operators to start ad-hoc schedules from the tablet."},"enableScheduleCutShort":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Cutting Schedules Short: Allow operators to end a schedule before its planned end."},"enableRejectProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Rejecting Production: Allow operators to reject (scrap) produced units."},"enableEditPartsPerCycle":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Editing Parts Per Cycle: Allow operators to override the parts-per-cycle value on a schedule."},"enableScheduleStationFlexibility":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Schedule Station Flexibility: Allow schedules to run on any station within the group."},"enableSchedulingOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Scheduling Only: Restrict the station to scheduling only (no live production capture)."},"enableManualDowntime":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Downtime: Allow operators and API users to manually trigger downtime on a station, blocking production while active."},"enableAlwaysConnected":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Always Connected: Force this station to always show as connected, regardless of device signals. Useful for stations with no physical device. Inherits from parent level if not set."},"enableMeterOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Meter Only: Meter Only: When true, this station represents a physical energy meter (e.g. a plant incomer). It only publishes electrical signals and is hidden from production views, rollups, and station pickers by default."},"stations":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^([a-zA-Z0-9-_]+)$","minLength":1,"maxLength":32,"description":"Code: Assign a Code to the Station, this cannot be changed once set."},"name":{"type":"string","minLength":1,"maxLength":32,"description":"Name: The friendly name for this Station (1-32 characters). Example: 'Assembly Station 1', 'Quality Check'"},"description":{"type":["string","null"],"description":"Description: Brief description of the station's purpose or function"},"shiftPatternCode":{"type":["string","null"],"maxLength":64,"description":"Shift Pattern: The ID of the shift pattern this station follows (overrides the group's shift pattern)"},"minimumCycleTime":{"type":["integer","null"],"minimum":0,"maximum":43200000,"description":"Minimum Cycle Time: Minimum time between production signals, set in seconds — if multiple signals arrive within this period, only one unit is counted. Useful for filtering signals during setup. Stored as milliseconds in the manifest."},"speedScale":{"type":["number","null"],"minimum":-9999,"maximum":9999,"description":"Speed Scale: If the value on the Performance Chart doesn't reflect actual running speed, it can be calibrated by setting this value. For example current value = 20, but actual speed = 10, scale should be set to 0.5."},"speedOffset":{"type":["number","null"],"minimum":-9999,"maximum":9999,"description":"Speed Offset: Fine tune a Speed value. For example if a Station's speed is showing as 0.5 when stopped, set the value to -0.5."},"speedToProductionRatio":{"type":["number","null"],"minimum":0,"maximum":99999,"description":"Speed to Production Ratio: Convert a speed value into a production count. Set the conversion ratio, can be a decimal. If left blank no production units will be counted."},"electricalPowerNominalKw":{"type":["number","null"],"minimum":0,"description":"Electrical Power Nominal (kW): The expected power usage in kW during normal operation."},"idleCostPerMinute":{"type":["number","null"],"minimum":0,"maximum":99999,"description":"Idle Cost Per Minute: Cost per minute during idle time in account currency. Used for calculating scheduling losses, planned non-production losses, and downtime losses when SKU doesn't have a specific value."},"downtimeDetectionMode":{"type":["string","null"],"enum":["off","production","utilisation","line_speed",null],"default":"utilisation","description":"Downtime Detection Mode: How to detect when the station is down. Options: 'off' (no detection), 'production' (use production cycle data), 'utilisation' (use utilisation signals - most common), 'line_speed' (use line speed monitoring). Default: 'utilisation'"},"utilisationDowntimeThreshold":{"type":["integer","null"],"minimum":0,"description":"Utilisation Downtime Threshold: Minimum stop duration before registering downtime, set in minutes — only stops at least this long are recorded. Stored as milliseconds in the manifest. Defaults to 1 hour."},"slowDurationThreshold":{"type":["integer","null"],"minimum":0,"description":"Slow Duration Threshold: Minimum duration running below 80% of the line speed target before registering slow running, in milliseconds. Defaults to 1 minute."},"forceAllShiftTimeAsPlannedProduction":{"type":["boolean","null"],"description":"Force All Shift Time As Planned Production: Treat all shift time as planned production time"},"productiveStatusMode":{"type":["string","null"],"enum":["productive_signal","electrical_usage","line_speed",null],"default":"productive_signal","description":"Productive Status Mode: How to measure when the station is engaged in value-adding activity. Options: 'productive_signal' (use productive signal input), 'electrical_usage' (use electrical consumption), 'line_speed' (use line speed value). Default: 'productive_signal'"},"electricalUsageStoppedThresholdKw":{"type":["number","null"],"minimum":0,"description":"Electrical Usage Stopped Threshold (kW): Minimum power consumption in kilowatts that indicates the station is active. Below this threshold, Busroot will regard the station as stopped/downtime. Example: 2.0, 1.0, 5.0"},"lineSpeedStoppedThreshold":{"type":["number","null"],"minimum":0,"description":"Line Speed Stopped Threshold: Minimum speed value that indicates the station is running. Below this threshold, Busroot will regard the station as stopped/downtime. Example: 10, 5, 20"},"productiveHoldOnTime":{"type":["integer","null"],"minimum":0,"maximum":86400000,"description":"Productive Hold On Time: How long to keep considering the station active after a productive signal, set in minutes — each new signal restarts the hold-on timer. Stored as milliseconds in the manifest."},"currentOperatorInitials":{"type":["string","null"],"minLength":3,"maxLength":8,"description":"Current Operator Initials: Current operator's initials (3-8 letters/numbers, system managed)"},"statusCode":{"type":["string","null"],"description":"Status Code: Current status code of the station (system managed)"},"statusCodeUpdatedAt":{"type":["string","null"],"description":"Status Code Updated At: Timestamp when status was last updated (ISO 8601, system managed)"},"cycleTime":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":43200000,"description":"Cycle Time: Standard cycle time for production, set in seconds. Stored as milliseconds in the manifest."},"unitsPerMinute":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Units Per Minute: Expected production rate in units per minute. Example: 2, 4, 10"},"unitsPerHour":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Units Per Hour: Expected production rate in units per hour. Example: 120, 240, 600"},"lineSpeedTarget":{"type":["number","null"],"exclusiveMinimum":0,"maximum":99999,"description":"Line Speed Target: Target operating speed for the station. Example: 100, 120, 50"},"includeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Reason Codes: If set, only these reason codes are available at this level. Applied before excludeReasonCodes."},"excludeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Reason Codes: These reason codes are removed at this level. Applied after includeReasonCodes."},"includeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task Codes: Legacy, no longer applied. Superseded by includeTaskListCodes."},"excludeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task Codes: Legacy, no longer applied. Superseded by excludeTaskListCodes."},"includeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task List Codes: The Task lists available at this level. Unlike reasons, no level setting this means no Task lists are available — lists must be included explicitly before their Tasks appear on a station."},"excludeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task List Codes: These Task list codes are removed at this level. Applied after includeTaskListCodes."},"alertMessage":{"type":["string","null"],"description":"Alert Message: Current alert message for the station (system managed)"},"alertExpiresAt":{"type":["string","null"],"description":"Alert Expires At: Timestamp when alert expires (ISO 8601, system managed)"},"createdAt":{"type":["string","null"],"description":"Created At: Station creation timestamp (ISO 8601, system managed)"},"updatedAt":{"type":["string","null"],"description":"Updated At: Last update timestamp (ISO 8601, system managed)"},"archivedAt":{"type":["string","null"],"description":"Archived At: Archive timestamp (ISO 8601, system managed)"},"enableProductionCorrection":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Production Correction: Allow operators to correct production counting errors during a running schedule from the tablet."},"enableManualProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Production: Allow operators to manually enter production quantities."},"enableQuickScheduleStart":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Ad Hoc Schedules: Allow operators to start ad-hoc schedules from the tablet."},"enableScheduleCutShort":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Cutting Schedules Short: Allow operators to end a schedule before its planned end."},"enableRejectProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Rejecting Production: Allow operators to reject (scrap) produced units."},"enableEditPartsPerCycle":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Editing Parts Per Cycle: Allow operators to override the parts-per-cycle value on a schedule."},"enableScheduleStationFlexibility":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Schedule Station Flexibility: Allow schedules to run on any station within the group."},"enableSchedulingOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Scheduling Only: Restrict the station to scheduling only (no live production capture)."},"enableManualDowntime":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Downtime: Allow operators and API users to manually trigger downtime on a station, blocking production while active."},"enableAlwaysConnected":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Always Connected: Force this station to always show as connected, regardless of device signals. Useful for stations with no physical device. Inherits from parent level if not set."},"enableMeterOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Meter Only: Meter Only: When true, this station represents a physical energy meter (e.g. a plant incomer). It only publishes electrical signals and is hidden from production views, rollups, and station pickers by default."}},"required":["code","name"],"additionalProperties":false},"description":"Array of stations within this group (minimum 1)"}},"required":["code","name","stations"],"additionalProperties":false,"description":"Station group configuration with nested stations"},"description":"Array of station groups within this plant (minimum 1)"},"createdAt":{"type":["string","null"],"description":"Plant creation timestamp (ISO 8601, system managed)"},"updatedAt":{"type":["string","null"],"description":"Last update timestamp (ISO 8601, system managed)"},"archivedAt":{"type":["string","null"],"description":"Archive timestamp (ISO 8601, system managed)"},"enableProductionCorrection":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Production Correction: Allow operators to correct production counting errors during a running schedule from the tablet."},"enableManualProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Production: Allow operators to manually enter production quantities."},"enableQuickScheduleStart":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Ad Hoc Schedules: Allow operators to start ad-hoc schedules from the tablet."},"enableScheduleCutShort":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Cutting Schedules Short: Allow operators to end a schedule before its planned end."},"enableRejectProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Rejecting Production: Allow operators to reject (scrap) produced units."},"enableEditPartsPerCycle":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Editing Parts Per Cycle: Allow operators to override the parts-per-cycle value on a schedule."},"enableScheduleStationFlexibility":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Schedule Station Flexibility: Allow schedules to run on any station within the group."},"enableManualDowntime":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Downtime: Allow operators and API users to manually trigger downtime on a station, blocking production while active."},"enableAlwaysConnected":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Always Connected: Force this station to always show as connected, regardless of device signals. Useful for stations with no physical device. Inherits from parent level if not set."}},"required":["code","name","timezone","dayStartHour","weekStartDay","stationGroups"],"additionalProperties":false},"description":"Array of plants belonging to this account (minimum 1)"}},"required":["id","domain","plants"],"additionalProperties":false,"description":"Account configuration with nested shift patterns, reasons, SKUs, plants, station groups, and stations"}},"required":["version","account"],"additionalProperties":false}},"required":["id","domain","manifest"]}},"required":["isSuccess","result"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}},"post":{"tags":["Account"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enableTasks":{"type":["string","null"],"enum":["on","off",null],"description":"Enable Tasks: Enable the Tasks feature for this account (OI-managed paid feature)."},"enableCycleTimeAnalysis":{"type":["string","null"],"enum":["on","off",null],"description":"Enable Cycle Time Analysis: Show the Cycle Time Analysis menu item for this account (OI-managed)."},"enableLostProductionCost":{"type":["string","null"],"enum":["on","off",null],"description":"Enable Lost Production Cost: Enable tracking of lost production costs."},"enableAutoEndOnQuantityComplete":{"type":["string","null"],"enum":["on","off",null],"description":"Auto-End on Quantity Complete: Automatically end schedules when their target quantity is reached (account default)."},"enableDragBetweenStationsOnGantt":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Drag Between Stations on Gantt: Allow schedules to be reassigned to a different station by dragging on the Gantt chart."},"enableProductionCorrection":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Production Correction: Allow operators to correct production counting errors during a running schedule from the tablet."},"enableHistoricalCorrection":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Historical Production Correction: Correct production counts on schedules that have already ended. Available to admins from the action menu on the schedule list and Gantt chart. This is separate from the tablet's live correction feature."},"enableManualProduction":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Manual Production: Allow operators to manually enter production quantities."},"enableQuickScheduleStart":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Ad Hoc Schedules: Allow operators to start ad-hoc schedules from the tablet."},"enableScheduleCutShort":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Cutting Schedules Short: Allow operators to end a schedule before its planned end."},"enableRejectProduction":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Rejecting Production: Allow operators to reject (scrap) produced units."},"enableEditPartsPerCycle":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Editing Parts Per Cycle: Allow operators to override the parts-per-cycle value on a schedule."},"enableScheduleStationFlexibility":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Schedule Station Flexibility: Allow schedules to run on any station within the group."},"enableManualDowntime":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Manual Downtime: Allow operators and API users to manually trigger downtime on a station, blocking production while active."},"enableAlwaysConnected":{"type":["string","null"],"enum":["on","off",null],"description":"Always Connected: Force this station to always show as connected, regardless of device signals. Useful for stations with no physical device. Inherits from parent level if not set."},"currency":{"type":["string","null"],"enum":["GBP","USD","EUR",null]},"electricalPricePerKwh":{"type":["number","null"],"minimum":0,"exclusiveMaximum":1000,"description":"Price per kWh: Have the cost of electricity displayed by providing a kWh price in GBP."},"electricalCo2PerKwh":{"type":["number","null"],"minimum":0,"exclusiveMaximum":1000,"description":"CO2 per kWh: Have the amount of CO2 used displayed by providing an average CO2 per kWh."},"dashboardConfig":{"type":["string","null"]},"resetRedshiftPassword":{"type":"boolean"},"uploadTransforms":{"type":["string","null"],"description":"Upload Transforms: This field accepts a JSONata expression (in YAML format) to define how table columns are mapped and transformed."},"maxProductionCountPerSchedule":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":9999999,"description":"Maximum Production Count per Schedule: Sets the maximum limit of production units for a single schedule to prevent large errors."},"durationFormat":{"type":"string","enum":["months","days","hours","minutes"],"default":"months","description":"Duration Format: Select the format to display durations, for example a downtime period or length of a schedule."},"includeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Reason Codes: If set, only these reason codes are available at this level. Applied before excludeReasonCodes."},"excludeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Reason Codes: These reason codes are removed at this level. Applied after includeReasonCodes."},"includeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task List Codes: The Task lists available at this level. No level setting this means no Task lists are available."},"excludeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task List Codes: These Task list codes are removed at this level. Applied after includeTaskListCodes."}}}}}},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"result":{"type":"object","properties":{"id":{"type":"string","description":"Unique account identifier (e.g., 'acme-manufacturing', 'global-ops')"},"domain":{"type":"string","description":"Email domain of the account's users (e.g., 'acme.com'). Users on this domain can log in without being added."},"stationCountLimit":{"type":["integer","null"],"minimum":0,"description":"Maximum number of stations allowed across all plants"},"electricalPricePerKwh":{"type":["number","null"],"minimum":0,"description":"Cost per kilowatt-hour for electrical consumption (e.g., 0.15)"},"electricalCo2PerKwh":{"type":["number","null"],"minimum":0,"description":"CO2 emissions per kilowatt-hour (e.g., 0.233)"},"currency":{"type":["string","null"],"description":"ISO 4217 currency code (e.g., 'USD', 'EUR', 'GBP')"},"maxProductionCountPerSchedule":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":9999999,"description":"Maximum production units a single schedule may record before recording stops. Null/absent means no limit."},"dashboardConfig":{"type":["object","null"],"additionalProperties":{},"description":"Custom dashboard configuration (key-value pairs)"},"redshiftPassword":{"type":["string","null"],"description":"Redshift database password (system managed)"},"uploadTransforms":{"type":["string","null"],"description":"Upload transformation configuration (system managed)"},"durationFormat":{"type":["string","null"],"enum":["months","days","hours","minutes",null],"description":"Duration display format (e.g., 'months', 'days', 'hours', 'minutes')"},"appUrls":{"type":["string","null"],"description":"Custom application URLs (system managed)"},"includeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Reason Codes: If set, only these reason codes are available at this level. Applied before excludeReasonCodes."},"excludeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Reason Codes: These reason codes are removed at this level. Applied after includeReasonCodes."},"includeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task Codes: Legacy, no longer applied. Superseded by includeTaskListCodes."},"excludeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task Codes: Legacy, no longer applied. Superseded by excludeTaskListCodes."},"includeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task List Codes: The Task lists available at this level. Unlike reasons, no level setting this means no Task lists are available — lists must be included explicitly before their Tasks appear on a station."},"excludeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task List Codes: These Task list codes are removed at this level. Applied after includeTaskListCodes."},"createdAt":{"type":["string","null"],"description":"Account creation timestamp (ISO 8601, system managed)"},"updatedAt":{"type":["string","null"],"description":"Last update timestamp (ISO 8601, system managed)"},"archivedAt":{"type":["string","null"],"description":"Archive timestamp (ISO 8601, system managed). When set, the account is archived and hidden from active lists."},"enableTasks":{"type":["string","null"],"enum":["on","off",null],"description":"Enable Tasks: Enable the Tasks feature for this account (OI-managed paid feature)."},"enableCycleTimeAnalysis":{"type":["string","null"],"enum":["on","off",null],"description":"Enable Cycle Time Analysis: Show the Cycle Time Analysis menu item for this account (OI-managed)."},"enableLostProductionCost":{"type":["string","null"],"enum":["on","off",null],"description":"Enable Lost Production Cost: Enable tracking of lost production costs."},"enableAutoEndOnQuantityComplete":{"type":["string","null"],"enum":["on","off",null],"description":"Auto-End on Quantity Complete: Automatically end schedules when their target quantity is reached (account default)."},"enableDragBetweenStationsOnGantt":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Drag Between Stations on Gantt: Allow schedules to be reassigned to a different station by dragging on the Gantt chart."},"enableProductionCorrection":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Production Correction: Allow operators to correct production counting errors during a running schedule from the tablet."},"enableHistoricalCorrection":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Historical Production Correction: Correct production counts on schedules that have already ended. Available to admins from the action menu on the schedule list and Gantt chart. This is separate from the tablet's live correction feature."},"enableManualProduction":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Manual Production: Allow operators to manually enter production quantities."},"enableQuickScheduleStart":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Ad Hoc Schedules: Allow operators to start ad-hoc schedules from the tablet."},"enableScheduleCutShort":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Cutting Schedules Short: Allow operators to end a schedule before its planned end."},"enableRejectProduction":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Rejecting Production: Allow operators to reject (scrap) produced units."},"enableEditPartsPerCycle":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Editing Parts Per Cycle: Allow operators to override the parts-per-cycle value on a schedule."},"enableScheduleStationFlexibility":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Schedule Station Flexibility: Allow schedules to run on any station within the group."},"enableManualDowntime":{"type":["string","null"],"enum":["on","off",null],"description":"Allow Manual Downtime: Allow operators and API users to manually trigger downtime on a station, blocking production while active."},"enableAlwaysConnected":{"type":["string","null"],"enum":["on","off",null],"description":"Always Connected: Force this station to always show as connected, regardless of device signals. Useful for stations with no physical device. Inherits from parent level if not set."}},"required":["id","domain"],"additionalProperties":false}},"required":["isSuccess","result"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/device":{"get":{"tags":["Device"],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"accessToken":{"type":"string"},"type":{"type":"string","default":"unknown"},"description":{"type":["string","null"],"maxLength":300},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["accountId","id","accessToken","type"]}}},"required":["isSuccess","results"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}},"post":{"tags":["Device"],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"result":{"type":"object","properties":{"accountId":{"type":"string"},"id":{"type":"string"},"accessToken":{"type":"string"},"type":{"type":"string","default":"unknown"},"description":{"type":["string","null"],"maxLength":300},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["accountId","id","accessToken","type"]}},"required":["isSuccess","result"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/device/{id}":{"delete":{"tags":["Device"],"parameters":[{"in":"path","name":"id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"accessToken","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"204 No Content"},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/downtime/ongoing":{"get":{"tags":["Downtime"],"parameters":[{"in":"query","name":"stationcodes","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"type":{"type":"string","enum":["stop","slow","manual","stop_utilisation","unknown"]},"stationCode":{"type":"string"},"startAt":{"type":"string"},"endAt":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"startNotifiedAt":{"type":"string"},"endNotifiedAt":{"type":"string"},"accountId":{"type":"string"},"excludedAt":{"type":"string"},"hasCause":{"type":"boolean"},"reasonCode":{"type":"string"},"note":{"type":"string"},"ragStatus":{"type":"string","enum":["#cc3311","#ee7733","#009988","#33bbee","#CCCCCC","#8338ec"]},"stationName":{"type":"string"},"reasonBreadcrumb":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"},"parentReasonCode":{"type":["string","null"]},"type":{"type":"array","items":{"type":"string","enum":["downtime","non-production","quality"]}},"requireNotes":{"type":"boolean"},"effectiveRequireNotes":{"type":"boolean"}},"required":["code","description","type"]}},"startAtTimestamp":{"type":"number"},"endAtTimestamp":{"type":"number"},"duration":{"type":"number"},"durationFormatted":{"type":"string"},"skuCode":{"type":"string"},"skuName":{"type":"string"},"skuValue":{"type":"number"},"isOngoing":{"type":"boolean"}},"required":["id","type","stationCode","startAt","endAt","createdAt","updatedAt","accountId","hasCause","ragStatus","reasonBreadcrumb","startAtTimestamp","endAtTimestamp","isOngoing"]}}},"required":["isSuccess","results"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/downtime/unreported-downtime/count":{"get":{"tags":["Downtime"],"parameters":[{"in":"query","name":"stationcodes","schema":{"type":"string"},"required":true},{"in":"query","name":"rangecode","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"stationCode":{"type":"string"},"count":{"type":"number"}},"required":["stationCode","count"]}}},"required":["isSuccess","results"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/downtime/{id}/event":{"post":{"tags":["Downtime"],"parameters":[{"in":"path","name":"id","schema":{"type":"integer","minimum":0},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["acknowledge","estimate","escalate","cause","exclude"]},"estimatedTime":{"type":"number","minimum":0},"causeCode":{"type":"string","minLength":1},"note":{"type":"string","maxLength":250,"description":"Free-text note describing the downtime. Mandatory when the assigned reason has 'requireNotes' enabled, otherwise optional. Maximum 250 characters."},"operator":{"type":"string"}},"required":["type"]}}}},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"}},"required":["isSuccess"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/note":{"get":{"tags":["Note"],"parameters":[{"in":"query","name":"stationcodes","description":"Comma-separated list of Station Codes.","schema":{"type":"string","description":"Comma-separated list of Station Codes."}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":0}},{"in":"query","name":"excludehidden","description":"Excludes notes hidden from the Cockpit / Station Notes page.","schema":{"type":"string","minLength":1,"description":"Excludes notes hidden from the Cockpit / Station Notes page."}}],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","description":"Unique note identifier"},"stationCode":{"type":["string","null"],"description":"Station code to attach the note to"},"content":{"type":"string","maxLength":250,"description":"Note text content (max 250 characters)"},"createdAt":{"type":"string","description":"Creation timestamp (ISO 8601)"},"expiresAt":{"type":["string","null"],"description":"Expiry time (ISO 8601). Defaults to 1 year from creation if not provided"},"hide":{"type":["boolean","null"],"description":"If true, the note is hidden from the default view"},"userId":{"type":["number","null"],"description":"User ID of the note creator"},"operatorInitials":{"type":["string","null"],"description":"Initials of the operator who created the note"},"email":{"type":["string","null"]},"stationName":{"type":["string","null"]}},"required":["id","content","createdAt"]}}},"required":["isSuccess","results"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}},"post":{"tags":["Note"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"number","description":"Unique note identifier"},"stationCode":{"type":["string","null"],"description":"Station code to attach the note to"},"severity":{"type":["string","null"],"description":"Severity level of the note"},"content":{"type":"string","maxLength":250,"description":"Note text content (max 250 characters)"},"expiresAt":{"type":["string","null"],"description":"Expiry time (ISO 8601). Defaults to 1 year from creation if not provided"},"hide":{"type":["boolean","null"],"description":"If true, the note is hidden from the default view"},"operatorInitials":{"type":["string","null"],"description":"Initials of the operator who created the note"},"userId":{"type":["number","null"],"description":"User ID of the note creator"},"createdAt":{"type":"string","description":"Creation timestamp (ISO 8601)"}},"required":["content"]}}}},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","description":"Unique note identifier"},"accountId":{"type":"string","description":"Account ID the note belongs to"},"stationCode":{"type":["string","null"],"description":"Station code to attach the note to"},"severity":{"type":["string","null"],"description":"Severity level of the note"},"content":{"type":"string","maxLength":250,"description":"Note text content (max 250 characters)"},"expiresAt":{"type":["string","null"],"description":"Expiry time (ISO 8601). Defaults to 1 year from creation if not provided"},"hide":{"type":["boolean","null"],"description":"If true, the note is hidden from the default view"},"operatorInitials":{"type":["string","null"],"description":"Initials of the operator who created the note"},"userId":{"type":["number","null"],"description":"User ID of the note creator"},"createdAt":{"type":"string","description":"Creation timestamp (ISO 8601)"},"updatedAt":{"type":"string","description":"Last update timestamp (ISO 8601)"}},"required":["id","accountId","content","createdAt","updatedAt"]}}},"required":["isSuccess","results"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/note/{id}":{"delete":{"tags":["Note"],"parameters":[{"in":"path","name":"id","schema":{"type":"number"},"required":true}],"responses":{"204":{"description":"204 No Content"},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/plant":{"get":{"tags":["Plant"],"parameters":[{"in":"query","name":"stationcodes","description":"Comma-separated list of Station Codes.","schema":{"type":"string","description":"Comma-separated list of Station Codes."}},{"in":"query","name":"plantcode","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"timezone":{"type":"string"},"now":{"type":"string"},"stationGroups":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Unique group identifier within the plant (e.g., 'LINE-01', 'ASM-A', 'PACKAGING')"},"name":{"type":"string","description":"Human-readable group name (e.g., 'Assembly Line 1', 'Packaging Line A')"},"shiftPatternCode":{"type":["string","null"],"description":"Shift Pattern: The ID of the shift pattern this group follows"},"includeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Reason Codes: If set, only these reason codes are available at this level. Applied before excludeReasonCodes."},"excludeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Reason Codes: These reason codes are removed at this level. Applied after includeReasonCodes."},"includeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task Codes: Legacy, no longer applied. Superseded by includeTaskListCodes."},"excludeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task Codes: Legacy, no longer applied. Superseded by excludeTaskListCodes."},"includeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task List Codes: The Task lists available at this level. Unlike reasons, no level setting this means no Task lists are available — lists must be included explicitly before their Tasks appear on a station."},"excludeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task List Codes: These Task list codes are removed at this level. Applied after includeTaskListCodes."},"totalEnergyStationCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Total Energy Station Codes: When set, this group's energy (kWh, cost, CO2) is the sum of these stations' energy instead of the additive sum over member stations."},"createdAt":{"type":["string","null"],"description":"Group creation timestamp (ISO 8601, system managed)"},"updatedAt":{"type":["string","null"],"description":"Last update timestamp (ISO 8601, system managed)"},"enableProductionCorrection":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Production Correction: Allow operators to correct production counting errors during a running schedule from the tablet."},"enableManualProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Production: Allow operators to manually enter production quantities."},"enableQuickScheduleStart":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Ad Hoc Schedules: Allow operators to start ad-hoc schedules from the tablet."},"enableScheduleCutShort":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Cutting Schedules Short: Allow operators to end a schedule before its planned end."},"enableRejectProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Rejecting Production: Allow operators to reject (scrap) produced units."},"enableEditPartsPerCycle":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Editing Parts Per Cycle: Allow operators to override the parts-per-cycle value on a schedule."},"enableScheduleStationFlexibility":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Schedule Station Flexibility: Allow schedules to run on any station within the group."},"enableSchedulingOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Scheduling Only: Restrict the station to scheduling only (no live production capture)."},"enableManualDowntime":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Downtime: Allow operators and API users to manually trigger downtime on a station, blocking production while active."},"enableAlwaysConnected":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Always Connected: Force this station to always show as connected, regardless of device signals. Useful for stations with no physical device. Inherits from parent level if not set."},"enableMeterOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Meter Only: Meter Only: When true, this station represents a physical energy meter (e.g. a plant incomer). It only publishes electrical signals and is hidden from production views, rollups, and station pickers by default."},"stations":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^([a-zA-Z0-9-_]+)$","minLength":1,"maxLength":32,"description":"Code: Assign a Code to the Station, this cannot be changed once set."},"name":{"type":"string","minLength":1,"maxLength":32,"description":"Name: The friendly name for this Station (1-32 characters). Example: 'Assembly Station 1', 'Quality Check'"},"description":{"type":["string","null"],"description":"Description: Brief description of the station's purpose or function"},"shiftPatternCode":{"type":["string","null"],"maxLength":64,"description":"Shift Pattern: The ID of the shift pattern this station follows (overrides the group's shift pattern)"},"minimumCycleTime":{"type":["integer","null"],"minimum":0,"maximum":43200000,"description":"Minimum Cycle Time: Minimum time between production signals, set in seconds — if multiple signals arrive within this period, only one unit is counted. Useful for filtering signals during setup. Stored as milliseconds in the manifest."},"speedScale":{"type":["number","null"],"minimum":-9999,"maximum":9999,"description":"Speed Scale: If the value on the Performance Chart doesn't reflect actual running speed, it can be calibrated by setting this value. For example current value = 20, but actual speed = 10, scale should be set to 0.5."},"speedOffset":{"type":["number","null"],"minimum":-9999,"maximum":9999,"description":"Speed Offset: Fine tune a Speed value. For example if a Station's speed is showing as 0.5 when stopped, set the value to -0.5."},"speedToProductionRatio":{"type":["number","null"],"minimum":0,"maximum":99999,"description":"Speed to Production Ratio: Convert a speed value into a production count. Set the conversion ratio, can be a decimal. If left blank no production units will be counted."},"electricalPowerNominalKw":{"type":["number","null"],"minimum":0,"description":"Electrical Power Nominal (kW): The expected power usage in kW during normal operation."},"idleCostPerMinute":{"type":["number","null"],"minimum":0,"maximum":99999,"description":"Idle Cost Per Minute: Cost per minute during idle time in account currency. Used for calculating scheduling losses, planned non-production losses, and downtime losses when SKU doesn't have a specific value."},"downtimeDetectionMode":{"type":["string","null"],"enum":["off","production","utilisation","line_speed",null],"default":"utilisation","description":"Downtime Detection Mode: How to detect when the station is down. Options: 'off' (no detection), 'production' (use production cycle data), 'utilisation' (use utilisation signals - most common), 'line_speed' (use line speed monitoring). Default: 'utilisation'"},"utilisationDowntimeThreshold":{"type":["integer","null"],"minimum":0,"description":"Utilisation Downtime Threshold: Minimum stop duration before registering downtime, set in minutes — only stops at least this long are recorded. Stored as milliseconds in the manifest. Defaults to 1 hour."},"slowDurationThreshold":{"type":["integer","null"],"minimum":0,"description":"Slow Duration Threshold: Minimum duration running below 80% of the line speed target before registering slow running, in milliseconds. Defaults to 1 minute."},"forceAllShiftTimeAsPlannedProduction":{"type":["boolean","null"],"description":"Force All Shift Time As Planned Production: Treat all shift time as planned production time"},"productiveStatusMode":{"type":["string","null"],"enum":["productive_signal","electrical_usage","line_speed",null],"default":"productive_signal","description":"Productive Status Mode: How to measure when the station is engaged in value-adding activity. Options: 'productive_signal' (use productive signal input), 'electrical_usage' (use electrical consumption), 'line_speed' (use line speed value). Default: 'productive_signal'"},"electricalUsageStoppedThresholdKw":{"type":["number","null"],"minimum":0,"description":"Electrical Usage Stopped Threshold (kW): Minimum power consumption in kilowatts that indicates the station is active. Below this threshold, Busroot will regard the station as stopped/downtime. Example: 2.0, 1.0, 5.0"},"lineSpeedStoppedThreshold":{"type":["number","null"],"minimum":0,"description":"Line Speed Stopped Threshold: Minimum speed value that indicates the station is running. Below this threshold, Busroot will regard the station as stopped/downtime. Example: 10, 5, 20"},"productiveHoldOnTime":{"type":["integer","null"],"minimum":0,"maximum":86400000,"description":"Productive Hold On Time: How long to keep considering the station active after a productive signal, set in minutes — each new signal restarts the hold-on timer. Stored as milliseconds in the manifest."},"currentOperatorInitials":{"type":["string","null"],"minLength":3,"maxLength":8,"description":"Current Operator Initials: Current operator's initials (3-8 letters/numbers, system managed)"},"statusCode":{"type":["string","null"],"description":"Status Code: Current status code of the station (system managed)"},"statusCodeUpdatedAt":{"type":["string","null"],"description":"Status Code Updated At: Timestamp when status was last updated (ISO 8601, system managed)"},"cycleTime":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":43200000,"description":"Cycle Time: Standard cycle time for production, set in seconds. Stored as milliseconds in the manifest."},"unitsPerMinute":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Units Per Minute: Expected production rate in units per minute. Example: 2, 4, 10"},"unitsPerHour":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Units Per Hour: Expected production rate in units per hour. Example: 120, 240, 600"},"lineSpeedTarget":{"type":["number","null"],"exclusiveMinimum":0,"maximum":99999,"description":"Line Speed Target: Target operating speed for the station. Example: 100, 120, 50"},"includeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Reason Codes: If set, only these reason codes are available at this level. Applied before excludeReasonCodes."},"excludeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Reason Codes: These reason codes are removed at this level. Applied after includeReasonCodes."},"includeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task Codes: Legacy, no longer applied. Superseded by includeTaskListCodes."},"excludeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task Codes: Legacy, no longer applied. Superseded by excludeTaskListCodes."},"includeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task List Codes: The Task lists available at this level. Unlike reasons, no level setting this means no Task lists are available — lists must be included explicitly before their Tasks appear on a station."},"excludeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task List Codes: These Task list codes are removed at this level. Applied after includeTaskListCodes."},"alertMessage":{"type":["string","null"],"description":"Alert Message: Current alert message for the station (system managed)"},"alertExpiresAt":{"type":["string","null"],"description":"Alert Expires At: Timestamp when alert expires (ISO 8601, system managed)"},"createdAt":{"type":["string","null"],"description":"Created At: Station creation timestamp (ISO 8601, system managed)"},"updatedAt":{"type":["string","null"],"description":"Updated At: Last update timestamp (ISO 8601, system managed)"},"archivedAt":{"type":["string","null"],"description":"Archived At: Archive timestamp (ISO 8601, system managed)"},"enableProductionCorrection":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Production Correction: Allow operators to correct production counting errors during a running schedule from the tablet."},"enableManualProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Production: Allow operators to manually enter production quantities."},"enableQuickScheduleStart":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Ad Hoc Schedules: Allow operators to start ad-hoc schedules from the tablet."},"enableScheduleCutShort":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Cutting Schedules Short: Allow operators to end a schedule before its planned end."},"enableRejectProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Rejecting Production: Allow operators to reject (scrap) produced units."},"enableEditPartsPerCycle":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Editing Parts Per Cycle: Allow operators to override the parts-per-cycle value on a schedule."},"enableScheduleStationFlexibility":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Schedule Station Flexibility: Allow schedules to run on any station within the group."},"enableSchedulingOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Scheduling Only: Restrict the station to scheduling only (no live production capture)."},"enableManualDowntime":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Downtime: Allow operators and API users to manually trigger downtime on a station, blocking production while active."},"enableAlwaysConnected":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Always Connected: Force this station to always show as connected, regardless of device signals. Useful for stations with no physical device. Inherits from parent level if not set."},"enableMeterOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Meter Only: Meter Only: When true, this station represents a physical energy meter (e.g. a plant incomer). It only publishes electrical signals and is hidden from production views, rollups, and station pickers by default."}},"required":["code","name"],"additionalProperties":false}}},"required":["code","name","stations"],"additionalProperties":false}},"dayStartHour":{"type":"number"},"weekStartDay":{"type":"number"},"totalEnergyStationCodes":{"type":["array","null"],"items":{"type":"string"}}},"required":["code","name","timezone","now","stationGroups","dayStartHour","weekStartDay"]}}},"required":["isSuccess","results"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}},"post":{"tags":["Plant"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z0-9\\-]*$","minLength":3,"maxLength":55,"description":"Plant Code: The unique code for this plant."},"name":{"type":"string","minLength":3,"maxLength":55,"description":"Plant Name: The display name for this plant."},"dayStartHour":{"type":"integer","minimum":0,"maximum":24,"description":"Start Hour for Day: When running 24 hours a day, this time will be considered the start and end when reporting by day."},"weekStartDay":{"type":"integer","minimum":0,"maximum":6,"description":"Week Start Day: The day the production week starts."},"timezone":{"type":"string","enum":["UTC","Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmara","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Timbuktu","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/ComodRivadavia","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Atikokan","America/Atka","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Ciudad_Juarez","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Coyhaique","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Ensenada","America/Fort_Nelson","America/Fort_Wayne","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Knox_IN","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Nuuk","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Acre","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Rosario","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Shiprock","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Virgin","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/South_Pole","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Ashkhabad","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Chongqing","Asia/Chungking","Asia/Colombo","Asia/Dacca","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Harbin","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Istanbul","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kashgar","Asia/Kathmandu","Asia/Katmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macao","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Tel_Aviv","Asia/Thimbu","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ujung_Pandang","Asia/Ulaanbaatar","Asia/Ulan_Bator","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Faroe","Atlantic/Jan_Mayen","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/ACT","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Canberra","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/LHI","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/NSW","Australia/North","Australia/Perth","Australia/Queensland","Australia/South","Australia/Sydney","Australia/Tasmania","Australia/Victoria","Australia/West","Australia/Yancowinna","Brazil/Acre","Brazil/DeNoronha","Brazil/East","Brazil/West","Canada/Atlantic","Canada/Central","Canada/Eastern","Canada/Mountain","Canada/Newfoundland","Canada/Pacific","Canada/Saskatchewan","Canada/Yukon","Chile/Continental","Chile/EasterIsland","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belfast","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Kyiv","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Nicosia","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Tiraspol","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Mexico/BajaNorte","Mexico/BajaSur","Mexico/General","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kanton","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Samoa","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis","Pacific/Yap","US/Alaska","US/Aleutian","US/Arizona","US/Central","US/East-Indiana","US/Eastern","US/Hawaii","US/Indiana-Starke","US/Michigan","US/Mountain","US/Pacific","US/Samoa"],"description":"Timezone: The timezone the plant operates in."},"enableProductionCorrection":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Production Correction: Allow operators to correct production counting errors during a running schedule from the tablet."},"enableManualProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Production: Allow operators to manually enter production quantities."},"enableQuickScheduleStart":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Ad Hoc Schedules: Allow operators to start ad-hoc schedules from the tablet."},"enableScheduleCutShort":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Cutting Schedules Short: Allow operators to end a schedule before its planned end."},"enableRejectProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Rejecting Production: Allow operators to reject (scrap) produced units."},"enableEditPartsPerCycle":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Editing Parts Per Cycle: Allow operators to override the parts-per-cycle value on a schedule."},"enableScheduleStationFlexibility":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Schedule Station Flexibility: Allow schedules to run on any station within the group."},"enableManualDowntime":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Downtime: Allow operators and API users to manually trigger downtime on a station, blocking production while active."},"enableAlwaysConnected":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Always Connected: Force this station to always show as connected, regardless of device signals. Useful for stations with no physical device. Inherits from parent level if not set."},"includeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task List Codes: The Task lists available at this level. No level setting this means no Task lists are available."},"excludeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task List Codes: These Task list codes are removed at this level."},"includeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Reason Codes: If set, only these reason codes are available at this level. Applied before excludeReasonCodes."},"excludeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Reason Codes: These reason codes are removed at this level. Applied after includeReasonCodes."},"totalEnergyStationCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Total Energy Station Codes: When set, this plant's energy (kWh, cost, CO2) is the sum of these stations' energy instead of the additive sum over member stations."}},"required":["code","name"]}}}},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"result":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"timezone":{"type":"string"},"now":{"type":"string"},"stationGroups":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Unique group identifier within the plant (e.g., 'LINE-01', 'ASM-A', 'PACKAGING')"},"name":{"type":"string","description":"Human-readable group name (e.g., 'Assembly Line 1', 'Packaging Line A')"},"shiftPatternCode":{"type":["string","null"],"description":"Shift Pattern: The ID of the shift pattern this group follows"},"includeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Reason Codes: If set, only these reason codes are available at this level. Applied before excludeReasonCodes."},"excludeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Reason Codes: These reason codes are removed at this level. Applied after includeReasonCodes."},"includeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task Codes: Legacy, no longer applied. Superseded by includeTaskListCodes."},"excludeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task Codes: Legacy, no longer applied. Superseded by excludeTaskListCodes."},"includeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task List Codes: The Task lists available at this level. Unlike reasons, no level setting this means no Task lists are available — lists must be included explicitly before their Tasks appear on a station."},"excludeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task List Codes: These Task list codes are removed at this level. Applied after includeTaskListCodes."},"totalEnergyStationCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Total Energy Station Codes: When set, this group's energy (kWh, cost, CO2) is the sum of these stations' energy instead of the additive sum over member stations."},"createdAt":{"type":["string","null"],"description":"Group creation timestamp (ISO 8601, system managed)"},"updatedAt":{"type":["string","null"],"description":"Last update timestamp (ISO 8601, system managed)"},"enableProductionCorrection":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Production Correction: Allow operators to correct production counting errors during a running schedule from the tablet."},"enableManualProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Production: Allow operators to manually enter production quantities."},"enableQuickScheduleStart":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Ad Hoc Schedules: Allow operators to start ad-hoc schedules from the tablet."},"enableScheduleCutShort":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Cutting Schedules Short: Allow operators to end a schedule before its planned end."},"enableRejectProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Rejecting Production: Allow operators to reject (scrap) produced units."},"enableEditPartsPerCycle":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Editing Parts Per Cycle: Allow operators to override the parts-per-cycle value on a schedule."},"enableScheduleStationFlexibility":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Schedule Station Flexibility: Allow schedules to run on any station within the group."},"enableSchedulingOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Scheduling Only: Restrict the station to scheduling only (no live production capture)."},"enableManualDowntime":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Downtime: Allow operators and API users to manually trigger downtime on a station, blocking production while active."},"enableAlwaysConnected":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Always Connected: Force this station to always show as connected, regardless of device signals. Useful for stations with no physical device. Inherits from parent level if not set."},"enableMeterOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Meter Only: Meter Only: When true, this station represents a physical energy meter (e.g. a plant incomer). It only publishes electrical signals and is hidden from production views, rollups, and station pickers by default."},"stations":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^([a-zA-Z0-9-_]+)$","minLength":1,"maxLength":32,"description":"Code: Assign a Code to the Station, this cannot be changed once set."},"name":{"type":"string","minLength":1,"maxLength":32,"description":"Name: The friendly name for this Station (1-32 characters). Example: 'Assembly Station 1', 'Quality Check'"},"description":{"type":["string","null"],"description":"Description: Brief description of the station's purpose or function"},"shiftPatternCode":{"type":["string","null"],"maxLength":64,"description":"Shift Pattern: The ID of the shift pattern this station follows (overrides the group's shift pattern)"},"minimumCycleTime":{"type":["integer","null"],"minimum":0,"maximum":43200000,"description":"Minimum Cycle Time: Minimum time between production signals, set in seconds — if multiple signals arrive within this period, only one unit is counted. Useful for filtering signals during setup. Stored as milliseconds in the manifest."},"speedScale":{"type":["number","null"],"minimum":-9999,"maximum":9999,"description":"Speed Scale: If the value on the Performance Chart doesn't reflect actual running speed, it can be calibrated by setting this value. For example current value = 20, but actual speed = 10, scale should be set to 0.5."},"speedOffset":{"type":["number","null"],"minimum":-9999,"maximum":9999,"description":"Speed Offset: Fine tune a Speed value. For example if a Station's speed is showing as 0.5 when stopped, set the value to -0.5."},"speedToProductionRatio":{"type":["number","null"],"minimum":0,"maximum":99999,"description":"Speed to Production Ratio: Convert a speed value into a production count. Set the conversion ratio, can be a decimal. If left blank no production units will be counted."},"electricalPowerNominalKw":{"type":["number","null"],"minimum":0,"description":"Electrical Power Nominal (kW): The expected power usage in kW during normal operation."},"idleCostPerMinute":{"type":["number","null"],"minimum":0,"maximum":99999,"description":"Idle Cost Per Minute: Cost per minute during idle time in account currency. Used for calculating scheduling losses, planned non-production losses, and downtime losses when SKU doesn't have a specific value."},"downtimeDetectionMode":{"type":["string","null"],"enum":["off","production","utilisation","line_speed",null],"default":"utilisation","description":"Downtime Detection Mode: How to detect when the station is down. Options: 'off' (no detection), 'production' (use production cycle data), 'utilisation' (use utilisation signals - most common), 'line_speed' (use line speed monitoring). Default: 'utilisation'"},"utilisationDowntimeThreshold":{"type":["integer","null"],"minimum":0,"description":"Utilisation Downtime Threshold: Minimum stop duration before registering downtime, set in minutes — only stops at least this long are recorded. Stored as milliseconds in the manifest. Defaults to 1 hour."},"slowDurationThreshold":{"type":["integer","null"],"minimum":0,"description":"Slow Duration Threshold: Minimum duration running below 80% of the line speed target before registering slow running, in milliseconds. Defaults to 1 minute."},"forceAllShiftTimeAsPlannedProduction":{"type":["boolean","null"],"description":"Force All Shift Time As Planned Production: Treat all shift time as planned production time"},"productiveStatusMode":{"type":["string","null"],"enum":["productive_signal","electrical_usage","line_speed",null],"default":"productive_signal","description":"Productive Status Mode: How to measure when the station is engaged in value-adding activity. Options: 'productive_signal' (use productive signal input), 'electrical_usage' (use electrical consumption), 'line_speed' (use line speed value). Default: 'productive_signal'"},"electricalUsageStoppedThresholdKw":{"type":["number","null"],"minimum":0,"description":"Electrical Usage Stopped Threshold (kW): Minimum power consumption in kilowatts that indicates the station is active. Below this threshold, Busroot will regard the station as stopped/downtime. Example: 2.0, 1.0, 5.0"},"lineSpeedStoppedThreshold":{"type":["number","null"],"minimum":0,"description":"Line Speed Stopped Threshold: Minimum speed value that indicates the station is running. Below this threshold, Busroot will regard the station as stopped/downtime. Example: 10, 5, 20"},"productiveHoldOnTime":{"type":["integer","null"],"minimum":0,"maximum":86400000,"description":"Productive Hold On Time: How long to keep considering the station active after a productive signal, set in minutes — each new signal restarts the hold-on timer. Stored as milliseconds in the manifest."},"currentOperatorInitials":{"type":["string","null"],"minLength":3,"maxLength":8,"description":"Current Operator Initials: Current operator's initials (3-8 letters/numbers, system managed)"},"statusCode":{"type":["string","null"],"description":"Status Code: Current status code of the station (system managed)"},"statusCodeUpdatedAt":{"type":["string","null"],"description":"Status Code Updated At: Timestamp when status was last updated (ISO 8601, system managed)"},"cycleTime":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":43200000,"description":"Cycle Time: Standard cycle time for production, set in seconds. Stored as milliseconds in the manifest."},"unitsPerMinute":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Units Per Minute: Expected production rate in units per minute. Example: 2, 4, 10"},"unitsPerHour":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Units Per Hour: Expected production rate in units per hour. Example: 120, 240, 600"},"lineSpeedTarget":{"type":["number","null"],"exclusiveMinimum":0,"maximum":99999,"description":"Line Speed Target: Target operating speed for the station. Example: 100, 120, 50"},"includeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Reason Codes: If set, only these reason codes are available at this level. Applied before excludeReasonCodes."},"excludeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Reason Codes: These reason codes are removed at this level. Applied after includeReasonCodes."},"includeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task Codes: Legacy, no longer applied. Superseded by includeTaskListCodes."},"excludeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task Codes: Legacy, no longer applied. Superseded by excludeTaskListCodes."},"includeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task List Codes: The Task lists available at this level. Unlike reasons, no level setting this means no Task lists are available — lists must be included explicitly before their Tasks appear on a station."},"excludeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task List Codes: These Task list codes are removed at this level. Applied after includeTaskListCodes."},"alertMessage":{"type":["string","null"],"description":"Alert Message: Current alert message for the station (system managed)"},"alertExpiresAt":{"type":["string","null"],"description":"Alert Expires At: Timestamp when alert expires (ISO 8601, system managed)"},"createdAt":{"type":["string","null"],"description":"Created At: Station creation timestamp (ISO 8601, system managed)"},"updatedAt":{"type":["string","null"],"description":"Updated At: Last update timestamp (ISO 8601, system managed)"},"archivedAt":{"type":["string","null"],"description":"Archived At: Archive timestamp (ISO 8601, system managed)"},"enableProductionCorrection":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Production Correction: Allow operators to correct production counting errors during a running schedule from the tablet."},"enableManualProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Production: Allow operators to manually enter production quantities."},"enableQuickScheduleStart":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Ad Hoc Schedules: Allow operators to start ad-hoc schedules from the tablet."},"enableScheduleCutShort":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Cutting Schedules Short: Allow operators to end a schedule before its planned end."},"enableRejectProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Rejecting Production: Allow operators to reject (scrap) produced units."},"enableEditPartsPerCycle":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Editing Parts Per Cycle: Allow operators to override the parts-per-cycle value on a schedule."},"enableScheduleStationFlexibility":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Schedule Station Flexibility: Allow schedules to run on any station within the group."},"enableSchedulingOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Scheduling Only: Restrict the station to scheduling only (no live production capture)."},"enableManualDowntime":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Downtime: Allow operators and API users to manually trigger downtime on a station, blocking production while active."},"enableAlwaysConnected":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Always Connected: Force this station to always show as connected, regardless of device signals. Useful for stations with no physical device. Inherits from parent level if not set."},"enableMeterOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Meter Only: Meter Only: When true, this station represents a physical energy meter (e.g. a plant incomer). It only publishes electrical signals and is hidden from production views, rollups, and station pickers by default."}},"required":["code","name"],"additionalProperties":false}}},"required":["code","name","stations"],"additionalProperties":false}},"dayStartHour":{"type":"number"},"weekStartDay":{"type":"number"},"totalEnergyStationCodes":{"type":["array","null"],"items":{"type":"string"}}},"required":["code","name","timezone","now","stationGroups","dayStartHour","weekStartDay"]}},"required":["isSuccess","result"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/production":{"get":{"tags":["Production"],"parameters":[{"in":"query","name":"rangecode","schema":{"type":"string"},"required":true},{"in":"query","name":"plantcode","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"stationcodes","description":"Comma-separated list of Station Codes.","schema":{"type":"string","description":"Comma-separated list of Station Codes."}},{"in":"query","name":"scheduleids","description":"Comma-separated list of Schedule IDs.","schema":{"type":"string","description":"Comma-separated list of Schedule IDs."}}],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":["number","null"]},"stationCode":{"type":"string"},"stationName":{"type":"string"},"skuCode":{"type":["string","null"]},"skuName":{"type":["string","null"]},"skuValue":{"type":["number","null"]},"effectiveCycleTime":{"type":["number","null"]},"workOrderReference":{"type":["string","null"]},"scheduleId":{"type":["number","null"]},"quantityGood":{"type":"number"},"quantityBad":{"type":"number"},"lastUnitAt":{"type":"string"},"lastUnitAtTimestamp":{"type":"number"},"operatorInitials":{"type":["string","null"]},"type":{"type":["string","null"],"enum":["manual","correction","timeseries","from-speed",null]},"partsPerCycle":{"type":["number","null"]},"badReasonCode":{"type":["string","null"]}},"required":["stationCode","stationName","quantityGood","quantityBad","lastUnitAt","lastUnitAtTimestamp"]}},"range":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"duration":{"type":"number"},"fromIso":{"type":"string"},"toIso":{"type":"string"},"durationFormatted":{"type":"string"}},"required":["from","to","duration","fromIso","toIso","durationFormatted"]}},"required":["isSuccess","results","range"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/production/station":{"get":{"tags":["Production"],"parameters":[{"in":"query","name":"rangecode","schema":{"type":"string"},"required":true},{"in":"query","name":"plantcode","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"stationcodes","description":"Comma-separated list of Station Codes.","schema":{"type":"string","description":"Comma-separated list of Station Codes."}},{"in":"query","name":"skucodes","description":"Comma-separated list of SKU Codes.","schema":{"type":"string","description":"Comma-separated list of SKU Codes."}}],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":["number","null"]},"stationCode":{"type":"string"},"stationName":{"type":"string"},"skuCode":{"type":["string","null"]},"skuName":{"type":["string","null"]},"skuValue":{"type":["number","null"]},"effectiveCycleTime":{"type":["number","null"]},"workOrderReference":{"type":["string","null"]},"scheduleId":{"type":["number","null"]},"quantityGood":{"type":"number"},"quantityBad":{"type":"number"},"lastUnitAt":{"type":"string"},"lastUnitAtTimestamp":{"type":"number"},"operatorInitials":{"type":["string","null"]},"type":{"type":["string","null"],"enum":["manual","correction","timeseries","from-speed",null]},"partsPerCycle":{"type":["number","null"]},"badReasonCode":{"type":["string","null"]}},"required":["stationCode","stationName","quantityGood","quantityBad","lastUnitAt","lastUnitAtTimestamp"]}},"range":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"duration":{"type":"number"},"fromIso":{"type":"string"},"toIso":{"type":"string"},"durationFormatted":{"type":"string"}},"required":["from","to","duration","fromIso","toIso","durationFormatted"]},"rangeCode":{"type":"string"}},"required":["isSuccess","results","range","rangeCode"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/production/sku":{"get":{"tags":["Production"],"parameters":[{"in":"query","name":"rangecode","schema":{"type":"string"},"required":true},{"in":"query","name":"plantcode","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"stationcodes","description":"Comma-separated list of Station Codes.","schema":{"type":"string","description":"Comma-separated list of Station Codes."}},{"in":"query","name":"skucodes","description":"Comma-separated list of SKU Codes.","schema":{"type":"string","description":"Comma-separated list of SKU Codes."}}],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":["number","null"]},"stationCode":{"type":"string"},"stationName":{"type":"string"},"skuCode":{"type":["string","null"]},"skuName":{"type":["string","null"]},"skuValue":{"type":["number","null"]},"effectiveCycleTime":{"type":["number","null"]},"workOrderReference":{"type":["string","null"]},"scheduleId":{"type":["number","null"]},"quantityGood":{"type":"number"},"quantityBad":{"type":"number"},"lastUnitAt":{"type":"string"},"lastUnitAtTimestamp":{"type":"number"},"operatorInitials":{"type":["string","null"]},"type":{"type":["string","null"],"enum":["manual","correction","timeseries","from-speed",null]},"partsPerCycle":{"type":["number","null"]},"badReasonCode":{"type":["string","null"]}},"required":["stationCode","stationName","quantityGood","quantityBad","lastUnitAt","lastUnitAtTimestamp"]}},"range":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"duration":{"type":"number"},"fromIso":{"type":"string"},"toIso":{"type":"string"},"durationFormatted":{"type":"string"}},"required":["from","to","duration","fromIso","toIso","durationFormatted"]},"rangeCode":{"type":"string"}},"required":["isSuccess","results","range","rangeCode"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/production/manual":{"get":{"tags":["Production"],"parameters":[{"in":"query","name":"stationcodes","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":["number","null"]},"stationCode":{"type":"string"},"stationName":{"type":"string"},"skuCode":{"type":["string","null"]},"skuName":{"type":["string","null"]},"skuValue":{"type":["number","null"]},"effectiveCycleTime":{"type":["number","null"]},"workOrderReference":{"type":["string","null"]},"scheduleId":{"type":["number","null"]},"quantityGood":{"type":"number"},"quantityBad":{"type":"number"},"lastUnitAt":{"type":"string"},"lastUnitAtTimestamp":{"type":"number"},"operatorInitials":{"type":["string","null"]},"type":{"type":["string","null"],"enum":["manual","correction","timeseries","from-speed",null]},"partsPerCycle":{"type":["number","null"]},"badReasonCode":{"type":["string","null"]}},"required":["stationCode","stationName","quantityGood","quantityBad","lastUnitAt","lastUnitAtTimestamp"]}}},"required":["isSuccess","results"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}},"post":{"tags":["Production"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"stationCode":{"type":"string","pattern":"^([a-zA-Z0-9-_]+)$","minLength":1,"maxLength":32,"description":"Code: Assign a Code to the Station, this cannot be changed once set."},"stationName":{"type":"string","minLength":1},"skuCode":{"type":"string","pattern":"^([_a-zA-Z0-9.\\\\/-]+)$","minLength":1,"maxLength":32,"description":"The unique code used to reference this SKU."},"skuName":{"type":"string","minLength":1},"effectiveCycleTime":{"type":"integer","minimum":0},"workOrderReference":{"type":"string","minLength":1},"scheduleId":{"type":"integer","exclusiveMinimum":0},"quantityGood":{"type":"integer"},"quantityBad":{"type":"integer"},"lastUnitAt":{"type":"string","format":"date-time"},"lastUnitAtTimestamp":{"type":"integer","minimum":0},"operatorInitials":{"type":"string","minLength":1},"badReasonCode":{"type":"string","minLength":1,"maxLength":50,"description":"Unique reason code used to reference this reason (e.g., 'MAINTENANCE', 'BREAKDOWN', 'PLANNED-PM'). Must be unique within the account."}},"required":["stationCode"]}}}},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"}},"required":["isSuccess"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/production/aggregatewindow":{"get":{"tags":["Production"],"parameters":[{"in":"query","name":"rangecode","schema":{"type":"string"},"required":true},{"in":"query","name":"plantcode","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"stationcodes","description":"Comma-separated list of Station Codes.","schema":{"type":"string","description":"Comma-separated list of Station Codes."}},{"in":"query","name":"skucodes","description":"Comma-separated list of SKU Codes.","schema":{"type":"string","description":"Comma-separated list of SKU Codes."}}],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"windowStart":{"type":"string"},"windowStartIso":{"type":"string"},"quantity":{"type":"number"}},"required":["windowStart","windowStartIso","quantity"]}}},"required":["isSuccess","results"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/reason":{"get":{"tags":["Reason"],"parameters":[{"in":"query","name":"codes","schema":{"type":"string"}},{"in":"query","name":"type","schema":{"type":"string","enum":["downtime","non-production","quality"]}},{"in":"query","name":"includedeleted","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"},"parentReasonCode":{"type":["string","null"]},"type":{"type":"array","items":{"type":"string","enum":["downtime","non-production","quality"]}},"requireNotes":{"type":"boolean"},"effectiveRequireNotes":{"type":"boolean"}},"required":["code","description","type"]}}},"required":["isSuccess","results"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}},"post":{"tags":["Reason"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":50,"description":"Unique reason code used to reference this reason (e.g., 'MAINTENANCE', 'BREAKDOWN', 'PLANNED-PM'). Must be unique within the account."},"description":{"type":"string","minLength":1,"maxLength":50,"description":"Description: Provide a short, clear description of the reason."},"type":{"type":"array","items":{"type":"string","enum":["downtime","non-production","quality"]},"minItems":1,"description":"Array of reason types this code applies to. Options: 'downtime' (for unplanned stoppages), 'non-production' (for planned activities), 'quality' (for bad/rejected production). A reason can have multiple types. Example: ['downtime'], ['non-production'], ['downtime', 'non-production']"},"requireNotes":{"type":"boolean","description":"Require Notes: When enabled, operators must enter notes before the reason can be confirmed. Only applies when the reason is assigned to a downtime. Omit the field to inherit the nearest ancestor reason's setting; set false to explicitly opt out of an inherited true."},"accountId":{"type":"string"},"parentReasonCode":{"type":["string","null"],"minLength":1,"maxLength":50,"description":"Reason Level: Select 'Top-level Reason' to keep it at the top level, or select an existing reason to nest it underneath as a sub-reason. Reasons can be organised in multiple levels."},"deletedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["code","description","type"],"additionalProperties":false}}}},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"result":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":50,"description":"Unique reason code used to reference this reason (e.g., 'MAINTENANCE', 'BREAKDOWN', 'PLANNED-PM'). Must be unique within the account."},"description":{"type":"string","minLength":1,"maxLength":50,"description":"Description: Provide a short, clear description of the reason."},"type":{"type":"array","items":{"type":"string","enum":["downtime","non-production","quality"]},"minItems":1,"description":"Array of reason types this code applies to. Options: 'downtime' (for unplanned stoppages), 'non-production' (for planned activities), 'quality' (for bad/rejected production). A reason can have multiple types. Example: ['downtime'], ['non-production'], ['downtime', 'non-production']"},"requireNotes":{"type":"boolean","description":"Require Notes: When enabled, operators must enter notes before the reason can be confirmed. Only applies when the reason is assigned to a downtime. Omit the field to inherit the nearest ancestor reason's setting; set false to explicitly opt out of an inherited true."},"accountId":{"type":"string"},"parentReasonCode":{"type":["string","null"],"minLength":1,"maxLength":50,"description":"Reason Level: Select 'Top-level Reason' to keep it at the top level, or select an existing reason to nest it underneath as a sub-reason. Reasons can be organised in multiple levels."},"deletedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["code","description","type"],"additionalProperties":false}},"required":["isSuccess","result"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/reason/{code}":{"delete":{"tags":["Reason"],"parameters":[{"in":"path","name":"code","description":"Unique reason code used to reference this reason (e.g., 'MAINTENANCE', 'BREAKDOWN', 'PLANNED-PM'). Must be unique within the account.","schema":{"type":"string","minLength":1,"maxLength":50,"description":"Unique reason code used to reference this reason (e.g., 'MAINTENANCE', 'BREAKDOWN', 'PLANNED-PM'). Must be unique within the account."},"required":true}],"responses":{"204":{"description":"204 No Content"},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/schedule":{"get":{"tags":["Schedule"],"parameters":[{"in":"query","name":"rangecode","schema":{"type":"string"},"required":true},{"in":"query","name":"plantcode","schema":{"type":"string","minLength":1}},{"in":"query","name":"stationcodes","description":"Comma-separated list of Station Codes.","schema":{"type":"string","description":"Comma-separated list of Station Codes."}},{"in":"query","name":"scheduleids","description":"Comma-separated list of Schedule IDs.","schema":{"type":"string","description":"Comma-separated list of Schedule IDs."}}],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"accountId":{"type":"string"},"stationCode":{"type":"string","pattern":"^([a-zA-Z0-9-_]+)$","minLength":1,"maxLength":32,"description":"Station: Select the Station to be scheduled."},"plannedStartAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"},{"type":"null"}],"description":"Planned Start: Enter the planned start time."},"plannedEndAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"},{"type":"null"}],"description":"Planned End: Enter the planned end time."},"plannedQuantity":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":9999999,"description":"Qty: Enter the target quantity."},"skuCode":{"type":["string","null"],"pattern":"^([_a-zA-Z0-9.\\\\/-]+)$","minLength":1,"maxLength":32,"description":"Individual SKU: Select the SKU to be produced."},"workOrderReference":{"type":["string","null"],"description":"Work Order Ref.: Add a reference to the schedule. Schedules with the same reference will be grouped in Production by WO Ref."},"workOrderItemReference":{"type":["string","null"],"description":"Work Order Item Ref.: A per-row unique identifier for the schedule. On upload, rows with a workOrderItemReference that already exists in the account are ignored so re-uploads do not duplicate schedules."},"nonProductionReasonCode":{"type":["string","null"],"minLength":1,"maxLength":50,"description":"Reason: Select the reason for the Non-Production period"},"deletedAt":{"type":["string","null"],"format":"date-time"},"actualStartAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"},{"type":"null"}]},"actualEndAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"},{"type":"null"}]},"cycleTime":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":43200000,"description":"Override Cycle Time (secs): A specific cycle time can be set for the schedule, to be used instead of the standard spec time of the SKU."},"extendShift":{"type":["boolean","null"],"description":"Extend Shift: A schedule can be set to run and record production outside of shift times. Enter a start or end time outside of shift and select 'Yes'."},"unitsPerMinute":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Override Units per Minute: "},"unitsPerHour":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Override Units per Hour: "},"lineSpeedTarget":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Override Movement Speed: "},"partsPerCycle":{"type":["number","null"],"exclusiveMinimum":0,"maximum":99999,"description":"Override Parts per Cycle: A specific PPC can be set for the schedule, to be used instead of the standard PPC of the SKU."},"priorityAt":{"type":["string","null"],"description":"Indicates that the schedule is to be prioritised, and then it was set."},"autoEndOnQuantityComplete":{"type":["boolean","null"],"description":"Auto End On Quantity Complete: Schedule will end when the Planned Quantity is reached."},"partsPerCycleOverride":{"type":["number","null"],"exclusiveMinimum":0,"maximum":99999},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]},"stationName":{"type":["string","null"]},"stationGroupCode":{"type":["string","null"]},"stationGroupName":{"type":["string","null"]},"nonProductionReasonDescription":{"type":["string","null"]},"skuName":{"type":["string","null"]},"skuValue":{"type":["number","null"]},"plannedStartAtTimestamp":{"type":"number"},"plannedEndAtTimestamp":{"type":["number","null"]},"actualStartAtTimestamp":{"type":["number","null"]},"actualEndAtTimestamp":{"type":["number","null"]},"plannedDuration":{"type":["number","null"]},"effectiveCycleTime":{"type":["number","null"]},"effectiveUnitsPerMinute":{"type":["number","null"]},"effectiveUnitsPerHour":{"type":["number","null"]},"effectiveLineSpeedTarget":{"type":["number","null"]},"normalisedCycleTime":{"type":["number","null"],"description":"The effective cycle time per unit (aka the time in millis required to make 1 unit."},"effectivePartsPerCycle":{"type":["number","null"]},"effectiveMinimumCycleTime":{"type":["number","null"]},"remainingQuantity":{"type":["number","null"]},"remainingTime":{"type":["number","null"]},"quantityIdeal":{"type":["number","null"]},"quantityIdealDelta":{"type":["number","null"]},"idealEndAt":{"type":["string","null"],"description":"The date and time, in ISO format, this schedule should end at according to the start time, cycle time of the SKU and the planned quantity."},"idealEndAtTimestamp":{"type":["number","null"],"description":"The timestamp this schedule should end at according to the start time, cycle time of the SKU and the planned quantity."},"idealDurationMs":{"type":["number","null"],"description":"The duration in millis this schedule should take according to the cycle time of the SKU and the planned quantity."},"quantityGood":{"type":["number","null"]},"quantityBad":{"type":["number","null"]},"quantityTotal":{"type":["number","null"]},"downtimeDurationThresholdMultiplier":{"type":["number","null"]},"logs":{"type":["array","null"],"items":{"type":"string"}},"isStarted":{"type":"boolean"},"isEnded":{"type":"boolean"},"status":{"type":"string","enum":["running","planned","deleted","completed"]},"performanceModeFrom":{"type":"string","enum":["schedule","sku","station","none"]}},"required":["id","accountId","stationCode","plannedStartAtTimestamp","isStarted","isEnded","status"]}},"range":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"duration":{"type":"number"},"fromIso":{"type":"string"},"toIso":{"type":"string"},"durationFormatted":{"type":"string"}},"required":["from","to","duration","fromIso","toIso","durationFormatted"]}},"required":["isSuccess","results","range"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}},"post":{"tags":["Schedule"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"stationCode":{"type":"string","pattern":"^([a-zA-Z0-9-_]+)$","minLength":1,"maxLength":32,"description":"Station: Select the Station to be scheduled."},"plannedStartAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"},{"type":"null"}],"description":"Planned Start: Enter the planned start time."},"plannedEndAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"},{"type":"null"}],"description":"Planned End: Enter the planned end time."},"plannedQuantity":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":9999999,"description":"Qty: Enter the target quantity."},"skuCode":{"type":["string","null"],"pattern":"^([_a-zA-Z0-9.\\\\/-]+)$","minLength":1,"maxLength":32,"description":"Individual SKU: Select the SKU to be produced."},"workOrderReference":{"type":["string","null"],"description":"Work Order Ref.: Add a reference to the schedule. Schedules with the same reference will be grouped in Production by WO Ref."},"workOrderItemReference":{"type":["string","null"],"description":"Work Order Item Ref.: A per-row unique identifier for the schedule. On upload, rows with a workOrderItemReference that already exists in the account are ignored so re-uploads do not duplicate schedules."},"nonProductionReasonCode":{"type":["string","null"],"minLength":1,"maxLength":50,"description":"Reason: Select the reason for the Non-Production period"},"calculatedQuantity":{"type":["number","null"]},"calculatedEndAt":{"type":["string","null"],"format":"date-time"},"predictedQuantity":{"type":["number","null"]},"predictedEndAt":{"type":["string","null"],"format":"date-time"},"lastPredictedAt":{"type":["string","null"],"format":"date-time"},"deletedAt":{"type":["string","null"],"format":"date-time"},"actualStartAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"},{"type":"null"}]},"actualEndAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"},{"type":"null"}]},"cycleTime":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":43200000,"description":"Override Cycle Time (secs): A specific cycle time can be set for the schedule, to be used instead of the standard spec time of the SKU."},"extendShift":{"type":["boolean","null"],"description":"Extend Shift: A schedule can be set to run and record production outside of shift times. Enter a start or end time outside of shift and select 'Yes'."},"orderType":{"type":["string","null"],"enum":["quantity","endTime","quantityEndTime","continuous",null],"description":"Order Type: Select target for the schedule. Either fixed quantity, time limit or to run continuously."},"unitsPerMinute":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Override Units per Minute: "},"unitsPerHour":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Override Units per Hour: "},"lineSpeedTarget":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Override Movement Speed: "},"partsPerCycle":{"type":["number","null"],"exclusiveMinimum":0,"maximum":99999,"description":"Override Parts per Cycle: A specific PPC can be set for the schedule, to be used instead of the standard PPC of the SKU."},"priorityAt":{"type":["string","null"],"description":"Indicates that the schedule is to be prioritised, and then it was set."},"autoEndOnQuantityComplete":{"type":["boolean","null"],"description":"Auto End On Quantity Complete: Schedule will end when the Planned Quantity is reached."},"partsPerCycleOverride":{"type":["number","null"],"exclusiveMinimum":0,"maximum":99999},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]},"skuName":{"type":"string"},"allowPastStart":{"type":"boolean"}}}}}},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"result":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"accountId":{"type":"string"},"stationCode":{"type":"string","pattern":"^([a-zA-Z0-9-_]+)$","minLength":1,"maxLength":32,"description":"Station: Select the Station to be scheduled."},"plannedStartAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"},{"type":"null"}],"description":"Planned Start: Enter the planned start time."},"plannedEndAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"},{"type":"null"}],"description":"Planned End: Enter the planned end time."},"plannedQuantity":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":9999999,"description":"Qty: Enter the target quantity."},"skuCode":{"type":["string","null"],"pattern":"^([_a-zA-Z0-9.\\\\/-]+)$","minLength":1,"maxLength":32,"description":"Individual SKU: Select the SKU to be produced."},"workOrderReference":{"type":["string","null"],"description":"Work Order Ref.: Add a reference to the schedule. Schedules with the same reference will be grouped in Production by WO Ref."},"workOrderItemReference":{"type":["string","null"],"description":"Work Order Item Ref.: A per-row unique identifier for the schedule. On upload, rows with a workOrderItemReference that already exists in the account are ignored so re-uploads do not duplicate schedules."},"nonProductionReasonCode":{"type":["string","null"],"minLength":1,"maxLength":50,"description":"Reason: Select the reason for the Non-Production period"},"calculatedQuantity":{"type":["number","null"]},"calculatedEndAt":{"type":["string","null"],"format":"date-time"},"predictedQuantity":{"type":["number","null"]},"predictedEndAt":{"type":["string","null"],"format":"date-time"},"lastPredictedAt":{"type":["string","null"],"format":"date-time"},"deletedAt":{"type":["string","null"],"format":"date-time"},"actualStartAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"},{"type":"null"}]},"actualEndAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"},{"type":"null"}]},"cycleTime":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":43200000,"description":"Override Cycle Time (secs): A specific cycle time can be set for the schedule, to be used instead of the standard spec time of the SKU."},"extendShift":{"type":["boolean","null"],"description":"Extend Shift: A schedule can be set to run and record production outside of shift times. Enter a start or end time outside of shift and select 'Yes'."},"orderType":{"type":["string","null"],"enum":["quantity","endTime","quantityEndTime","continuous",null],"description":"Order Type: Select target for the schedule. Either fixed quantity, time limit or to run continuously."},"unitsPerMinute":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Override Units per Minute: "},"unitsPerHour":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Override Units per Hour: "},"lineSpeedTarget":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Override Movement Speed: "},"partsPerCycle":{"type":["number","null"],"exclusiveMinimum":0,"maximum":99999,"description":"Override Parts per Cycle: A specific PPC can be set for the schedule, to be used instead of the standard PPC of the SKU."},"priorityAt":{"type":["string","null"],"description":"Indicates that the schedule is to be prioritised, and then it was set."},"autoEndOnQuantityComplete":{"type":["boolean","null"],"description":"Auto End On Quantity Complete: Schedule will end when the Planned Quantity is reached."},"partsPerCycleOverride":{"type":["number","null"],"exclusiveMinimum":0,"maximum":99999},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}},"required":["id","accountId","stationCode"]}},"required":["isSuccess","result"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/schedule/workorder":{"get":{"tags":["Schedule"],"parameters":[{"in":"query","name":"stationcodes","description":"Comma-separated list of Station Codes.","schema":{"type":"string","description":"Comma-separated list of Station Codes."}},{"in":"query","name":"plantcode","schema":{"type":"string","minLength":1}},{"in":"query","name":"skucodes","description":"Comma-separated list of SKU Codes.","schema":{"type":"string","description":"Comma-separated list of SKU Codes."}}],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"result":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"accountId":{"type":"string"},"stationCode":{"type":"string","pattern":"^([a-zA-Z0-9-_]+)$","minLength":1,"maxLength":32,"description":"Station: Select the Station to be scheduled."},"plannedStartAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"},{"type":"null"}],"description":"Planned Start: Enter the planned start time."},"plannedEndAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"},{"type":"null"}],"description":"Planned End: Enter the planned end time."},"plannedQuantity":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":9999999,"description":"Qty: Enter the target quantity."},"skuCode":{"type":["string","null"],"pattern":"^([_a-zA-Z0-9.\\\\/-]+)$","minLength":1,"maxLength":32,"description":"Individual SKU: Select the SKU to be produced."},"workOrderReference":{"type":["string","null"],"description":"Work Order Ref.: Add a reference to the schedule. Schedules with the same reference will be grouped in Production by WO Ref."},"workOrderItemReference":{"type":["string","null"],"description":"Work Order Item Ref.: A per-row unique identifier for the schedule. On upload, rows with a workOrderItemReference that already exists in the account are ignored so re-uploads do not duplicate schedules."},"nonProductionReasonCode":{"type":["string","null"],"minLength":1,"maxLength":50,"description":"Reason: Select the reason for the Non-Production period"},"deletedAt":{"type":["string","null"],"format":"date-time"},"actualStartAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"},{"type":"null"}]},"actualEndAt":{"anyOf":[{"type":"string"},{"type":"string","format":"date-time"},{"type":"null"}]},"cycleTime":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":43200000,"description":"Override Cycle Time (secs): A specific cycle time can be set for the schedule, to be used instead of the standard spec time of the SKU."},"extendShift":{"type":["boolean","null"],"description":"Extend Shift: A schedule can be set to run and record production outside of shift times. Enter a start or end time outside of shift and select 'Yes'."},"unitsPerMinute":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Override Units per Minute: "},"unitsPerHour":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Override Units per Hour: "},"lineSpeedTarget":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Override Movement Speed: "},"partsPerCycle":{"type":["number","null"],"exclusiveMinimum":0,"maximum":99999,"description":"Override Parts per Cycle: A specific PPC can be set for the schedule, to be used instead of the standard PPC of the SKU."},"priorityAt":{"type":["string","null"],"description":"Indicates that the schedule is to be prioritised, and then it was set."},"autoEndOnQuantityComplete":{"type":["boolean","null"],"description":"Auto End On Quantity Complete: Schedule will end when the Planned Quantity is reached."},"partsPerCycleOverride":{"type":["number","null"],"exclusiveMinimum":0,"maximum":99999},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]},"stationName":{"type":["string","null"]},"stationGroupCode":{"type":["string","null"]},"stationGroupName":{"type":["string","null"]},"nonProductionReasonDescription":{"type":["string","null"]},"skuName":{"type":["string","null"]},"skuValue":{"type":["number","null"]},"plannedStartAtTimestamp":{"type":"number"},"plannedEndAtTimestamp":{"type":["number","null"]},"actualStartAtTimestamp":{"type":["number","null"]},"actualEndAtTimestamp":{"type":["number","null"]},"plannedDuration":{"type":["number","null"]},"effectiveCycleTime":{"type":["number","null"]},"effectiveUnitsPerMinute":{"type":["number","null"]},"effectiveUnitsPerHour":{"type":["number","null"]},"effectiveLineSpeedTarget":{"type":["number","null"]},"normalisedCycleTime":{"type":["number","null"],"description":"The effective cycle time per unit (aka the time in millis required to make 1 unit."},"effectivePartsPerCycle":{"type":["number","null"]},"effectiveMinimumCycleTime":{"type":["number","null"]},"remainingQuantity":{"type":["number","null"]},"remainingTime":{"type":["number","null"]},"quantityIdeal":{"type":["number","null"]},"quantityIdealDelta":{"type":["number","null"]},"idealEndAt":{"type":["string","null"],"description":"The date and time, in ISO format, this schedule should end at according to the start time, cycle time of the SKU and the planned quantity."},"idealEndAtTimestamp":{"type":["number","null"],"description":"The timestamp this schedule should end at according to the start time, cycle time of the SKU and the planned quantity."},"idealDurationMs":{"type":["number","null"],"description":"The duration in millis this schedule should take according to the cycle time of the SKU and the planned quantity."},"quantityGood":{"type":"number"},"quantityBad":{"type":"number"},"quantityTotal":{"type":["number","null"]},"downtimeDurationThresholdMultiplier":{"type":["number","null"]},"logs":{"type":["array","null"],"items":{"type":"string"}},"isStarted":{"type":"boolean"},"isEnded":{"type":"boolean"},"status":{"type":"string","enum":["running","planned","deleted","completed"]},"performanceModeFrom":{"type":"string","enum":["schedule","sku","station","none"]}},"required":["id","accountId","stationCode","plannedStartAtTimestamp","quantityGood","quantityBad","isStarted","isEnded","status"]}}}}},"required":["isSuccess","result"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/schedule/{id}/cutshort":{"post":{"tags":["Schedule"],"parameters":[{"in":"path","name":"id","schema":{"type":"integer","exclusiveMinimum":0},"required":true}],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"}},"required":["isSuccess"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/schedule/{id}/parts-per-cycle-override":{"post":{"tags":["Schedule"],"parameters":[{"in":"path","name":"id","schema":{"type":"integer","exclusiveMinimum":0},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"partsPerCycleOverride":{"type":"number","exclusiveMinimum":0,"maximum":99999}},"required":["partsPerCycleOverride"]}}}},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"}},"required":["isSuccess"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/schedule/{id}":{"delete":{"tags":["Schedule"],"parameters":[{"in":"path","name":"id","schema":{"type":"integer","exclusiveMinimum":0},"required":true}],"responses":{"204":{"description":"204 No Content"},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/shift-pattern":{"get":{"tags":["Shift"],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","maxLength":64,"description":"Unique shift pattern identifier"},"title":{"type":"string","description":"Shift Pattern Title: The name of this shift pattern (e.g., 'default', '5-day', '24/7'). Used to reference the pattern from station groups and stations. Must be unique within the account."},"duration":{"type":"number"},"startHour":{"type":"number"},"endHour":{"type":"number"},"shifts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Shift Name: The name of this shift. Multiple shifts can share the same name for grouping purposes (e.g., 'Day Shift' for split periods like 09:00-12:00 and 13:00-17:00). Does not need to be unique."},"startHour":{"type":"number","minimum":0,"exclusiveMaximum":24,"description":"Start Hour: The start hour in the day of this shift as a decimal (0-24). Example: 14.5 represents 14:30 (2:30 PM), 9 represents 09:00, 17.25 represents 17:15"},"duration":{"type":"number","exclusiveMinimum":0,"maximum":24,"description":"Duration: Duration of the shift in hours as a decimal. Example: 8 for 8 hours, 4.5 for 4 hours 30 minutes"},"weekDay":{"type":"string","pattern":"^[1-7]$","description":"Week Day: The day of the week this shift starts on as a number string: 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday, 7 = Sunday"},"key":{"type":"string"},"shiftPatternCode":{"type":"string"}},"required":["name","startHour","duration","weekDay","key","shiftPatternCode"],"additionalProperties":false}}},"required":["code","title","duration","startHour","endHour","shifts"]}}},"required":["isSuccess","results"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/shift-pattern/{id}":{"delete":{"tags":["Shift"],"parameters":[{"in":"path","name":"code","schema":{"type":"string","maxLength":64},"required":true}],"responses":{"204":{"description":"204 No Content"},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/shift":{"post":{"tags":["Shift"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"shiftPatternCode":{"type":"string","maxLength":64,"description":"Shift pattern code. Use an existing code to update that pattern, or a new code to create a new pattern."},"title":{"type":"string","minLength":1,"description":"Display name for the shift pattern (e.g. 'Default', '5-day', '24/7')"},"shifts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"startHour":{"type":"number","minimum":0},"duration":{"type":"number","minimum":0},"weekDay":{"type":"string"}},"required":["startHour","duration","weekDay"]},"minItems":1,"description":"Full list of shifts for this pattern. Each shift has: name (optional label), startHour (decimal 0-24, e.g. 14.5 = 14:30), duration (hours as decimal), weekDay (1=Mon to 7=Sun). When updating, provide ALL shifts — this replaces the entire shift list."}},"required":["shiftPatternCode","title","shifts"]}}}},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"result":{"type":"object","properties":{"shifts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Shift Name: The name of this shift. Multiple shifts can share the same name for grouping purposes (e.g., 'Day Shift' for split periods like 09:00-12:00 and 13:00-17:00). Does not need to be unique."},"startHour":{"type":"number","minimum":0,"exclusiveMaximum":24,"description":"Start Hour: The start hour in the day of this shift as a decimal (0-24). Example: 14.5 represents 14:30 (2:30 PM), 9 represents 09:00, 17.25 represents 17:15"},"duration":{"type":"number","exclusiveMinimum":0,"maximum":24,"description":"Duration: Duration of the shift in hours as a decimal. Example: 8 for 8 hours, 4.5 for 4 hours 30 minutes"},"weekDay":{"type":"string","pattern":"^[1-7]$","description":"Week Day: The day of the week this shift starts on as a number string: 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday, 7 = Sunday"},"key":{"type":"string"},"shiftPatternCode":{"type":"string"}},"required":["name","startHour","duration","weekDay","key","shiftPatternCode"],"additionalProperties":false}},"shiftPatternCode":{"type":"string"}},"required":["shifts","shiftPatternCode"]}},"required":["isSuccess","result"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/sku":{"post":{"tags":["SKU"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^([_a-zA-Z0-9.\\\\/-]+)$","minLength":1,"maxLength":32,"description":"Code: Assign a Code to the SKU, this could be the part number."},"name":{"type":"string","minLength":1,"maxLength":128,"description":"Name: Assign a Name to the SKU, this is normally a short description for easy identification."},"cycleTime":{"type":["number","null"],"exclusiveMinimum":0,"description":"Cycle Time (secs): Set a typical Cycle Time for this SKU. This can be refined and edited using Cycle time Analysis."},"specifications":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}},{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"instructionsUrl":{"type":["string","null"],"format":"uri"},"lineSpeedTarget":{"type":["number","null"],"exclusiveMinimum":0,"maximum":99999,"description":"Line Speed Target: Set a target speed for the SKU."},"downtimeDurationThresholdMultiplier":{"type":["number","null"],"minimum":1,"maximum":999,"description":"Downtime duration threshold multiplier: This controls when Busroot will start to measure downtime (if set to Production Cycle Monitoring). By default set to 1.5X the Cycle Time."},"allowUseInQuickSchedule":{"type":"boolean","default":true,"description":"Allow use in Ad Hoc Schedules: Select whether the SKU will be available when creating Ad Hoc Schedules on the Operator Tablet."},"unitsPerMinute":{"type":["number","null"],"exclusiveMinimum":0,"description":"Units Per Minute: Set the expected production rate in units/min."},"unitsPerHour":{"type":["number","null"],"exclusiveMinimum":0,"description":"Units Per Hour: Set the expected production rate in units/hr."},"partsPerCycle":{"type":["number","null"],"exclusiveMinimum":0,"exclusiveMaximum":99999,"description":"Parts per Cycle: For SKUs where multiple are produced per cycle, this will multiply the count received from the 'Production Complete' signal or tablet to give the total unit count."},"value":{"type":["number","null"],"exclusiveMinimum":0,"exclusiveMaximum":99999,"description":"Value: Assign a value to the SKU in £. This can be any chosen metric, for example the production cost of the unit or the profit value."},"minimumCycleTime":{"type":["integer","null"],"minimum":0,"maximum":43200000,"description":"Minimum Cycle Time (secs): Set a minimum cycle-time for the SKU. If more than one signal is received in this period, Busroot will only count one unit. This allows filtering of signals during setup process for example."},"stationCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Station Allowlist: Select which stations can use this SKU."},"stationGroupCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Station Group Allowlist: SKUs can be allowed for selection by certain groups when creating a schedule. Select which groups can use this SKU."}},"required":["code","name"]}}}},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Code: Unique SKU code used to reference this product (e.g., 'WIDGET-001', 'PART-A'). Must be unique within the account."},"name":{"type":"string","description":"Name: Human-readable name describing this SKU. Example: 'Widget Type A', 'Component Assembly'"},"specifications":{"type":["string","null"],"description":"Specifications: Detailed specifications or technical description of the SKU"},"instructionsUrl":{"type":["string","null"],"description":"Instructions URL: URL to manufacturing instructions or work instructions for this SKU"},"cycleTime":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":43200000,"description":"Cycle Time: Standard cycle time in milliseconds for producing this SKU. Used for discrete operations with defined cycles. Exactly one of cycleTime, unitsPerMinute, or unitsPerHour must be set. Example: 30000 (30 seconds), 600000 (10 minutes)"},"unitsPerMinute":{"type":["number","null"],"exclusiveMinimum":0,"description":"Units Per Minute: Standard production rate in units per minute. Used for moderate-speed processes. Exactly one of cycleTime, unitsPerMinute, or unitsPerHour must be set. Example: 2, 4, 10"},"unitsPerHour":{"type":["number","null"],"exclusiveMinimum":0,"description":"Units Per Hour: Standard production rate in units per hour. Used for high-speed continuous manufacturing. Exactly one of cycleTime, unitsPerMinute, or unitsPerHour must be set. Example: 1200, 2400, 6000"},"minimumCycleTime":{"type":["integer","null"],"minimum":0,"maximum":43200000,"description":"Minimum Cycle Time: Absolute minimum cycle time in milliseconds. Used to filter erroneous or duplicate production signals. Example: 5000 (5 seconds), 10000 (10 seconds)"},"partsPerCycle":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Parts Per Cycle: Number of units produced in a single cycle. Used when production complete signals are received. Example: 1, 2, 10"},"lineSpeedTarget":{"type":["number","null"],"exclusiveMinimum":0,"maximum":99999,"description":"Line Speed Target: Target line speed for this SKU. Example: 100, 120, 50"},"downtimeDurationThresholdMultiplier":{"type":["number","null"],"exclusiveMinimum":0,"description":"Downtime Duration Threshold Multiplier: Multiple of cycle time used as downtime threshold when production-based downtime detection is enabled. Example: 2.0 means downtime triggers after 2x cycle time"},"value":{"type":["number","null"],"minimum":0,"description":"Value: Nominal value for 1 unit of this SKU in account currency. Used in calculating lost production cost. Example: 5.50, 12.00, 0.75"},"allowUseInQuickSchedule":{"type":["boolean","null"],"description":"Allow Use In Quick Schedule: Determines if this SKU can be selected when creating ad-hoc schedules from tablets"},"stationCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Station Codes: Array of station codes allowed to produce this SKU. If specified, only these stations can be scheduled with this SKU. Example: ['STA-01', 'STA-02']"},"stationGroupCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Station Group Codes: Array of station group codes allowed to produce this SKU. If specified, only stations in these groups can be scheduled with this SKU. Example: ['LINE-01', 'LINE-02']"},"taskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Task Codes: Array of Task codes linked to this SKU. References Tasks defined at the account level. Example: ['TASK-001', 'QC-CHECK']"}},"required":["code","name"],"additionalProperties":false,"description":"A record for an SKU (aka part or component) that is referenced when scheduling production."}}},"required":["isSuccess","results"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/sku/{code}":{"delete":{"tags":["SKU"],"parameters":[{"in":"path","name":"code","description":"The unique code used to reference this SKU.","schema":{"type":"string","pattern":"^([_a-zA-Z0-9.\\\\/-]+)$","minLength":1,"maxLength":32,"description":"The unique code used to reference this SKU."},"required":true}],"responses":{"204":{"description":"204 No Content"},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/station":{"get":{"tags":["Station"],"parameters":[{"in":"query","name":"plantcode","schema":{"type":"string","minLength":1}},{"in":"query","name":"stationcodes","description":"Comma-separated list of Station Codes.","schema":{"type":"string","description":"Comma-separated list of Station Codes."}},{"in":"query","name":"sortby","schema":{"type":"string","minLength":1}},{"in":"query","name":"skipcache","schema":{"type":"string","minLength":1}},{"in":"query","name":"includeschedulingonly","schema":{"type":"string","minLength":1}},{"in":"query","name":"includemeteronly","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^([a-zA-Z0-9-_]+)$","minLength":1,"maxLength":32,"description":"Code: Assign a Code to the Station, this cannot be changed once set."},"name":{"type":"string","minLength":1,"maxLength":32,"description":"Name: The friendly name for this Station (1-32 characters). Example: 'Assembly Station 1', 'Quality Check'"},"description":{"type":["string","null"],"description":"Description: Brief description of the station's purpose or function"},"shiftPatternCode":{"type":["string","null"],"maxLength":64,"description":"Shift Pattern: The ID of the shift pattern this station follows (overrides the group's shift pattern)"},"minimumCycleTime":{"type":["integer","null"],"minimum":0,"maximum":43200000,"description":"Minimum Cycle Time: Minimum time between production signals, set in seconds — if multiple signals arrive within this period, only one unit is counted. Useful for filtering signals during setup. Stored as milliseconds in the manifest."},"speedScale":{"type":["number","null"],"minimum":-9999,"maximum":9999,"description":"Speed Scale: If the value on the Performance Chart doesn't reflect actual running speed, it can be calibrated by setting this value. For example current value = 20, but actual speed = 10, scale should be set to 0.5."},"speedOffset":{"type":["number","null"],"minimum":-9999,"maximum":9999,"description":"Speed Offset: Fine tune a Speed value. For example if a Station's speed is showing as 0.5 when stopped, set the value to -0.5."},"speedToProductionRatio":{"type":["number","null"],"minimum":0,"maximum":99999,"description":"Speed to Production Ratio: Convert a speed value into a production count. Set the conversion ratio, can be a decimal. If left blank no production units will be counted."},"electricalPowerNominalKw":{"type":["number","null"],"minimum":0,"description":"Electrical Power Nominal (kW): The expected power usage in kW during normal operation."},"idleCostPerMinute":{"type":["number","null"],"minimum":0,"maximum":99999,"description":"Idle Cost Per Minute: Cost per minute during idle time in account currency. Used for calculating scheduling losses, planned non-production losses, and downtime losses when SKU doesn't have a specific value."},"downtimeDetectionMode":{"type":["string","null"],"enum":["off","production","utilisation","line_speed",null],"default":"utilisation","description":"Downtime Detection Mode: How to detect when the station is down. Options: 'off' (no detection), 'production' (use production cycle data), 'utilisation' (use utilisation signals - most common), 'line_speed' (use line speed monitoring). Default: 'utilisation'"},"utilisationDowntimeThreshold":{"type":["number","null"]},"slowDurationThreshold":{"type":["integer","null"],"minimum":0,"description":"Slow Duration Threshold: Minimum duration running below 80% of the line speed target before registering slow running, in milliseconds. Defaults to 1 minute."},"forceAllShiftTimeAsPlannedProduction":{"type":["boolean","null"],"description":"Force All Shift Time As Planned Production: Treat all shift time as planned production time"},"productiveStatusMode":{"type":["string","null"],"enum":["productive_signal","electrical_usage","line_speed",null],"default":"productive_signal","description":"Productive Status Mode: How to measure when the station is engaged in value-adding activity. Options: 'productive_signal' (use productive signal input), 'electrical_usage' (use electrical consumption), 'line_speed' (use line speed value). Default: 'productive_signal'"},"electricalUsageStoppedThresholdKw":{"type":["number","null"],"minimum":0,"description":"Electrical Usage Stopped Threshold (kW): Minimum power consumption in kilowatts that indicates the station is active. Below this threshold, Busroot will regard the station as stopped/downtime. Example: 2.0, 1.0, 5.0"},"lineSpeedStoppedThreshold":{"type":["number","null"],"minimum":0,"description":"Line Speed Stopped Threshold: Minimum speed value that indicates the station is running. Below this threshold, Busroot will regard the station as stopped/downtime. Example: 10, 5, 20"},"productiveHoldOnTime":{"type":["integer","null"],"minimum":0,"maximum":86400000,"description":"Productive Hold On Time: How long to keep considering the station active after a productive signal, set in minutes — each new signal restarts the hold-on timer. Stored as milliseconds in the manifest."},"currentOperatorInitials":{"type":["string","null"],"minLength":3,"maxLength":8,"description":"Current Operator Initials: Current operator's initials (3-8 letters/numbers, system managed)"},"statusCode":{"type":["string","null"],"description":"Status Code: Current status code of the station (system managed)"},"statusCodeUpdatedAt":{"type":["string","null"],"description":"Status Code Updated At: Timestamp when status was last updated (ISO 8601, system managed)"},"cycleTime":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":43200000,"description":"Cycle Time: Standard cycle time for production, set in seconds. Stored as milliseconds in the manifest."},"unitsPerMinute":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Units Per Minute: Expected production rate in units per minute. Example: 2, 4, 10"},"unitsPerHour":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Units Per Hour: Expected production rate in units per hour. Example: 120, 240, 600"},"lineSpeedTarget":{"type":["number","null"],"exclusiveMinimum":0,"maximum":99999,"description":"Line Speed Target: Target operating speed for the station. Example: 100, 120, 50"},"includeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task Codes: Legacy, no longer applied. Superseded by includeTaskListCodes."},"excludeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task Codes: Legacy, no longer applied. Superseded by excludeTaskListCodes."},"alertMessage":{"type":["string","null"],"description":"Alert Message: Current alert message for the station (system managed)"},"alertExpiresAt":{"type":["string","null"],"description":"Alert Expires At: Timestamp when alert expires (ISO 8601, system managed)"},"enableManualDowntime":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Downtime: Allow operators and API users to manually trigger downtime on a station, blocking production while active."},"enableAlwaysConnected":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Always Connected: Force this station to always show as connected, regardless of device signals. Useful for stations with no physical device. Inherits from parent level if not set."},"accountId":{"type":"string"},"groupCode":{"type":"string","description":"Group: Assign the station to a group of stations."},"groupName":{"type":["string","null"],"description":"The name of the station group this station belongs to."},"plantCode":{"type":"string","description":"The code of the plant this station belongs to."},"dayStartHour":{"type":"number","description":"The hour the production day starts for this station's plant (0-23)."},"timezone":{"type":"string","description":"The IANA timezone of this station's plant (e.g. Europe/London)."},"shiftPattern":{"type":"object","properties":{"code":{"type":"string","maxLength":64,"description":"Unique shift pattern identifier"},"title":{"type":"string","description":"Shift Pattern Title: The name of this shift pattern (e.g., 'default', '5-day', '24/7'). Used to reference the pattern from station groups and stations. Must be unique within the account."},"duration":{"type":"number"},"startHour":{"type":"number"},"endHour":{"type":"number"},"shifts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Shift Name: The name of this shift. Multiple shifts can share the same name for grouping purposes (e.g., 'Day Shift' for split periods like 09:00-12:00 and 13:00-17:00). Does not need to be unique."},"startHour":{"type":"number","minimum":0,"exclusiveMaximum":24,"description":"Start Hour: The start hour in the day of this shift as a decimal (0-24). Example: 14.5 represents 14:30 (2:30 PM), 9 represents 09:00, 17.25 represents 17:15"},"duration":{"type":"number","exclusiveMinimum":0,"maximum":24,"description":"Duration: Duration of the shift in hours as a decimal. Example: 8 for 8 hours, 4.5 for 4 hours 30 minutes"},"weekDay":{"type":"string","pattern":"^[1-7]$","description":"Week Day: The day of the week this shift starts on as a number string: 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday, 7 = Sunday"},"key":{"type":"string"},"shiftPatternCode":{"type":"string"}},"required":["name","startHour","duration","weekDay","key","shiftPatternCode"],"additionalProperties":false}}},"required":["code","title","duration","startHour","endHour","shifts"],"description":"The shift pattern assigned to this station."},"shifts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Shift Name: The name of this shift. Multiple shifts can share the same name for grouping purposes (e.g., 'Day Shift' for split periods like 09:00-12:00 and 13:00-17:00). Does not need to be unique."},"startHour":{"type":"number","minimum":0,"exclusiveMaximum":24,"description":"Start Hour: The start hour in the day of this shift as a decimal (0-24). Example: 14.5 represents 14:30 (2:30 PM), 9 represents 09:00, 17.25 represents 17:15"},"duration":{"type":"number","exclusiveMinimum":0,"maximum":24,"description":"Duration: Duration of the shift in hours as a decimal. Example: 8 for 8 hours, 4.5 for 4 hours 30 minutes"},"weekDay":{"type":"string","pattern":"^[1-7]$","description":"Week Day: The day of the week this shift starts on as a number string: 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday, 7 = Sunday"},"key":{"type":"string"},"shiftPatternCode":{"type":"string"}},"required":["name","startHour","duration","weekDay","key","shiftPatternCode"],"additionalProperties":false},"description":"All shifts defined for this station's shift pattern."},"currentShift":{"type":"object","properties":{"name":{"type":"string","description":"Shift Name: The name of this shift. Multiple shifts can share the same name for grouping purposes (e.g., 'Day Shift' for split periods like 09:00-12:00 and 13:00-17:00). Does not need to be unique."},"startHour":{"type":"number","minimum":0,"exclusiveMaximum":24,"description":"Start Hour: The start hour in the day of this shift as a decimal (0-24). Example: 14.5 represents 14:30 (2:30 PM), 9 represents 09:00, 17.25 represents 17:15"},"duration":{"type":"number","exclusiveMinimum":0,"maximum":24,"description":"Duration: Duration of the shift in hours as a decimal. Example: 8 for 8 hours, 4.5 for 4 hours 30 minutes"},"weekDay":{"type":"string","pattern":"^[1-7]$","description":"Week Day: The day of the week this shift starts on as a number string: 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday, 7 = Sunday"},"key":{"type":"string"},"shiftPatternCode":{"type":"string"}},"required":["name","startHour","duration","weekDay","key","shiftPatternCode"],"additionalProperties":false,"description":"The shift currently in progress, if any."},"currentStopReasonCode":{"type":["string","null"],"description":"The reason code for the current downtime stop, if the station is stopped."},"stoppedSince":{"type":["number","null"],"description":"Unix timestamp when the current downtime started, if the station is stopped."},"cachedAt":{"type":["number","null"],"description":"Unix timestamp when this station data was last cached."},"lastStationWindow":{"type":["object","null"],"properties":{"accountId":{"type":"string","description":""},"stationCode":{"type":"string","description":"A code that uniquely identifies this station within this account."},"windowStartAt":{"type":"string","description":"The start time of this window in ISO 8601 format."},"windowEndAt":{"type":"string","description":"The end time of this window in ISO 8601 format."},"totalMs":{"type":"number","description":"The total number milliseconds covered by this window. Shortcut for windowEndAt - windowStartAt."},"shiftMs":{"type":["number","null"],"description":"The number of milliseconds that were in shift."},"scheduledProductionMs":{"type":["number","null"],"description":"The number of milliseconds that were scheduled production."},"scheduledNonProductionMs":{"type":["number","null"],"description":"The number of milliseconds that were scheduled non-production."},"productiveMs":{"type":["number","null"],"description":"The number of milliseconds that the station was in a productive state, based on the station's productive status mode (productive signal, electrical usage, or line speed). Only counted during shift time."},"downtimeMs":{"type":["number","null"],"description":"The number of milliseconds that the station was in downtime."},"downtimeSince":{"type":["string","null"],"description":"The time this downtime started, in ISO 8601 format."},"rssiAvg":{"type":["number","null","null"],"description":"The received signal strength of the wireless device. -70dBm to -80dBm is good. <-90dBm is bad."},"productionGoodCount":{"type":["number","null"],"description":"The number of good quality units produced."},"productionBadCount":{"type":["number","null"],"description":"The number of bad quality units produced."},"productionIdealCount":{"type":["number","null","null"],"description":"The number of production units that should have been produced according to the SKU/part's cycle-time. WITH consideration for downtime."},"productionTargetCount":{"type":["number","null"],"description":"The number of production units that should have been produced according to the SKU/part's cycle-time. WITHOUT consideration for downtime."},"speed":{"type":["number","null"],"description":"The average line speed. Line speed is an arbitrary value that relates to this station's manufacturing process. i.e. Motor RPM."},"isAlive":{"type":["boolean","null"],"description":"A boolean value indicating if any signal was recieved from this station. Useful for detemining if the device has been disconnected from the network."},"electricalVoltsAvg":{"type":["number","null"],"description":"The average voltage of the electrical supply."},"electricalAmpsAvg":{"type":["number","null"],"description":"The average current draw."},"electricalHzAvg":{"type":["number","null"],"description":"The average frequency of the electrical supply."},"electricalPfAvg":{"type":["number","null"],"description":"The average Power Factor."},"electricalKwAvg":{"type":["number","null"],"description":"The average power used."},"electricalKwh":{"type":["number","null"],"description":"The total energy consumed."},"statusCode":{"type":["string","null"],"description":""},"electricalCost":{"type":["number","null"],"description":"The cost of the electricity used."},"costCurrency":{"type":["string","null"],"description":"The currency of any costs."},"electricalCo2":{"type":["number","null"],"description":"The amount of CO2 associated with the electricity used."},"operatorInitials":{"type":"string","description":"The initials of the operator at the station."},"lostProductionCostNonProduction":{"type":["number","null"],"description":"The cost of the time lost to scheduled non-production."},"lostProductionCostDowntime":{"type":["number","null"],"description":"The cost of the time lost to downtime."},"lostProductionCostSpeed":{"type":["number","null"],"description":"The cost of the shortfall units lost due to under performance."},"lostProductionCostQuality":{"type":["number","null"],"description":"The cost of the bad quality units produced."},"performanceModeFrom":{"type":["string","null"],"description":""},"performanceModeType":{"type":["string","null"],"description":""},"productionGoodValue":{"type":["number","null"],"description":"The value of the good quality units produced."},"productionBadValue":{"type":["number","null"],"description":"The value of the bad quality units produced."},"createdAt":{"type":["string","null"],"description":""},"updatedAt":{"type":["string","null"],"description":""},"stationName":{"type":"string","description":"The name of the station."},"scheduleIds":{"type":"array","items":{"type":"number"},"description":"The IDs of the schedules that ran."},"workOrderReferences":{"type":"array","items":{"type":"string"},"description":"The WO refs of the schedules that ran."},"errorCodes":{"type":"array","items":{"type":"string"},"description":"The error codes that were flagged."},"downtimeIds":{"type":"array","items":{"type":"number"},"description":"The IDs of the downtimes that occured."},"downtimeReasonCodes":{"type":"array","items":{"type":"string"},"description":"The reason codes of the downtimes that occured."},"nonProductionReasonCodes":{"type":"array","items":{"type":"string"},"description":"The reason codes for the non-production schedules that ran."},"windowStartAtTimestamp":{"type":"number","description":"The start time of this window as a UNIX timestamp."},"windowEndAtTimestamp":{"type":"number","description":"The end time of this window as a UNIX timestamp."},"isFuture":{"type":"boolean","description":"A boolean value indicating if this is a placeholder station window for future time."},"skuNames":{"type":"array","items":{"type":"string","description":"The name of the SKUs from the current schedule."}},"skuCodes":{"type":"array","items":{"type":"string"},"description":"The code of the SKUs from the schedules that ran."},"shiftNames":{"type":"array","items":{"type":"string"},"description":"The shift names during this time."},"lostProductionCostTotal":{"type":"number","description":"The total cost of lost production output."},"productionTotalCount":{"type":"number","description":"The total number of units produced, both good and bad."},"productionRatePerHour":{"type":"number","description":"The average rate of production in units per hour."},"productionRatePerHourIdeal":{"type":"number","description":"The ideal rate of production in units per hour."},"productionMs":{"type":"number","description":"The ideal time in milliseconds for the production actually achieved: (productionTotalCount / productionIdealCount) * totalMs."}},"required":["accountId","stationCode","windowStartAt","windowEndAt","totalMs","isAlive","stationName","windowStartAtTimestamp","windowEndAtTimestamp"],"description":"The most recent one-minute metrics window for this station."},"notes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","description":"Unique note identifier"},"stationCode":{"type":["string","null"],"description":"Station code to attach the note to"},"content":{"type":"string","maxLength":250,"description":"Note text content (max 250 characters)"},"createdAt":{"type":"string","description":"Creation timestamp (ISO 8601)"},"expiresAt":{"type":["string","null"],"description":"Expiry time (ISO 8601). Defaults to 1 year from creation if not provided"},"hide":{"type":["boolean","null"],"description":"If true, the note is hidden from the default view"},"userId":{"type":["number","null"],"description":"User ID of the note creator"},"operatorInitials":{"type":["string","null"],"description":"Initials of the operator who created the note"},"email":{"type":["string","null"]},"stationName":{"type":["string","null"]}},"required":["id","content","createdAt"]},"description":"Active notes attached to this station."},"allowedReasonCodes":{"type":"array","items":{"type":"string"},"description":"The reason codes available for this station after include/exclude filtering."},"requiredTasks":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Unique Task code used to reference this procedure (e.g., 'TASK-001', 'STARTUP-CHECK'). Must be unique within the account."},"title":{"type":"string","description":"Human-readable title of the Task (e.g., 'Machine Startup Checklist', 'Quality Inspection Procedure')"},"description":{"type":"string","description":"Detailed description of the Task and its purpose"},"trigger":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"schedule","description":"Once per production schedule: pending from when the schedule starts, missed if it ends first."}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"cron"},"pattern":{"type":"string","minLength":1,"description":"Standard 5-field cron pattern (minute hour day-of-month month day-of-week), evaluated in the station's plant timezone"},"availableBeforeDeadlineMinutes":{"type":"integer","exclusiveMinimum":0,"description":"How many minutes before the deadline (the cron fire) this Task becomes available to complete on the tablet. Required for cron Tasks; must be shorter than the smallest gap between consecutive cron fires."}},"required":["type","pattern"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"on_demand","description":"On Demand: no deadline; the operator starts the list from the tablet whenever it is needed."}},"required":["type"],"additionalProperties":false}],"description":"The trigger of the Task list this entry belongs to — not the Task's own legacy field."},"requireNotes":{"type":"boolean","description":"When enabled, operators must enter notes before this Task can be confirmed as complete."},"taskListCodes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"description":"Code of the Task list this Task belongs to"},"order":{"type":"number","description":"Display order of this Task within this list: greater than 0 and at most 100. Decimals are allowed, so a Task can be inserted between two others."}},"required":["code"],"additionalProperties":false},"description":"The Task lists this Task belongs to, with its display order within each. A Task can belong to several lists and is completed independently in each."},"taskListCode":{"type":"string","description":"The Task list this entry is being viewed through. A Task in two lists assigned to this station appears twice, once per list, each with that list's trigger and its own completion state."},"taskListName":{"type":["string","null"],"description":"Name of the Task list this entry belongs to, falling back to the code."},"taskListDescription":{"type":["string","null"],"description":"Description of the Task list this entry belongs to, shown as the subtitle on its tablet button."},"order":{"type":["number","null"],"description":"Display order of the Task within this list."},"completedAt":{"type":["string","null"]},"lastCompletedAt":{"type":["string","null"],"description":"ISO timestamp of the most recent completion of this Task in this list at this station, whichever instance it was. Set whether or not a current row exists; when the current row itself is completed, completedAt says so too."},"completedOperatorInitials":{"type":["string","null"]},"taskCompletionId":{"type":["number","null"],"description":"Id of the current task_completion row for this entry — the target of POST /api/task-completion/{id}/complete. An open row wins over a completed one. Null when the Task is not currently pending: its cron window has not opened, no schedule is running, or its list has not been started."},"expectedAt":{"type":["string","null"],"description":"ISO timestamp of the deadline of the current row when it is a cron instance; null otherwise, including for a manually started instance of a cron list."}},"required":["code","title","trigger","taskListCode"],"additionalProperties":false},"description":"Tasks required for this station with completion status."}},"required":["code","name","accountId","groupCode","plantCode","dayStartHour","timezone","shifts"],"description":"Represents a machine or workstation inside a factory. Generically, these are referred to as 'stations'."}}},"required":["isSuccess","results"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}},"post":{"tags":["Station"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^([a-zA-Z0-9-_]+)$","minLength":1,"maxLength":32,"description":"Code: Assign a Code to the Station, this cannot be changed once set."},"name":{"type":"string","minLength":1,"maxLength":32,"description":"Name: The friendly name for this Station (1-32 characters). Example: 'Assembly Station 1', 'Quality Check'"},"description":{"type":["string","null"],"description":"Description: Brief description of the station's purpose or function"},"shiftPatternCode":{"type":["string","null"],"maxLength":64,"description":"Shift Pattern: The ID of the shift pattern this station follows (overrides the group's shift pattern)"},"minimumCycleTime":{"type":["integer","null"],"minimum":0,"maximum":43200000,"description":"Minimum Cycle Time: Minimum time between production signals, set in seconds — if multiple signals arrive within this period, only one unit is counted. Useful for filtering signals during setup. Stored as milliseconds in the manifest."},"speedScale":{"type":["number","null"],"minimum":-9999,"maximum":9999,"description":"Speed Scale: If the value on the Performance Chart doesn't reflect actual running speed, it can be calibrated by setting this value. For example current value = 20, but actual speed = 10, scale should be set to 0.5."},"speedOffset":{"type":["number","null"],"minimum":-9999,"maximum":9999,"description":"Speed Offset: Fine tune a Speed value. For example if a Station's speed is showing as 0.5 when stopped, set the value to -0.5."},"speedToProductionRatio":{"type":["number","null"],"minimum":0,"maximum":99999,"description":"Speed to Production Ratio: Convert a speed value into a production count. Set the conversion ratio, can be a decimal. If left blank no production units will be counted."},"electricalPowerNominalKw":{"type":["number","null"],"minimum":0,"description":"Electrical Power Nominal (kW): The expected power usage in kW during normal operation."},"idleCostPerMinute":{"type":["number","null"],"minimum":0,"maximum":99999,"description":"Idle Cost Per Minute: Cost per minute during idle time in account currency. Used for calculating scheduling losses, planned non-production losses, and downtime losses when SKU doesn't have a specific value."},"downtimeDetectionMode":{"type":["string","null"],"enum":["off","production","utilisation","line_speed",null],"default":"utilisation","description":"Downtime Detection Mode: How to detect when the station is down. Options: 'off' (no detection), 'production' (use production cycle data), 'utilisation' (use utilisation signals - most common), 'line_speed' (use line speed monitoring). Default: 'utilisation'"},"utilisationDowntimeThreshold":{"type":["integer","null"],"minimum":0,"description":"Utilisation Downtime Threshold: Minimum stop duration before registering downtime, set in minutes — only stops at least this long are recorded. Stored as milliseconds in the manifest. Defaults to 1 hour."},"slowDurationThreshold":{"type":["integer","null"],"minimum":0,"description":"Slow Duration Threshold: Minimum duration running below 80% of the line speed target before registering slow running, in milliseconds. Defaults to 1 minute."},"forceAllShiftTimeAsPlannedProduction":{"type":["boolean","null"],"description":"Force All Shift Time As Planned Production: Treat all shift time as planned production time"},"productiveStatusMode":{"type":["string","null"],"enum":["productive_signal","electrical_usage","line_speed",null],"default":"productive_signal","description":"Productive Status Mode: How to measure when the station is engaged in value-adding activity. Options: 'productive_signal' (use productive signal input), 'electrical_usage' (use electrical consumption), 'line_speed' (use line speed value). Default: 'productive_signal'"},"electricalUsageStoppedThresholdKw":{"type":["number","null"],"minimum":0,"description":"Electrical Usage Stopped Threshold (kW): Minimum power consumption in kilowatts that indicates the station is active. Below this threshold, Busroot will regard the station as stopped/downtime. Example: 2.0, 1.0, 5.0"},"lineSpeedStoppedThreshold":{"type":["number","null"],"minimum":0,"description":"Line Speed Stopped Threshold: Minimum speed value that indicates the station is running. Below this threshold, Busroot will regard the station as stopped/downtime. Example: 10, 5, 20"},"productiveHoldOnTime":{"type":["integer","null"],"minimum":0,"maximum":86400000,"description":"Productive Hold On Time: How long to keep considering the station active after a productive signal, set in minutes — each new signal restarts the hold-on timer. Stored as milliseconds in the manifest."},"currentOperatorInitials":{"type":["string","null"],"minLength":3,"maxLength":8,"description":"Current Operator Initials: Current operator's initials (3-8 letters/numbers, system managed)"},"statusCode":{"type":["string","null"],"description":"Status Code: Current status code of the station (system managed)"},"statusCodeUpdatedAt":{"type":["string","null"],"description":"Status Code Updated At: Timestamp when status was last updated (ISO 8601, system managed)"},"cycleTime":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":43200000,"description":"Cycle Time: Standard cycle time for production, set in seconds. Stored as milliseconds in the manifest."},"unitsPerMinute":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Units Per Minute: Expected production rate in units per minute. Example: 2, 4, 10"},"unitsPerHour":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Units Per Hour: Expected production rate in units per hour. Example: 120, 240, 600"},"lineSpeedTarget":{"type":["number","null"],"exclusiveMinimum":0,"maximum":99999,"description":"Line Speed Target: Target operating speed for the station. Example: 100, 120, 50"},"includeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Reason Codes: If set, only these reason codes are available at this level. Applied before excludeReasonCodes."},"excludeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Reason Codes: These reason codes are removed at this level. Applied after includeReasonCodes."},"includeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task Codes: Legacy, no longer applied. Superseded by includeTaskListCodes."},"excludeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task Codes: Legacy, no longer applied. Superseded by excludeTaskListCodes."},"includeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task List Codes: The Task lists available at this level. Unlike reasons, no level setting this means no Task lists are available — lists must be included explicitly before their Tasks appear on a station."},"excludeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task List Codes: These Task list codes are removed at this level. Applied after includeTaskListCodes."},"alertMessage":{"type":["string","null"],"description":"Alert Message: Current alert message for the station (system managed)"},"alertExpiresAt":{"type":["string","null"],"description":"Alert Expires At: Timestamp when alert expires (ISO 8601, system managed)"},"createdAt":{"type":["string","null"],"description":"Created At: Station creation timestamp (ISO 8601, system managed)"},"updatedAt":{"type":["string","null"],"description":"Updated At: Last update timestamp (ISO 8601, system managed)"},"archivedAt":{"type":["string","null"],"description":"Archived At: Archive timestamp (ISO 8601, system managed)"},"enableProductionCorrection":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Production Correction: Allow operators to correct production counting errors during a running schedule from the tablet."},"enableManualProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Production: Allow operators to manually enter production quantities."},"enableQuickScheduleStart":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Ad Hoc Schedules: Allow operators to start ad-hoc schedules from the tablet."},"enableScheduleCutShort":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Cutting Schedules Short: Allow operators to end a schedule before its planned end."},"enableRejectProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Rejecting Production: Allow operators to reject (scrap) produced units."},"enableEditPartsPerCycle":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Editing Parts Per Cycle: Allow operators to override the parts-per-cycle value on a schedule."},"enableScheduleStationFlexibility":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Schedule Station Flexibility: Allow schedules to run on any station within the group."},"enableSchedulingOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Scheduling Only: Restrict the station to scheduling only (no live production capture)."},"enableManualDowntime":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Downtime: Allow operators and API users to manually trigger downtime on a station, blocking production while active."},"enableAlwaysConnected":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Always Connected: Force this station to always show as connected, regardless of device signals. Useful for stations with no physical device. Inherits from parent level if not set."},"enableMeterOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Meter Only: Meter Only: When true, this station represents a physical energy meter (e.g. a plant incomer). It only publishes electrical signals and is hidden from production views, rollups, and station pickers by default."},"accountId":{"type":"string"},"groupCode":{"type":"string","description":"Group: Assign the station to a group of stations."}},"required":["code","name","groupCode"],"additionalProperties":false}}}},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^([a-zA-Z0-9-_]+)$","minLength":1,"maxLength":32,"description":"Code: Assign a Code to the Station, this cannot be changed once set."},"name":{"type":"string","minLength":1,"maxLength":32,"description":"Name: The friendly name for this Station (1-32 characters). Example: 'Assembly Station 1', 'Quality Check'"},"description":{"type":["string","null"],"description":"Description: Brief description of the station's purpose or function"},"shiftPatternCode":{"type":["string","null"],"maxLength":64,"description":"Shift Pattern: The ID of the shift pattern this station follows (overrides the group's shift pattern)"},"minimumCycleTime":{"type":["integer","null"],"minimum":0,"maximum":43200000,"description":"Minimum Cycle Time: Minimum time between production signals, set in seconds — if multiple signals arrive within this period, only one unit is counted. Useful for filtering signals during setup. Stored as milliseconds in the manifest."},"speedScale":{"type":["number","null"],"minimum":-9999,"maximum":9999,"description":"Speed Scale: If the value on the Performance Chart doesn't reflect actual running speed, it can be calibrated by setting this value. For example current value = 20, but actual speed = 10, scale should be set to 0.5."},"speedOffset":{"type":["number","null"],"minimum":-9999,"maximum":9999,"description":"Speed Offset: Fine tune a Speed value. For example if a Station's speed is showing as 0.5 when stopped, set the value to -0.5."},"speedToProductionRatio":{"type":["number","null"],"minimum":0,"maximum":99999,"description":"Speed to Production Ratio: Convert a speed value into a production count. Set the conversion ratio, can be a decimal. If left blank no production units will be counted."},"electricalPowerNominalKw":{"type":["number","null"],"minimum":0,"description":"Electrical Power Nominal (kW): The expected power usage in kW during normal operation."},"idleCostPerMinute":{"type":["number","null"],"minimum":0,"maximum":99999,"description":"Idle Cost Per Minute: Cost per minute during idle time in account currency. Used for calculating scheduling losses, planned non-production losses, and downtime losses when SKU doesn't have a specific value."},"downtimeDetectionMode":{"type":["string","null"],"enum":["off","production","utilisation","line_speed",null],"default":"utilisation","description":"Downtime Detection Mode: How to detect when the station is down. Options: 'off' (no detection), 'production' (use production cycle data), 'utilisation' (use utilisation signals - most common), 'line_speed' (use line speed monitoring). Default: 'utilisation'"},"utilisationDowntimeThreshold":{"type":["integer","null"],"minimum":0,"description":"Utilisation Downtime Threshold: Minimum stop duration before registering downtime, set in minutes — only stops at least this long are recorded. Stored as milliseconds in the manifest. Defaults to 1 hour."},"slowDurationThreshold":{"type":["integer","null"],"minimum":0,"description":"Slow Duration Threshold: Minimum duration running below 80% of the line speed target before registering slow running, in milliseconds. Defaults to 1 minute."},"forceAllShiftTimeAsPlannedProduction":{"type":["boolean","null"],"description":"Force All Shift Time As Planned Production: Treat all shift time as planned production time"},"productiveStatusMode":{"type":["string","null"],"enum":["productive_signal","electrical_usage","line_speed",null],"default":"productive_signal","description":"Productive Status Mode: How to measure when the station is engaged in value-adding activity. Options: 'productive_signal' (use productive signal input), 'electrical_usage' (use electrical consumption), 'line_speed' (use line speed value). Default: 'productive_signal'"},"electricalUsageStoppedThresholdKw":{"type":["number","null"],"minimum":0,"description":"Electrical Usage Stopped Threshold (kW): Minimum power consumption in kilowatts that indicates the station is active. Below this threshold, Busroot will regard the station as stopped/downtime. Example: 2.0, 1.0, 5.0"},"lineSpeedStoppedThreshold":{"type":["number","null"],"minimum":0,"description":"Line Speed Stopped Threshold: Minimum speed value that indicates the station is running. Below this threshold, Busroot will regard the station as stopped/downtime. Example: 10, 5, 20"},"productiveHoldOnTime":{"type":["integer","null"],"minimum":0,"maximum":86400000,"description":"Productive Hold On Time: How long to keep considering the station active after a productive signal, set in minutes — each new signal restarts the hold-on timer. Stored as milliseconds in the manifest."},"currentOperatorInitials":{"type":["string","null"],"minLength":3,"maxLength":8,"description":"Current Operator Initials: Current operator's initials (3-8 letters/numbers, system managed)"},"statusCode":{"type":["string","null"],"description":"Status Code: Current status code of the station (system managed)"},"statusCodeUpdatedAt":{"type":["string","null"],"description":"Status Code Updated At: Timestamp when status was last updated (ISO 8601, system managed)"},"cycleTime":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":43200000,"description":"Cycle Time: Standard cycle time for production, set in seconds. Stored as milliseconds in the manifest."},"unitsPerMinute":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Units Per Minute: Expected production rate in units per minute. Example: 2, 4, 10"},"unitsPerHour":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Units Per Hour: Expected production rate in units per hour. Example: 120, 240, 600"},"lineSpeedTarget":{"type":["number","null"],"exclusiveMinimum":0,"maximum":99999,"description":"Line Speed Target: Target operating speed for the station. Example: 100, 120, 50"},"includeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Reason Codes: If set, only these reason codes are available at this level. Applied before excludeReasonCodes."},"excludeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Reason Codes: These reason codes are removed at this level. Applied after includeReasonCodes."},"includeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task Codes: Legacy, no longer applied. Superseded by includeTaskListCodes."},"excludeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task Codes: Legacy, no longer applied. Superseded by excludeTaskListCodes."},"includeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task List Codes: The Task lists available at this level. Unlike reasons, no level setting this means no Task lists are available — lists must be included explicitly before their Tasks appear on a station."},"excludeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task List Codes: These Task list codes are removed at this level. Applied after includeTaskListCodes."},"alertMessage":{"type":["string","null"],"description":"Alert Message: Current alert message for the station (system managed)"},"alertExpiresAt":{"type":["string","null"],"description":"Alert Expires At: Timestamp when alert expires (ISO 8601, system managed)"},"createdAt":{"type":["string","null"],"description":"Created At: Station creation timestamp (ISO 8601, system managed)"},"updatedAt":{"type":["string","null"],"description":"Updated At: Last update timestamp (ISO 8601, system managed)"},"archivedAt":{"type":["string","null"],"description":"Archived At: Archive timestamp (ISO 8601, system managed)"},"enableProductionCorrection":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Production Correction: Allow operators to correct production counting errors during a running schedule from the tablet."},"enableManualProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Production: Allow operators to manually enter production quantities."},"enableQuickScheduleStart":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Ad Hoc Schedules: Allow operators to start ad-hoc schedules from the tablet."},"enableScheduleCutShort":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Cutting Schedules Short: Allow operators to end a schedule before its planned end."},"enableRejectProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Rejecting Production: Allow operators to reject (scrap) produced units."},"enableEditPartsPerCycle":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Editing Parts Per Cycle: Allow operators to override the parts-per-cycle value on a schedule."},"enableScheduleStationFlexibility":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Schedule Station Flexibility: Allow schedules to run on any station within the group."},"enableSchedulingOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Scheduling Only: Restrict the station to scheduling only (no live production capture)."},"enableManualDowntime":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Downtime: Allow operators and API users to manually trigger downtime on a station, blocking production while active."},"enableAlwaysConnected":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Always Connected: Force this station to always show as connected, regardless of device signals. Useful for stations with no physical device. Inherits from parent level if not set."},"enableMeterOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Meter Only: Meter Only: When true, this station represents a physical energy meter (e.g. a plant incomer). It only publishes electrical signals and is hidden from production views, rollups, and station pickers by default."},"accountId":{"type":"string"},"groupCode":{"type":"string","description":"Group: Assign the station to a group of stations."}},"required":["code","name","accountId","groupCode"],"additionalProperties":false}}},"required":["isSuccess","results"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/station/{code}":{"delete":{"tags":["Station"],"parameters":[{"in":"path","name":"code","description":"Code: Assign a Code to the Station, this cannot be changed once set.","schema":{"type":"string","pattern":"^([a-zA-Z0-9-_]+)$","minLength":1,"maxLength":32,"description":"Code: Assign a Code to the Station, this cannot be changed once set."},"required":true}],"responses":{"204":{"description":"204 No Content"},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/station/{code}/operator":{"post":{"tags":["Station"],"parameters":[{"in":"path","name":"code","description":"Code: Assign a Code to the Station, this cannot be changed once set.","schema":{"type":"string","pattern":"^([a-zA-Z0-9-_]+)$","minLength":1,"maxLength":32,"description":"Code: Assign a Code to the Station, this cannot be changed once set."},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"currentOperatorInitials":{"type":["string","null"],"minLength":3,"maxLength":8,"description":"Current Operator Initials: Current operator's initials (3-8 letters/numbers, system managed)"}},"additionalProperties":false}}}},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^([a-zA-Z0-9-_]+)$","minLength":1,"maxLength":32,"description":"Code: Assign a Code to the Station, this cannot be changed once set."},"name":{"type":"string","minLength":1,"maxLength":32,"description":"Name: The friendly name for this Station (1-32 characters). Example: 'Assembly Station 1', 'Quality Check'"},"description":{"type":["string","null"],"description":"Description: Brief description of the station's purpose or function"},"shiftPatternCode":{"type":["string","null"],"maxLength":64,"description":"Shift Pattern: The ID of the shift pattern this station follows (overrides the group's shift pattern)"},"minimumCycleTime":{"type":["integer","null"],"minimum":0,"maximum":43200000,"description":"Minimum Cycle Time: Minimum time between production signals, set in seconds — if multiple signals arrive within this period, only one unit is counted. Useful for filtering signals during setup. Stored as milliseconds in the manifest."},"speedScale":{"type":["number","null"],"minimum":-9999,"maximum":9999,"description":"Speed Scale: If the value on the Performance Chart doesn't reflect actual running speed, it can be calibrated by setting this value. For example current value = 20, but actual speed = 10, scale should be set to 0.5."},"speedOffset":{"type":["number","null"],"minimum":-9999,"maximum":9999,"description":"Speed Offset: Fine tune a Speed value. For example if a Station's speed is showing as 0.5 when stopped, set the value to -0.5."},"speedToProductionRatio":{"type":["number","null"],"minimum":0,"maximum":99999,"description":"Speed to Production Ratio: Convert a speed value into a production count. Set the conversion ratio, can be a decimal. If left blank no production units will be counted."},"electricalPowerNominalKw":{"type":["number","null"],"minimum":0,"description":"Electrical Power Nominal (kW): The expected power usage in kW during normal operation."},"idleCostPerMinute":{"type":["number","null"],"minimum":0,"maximum":99999,"description":"Idle Cost Per Minute: Cost per minute during idle time in account currency. Used for calculating scheduling losses, planned non-production losses, and downtime losses when SKU doesn't have a specific value."},"downtimeDetectionMode":{"type":["string","null"],"enum":["off","production","utilisation","line_speed",null],"default":"utilisation","description":"Downtime Detection Mode: How to detect when the station is down. Options: 'off' (no detection), 'production' (use production cycle data), 'utilisation' (use utilisation signals - most common), 'line_speed' (use line speed monitoring). Default: 'utilisation'"},"utilisationDowntimeThreshold":{"type":["integer","null"],"minimum":0,"description":"Utilisation Downtime Threshold: Minimum stop duration before registering downtime, set in minutes — only stops at least this long are recorded. Stored as milliseconds in the manifest. Defaults to 1 hour."},"slowDurationThreshold":{"type":["integer","null"],"minimum":0,"description":"Slow Duration Threshold: Minimum duration running below 80% of the line speed target before registering slow running, in milliseconds. Defaults to 1 minute."},"forceAllShiftTimeAsPlannedProduction":{"type":["boolean","null"],"description":"Force All Shift Time As Planned Production: Treat all shift time as planned production time"},"productiveStatusMode":{"type":["string","null"],"enum":["productive_signal","electrical_usage","line_speed",null],"default":"productive_signal","description":"Productive Status Mode: How to measure when the station is engaged in value-adding activity. Options: 'productive_signal' (use productive signal input), 'electrical_usage' (use electrical consumption), 'line_speed' (use line speed value). Default: 'productive_signal'"},"electricalUsageStoppedThresholdKw":{"type":["number","null"],"minimum":0,"description":"Electrical Usage Stopped Threshold (kW): Minimum power consumption in kilowatts that indicates the station is active. Below this threshold, Busroot will regard the station as stopped/downtime. Example: 2.0, 1.0, 5.0"},"lineSpeedStoppedThreshold":{"type":["number","null"],"minimum":0,"description":"Line Speed Stopped Threshold: Minimum speed value that indicates the station is running. Below this threshold, Busroot will regard the station as stopped/downtime. Example: 10, 5, 20"},"productiveHoldOnTime":{"type":["integer","null"],"minimum":0,"maximum":86400000,"description":"Productive Hold On Time: How long to keep considering the station active after a productive signal, set in minutes — each new signal restarts the hold-on timer. Stored as milliseconds in the manifest."},"currentOperatorInitials":{"type":["string","null"],"minLength":3,"maxLength":8,"description":"Current Operator Initials: Current operator's initials (3-8 letters/numbers, system managed)"},"statusCode":{"type":["string","null"],"description":"Status Code: Current status code of the station (system managed)"},"statusCodeUpdatedAt":{"type":["string","null"],"description":"Status Code Updated At: Timestamp when status was last updated (ISO 8601, system managed)"},"cycleTime":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":43200000,"description":"Cycle Time: Standard cycle time for production, set in seconds. Stored as milliseconds in the manifest."},"unitsPerMinute":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Units Per Minute: Expected production rate in units per minute. Example: 2, 4, 10"},"unitsPerHour":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Units Per Hour: Expected production rate in units per hour. Example: 120, 240, 600"},"lineSpeedTarget":{"type":["number","null"],"exclusiveMinimum":0,"maximum":99999,"description":"Line Speed Target: Target operating speed for the station. Example: 100, 120, 50"},"includeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Reason Codes: If set, only these reason codes are available at this level. Applied before excludeReasonCodes."},"excludeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Reason Codes: These reason codes are removed at this level. Applied after includeReasonCodes."},"includeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task Codes: Legacy, no longer applied. Superseded by includeTaskListCodes."},"excludeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task Codes: Legacy, no longer applied. Superseded by excludeTaskListCodes."},"includeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task List Codes: The Task lists available at this level. Unlike reasons, no level setting this means no Task lists are available — lists must be included explicitly before their Tasks appear on a station."},"excludeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task List Codes: These Task list codes are removed at this level. Applied after includeTaskListCodes."},"alertMessage":{"type":["string","null"],"description":"Alert Message: Current alert message for the station (system managed)"},"alertExpiresAt":{"type":["string","null"],"description":"Alert Expires At: Timestamp when alert expires (ISO 8601, system managed)"},"createdAt":{"type":["string","null"],"description":"Created At: Station creation timestamp (ISO 8601, system managed)"},"updatedAt":{"type":["string","null"],"description":"Updated At: Last update timestamp (ISO 8601, system managed)"},"archivedAt":{"type":["string","null"],"description":"Archived At: Archive timestamp (ISO 8601, system managed)"},"enableProductionCorrection":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Production Correction: Allow operators to correct production counting errors during a running schedule from the tablet."},"enableManualProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Production: Allow operators to manually enter production quantities."},"enableQuickScheduleStart":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Ad Hoc Schedules: Allow operators to start ad-hoc schedules from the tablet."},"enableScheduleCutShort":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Cutting Schedules Short: Allow operators to end a schedule before its planned end."},"enableRejectProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Rejecting Production: Allow operators to reject (scrap) produced units."},"enableEditPartsPerCycle":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Editing Parts Per Cycle: Allow operators to override the parts-per-cycle value on a schedule."},"enableScheduleStationFlexibility":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Schedule Station Flexibility: Allow schedules to run on any station within the group."},"enableSchedulingOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Scheduling Only: Restrict the station to scheduling only (no live production capture)."},"enableManualDowntime":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Downtime: Allow operators and API users to manually trigger downtime on a station, blocking production while active."},"enableAlwaysConnected":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Always Connected: Force this station to always show as connected, regardless of device signals. Useful for stations with no physical device. Inherits from parent level if not set."},"enableMeterOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Meter Only: Meter Only: When true, this station represents a physical energy meter (e.g. a plant incomer). It only publishes electrical signals and is hidden from production views, rollups, and station pickers by default."},"accountId":{"type":"string"},"groupCode":{"type":"string","description":"Group: Assign the station to a group of stations."}},"required":["code","name","accountId","groupCode"],"additionalProperties":false}}},"required":["isSuccess","results"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/station-group":{"get":{"tags":["Station Group"],"parameters":[{"in":"query","name":"plantcode","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Unique group identifier within the plant (e.g., 'LINE-01', 'ASM-A', 'PACKAGING')"},"name":{"type":"string","description":"Human-readable group name (e.g., 'Assembly Line 1', 'Packaging Line A')"},"shiftPatternCode":{"type":["string","null"],"description":"Shift Pattern: The ID of the shift pattern this group follows"},"includeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task Codes: Legacy, no longer applied. Superseded by includeTaskListCodes."},"excludeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task Codes: Legacy, no longer applied. Superseded by excludeTaskListCodes."},"totalEnergyStationCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Total Energy Station Codes: When set, this group's energy (kWh, cost, CO2) is the sum of these stations' energy instead of the additive sum over member stations."},"enableManualDowntime":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Downtime: Allow operators and API users to manually trigger downtime on a station, blocking production while active."},"enableAlwaysConnected":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Always Connected: Force this station to always show as connected, regardless of device signals. Useful for stations with no physical device. Inherits from parent level if not set."},"enableMeterOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Meter Only: Meter Only: When true, this station represents a physical energy meter (e.g. a plant incomer). It only publishes electrical signals and is hidden from production views, rollups, and station pickers by default."},"plantCode":{"type":"string"},"accountId":{"type":"string"},"plantTimezone":{"type":"string"},"stations":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^([a-zA-Z0-9-_]+)$","minLength":1,"maxLength":32,"description":"Code: Assign a Code to the Station, this cannot be changed once set."},"name":{"type":"string","minLength":1,"maxLength":32,"description":"Name: The friendly name for this Station (1-32 characters). Example: 'Assembly Station 1', 'Quality Check'"},"description":{"type":["string","null"],"description":"Description: Brief description of the station's purpose or function"},"shiftPatternCode":{"type":["string","null"],"maxLength":64,"description":"Shift Pattern: The ID of the shift pattern this station follows (overrides the group's shift pattern)"},"minimumCycleTime":{"type":["integer","null"],"minimum":0,"maximum":43200000,"description":"Minimum Cycle Time: Minimum time between production signals, set in seconds — if multiple signals arrive within this period, only one unit is counted. Useful for filtering signals during setup. Stored as milliseconds in the manifest."},"speedScale":{"type":["number","null"],"minimum":-9999,"maximum":9999,"description":"Speed Scale: If the value on the Performance Chart doesn't reflect actual running speed, it can be calibrated by setting this value. For example current value = 20, but actual speed = 10, scale should be set to 0.5."},"speedOffset":{"type":["number","null"],"minimum":-9999,"maximum":9999,"description":"Speed Offset: Fine tune a Speed value. For example if a Station's speed is showing as 0.5 when stopped, set the value to -0.5."},"speedToProductionRatio":{"type":["number","null"],"minimum":0,"maximum":99999,"description":"Speed to Production Ratio: Convert a speed value into a production count. Set the conversion ratio, can be a decimal. If left blank no production units will be counted."},"electricalPowerNominalKw":{"type":["number","null"],"minimum":0,"description":"Electrical Power Nominal (kW): The expected power usage in kW during normal operation."},"idleCostPerMinute":{"type":["number","null"],"minimum":0,"maximum":99999,"description":"Idle Cost Per Minute: Cost per minute during idle time in account currency. Used for calculating scheduling losses, planned non-production losses, and downtime losses when SKU doesn't have a specific value."},"downtimeDetectionMode":{"type":["string","null"],"enum":["off","production","utilisation","line_speed",null],"default":"utilisation","description":"Downtime Detection Mode: How to detect when the station is down. Options: 'off' (no detection), 'production' (use production cycle data), 'utilisation' (use utilisation signals - most common), 'line_speed' (use line speed monitoring). Default: 'utilisation'"},"utilisationDowntimeThreshold":{"type":["integer","null"],"minimum":0,"description":"Utilisation Downtime Threshold: Minimum stop duration before registering downtime, set in minutes — only stops at least this long are recorded. Stored as milliseconds in the manifest. Defaults to 1 hour."},"slowDurationThreshold":{"type":["integer","null"],"minimum":0,"description":"Slow Duration Threshold: Minimum duration running below 80% of the line speed target before registering slow running, in milliseconds. Defaults to 1 minute."},"forceAllShiftTimeAsPlannedProduction":{"type":["boolean","null"],"description":"Force All Shift Time As Planned Production: Treat all shift time as planned production time"},"productiveStatusMode":{"type":["string","null"],"enum":["productive_signal","electrical_usage","line_speed",null],"default":"productive_signal","description":"Productive Status Mode: How to measure when the station is engaged in value-adding activity. Options: 'productive_signal' (use productive signal input), 'electrical_usage' (use electrical consumption), 'line_speed' (use line speed value). Default: 'productive_signal'"},"electricalUsageStoppedThresholdKw":{"type":["number","null"],"minimum":0,"description":"Electrical Usage Stopped Threshold (kW): Minimum power consumption in kilowatts that indicates the station is active. Below this threshold, Busroot will regard the station as stopped/downtime. Example: 2.0, 1.0, 5.0"},"lineSpeedStoppedThreshold":{"type":["number","null"],"minimum":0,"description":"Line Speed Stopped Threshold: Minimum speed value that indicates the station is running. Below this threshold, Busroot will regard the station as stopped/downtime. Example: 10, 5, 20"},"productiveHoldOnTime":{"type":["integer","null"],"minimum":0,"maximum":86400000,"description":"Productive Hold On Time: How long to keep considering the station active after a productive signal, set in minutes — each new signal restarts the hold-on timer. Stored as milliseconds in the manifest."},"currentOperatorInitials":{"type":["string","null"],"minLength":3,"maxLength":8,"description":"Current Operator Initials: Current operator's initials (3-8 letters/numbers, system managed)"},"statusCode":{"type":["string","null"],"description":"Status Code: Current status code of the station (system managed)"},"statusCodeUpdatedAt":{"type":["string","null"],"description":"Status Code Updated At: Timestamp when status was last updated (ISO 8601, system managed)"},"cycleTime":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":43200000,"description":"Cycle Time: Standard cycle time for production, set in seconds. Stored as milliseconds in the manifest."},"unitsPerMinute":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Units Per Minute: Expected production rate in units per minute. Example: 2, 4, 10"},"unitsPerHour":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Units Per Hour: Expected production rate in units per hour. Example: 120, 240, 600"},"lineSpeedTarget":{"type":["number","null"],"exclusiveMinimum":0,"maximum":99999,"description":"Line Speed Target: Target operating speed for the station. Example: 100, 120, 50"},"includeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Reason Codes: If set, only these reason codes are available at this level. Applied before excludeReasonCodes."},"excludeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Reason Codes: These reason codes are removed at this level. Applied after includeReasonCodes."},"includeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task Codes: Legacy, no longer applied. Superseded by includeTaskListCodes."},"excludeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task Codes: Legacy, no longer applied. Superseded by excludeTaskListCodes."},"includeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task List Codes: The Task lists available at this level. Unlike reasons, no level setting this means no Task lists are available — lists must be included explicitly before their Tasks appear on a station."},"excludeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task List Codes: These Task list codes are removed at this level. Applied after includeTaskListCodes."},"alertMessage":{"type":["string","null"],"description":"Alert Message: Current alert message for the station (system managed)"},"alertExpiresAt":{"type":["string","null"],"description":"Alert Expires At: Timestamp when alert expires (ISO 8601, system managed)"},"createdAt":{"type":["string","null"],"description":"Created At: Station creation timestamp (ISO 8601, system managed)"},"updatedAt":{"type":["string","null"],"description":"Updated At: Last update timestamp (ISO 8601, system managed)"},"archivedAt":{"type":["string","null"],"description":"Archived At: Archive timestamp (ISO 8601, system managed)"},"enableProductionCorrection":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Production Correction: Allow operators to correct production counting errors during a running schedule from the tablet."},"enableManualProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Production: Allow operators to manually enter production quantities."},"enableQuickScheduleStart":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Ad Hoc Schedules: Allow operators to start ad-hoc schedules from the tablet."},"enableScheduleCutShort":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Cutting Schedules Short: Allow operators to end a schedule before its planned end."},"enableRejectProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Rejecting Production: Allow operators to reject (scrap) produced units."},"enableEditPartsPerCycle":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Editing Parts Per Cycle: Allow operators to override the parts-per-cycle value on a schedule."},"enableScheduleStationFlexibility":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Schedule Station Flexibility: Allow schedules to run on any station within the group."},"enableSchedulingOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Scheduling Only: Restrict the station to scheduling only (no live production capture)."},"enableManualDowntime":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Downtime: Allow operators and API users to manually trigger downtime on a station, blocking production while active."},"enableAlwaysConnected":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Always Connected: Force this station to always show as connected, regardless of device signals. Useful for stations with no physical device. Inherits from parent level if not set."},"enableMeterOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Meter Only: Meter Only: When true, this station represents a physical energy meter (e.g. a plant incomer). It only publishes electrical signals and is hidden from production views, rollups, and station pickers by default."},"accountId":{"type":"string"},"groupCode":{"type":"string","description":"Group: Assign the station to a group of stations."}},"required":["code","name","accountId","groupCode"],"additionalProperties":false}},"shifts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Shift Name: The name of this shift. Multiple shifts can share the same name for grouping purposes (e.g., 'Day Shift' for split periods like 09:00-12:00 and 13:00-17:00). Does not need to be unique."},"startHour":{"type":"number","minimum":0,"exclusiveMaximum":24,"description":"Start Hour: The start hour in the day of this shift as a decimal (0-24). Example: 14.5 represents 14:30 (2:30 PM), 9 represents 09:00, 17.25 represents 17:15"},"duration":{"type":"number","exclusiveMinimum":0,"maximum":24,"description":"Duration: Duration of the shift in hours as a decimal. Example: 8 for 8 hours, 4.5 for 4 hours 30 minutes"},"weekDay":{"type":"string","pattern":"^[1-7]$","description":"Week Day: The day of the week this shift starts on as a number string: 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday, 7 = Sunday"},"key":{"type":"string"},"shiftPatternCode":{"type":"string"}},"required":["name","startHour","duration","weekDay","key","shiftPatternCode"],"additionalProperties":false}}},"required":["code","name","plantCode","accountId","plantTimezone","stations","shifts"]}}},"required":["isSuccess","results"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}},"post":{"tags":["Station Group"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^([a-zA-Z0-9-_]+)$","minLength":1,"maxLength":32,"description":"Code: Assign a Code to the Station Group, this cannot be changed once set."},"name":{"type":"string","minLength":1,"maxLength":32,"description":"Name: Assign a Name to the Station Group."},"plantCode":{"type":"string","pattern":"^[a-z0-9\\-]*$","minLength":3,"maxLength":55,"description":"Plant: Select the plant you would like this group of stations associated with."},"shiftPatternCode":{"type":"string","maxLength":64,"description":"Shift Pattern: Select which Shift Pattern the group will follow."},"enableProductionCorrection":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Production Correction: Allow operators to correct production counting errors during a running schedule from the tablet."},"enableManualProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Production: Allow operators to manually enter production quantities."},"enableQuickScheduleStart":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Ad Hoc Schedules: Allow operators to start ad-hoc schedules from the tablet."},"enableScheduleCutShort":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Cutting Schedules Short: Allow operators to end a schedule before its planned end."},"enableRejectProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Rejecting Production: Allow operators to reject (scrap) produced units."},"enableEditPartsPerCycle":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Editing Parts Per Cycle: Allow operators to override the parts-per-cycle value on a schedule."},"enableScheduleStationFlexibility":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Schedule Station Flexibility: Allow schedules to run on any station within the group."},"enableSchedulingOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Scheduling Only: Restrict the station to scheduling only (no live production capture)."},"enableManualDowntime":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Downtime: Allow operators and API users to manually trigger downtime on a station, blocking production while active."},"enableAlwaysConnected":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Always Connected: Force this station to always show as connected, regardless of device signals. Useful for stations with no physical device. Inherits from parent level if not set."},"enableMeterOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Meter Only: Meter Only: When true, this station represents a physical energy meter (e.g. a plant incomer). It only publishes electrical signals and is hidden from production views, rollups, and station pickers by default."},"includeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task List Codes: The Task lists available at this level. No level setting this means no Task lists are available."},"excludeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task List Codes: These Task list codes are removed at this level."},"includeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Reason Codes: If set, only these reason codes are available at this level. Applied before excludeReasonCodes."},"excludeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Reason Codes: These reason codes are removed at this level. Applied after includeReasonCodes."},"totalEnergyStationCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Total Energy Station Codes: When set, this group's energy (kWh, cost, CO2) is the sum of these stations' energy instead of the additive sum over member stations."}},"required":["code","name","plantCode","shiftPatternCode"]}}}},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Unique group identifier within the plant (e.g., 'LINE-01', 'ASM-A', 'PACKAGING')"},"name":{"type":"string","description":"Human-readable group name (e.g., 'Assembly Line 1', 'Packaging Line A')"},"shiftPatternCode":{"type":["string","null"],"description":"Shift Pattern: The ID of the shift pattern this group follows"},"includeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Reason Codes: If set, only these reason codes are available at this level. Applied before excludeReasonCodes."},"excludeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Reason Codes: These reason codes are removed at this level. Applied after includeReasonCodes."},"includeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task Codes: Legacy, no longer applied. Superseded by includeTaskListCodes."},"excludeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task Codes: Legacy, no longer applied. Superseded by excludeTaskListCodes."},"includeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task List Codes: The Task lists available at this level. Unlike reasons, no level setting this means no Task lists are available — lists must be included explicitly before their Tasks appear on a station."},"excludeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task List Codes: These Task list codes are removed at this level. Applied after includeTaskListCodes."},"totalEnergyStationCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Total Energy Station Codes: When set, this group's energy (kWh, cost, CO2) is the sum of these stations' energy instead of the additive sum over member stations."},"createdAt":{"type":["string","null"],"description":"Group creation timestamp (ISO 8601, system managed)"},"updatedAt":{"type":["string","null"],"description":"Last update timestamp (ISO 8601, system managed)"},"enableProductionCorrection":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Production Correction: Allow operators to correct production counting errors during a running schedule from the tablet."},"enableManualProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Production: Allow operators to manually enter production quantities."},"enableQuickScheduleStart":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Ad Hoc Schedules: Allow operators to start ad-hoc schedules from the tablet."},"enableScheduleCutShort":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Cutting Schedules Short: Allow operators to end a schedule before its planned end."},"enableRejectProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Rejecting Production: Allow operators to reject (scrap) produced units."},"enableEditPartsPerCycle":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Editing Parts Per Cycle: Allow operators to override the parts-per-cycle value on a schedule."},"enableScheduleStationFlexibility":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Schedule Station Flexibility: Allow schedules to run on any station within the group."},"enableSchedulingOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Scheduling Only: Restrict the station to scheduling only (no live production capture)."},"enableManualDowntime":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Downtime: Allow operators and API users to manually trigger downtime on a station, blocking production while active."},"enableAlwaysConnected":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Always Connected: Force this station to always show as connected, regardless of device signals. Useful for stations with no physical device. Inherits from parent level if not set."},"enableMeterOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Meter Only: Meter Only: When true, this station represents a physical energy meter (e.g. a plant incomer). It only publishes electrical signals and is hidden from production views, rollups, and station pickers by default."},"plantCode":{"type":"string"},"accountId":{"type":"string"}},"required":["code","name","plantCode","accountId"],"additionalProperties":false}}},"required":["isSuccess","results"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/station-group/{code}":{"get":{"tags":["Station Group"],"parameters":[{"in":"path","name":"code","schema":{"type":"string","pattern":"^([a-zA-Z0-9-_]+)$","minLength":1,"maxLength":32},"required":true}],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"result":{"type":"object","properties":{"code":{"type":"string","description":"Unique group identifier within the plant (e.g., 'LINE-01', 'ASM-A', 'PACKAGING')"},"name":{"type":"string","description":"Human-readable group name (e.g., 'Assembly Line 1', 'Packaging Line A')"},"shiftPatternCode":{"type":["string","null"],"description":"Shift Pattern: The ID of the shift pattern this group follows"},"includeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task Codes: Legacy, no longer applied. Superseded by includeTaskListCodes."},"excludeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task Codes: Legacy, no longer applied. Superseded by excludeTaskListCodes."},"totalEnergyStationCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Total Energy Station Codes: When set, this group's energy (kWh, cost, CO2) is the sum of these stations' energy instead of the additive sum over member stations."},"enableManualDowntime":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Downtime: Allow operators and API users to manually trigger downtime on a station, blocking production while active."},"enableAlwaysConnected":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Always Connected: Force this station to always show as connected, regardless of device signals. Useful for stations with no physical device. Inherits from parent level if not set."},"enableMeterOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Meter Only: Meter Only: When true, this station represents a physical energy meter (e.g. a plant incomer). It only publishes electrical signals and is hidden from production views, rollups, and station pickers by default."},"plantCode":{"type":"string"},"accountId":{"type":"string"},"plantTimezone":{"type":"string"},"stations":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","pattern":"^([a-zA-Z0-9-_]+)$","minLength":1,"maxLength":32,"description":"Code: Assign a Code to the Station, this cannot be changed once set."},"name":{"type":"string","minLength":1,"maxLength":32,"description":"Name: The friendly name for this Station (1-32 characters). Example: 'Assembly Station 1', 'Quality Check'"},"description":{"type":["string","null"],"description":"Description: Brief description of the station's purpose or function"},"shiftPatternCode":{"type":["string","null"],"maxLength":64,"description":"Shift Pattern: The ID of the shift pattern this station follows (overrides the group's shift pattern)"},"minimumCycleTime":{"type":["integer","null"],"minimum":0,"maximum":43200000,"description":"Minimum Cycle Time: Minimum time between production signals, set in seconds — if multiple signals arrive within this period, only one unit is counted. Useful for filtering signals during setup. Stored as milliseconds in the manifest."},"speedScale":{"type":["number","null"],"minimum":-9999,"maximum":9999,"description":"Speed Scale: If the value on the Performance Chart doesn't reflect actual running speed, it can be calibrated by setting this value. For example current value = 20, but actual speed = 10, scale should be set to 0.5."},"speedOffset":{"type":["number","null"],"minimum":-9999,"maximum":9999,"description":"Speed Offset: Fine tune a Speed value. For example if a Station's speed is showing as 0.5 when stopped, set the value to -0.5."},"speedToProductionRatio":{"type":["number","null"],"minimum":0,"maximum":99999,"description":"Speed to Production Ratio: Convert a speed value into a production count. Set the conversion ratio, can be a decimal. If left blank no production units will be counted."},"electricalPowerNominalKw":{"type":["number","null"],"minimum":0,"description":"Electrical Power Nominal (kW): The expected power usage in kW during normal operation."},"idleCostPerMinute":{"type":["number","null"],"minimum":0,"maximum":99999,"description":"Idle Cost Per Minute: Cost per minute during idle time in account currency. Used for calculating scheduling losses, planned non-production losses, and downtime losses when SKU doesn't have a specific value."},"downtimeDetectionMode":{"type":["string","null"],"enum":["off","production","utilisation","line_speed",null],"default":"utilisation","description":"Downtime Detection Mode: How to detect when the station is down. Options: 'off' (no detection), 'production' (use production cycle data), 'utilisation' (use utilisation signals - most common), 'line_speed' (use line speed monitoring). Default: 'utilisation'"},"utilisationDowntimeThreshold":{"type":["integer","null"],"minimum":0,"description":"Utilisation Downtime Threshold: Minimum stop duration before registering downtime, set in minutes — only stops at least this long are recorded. Stored as milliseconds in the manifest. Defaults to 1 hour."},"slowDurationThreshold":{"type":["integer","null"],"minimum":0,"description":"Slow Duration Threshold: Minimum duration running below 80% of the line speed target before registering slow running, in milliseconds. Defaults to 1 minute."},"forceAllShiftTimeAsPlannedProduction":{"type":["boolean","null"],"description":"Force All Shift Time As Planned Production: Treat all shift time as planned production time"},"productiveStatusMode":{"type":["string","null"],"enum":["productive_signal","electrical_usage","line_speed",null],"default":"productive_signal","description":"Productive Status Mode: How to measure when the station is engaged in value-adding activity. Options: 'productive_signal' (use productive signal input), 'electrical_usage' (use electrical consumption), 'line_speed' (use line speed value). Default: 'productive_signal'"},"electricalUsageStoppedThresholdKw":{"type":["number","null"],"minimum":0,"description":"Electrical Usage Stopped Threshold (kW): Minimum power consumption in kilowatts that indicates the station is active. Below this threshold, Busroot will regard the station as stopped/downtime. Example: 2.0, 1.0, 5.0"},"lineSpeedStoppedThreshold":{"type":["number","null"],"minimum":0,"description":"Line Speed Stopped Threshold: Minimum speed value that indicates the station is running. Below this threshold, Busroot will regard the station as stopped/downtime. Example: 10, 5, 20"},"productiveHoldOnTime":{"type":["integer","null"],"minimum":0,"maximum":86400000,"description":"Productive Hold On Time: How long to keep considering the station active after a productive signal, set in minutes — each new signal restarts the hold-on timer. Stored as milliseconds in the manifest."},"currentOperatorInitials":{"type":["string","null"],"minLength":3,"maxLength":8,"description":"Current Operator Initials: Current operator's initials (3-8 letters/numbers, system managed)"},"statusCode":{"type":["string","null"],"description":"Status Code: Current status code of the station (system managed)"},"statusCodeUpdatedAt":{"type":["string","null"],"description":"Status Code Updated At: Timestamp when status was last updated (ISO 8601, system managed)"},"cycleTime":{"type":["integer","null"],"exclusiveMinimum":0,"maximum":43200000,"description":"Cycle Time: Standard cycle time for production, set in seconds. Stored as milliseconds in the manifest."},"unitsPerMinute":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Units Per Minute: Expected production rate in units per minute. Example: 2, 4, 10"},"unitsPerHour":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Units Per Hour: Expected production rate in units per hour. Example: 120, 240, 600"},"lineSpeedTarget":{"type":["number","null"],"exclusiveMinimum":0,"maximum":99999,"description":"Line Speed Target: Target operating speed for the station. Example: 100, 120, 50"},"includeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Reason Codes: If set, only these reason codes are available at this level. Applied before excludeReasonCodes."},"excludeReasonCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Reason Codes: These reason codes are removed at this level. Applied after includeReasonCodes."},"includeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task Codes: Legacy, no longer applied. Superseded by includeTaskListCodes."},"excludeTaskCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task Codes: Legacy, no longer applied. Superseded by excludeTaskListCodes."},"includeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Include Task List Codes: The Task lists available at this level. Unlike reasons, no level setting this means no Task lists are available — lists must be included explicitly before their Tasks appear on a station."},"excludeTaskListCodes":{"type":["array","null"],"items":{"type":"string"},"description":"Exclude Task List Codes: These Task list codes are removed at this level. Applied after includeTaskListCodes."},"alertMessage":{"type":["string","null"],"description":"Alert Message: Current alert message for the station (system managed)"},"alertExpiresAt":{"type":["string","null"],"description":"Alert Expires At: Timestamp when alert expires (ISO 8601, system managed)"},"createdAt":{"type":["string","null"],"description":"Created At: Station creation timestamp (ISO 8601, system managed)"},"updatedAt":{"type":["string","null"],"description":"Updated At: Last update timestamp (ISO 8601, system managed)"},"archivedAt":{"type":["string","null"],"description":"Archived At: Archive timestamp (ISO 8601, system managed)"},"enableProductionCorrection":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Production Correction: Allow operators to correct production counting errors during a running schedule from the tablet."},"enableManualProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Production: Allow operators to manually enter production quantities."},"enableQuickScheduleStart":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Ad Hoc Schedules: Allow operators to start ad-hoc schedules from the tablet."},"enableScheduleCutShort":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Cutting Schedules Short: Allow operators to end a schedule before its planned end."},"enableRejectProduction":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Rejecting Production: Allow operators to reject (scrap) produced units."},"enableEditPartsPerCycle":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Editing Parts Per Cycle: Allow operators to override the parts-per-cycle value on a schedule."},"enableScheduleStationFlexibility":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Schedule Station Flexibility: Allow schedules to run on any station within the group."},"enableSchedulingOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Scheduling Only: Restrict the station to scheduling only (no live production capture)."},"enableManualDowntime":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Allow Manual Downtime: Allow operators and API users to manually trigger downtime on a station, blocking production while active."},"enableAlwaysConnected":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Always Connected: Force this station to always show as connected, regardless of device signals. Useful for stations with no physical device. Inherits from parent level if not set."},"enableMeterOnly":{"type":["string","null"],"enum":["on","off","inherit",null],"description":"Meter Only: Meter Only: When true, this station represents a physical energy meter (e.g. a plant incomer). It only publishes electrical signals and is hidden from production views, rollups, and station pickers by default."},"accountId":{"type":"string"},"groupCode":{"type":"string","description":"Group: Assign the station to a group of stations."}},"required":["code","name","accountId","groupCode"],"additionalProperties":false}},"shifts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Shift Name: The name of this shift. Multiple shifts can share the same name for grouping purposes (e.g., 'Day Shift' for split periods like 09:00-12:00 and 13:00-17:00). Does not need to be unique."},"startHour":{"type":"number","minimum":0,"exclusiveMaximum":24,"description":"Start Hour: The start hour in the day of this shift as a decimal (0-24). Example: 14.5 represents 14:30 (2:30 PM), 9 represents 09:00, 17.25 represents 17:15"},"duration":{"type":"number","exclusiveMinimum":0,"maximum":24,"description":"Duration: Duration of the shift in hours as a decimal. Example: 8 for 8 hours, 4.5 for 4 hours 30 minutes"},"weekDay":{"type":"string","pattern":"^[1-7]$","description":"Week Day: The day of the week this shift starts on as a number string: 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday, 7 = Sunday"},"key":{"type":"string"},"shiftPatternCode":{"type":"string"}},"required":["name","startHour","duration","weekDay","key","shiftPatternCode"],"additionalProperties":false}}},"required":["code","name","plantCode","accountId","plantTimezone","stations","shifts"]}},"required":["isSuccess","result"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}},"delete":{"tags":["Station Group"],"parameters":[{"in":"path","name":"code","schema":{"type":"string","pattern":"^([a-zA-Z0-9-_]+)$","minLength":1,"maxLength":32},"required":true}],"responses":{"204":{"description":"204 No Content"},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/station-window":{"get":{"tags":["Station Window"],"parameters":[{"in":"query","name":"plantcode","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"rangecode","schema":{"type":"string"},"required":true},{"in":"query","name":"aggregatewindow","schema":{"type":"string"}},{"in":"query","name":"stationcodes","description":"Comma-separated list of Station Codes.","schema":{"type":"string","description":"Comma-separated list of Station Codes."}},{"in":"query","name":"skucodes","description":"Comma-separated list of SKU Codes.","schema":{"type":"string","description":"Comma-separated list of SKU Codes."}}],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"stationCode":{"type":"string"},"stationName":{"type":"string"},"stationGroupCode":{"type":"string"},"stationGroupName":{"type":"string"},"windows":{"type":"array","items":{"$ref":"#/components/schemas/StationWindow"}},"reliabilityData":{"type":"object","properties":{"runningsCount":{"type":"number"},"stopsCount":{"type":"number"},"totalRunningTime":{"type":"number"},"totalStoppedTime":{"type":"number"}},"required":["runningsCount","stopsCount","totalRunningTime","totalStoppedTime"]},"cycleTimeAnalysis":{"type":"object","properties":{"avg":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"quantity":{"type":"number"},"default":{"type":"number"},"stations":{"type":"array","items":{"type":"object","properties":{"stationCode":{"type":"string"},"stationName":{"type":"string"},"avg":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"quantity":{"type":"number"}},"required":["stationCode","stationName","avg","min","max","quantity"]}}},"required":["avg","min","max","quantity","stations"]},"oee":{"type":"object","properties":{"scheduleMs":{"type":"number","description":"The number of milliseconds spent on any schedule."},"scheduleLossMs":{"type":"number","description":"The number of milliseconds that were in shift, but not scheduled."},"schedulePerc":{"type":"number","description":"The ratio of scheduled to unscheduled time."},"productionScheduleMs":{"type":"number","description":"The number of milliseconds spent in a production schedule."},"productionScheduleLossMs":{"type":"number","description":"The number of milliseconds spent in a non-production schedule."},"productionSchedulePerc":{"type":"number","description":"The ratio of production to non-production scheduled time."},"availabilityMs":{"type":"number","description":"The number of milliseconds spent running (not in downtime)."},"availabilityLossMs":{"type":"number","description":"The number of milliseconds spend stopped (in downtime)."},"availabilityPerc":{"type":"number","description":"The ratio of running to stopped time (aka OEE Availability)."},"performanceMs":{"type":"number","description":"The number of milliseconds that should have been spent on the quantity produced (production count * ideal cycle time)."},"performanceLossMs":{"type":"number","description":"The number of milliseconds spent running, minus the idea time spent for the production output."},"performancePerc":{"type":"number","description":"OEE Performance."},"goodQualityCount":{"type":"number","description":"The number of good quality units produced."},"goodQualityLossCount":{"type":"number","description":"The number of bad quality units produced."},"goodQualityPerc":{"type":"number","description":"The ratio of good units to bad units aka OEE Quality."},"scheduledNonProduction":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"},"reasonBreadcrumb":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"}},"required":["code","description"]},"description":"The full reason hierarchy (root → leaf) for this stop, used to render a hierarchical reasons treetable."},"duration":{"type":"number"},"cost":{"type":"number"},"percent":{"type":"number"},"energy":{"type":"number"},"energyCost":{"type":"number"},"productionQuantity":{"type":"number"}},"required":["code","description","reasonBreadcrumb","duration","cost","percent","energy","energyCost","productionQuantity"]}},"stops":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"},"reasonBreadcrumb":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"description":{"type":"string"}},"required":["code","description"]},"description":"The full reason hierarchy (root → leaf) for this stop, used to render a hierarchical reasons treetable."},"duration":{"type":"number"},"cost":{"type":"number"},"percent":{"type":"number"},"energy":{"type":"number"},"energyCost":{"type":"number"},"productionQuantity":{"type":"number"}},"required":["code","description","reasonBreadcrumb","duration","cost","percent","energy","energyCost","productionQuantity"]}},"oee":{"type":"number"}},"required":["scheduleMs","scheduleLossMs","schedulePerc","productionScheduleMs","productionScheduleLossMs","productionSchedulePerc","availabilityMs","availabilityLossMs","availabilityPerc","performanceMs","performanceLossMs","performancePerc","goodQualityCount","goodQualityLossCount","goodQualityPerc","scheduledNonProduction","stops","oee"]},"nominal":{"type":"object","properties":{"electricalPowerNominalKw":{"type":"number"}},"required":["electricalPowerNominalKw"]},"utilisation":{"type":"object","properties":{"allTime":{"type":"object","properties":{"totalTime":{"type":"number","description":"Total considered time in milliseconds for this scope"},"productiveTime":{"type":"number","description":"Total productive time in milliseconds (sum of productiveMs across windows)"},"perc":{"type":"number","description":"Utilisation ratio: productiveTime / totalTime (0 to 1)"}},"required":["totalTime","productiveTime","perc"],"description":"All windows in the time range. No time windows excluded."},"shiftTime":{"type":"object","properties":{"totalTime":{"type":"number","description":"Total considered time in milliseconds for this scope"},"productiveTime":{"type":"number","description":"Total productive time in milliseconds (sum of productiveMs across windows)"},"perc":{"type":"number","description":"Utilisation ratio: productiveTime / totalTime (0 to 1)"}},"required":["totalTime","productiveTime","perc"],"description":"Only in-shift time. Out-of-shift windows are excluded from totalTime."},"scheduledProductionTime":{"type":"object","properties":{"totalTime":{"type":"number","description":"Total considered time in milliseconds for this scope"},"productiveTime":{"type":"number","description":"Total productive time in milliseconds (sum of productiveMs across windows)"},"perc":{"type":"number","description":"Utilisation ratio: productiveTime / totalTime (0 to 1)"}},"required":["totalTime","productiveTime","perc"],"description":"Only time covered by scheduled production. Non-production and out-of-shift windows are excluded from totalTime."}},"required":["allTime","shiftTime","scheduledProductionTime"]}},"required":["stationCode","stationName","stationGroupCode","stationGroupName","windows","reliabilityData","oee","nominal","utilisation"]}},"range":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"duration":{"type":"number"},"fromIso":{"type":"string"},"toIso":{"type":"string"},"durationFormatted":{"type":"string"}},"required":["from","to","duration","fromIso","toIso","durationFormatted"]}},"required":["isSuccess","results","range"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/station-window/sku":{"get":{"tags":["Station Window"],"parameters":[{"in":"query","name":"plantcode","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"rangecode","schema":{"type":"string"},"required":true},{"in":"query","name":"stationcodes","description":"Comma-separated list of Station Codes.","schema":{"type":"string","description":"Comma-separated list of Station Codes."}}],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"skuCode":{"type":"string"},"skuName":{"type":"string"},"windows":{"type":"array","items":{"$ref":"#/components/schemas/StationWindow"}},"cycleTimeAnalysis":{"type":"object","properties":{"avg":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"quantity":{"type":"number"},"default":{"type":"number"},"stations":{"type":"array","items":{"type":"object","properties":{"stationCode":{"type":"string"},"stationName":{"type":"string"},"avg":{"type":"number"},"min":{"type":"number"},"max":{"type":"number"},"quantity":{"type":"number"}},"required":["stationCode","stationName","avg","min","max","quantity"]}}},"required":["avg","min","max","quantity","stations"]}},"required":["skuCode","skuName","windows"]}},"range":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"duration":{"type":"number"},"fromIso":{"type":"string"},"toIso":{"type":"string"},"durationFormatted":{"type":"string"}},"required":["from","to","duration","fromIso","toIso","durationFormatted"]}},"required":["isSuccess","results","range"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/admin/user":{"get":{"tags":["User"],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"email":{"type":"string"},"userRole":{"type":"string","enum":["customer","oi","blocked","partner"]},"accounts":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["member","admin","blocked","read_only","supervisor"]},"accountId":{"type":"string"},"domain":{"type":"string"},"archivedAt":{"type":["string","null"]}},"required":["role","accountId","domain"]}}},"required":["id","email","userRole","accounts"]}}},"required":["isSuccess","results"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}},"post":{"tags":["User"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","minLength":1},"role":{"type":"string","enum":["member","admin","blocked","read_only","supervisor"],"description":"Role: "}},"required":["email","role"]}}}},"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"result":{"type":"object","properties":{"userId":{"type":"number"},"role":{"type":"string"},"accountId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["userId","role","accountId"]}},"required":["isSuccess","result"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}},"/admin/user/{email}":{"get":{"tags":["User"],"parameters":[{"in":"path","name":"email","schema":{"type":"string","format":"email","minLength":1},"required":true}],"responses":{"200":{"description":"200 OK","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"result":{"type":"object","properties":{"id":{"type":"number"},"email":{"type":"string"},"userRole":{"type":"string","enum":["customer","oi","blocked","partner"]},"accounts":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["member","admin","blocked","read_only","supervisor"]},"accountId":{"type":"string"},"domain":{"type":"string"},"archivedAt":{"type":["string","null"]}},"required":["role","accountId","domain"]}}},"required":["id","email","userRole","accounts"]}},"required":["isSuccess","result"]}}}},"400":{"description":"Bad Request - The server could not process the request due to invalid input, missing required parameters, or malformed syntax.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"invalidInput"},"errorMessage":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}},"required":["field","issue"]}}},"required":["isSuccess","errorCode"]}}}},"401":{"description":"Unauthorized - Authentication is missing or invalid. Ensure you provide a valid token or credentials to access this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"unauthorizedUser"}},"required":["isSuccess","errorCode"]}}}},"403":{"description":"Forbidden - You are authenticated but do not have permission to perform this action. Contact the administrator if you believe this is an error.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"forbidden"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"409":{"description":"Conflict - The request could not be completed due to a conflict with the current state of the resource, such as a duplicate record or a versioning issue.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"conflict"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}},"500":{"description":"Internal Server Error - An unexpected error occurred on the server. Please try again later or contact support if the issue persists.","content":{"application/json":{"schema":{"type":"object","properties":{"isSuccess":{"type":"boolean","default":false},"errorCode":{"type":"string","default":"internalServerError"},"errorMessage":{"type":"string"}},"required":["isSuccess","errorCode","errorMessage"]}}}}}}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY"}},"schemas":{"StationWindow":{"type":"object","properties":{"stationCode":{"type":"string","description":"A code that uniquely identifies this station within this account."},"windowStartAt":{"type":"string","description":"The start time of this window in ISO 8601 format."},"windowEndAt":{"type":"string","description":"The end time of this window in ISO 8601 format."},"totalMs":{"type":"number","description":"The total number milliseconds covered by this window. Shortcut for windowEndAt - windowStartAt."},"shiftMs":{"type":["number","null"],"description":"The number of milliseconds that were in shift."},"scheduledProductionMs":{"type":["number","null"],"description":"The number of milliseconds that were scheduled production."},"scheduledNonProductionMs":{"type":["number","null"],"description":"The number of milliseconds that were scheduled non-production."},"productiveMs":{"type":["number","null"],"description":"The number of milliseconds that the station was in a productive state, based on the station's productive status mode (productive signal, electrical usage, or line speed). Only counted during shift time."},"downtimeMs":{"type":["number","null"],"description":"The number of milliseconds that the station was in downtime."},"downtimeSince":{"type":["string","null"],"description":"The time this downtime started, in ISO 8601 format."},"rssiAvg":{"type":["number","null","null"],"description":"The received signal strength of the wireless device. -70dBm to -80dBm is good. <-90dBm is bad."},"productionGoodCount":{"type":["number","null"],"description":"The number of good quality units produced."},"productionBadCount":{"type":["number","null"],"description":"The number of bad quality units produced."},"productionIdealCount":{"type":["number","null","null"],"description":"The number of production units that should have been produced according to the SKU/part's cycle-time. WITH consideration for downtime."},"productionTargetCount":{"type":["number","null"],"description":"The number of production units that should have been produced according to the SKU/part's cycle-time. WITHOUT consideration for downtime."},"speed":{"type":["number","null"],"description":"The average line speed. Line speed is an arbitrary value that relates to this station's manufacturing process. i.e. Motor RPM."},"isAlive":{"type":["boolean","null"],"description":"A boolean value indicating if any signal was recieved from this station. Useful for detemining if the device has been disconnected from the network."},"electricalVoltsAvg":{"type":["number","null"],"description":"The average voltage of the electrical supply."},"electricalAmpsAvg":{"type":["number","null"],"description":"The average current draw."},"electricalHzAvg":{"type":["number","null"],"description":"The average frequency of the electrical supply."},"electricalPfAvg":{"type":["number","null"],"description":"The average Power Factor."},"electricalKwAvg":{"type":["number","null"],"description":"The average power used."},"electricalKwh":{"type":["number","null"],"description":"The total energy consumed."},"statusCode":{"type":["string","null"],"description":""},"electricalCost":{"type":["number","null"],"description":"The cost of the electricity used."},"costCurrency":{"type":["string","null"],"description":"The currency of any costs."},"electricalCo2":{"type":["number","null"],"description":"The amount of CO2 associated with the electricity used."},"operatorInitials":{"type":"string","description":"The initials of the operator at the station."},"lostProductionCostNonProduction":{"type":["number","null"],"description":"The cost of the time lost to scheduled non-production."},"lostProductionCostDowntime":{"type":["number","null"],"description":"The cost of the time lost to downtime."},"lostProductionCostSpeed":{"type":["number","null"],"description":"The cost of the shortfall units lost due to under performance."},"lostProductionCostQuality":{"type":["number","null"],"description":"The cost of the bad quality units produced."},"performanceModeFrom":{"type":["string","null"],"description":""},"performanceModeType":{"type":["string","null"],"description":""},"productionGoodValue":{"type":["number","null"],"description":"The value of the good quality units produced."},"productionBadValue":{"type":["number","null"],"description":"The value of the bad quality units produced."},"stationName":{"type":"string","description":"The name of the station."},"scheduleIds":{"type":"array","items":{"type":"number"},"description":"The IDs of the schedules that ran."},"workOrderReferences":{"type":"array","items":{"type":"string"},"description":"The WO refs of the schedules that ran."},"errorCodes":{"type":"array","items":{"type":"string"},"description":"The error codes that were flagged."},"downtimeIds":{"type":"array","items":{"type":"number"},"description":"The IDs of the downtimes that occured."},"downtimeReasonCodes":{"type":"array","items":{"type":"string"},"description":"The reason codes of the downtimes that occured."},"nonProductionReasonCodes":{"type":"array","items":{"type":"string"},"description":"The reason codes for the non-production schedules that ran."},"windowStartAtTimestamp":{"type":"number","description":"The start time of this window as a UNIX timestamp."},"windowEndAtTimestamp":{"type":"number","description":"The end time of this window as a UNIX timestamp."},"isFuture":{"type":"boolean","description":"A boolean value indicating if this is a placeholder station window for future time."},"skuNames":{"type":"array","items":{"type":"string","description":"The name of the SKUs from the current schedule."}},"skuCodes":{"type":"array","items":{"type":"string"},"description":"The code of the SKUs from the schedules that ran."},"shiftNames":{"type":"array","items":{"type":"string"},"description":"The shift names during this time."},"lostProductionCostTotal":{"type":"number","description":"The total cost of lost production output."},"productionTotalCount":{"type":"number","description":"The total number of units produced, both good and bad."},"productionRatePerHour":{"type":"number","description":"The average rate of production in units per hour."},"productionRatePerHourIdeal":{"type":"number","description":"The ideal rate of production in units per hour."},"productionMs":{"type":"number","description":"The ideal time in milliseconds for the production actually achieved: (productionTotalCount / productionIdealCount) * totalMs."},"nonProductionReasonNames":{"type":"array","items":{"type":"string"}},"downtimeReasonCodesDetail":{"type":"object","additionalProperties":{"type":"object","properties":{"productionIdealCount":{"type":["number","null","null"],"description":"The number of production units that should have been produced according to the SKU/part's cycle-time. WITH consideration for downtime."},"downtimeMs":{"type":["number","null"],"description":"The number of milliseconds that the station was in downtime."},"lostProductionCostDowntime":{"type":["number","null"],"description":"The cost of the time lost to downtime."},"electricalCost":{"type":["number","null"],"description":"The cost of the electricity used."},"electricalKwh":{"type":["number","null"],"description":"The total energy consumed."}}}},"nonProductionReasonCodesDetail":{"type":"object","additionalProperties":{"type":"object","properties":{"scheduledNonProductionMs":{"type":["number","null"],"description":"The number of milliseconds that were scheduled non-production."}}}}},"required":["windowStartAt","windowEndAt","totalMs","isAlive","windowStartAtTimestamp","windowEndAtTimestamp"]},"ManifestReason":{"type":"object","properties":{"code":{"type":"string","description":"Unique reason code used to reference this reason (e.g., 'MAINTENANCE', 'BREAKDOWN', 'PLANNED-PM'). Must be unique within the account."},"description":{"type":"string","description":"Human-readable description of this reason (e.g., 'Planned maintenance', 'Equipment breakdown', 'Material shortage')"},"type":{"type":"array","items":{"type":"string","enum":["downtime","non-production","quality"]},"minItems":1,"description":"Array of reason types this code applies to. Options: 'downtime' (for unplanned stoppages), 'non-production' (for planned activities), 'quality' (for bad/rejected production). A reason can have multiple types. Example: ['downtime'], ['non-production'], ['downtime', 'non-production']"},"requireNotes":{"type":"boolean","description":"Require Notes: When enabled, operators must enter notes before the reason can be confirmed. Only applies when the reason is assigned to a downtime. Omit the field to inherit the nearest ancestor reason's setting; set false to explicitly opt out of an inherited true."},"reasons":{"type":"array","items":{"$ref":"#/components/schemas/ManifestReason"},"description":"Optional array of child reasons that are subcategories of this reason. Used to create hierarchical reason structures (e.g., 'Maintenance' → 'Preventive Maintenance' → 'PM Check')."}},"required":["code","description","type"],"additionalProperties":false}}}}