Planning API
The Planning API manages weekly production planning, including order scheduling, personnel assignments, and deviation tracking against planned vs. actual execution.Authentication
- Read operations:
VIEW_PRODUCTIONpermission - Planning operations:
ASSIGN_OPERATIONSpermission - Deviation tracking:
MANAGE_PRODUCTIONpermission
Get Weekly Plan
VIEW_PRODUCTION
Retrieves the production plan for a specific week.
Path Parameters
Year (e.g., 2026)
ISO week number (1-53)
Response
Plan ID
Year
Week number
Plan state: Borrador, Publicado
Planned production orders for the week
Personnel assignments for the week
Example Request
cURL
JavaScript
Example Response
404 Response
If no plan exists for the specified week:
Create Plan
ASSIGN_OPERATIONS
Creates a new weekly production plan.
Request Body
Year
ISO week number (1-53)
Response
Returns the newly created plan object with statusBorrador.
Example Request
cURL
Assign Order
ASSIGN_OPERATIONS
Assigns a production order to a specific day, shift, and process.
Request Body
Plan ID
Production order ID
Process ID (1-9)
Shift: T1, T2, or T3
Day of week (1=Monday, 7=Sunday)
Planned production quantity
Example Request
cURL
Update Order Assignment
ASSIGN_OPERATIONS
Updates an existing order assignment.
Request Body
Assignment ID
Plan ID
Delete Order Assignment
ASSIGN_OPERATIONS
Removes an order from the plan.
Request Body
Assignment ID to delete
Plan ID
Assign Personnel
ASSIGN_OPERATIONS
Assigns a person to a process, shift, and day.
Request Body
Plan ID
Person ID
Process ID
Shift: T1, T2, T3
Day of week (1-7)
Example Request
cURL
Update Personnel Assignment
ASSIGN_OPERATIONS
Updates an existing personnel assignment.
Delete Personnel Assignment
ASSIGN_OPERATIONS
Removes a personnel assignment from the plan.
Publish Plan
ASSIGN_OPERATIONS
Publishes a plan, making it visible to production operators and locking further modifications.
Request Body
Plan ID to publish
Business Rules
- Once published, a plan cannot be unpublished (create a new plan instead)
- Published plans are used by the Bitácora system for shift inheritance
- All personnel and order assignments should be finalized before publishing
Example Request
cURL
Record Deviation
MANAGE_PRODUCTION
Records a deviation from the planned schedule.
Request Body
Plan ID
Bitácora ID where deviation occurred
Order ID affected
Process ID
Deviation reason ID (from motivos catalog)
Originally planned quantity
Actual produced quantity
Additional comments or context
Example Request
cURL
Get Deviation Reasons
VIEW_PRODUCTION
Returns the catalog of deviation reasons.
Example Response
Get Deviations
VIEW_PRODUCTION
Returns all deviations for a specific shift.
Query Parameters
Bitácora ID
Get Plan KPIs
VIEW_PRODUCTION
Calculates performance metrics for a completed week.
Path Parameters
Plan ID
Response
Overall plan fulfillment percentage (0-100)
Total planned production across all orders
Total actual production
Number of orders meeting 100% target
Total orders in plan
Number of deviations recorded
Fulfillment breakdown by process
Example Response
Planning Workflow
Best Practices
Capacity Validation: Ensure planned quantities are realistic given:
- Machine capacity and availability
- Personnel skill levels and availability
- Material lead times
- Maintenance schedules
Related Endpoints
- Bitácora API - Shift execution against plan
- Production Orders - Order management
- Personnel API - Personnel management