{
 "openapi": "3.1.0",
 "info": {
  "title": "Capacity Schedules (Supply Chain)",
  "version": "20261030b",
  "description": "One board: this set of resources, over this window. A factory schedule, a work center schedule and a vehicle schedule are the same document with a different resource kind on it."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "schedules": {
    "type": "object",
    "required": [
     "name",
     "horizon_from",
     "horizon_to"
    ],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "schedule_no": {
      "type": "string",
      "description": "Schedule no",
      "readOnly": true
     },
     "name": {
      "type": "string",
      "description": "Name"
     },
     "schedule_type": {
      "type": "string",
      "description": "Type"
     },
     "supply_plan_id": {
      "type": "string",
      "format": "uuid",
      "description": "Supply plan"
     },
     "warehouse_id": {
      "type": "string",
      "format": "uuid",
      "description": "Warehouse"
     },
     "location_id": {
      "type": "string",
      "format": "uuid",
      "description": "Location"
     },
     "horizon_from": {
      "type": "string",
      "format": "date-time",
      "description": "Board from"
     },
     "horizon_to": {
      "type": "string",
      "format": "date-time",
      "description": "Board to"
     },
     "bucket_minutes": {
      "type": "integer",
      "description": "Bucket (minutes)"
     },
     "resource_ids": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "description": "Resource ids",
      "readOnly": true
     },
     "method": {
      "type": "string",
      "description": "Built by",
      "enum": [
       "manual",
       "forward",
       "backward",
       "finite_forward",
       "finite_backward",
       "optimizer",
       "imported"
      ]
     },
     "sequencing_rule": {
      "type": "string",
      "description": "Sequenced by"
     },
     "entry_count": {
      "type": "integer",
      "description": "Entry count",
      "readOnly": true
     },
     "late_count": {
      "type": "integer",
      "description": "Late count",
      "readOnly": true
     },
     "total_setup_minutes": {
      "type": "string",
      "format": "decimal",
      "description": "Total setup minutes",
      "readOnly": true
     },
     "total_run_minutes": {
      "type": "string",
      "format": "decimal",
      "description": "Total run minutes",
      "readOnly": true
     },
     "makespan_minutes": {
      "type": "string",
      "format": "decimal",
      "description": "Makespan minutes",
      "readOnly": true
     },
     "utilization_pct": {
      "type": "string",
      "format": "decimal",
      "description": "Utilization pct",
      "readOnly": true
     },
     "published_at": {
      "type": "string",
      "format": "date-time",
      "description": "Published at",
      "readOnly": true
     },
     "published_by": {
      "type": "string",
      "format": "uuid",
      "description": "Published by",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "notes": {
      "type": "string",
      "description": "Notes"
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "xf_text_1": {
      "type": "string",
      "description": "Xf text 1",
      "readOnly": true
     },
     "xf_text_2": {
      "type": "string",
      "description": "Xf text 2",
      "readOnly": true
     },
     "xf_text_3": {
      "type": "string",
      "description": "Xf text 3",
      "readOnly": true
     },
     "xf_text_4": {
      "type": "string",
      "description": "Xf text 4",
      "readOnly": true
     },
     "xf_text_5": {
      "type": "string",
      "description": "Xf text 5",
      "readOnly": true
     },
     "xf_num_1": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 1",
      "readOnly": true
     },
     "xf_num_2": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 2",
      "readOnly": true
     },
     "xf_num_3": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 3",
      "readOnly": true
     },
     "xf_date_1": {
      "type": "string",
      "format": "date",
      "description": "Xf date 1",
      "readOnly": true
     },
     "xf_date_2": {
      "type": "string",
      "format": "date",
      "description": "Xf date 2",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Updated at",
      "readOnly": true
     },
     "updated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Updated by",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/scm/schedules": {
   "get": {
    "summary": "list schedules",
    "operationId": "list_schedules_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create schedules",
    "operationId": "create_schedules_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/schedules/{id}": {
   "get": {
    "summary": "get schedules",
    "operationId": "get_schedules_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change schedules",
    "operationId": "change_schedules_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete schedules",
    "operationId": "delete_schedules_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/schedules/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_schedules_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/schedules/{id}/sequence": {
   "post": {
    "summary": "Sequence",
    "operationId": "action_schedules_0_6",
    "description": "Body keys: source, respectDependencies",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/schedules/{id}/move": {
   "post": {
    "summary": "Move",
    "operationId": "action_schedules_0_6",
    "description": "Body keys: entryId*, plannedStart, resourceId, pin, cascade",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/schedules/{parentId}/entries": {
   "get": {
    "summary": "Entries",
    "operationId": "action_schedules_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Entries",
    "operationId": "action_schedules_1_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/schedules/{parentId}/entries/{lineId}": {
   "put": {
    "summary": "Entries",
    "operationId": "action_schedules_0_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Entries",
    "operationId": "action_schedules_1_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}